Posts

Showing posts from June, 2015

gis - leaflet.draw with CartoDB -

i new leaflet.js , cartodb.js. trying create editable webmap, sourcing (and writing) data cartodb sql tables. can render map cartodb, when add links leaflet.js map layers disappear. js fiddle shows this. if comment out lines 5 , 6, works: <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> you don't need add leaflet library's javascript , stylesheet when using cartodb, include leaflet draw's assets, enable drawcontrol option in options of l.map , you're go: assets: <link type="text/css" rel="stylesheet" href="http://leaflet.github.io/leaflet.draw/leaflet.draw.css" /> <script type="text/javascript" src="http://leaflet.github.io/leaflet.draw/leaflet.draw.js"></script> map: new l.map('cartodb-map', { center: [40,-98], zoom: 4, drawcontrol: true }); here's fork of fiddle: http://jsfiddle.net/...

java - Cannot build JavaFX application using Ant -

i need create build file ant build javafx project, have searched lot, nothing helped me. still show errors compiles. when tries run jar file - exceptions. have tried different paths, still nothing. here build.xml. <?xml version="1.0" encoding="utf-8" ?> <project name="jdbc ant project" default="default" basedir="." xmlns:**fx="javafx:com.sun.javafx.tools.ant"**(uri not registered)> <property name="src.dir" location="src"/> <property name="build.dir" location="classes"/> <property name="out.dir" location="out"/> <property name="docs.dir" location="docs"/> <property name="bin.dir" location="bin"/> <property name="lib.dir" location="lib"/> <property name="jar.name" value="javafxtest.jar"/> <p...

python - REST/Database caching in Django -

i'm having following scheme of project. every 4 hours download data source, deserialise , store database. @ same time, whole day round sort of client retrieve data database. i have no downtimes while updating database. i've asked similar question before ( django use 2 databases seamless updates ), i'm learned caching , think 2 databases real over-engineering. what best option in django create caches database or/and request (i use django-rest-framework it)? i suppose question not opinional @ all, i'm searching correct way perform in django.

Either PHP convert JSON values to have keys or PostgreSQL assign values to keys -

i need store text (rows have own separate date). either... 1. how read (either of) following value(s) in php array can iterate on via foreach loop? ... or ... 2. how insert into table value assigned key (which not clarified @ in postgresql documentation)? {".022 x 2.031"} {".012 x 3.621"} so have single measurement values (to treated text purely records) formatted first format above. try convert row data in php , invalid argument supplied foreach() following: $array = json_decode($row1['material_size']); foreach ($array $k1) {echo $k1;} so after doing more searching , reading decided see if convert data via postgresql directly: select array_to_json(material_size) material_size table; now array data correctly... $array = json_decode($row1['material_size']); print_r($array); array ( [0] => .022 x 2.031 )

ftp - wget trouble, explicit encryption -

i cant access server explicit encryption. example: wget --secure-protocol=sslv3 --no-proxy --passive-ftp ftp://username:password@host:port/folder/file.pdf response: logging in username ... the server refuses login. retrying. can me it? in advance. try alternate parameter syntax --ftp-user , --ftp-password therefore: wget --secure-protocol=sslv3 --no-proxy --passive-ftp --ftp-user=username --ftp-password=password ftp://host:port/folder/file.pdf

html - PHP and MySQL query based on user input not working -

i creating users database there 4 fields: id, username, password, , occupation. test database. tried querying db table , worked have lot of trouble having user input , mysql query based off of it. run apache server in linux (debian, ubuntu). i have 2 pages. first 1 bare-bone test index page. there textboxes people input easy info register info in db. here code it: <html> <form action="reg.php" method="post"> username: <input type="text" name="u">password: <input type="password" name="p">occupation: <input type="text" name="o"> <input type="submit" value="register"> </form> </html> after submit button clicked. goes reg.php file. gets complicated. page goes blank!!! nothing displayed or inputted in db. normal queries work well, when user interaction added, wrong. here code reg.php: <?php $...

ios - Linker error in Xcode? -

Image
i getting weird error when attempt run app on simulator. error within following code/file. (i unsure of called): undefined symbols architecture i386: "_main", referenced from: implicit entry/start main executable ld: symbol(s) not found architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation) there 2 parts of error above highlighted in red; "_main", referenced from: , linker command failed exit code 1 (use -v see invocation) . i have never encountered error before. therefore, unable fix it. here code in case necessary: class viewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() } override func didreceivememorywarning() { super.didreceivememorywarning() } @iboutlet weak var strwordvalue: uilabel! @iboutlet weak var strinputfield: uitextfield! func textfieldshouldreturn(textfield: uitextfield) -> bool{ textfield.resignfirstresponder() let word = textfield.text ...

How to implement Trapezoidal Integration with Infinite Limits in C? -

i trying create c program integrate sin(x)/sqrt(x) between 0 , infinity. using trapezium rule cutting off end points function tends infinity. however total returned high , not sure why. here's code: #include<math.h> #include<stdio.h> double func(double u) { double a; = ((sin(u))/(sqrt(u))); return a;} void main() { int i, n; double sum, u, a, b, h, fa, fb, f; printf("enter value of n\n"); scanf("%d" ,&n); a=0.01; b=1000; h=(b-a)/(n-1); sum=0; f=func(a); u=a; for(i=0; i<n; i++) { sum=sum+f; u=u+h; f=fabs(func(u)); } fa=func(a); fb=func(b); sum=sum-(0.5*fa)-(0.5*fb); sum=sum*h; printf("i: %lf\n", sum); } any thoughts? working example: http://ideone.com/xibrov just remove fabs in line f=fabs(func(u)); . and should use int main(void) , return 0; @ end instead of void main() .

Undo many times in Vim? -

suppose state in document, make change b, c d. typed 'u', state goes c. type 'u' again goes d. (the second undo looks redo me). in understanding, undo means undo once return c, undo again return b undo again return a. also, know 'u3' can work here in cases have no way keep track of number of state changes. how can achieve unlimited undo in vim? you have 1 level of undo if in vi compatible mode. missing out on number of features being in 'compatible' mode. create ~/.vimrc file , automatically disable 'compatible' mode. what wonderful undo features using 'nocompatible' ? unlimited undo persistent undo undo branches (like undo tree)

angularjs - Prevent Angular from toggling ng-view size -

Image
i have specific issue way ng-view renders templates. whenever partial rendered, div ng-view attribute slides , again renders compiled template. tried using ngcloak follows: <div ng-view autscroll="true"> <!--partials rendered here--> </div> partial.html <div class="some-class" ng-cloak> </div> for better illustration: pre render post render here dark part footer that's static across pages along red header. how prevent jumping?

ios - How can I check that a label has fallen off the screen? -

i have question uikit dynamics. let's i'm designing interactivity, , when user taps, want label text fall off screen (at point, i'll destroy it, , new label spawn , fall top, snap center, , when user taps, falls off screen, , on goes.) import uikit class viewcontroller: uiviewcontroller { var mylabel: uilabel! var gravity: uigravitybehavior! var animator: uidynamicanimator! override func viewdidload() { super.viewdidload() mylabel = uilabel(frame: cgrect(x: 100, y: 100, width: 100, height: 100)) mylabel.backgroundcolor = uicolor.bluecolor() mylabel.text = "some sample text." view.addsubview(mylabel) animator = uidynamicanimator(referenceview: view) gravity = uigravitybehavior(items: [mylabel]) animator.addbehavior(gravity) } the code above spawn uilabel , make drop off screen. understand how of that. however, i'm @ loss concerning how determine whether or when label has fallen view, @ point removedfromsuperview, , ...

ios - Is it possible to have different table view cell row heights for different size classes? -

i developing app adaptive layout , works far except need have adaptive table view cell heights. using storyboard , not see way this. mission impossible? if i'm understanding question correctly, want have cell height adjust different font sizes using size classes; have bigger font on bigger size screen cause cells adjust accordingly. think way have different text views installed particular size classes. i made test app demonstrates this. in storyboard, added table view controller custom cell. changed size class wcompact hany , added text view (iboutlet: labelphone) cell. pinned 4 sides of cell, disabled scrolling, made text red, , sized font 8. changed size class wregular hany , , added text view (iboutlet: labelpad) cell same constraints , green text of font size 30. code in table view controller follows, - (void)viewdidload { [super viewdidload]; self.tableview.rowheight = uitableviewautomaticdimension; self.tableview.estimatedrowheight = 50; } -(vo...

Playing youtube video in vaadin MediaComponent(Mediaelementjs Player add on) -

i trying play youtube video in vaadin mediacomponent. did externalresource externalresource = new externalresource(formaturl(url)); externalresource.setmimetype(mediacomponent.type.video.name().tolowercase()); mediacomponent videoplayer = new mediacomponent(mediacomponent.type.video); videoplayer.setwidth(665.0f, unit.pixels); videoplayer.setheight(465.0f, unit.pixels); videoplayer.setsource(externalresource); videoplayer.play(); csslayout.addcomponent(videoplayer); if define other url, i.e. new externalresource("pathtomp4.mp4") works perfectly. so, "special" youtube videos? suggestion doing wrong? cheers, simon mp4 file provided actual video can converted stream played vaadin media player. if tried url of youtube video, used url of youtube page video embedded, not vide , cannot converted stream used vaadin media player. you can either embedd actual youtube video on web page or use vaadin add-on designed play youtube vide...

database - mysql primary key,is it a hash index or b-tree? -

the primary key automaticlly created , has index type "primary". hash or b-tree. cos b-tree rangeable , hash not. so, if "primary" b-tree can query range selection. unless you're using memory access method, mysql indexes organized btrees , can suitable range scan queries.

python 2.7 - How to find the position of letters in a list of words? -

in list of words : acquired almanac insult joke hymn gazelle amazon eyebrows affix vellum for e.g.:how find position of 'a'; 'a' def find_a(input): i, c in enumerate(input): if c == 'a': yield will return character position of as

javascript - What is diference? -

this question has answer here: do recommend using semicolons after every statement in javascript? 11 answers i begginer in javascript, need theoretical explanation. what's mean ; behind } , why must put there? when work in php don't need put ; after function {} in case. var orangecost = function(price) { var quantity = 5; console.log(quantity * price); }; orangecost(5); i want know code or not because can't desired result in case: var orangecost = function(price) { var quantity = 5; console.log(quantity * price); } orangecost(5); when assign function variable, it's other assignment. var amethod = function() { /*...*/ }; var anumber = 123; in both cases, semicolons @ end optional. it's recommended add them avoid statements accidentally being combined if newline removed (say, during process of concatenating sour...

java - Mocking config with spring boot isn't picking up property files -

i trying write integrationflow test. goes this: jms(in) -> (find previous versions in db) -> reduce(in,1...n) -> (to db) -> jms(out) so, no suprise: want mock db calls; dao beans. but, want pickup other beans through component scan; selectively scan packages except dao. create test config , mock daos. no problem follow spring boot instructions testing component scanned beans. no problem i want verify sequence of steps , resultant output outbound jms queue see it. can me fill in blanks? this cant tough! use of mocks seems problematic because plenty of essential fields final. reading everywhere , not coming clear path. inherited code btw my error: org.springframework.integration.messagedispatchingexception: dispatcher has no subscribers here code @configuration @importresource("classpath:retry-context.xml") public class lifecycleconfig { @autowired private messageproducersupport inbound; @autowired private messageh...

node.js - 'this' undefined in npm package -

i trying authenticate google through oauth2, , using googleapis npm package. this, creating small local package use in project: package.js npm.depends({ "googleapis": "2.0.1" }); package.describe({ name: 'google-tokens', summary: 'library requesting google api tokens', version: '0.0.1' }); package.onuse(function (api) { api.use(['underscore', 'http', 'service-configuration', 'oauth', 'accounts-oauth'], ['client', 'server']); api.addfiles('lib/tokens_client.js', 'client'); api.addfiles('lib/tokens_server.js', 'server'); api.export(['tokens']); }); tokens_server.js (package) tokens = (function() { google = npm.require('googleapis'); oauth2client = google.auth.oauth2; var = {}; my.fetchtokens = function(code) { var clientid = meteor.settings.google.client_id; var clientsecret = m...

c++ - Problems with std::stoi, not working on MinGW GCC 4.7.2 -

Image
#include <iostream> #include <string> int main() { std::string test = "45"; int myint = stoi(test); std::cout << myint << '\n'; } i tried code on computer running mingw gcc 4.7.2. gives me error: what doing wrong, got cppreference . exact same code. , different error 1 described here . it seems mingw needs patch: enabling string conversion functions in mingw this patch enables following list of c++11 functions , templates in std namespace: stoi, stol, stoul, stoll, stof, stod, stold, to_string, to_wstring in above link, there .zip file, download and copy wchar.h , stdio.h include directory in zip file following directory (overwrite): c:\mingw\include (replace c:\mingw\ appropriate directory) copy os_defines.h following directory (overwrite): c:\mingw\lib\gcc\mingw32\4.7.0\include\c++\mingw32\bits (replace c:\mingw\ appropriate directory) (replace 4.7.0 correct version number)

java - Static block execution before main method -

this question has answer here: static initializer in java 9 answers does static block of class execute before main method of same class? example: public class example { static { system.out.println("hi"); } public static void main(string[] args) { system.out.println("bye"); } } the output of program : hi bye my doubt why output not: bye java run static intializers of class before method called (or instance created). jls, section 12.4.1 , states: a class or interface type t initialized before first occurrence of 1 of following: t class , instance of t created. a static method declared t invoked. a static field declared t assigned. a static field declared t used , field not constant variable (§4.12.4). t top level class (§7.6) , assert statement (§14...

javascript - how to echo data as it is in the DB the same format? -

i developing web application data in database " 10 functions touch control lcd display electric programmer with: minute minder, automatic start automatic end of cooking end cooking acoustic alarm additional menu programmes: showroom mode limited power consumption mode ecologic (nominal power < 2.3 kw) locking function (child safety lock) electronic temperature control rapid pre-heating temperature range: 30-280 °c large 72 litres cavity (+ 35% volume) 5 cooking levels " as see data in db formatted each 1 in line when data db using php , echo it appear paragraph not each data in line ...and want data echoed above format should do? i have data not stored in useful/sensible way, if has newline @ end of every line need convert newline's html understands, <br> tags. so try this echo nl2br($database_column_value);

c# - Ellipse position according to grid layout -

Image
i'm facing elements' positioning problem in wp 8.1 app (xaml/c#). i've read create flexible layout, should use grid control. well, here xaml within page element: <grid style="{staticresource layoutgridcreateprofilstyle}"> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition height="auto"/> <rowdefinition height="auto"/> <rowdefinition height="*"/> </grid.rowdefinitions> <rectangle grid.row="0" height="60" fill="#f3a8e4f9" ></rectangle> <rectangle grid.row="1" height="40" fill="gray"></rectangle> <listbox grid.row="2" height="420" background="transparent"/> <canvas grid.row="3"> <ellipse height="100" margin="0,0,0,0" width="100" fil...

java - Google Cloud Datastore - Inequality returning "no matching index found" -

in android studio , i'm trying use google clood datastore android app. with google example https://cloud.google.com/datastore/docs/concepts/indexes#datastore_indexes_and_properties able add tom (32 years old) , lucy (30 years old) person , children of company acme. can see these 2 entries in datastore in google developers console. i can retrieve children company acme if set query filter below. key acmekey = makekey("company", "acme").build(); makefilter("__key__", propertyfilter.operator.has_ancestor, makevalue(acmekey)).build())); if want retrieve person age equal 32 add filter above makefilter("age", propertyfilter.operator.equal, makevalue(32)).build() then, person tom. but, if, instead of operator.equal put inequality filter operator.less_than or operator.greater_than error " no matching index found ". i think it's problem of indexes, don't understand how can set index. use androi...

java - How would I add a return statement for this, and how do I call the method? -

public class inputfiledata { /** * @param inputfile file giving data electronic * equipment supplier’s product range * @return array of product details * @throws ioexception */ public static product [] readproductdatafile(file inputfile) throws ioexception { // code goes here (input data text file , sort arraylists) } readproductdatafile used read text file, , store in array of type product[] . code provided cannot changed, need way works code. i've managed make file reading , sorting array lists work in different class, running in way giving me couple of problems: 1) can't call readproductdatafile method main class, if can't find method (it's in correct package). 2) can't figure out how format return statement, i've tried lots of different things can't see how store array type product[] . i haven't provided lot of specific code far because don't want answer handed me on platter (this part of assignment don't want other people...

recursion - Appending two lists on Ocaml -

so 1 way append 2 lists: let rec append l1 l2 = match l1 | h :: t -> h :: append t l2 | [] -> l2 but trying write tail-recursive version of append. (solve problem before calling recursive function). this code far, when try add append in first if statement code becomes faulty weird reasons. let list1 = [1;2;3;4] let list2 = [5;6;7;8] let rec append lista listb = match listb | h :: taillist -> if taillist != [] begin lista @ [h]; (* cant put append recursive call here because causes error*) end else append lista taillist; | [] -> lista;; append list1 list2;; any appreciated, thanks. the easiest way transform non tail-recursive list algorithm tail-recursive one, use accumulator. consider rewriting code using third list, accumulate result. use cons (i.e., :: ) prepend new elements third list, have result of concatenation. next, need reverse list.rev et voila.

hibernate - JPA MappedSuperClass -

i using @mappedsuperclass in hibernate project: @mappedsuperclass public abstract class abstracthotel extends abstractdata { protected string id; protected string name; protected string type; .... } @entity @table(name = "t_hotel") public class hotel extends abstracthotel { @attributeoverride(name = "id", column = @column(name = "hotel_id")) protected string id; @attributeoverride(name = "name", column = @column(name = "hotel_name")) protected string name; @attributeoverride(name = "type", column = @column(name = "hotel_type")) protected string type; ... } as shown, want column can overrideed in subclass, error: org.hibernate.mappingexception: duplicate property mapping of id found in cn.test.hotel is possible fix this? you should not define fields again in child class : check out : https://stackoverflow.com/a/5258090/286588

python - Invalid Syntax ; probably simple to fix -

this part of code doesn't work. says "there's error in code: invalid syntax." edit: part of code broken: in range(0, len(marks)): def histogram(data): def getfrequency(marks): freqlist = [] in range(0,101): freqlist.append(0) in range(0, 101): starslist = [] in range(0, data[i]): starslist.append("*") pad if data[i] < 10: pad = " " elif data[i] < 100: stars = "" .join(starslist) print("%d | %s %d" %(i, starslist) in range(0, len(marks)): mark = marks[i] freqlist[mark] += 1 return freqlist freq = getfrequency(marks) mode = maximum(freq) #print (freq) this rest of code (which above part error). may or may not riddled errors. put here in case relevant. import random def bubblesort(data): count = 0 in range(0,len(data) - 1): j in range(0, len(data) - 1): count += 1 if data[j] > data[j+...

sublimetext3 - How to set key-bindings in Sublime that change values of settings? -

i'm looking bind "alt+f11" binding toggle "draw_centered", centers text in distraction-free mode. i'm not sure how work though. heres keybinds far: //if draw_centered == true, set false { "keys": ["alt+f11"], "command": "set_setting", "args": { "setting": "draw_centered", "value": "true", }, "context": [ { "key": "setting.draw_centered", "operator": "equal", "operand": false} ] }, //if draw_centered == false, set true { "keys": ["alt+f11"], "command": "set_setting", "args": { "setting": "draw_centered", "value": "false", }, "context": [ { "key": "setting.draw_centered", "operator": "eq...

c# - How do I deserialise this JSON? -

i haven't done json before... missing step. here example of json want deserialise: {"item":{"icon":"http://services.runescape.com/m=itemdb_rs/4765_obj_sprite.gif?id=4798","icon_large":"http://services.runescape.com/m=itemdb_rs/4765_obj_big.gif?id=4798","id":4798,"type":"ammo","typeicon":"http://www.runescape.com/img/categories/ammo","name":"adamant brutal","description":"blunt adamantite arrow...ouch","current":{"trend":"neutral","price":237},"today":{"trend":"neutral","price":0},"members":"true","day30":{"trend":"positive","change":"+1.0%"},"day90":{"trend":"negative","change":"-0.0%"},"day180":{"trend":"positive...

Moving Spring Accessing Data with JPA getting started guide to something more complex -

i able sample application running on machine directly website: https://spring.io/guides/gs/accessing-data-jpa/ . this sample application gets started simple implementation of h2 embedded database. it requires 2 dependencies run: dependencies { compile("org.springframework.boot:spring-boot-starter-data-jpa") compile("com.h2database:h2") testcompile("junit:junit") } the repository declared here reference: package hello; import java.util.list; import org.springframework.data.repository.crudrepository; public interface customerrepository extends crudrepository<customer, long> { list<customer> findbylastname(string lastname); } this repository autowired configuration. files contained in same package/directory. i'm assuming spring smart enough instantiate correct instance of bean implementing customerrepository provides right connections h2database. i'm not sure how done here, works. the code here: package he...

http - Are there performance advantages in http2 over http1.1 for service-to-service communication? -

i'm curious if i'm missing in http2 make more efficient in service-to-service communication, example in microservice architecture. are improvements related end-users (browsers)? if issuing many concurrent requests between microservices, there's benefit connection multiplexing . not need manage tcp connection pools on client, , restrict number of incoming tcp connections @ service side. some services might benefit server push, though depends on service does. headers compression can useful if have high traffic volumes service repeated meta-data. more information can found here . in summary, yes, designed more end users in mind, there's value restful microservices well, due connection multiplexing.

Recode bytes which cannot be decoded in utf-8 in python -

reading in txt files - there 1 byte causing me issues encode: open(input_filename_and_director, 'rb') f: r = unicodecsv.reader(f, delimiter="|") results in error message: unicodedecodeerror: 'utf8' codec can't decode byte 0xc3 in position 26: invalid continuation byte is there anyway specify how want these bytes handled (i.e. read byte in character?) depending upon want, try using unicodecsv.reader(f, delimiter="|", errors='replace') or unicodecsv.reader(f, delimiter="|", errors='ignore') . unicodecsv passes through errors parameter unicode encoding. see unicode or here more information.

java - JFrame and ItemListener Issues -

i cannot figure out debug class. as comments say, needs have user enter pizza toppings , gives price back. has code have no clue start on debug. anything help, or if have working code help. want learn need help. thank in advance help/nudge in right direction. // debugfourteen3 // user selects pizza topping , sees price import javax.swing.*; import java.awt.*; import java.awt.event.*; //use correct spelling of class name public class debugfourteen3 extends jframe implements itemlistener { flowlayout flow = new flowlayout(); jcombobox pizzabox = new jcombobox(); jlabel toppinglist = new jlabel("topping list"); jlabel alabel = new jlabel("paulos's american pie"); jtextfield totprice = new jtextfield(10); int[] pizzaprice = {7,10,10,8,8,8,8}; int totalprice = 0; string output; int pizzanum; public debugfourteen3() { super("pizza list"); setdefaultcloseoperation(jframe.exit_on_close); setlayout(f...

amazon web services - Disk usage when redshift doing vacuum merge? -

i know redshift split vacuum progress 2 stages: sort , merge. during sorting, disk usage not change, merge stage seems occupy lot of free space. my cluster 3 nodes of dw2.xlarge, total 480 gb ssd. before vacuuming, total disk usage around 50%. i'm doing vacuum on a table of 81gb, failed when trying merge, due disk full error. i want know how space should reserve vacuuming large unsorted table? i asked question redshift support team, haven't got reply until now. have experience it? yes longer vacuum use deep copy this should avoid disk usage problems. while insert ( select * from...) here in select select sorted order data data inserted in sorted fashion. do incremental insert (select * ) per sort key e.g if storing data 30 days deep copy day day should avoid space issues

vb.net - External table is not in the expected format error while trying to access Excel -

i trying access excel vb application using oledb connection . here connection string: <add key="excelconnection" value="provider=microsoft.ace.oledb.12.0;data source={0};extended properties=&quot;excel 12.0 xml;hdr=no;imex=1;maxscanrows=1000;readonly=false;&quot;" /> here code: dim connection new system.data.oledb.oledbconnection(excelconnectionstring) connection .open() dim schtbl datatable = connection .getoledbschematable(system.data.oledb.oledbschemaguid.tables, nothing) dim dbadapter system.data.oledb.oledbdataadapter dim execquery string dim rtndata system.data.datatable execquery = "select * [" & schtbl.rows.item(0)("table_name") & "]" dbadapter = new system.data.oledb.oledbdataadapter(execquery , excelconnectionstring) dbadapter.fill(rtndat ) dbadapter.dispose() connection .close() schtbl .reset() what problem ,the above working 70% of times rest of times getting ...

ios - [SpriteBuilder]App icon become white when use "Assert catalog" -

Image
i made test project : sb version: 1.4.7 sb revision: 10891b8 xcode version 6.2 (6c131e) and export xcode project.run xcode project , fine .app icon show normally. after , try use "assert catalog" , app icon become white when build xcode project , , nothing can old icon comeback. i attached screen shot bellow : i had same problem... solution easy. insert "appicon" string in info.plist file in /resources/platforms/ios @ icon file key.

javascript - Knockout.js rows won't validate in MVC -

i'am using mvc, c#, razor, , knockout.js models > skuprice.cs [required] [display(name = "srp")] public decimal srp { get; set; } controllers > skupricecontroller.cs public actionresult create(int id = 1) { return view(); } [httppost] public actionresult create(list<skuprice> skuprices) { if (modelstate.isvalid) { foreach (skuprice skuprice in skuprices) { db.skuprices.addobject(skuprice); db.savechanges(); } } } return view(); views > skuprice > create.cshtml <table> <thead> <tr> <th> @html.labelfor(model => model[0].srp) </th> <th> </th> <tr> <tr> <td> <input class="form-control" data-val="true" data-val-number="the field srp must number." data...

Spring 3 + Hibernate 4 + C3P0: java.lang.NoSuchMethodError: org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.addAnnotatedClass -

my webapp works , wanna add c3p0 webapp manage connection pooling. seems ok following error leading bunch of exceptions: java.lang.nosuchmethoderror: org.springframework.orm.hibernate4.localsessionfactorybuilder.addannotatedclass(ljava/lang/class;)lorg/hibernate/cfg/configuration; @ org.springframework.orm.hibernate4.localsessionfactorybuilder.addannotatedclasses(localsessionfactorybuilder.java:165) @ org.springframework.orm.hibernate4.localsessionfactorybean.afterpropertiesset(localsessionfactorybean.java:341) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1541) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1479) ... 86 more here's configuration files: spring-config.xml <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/sche...

sails.js - Waterline Edges associations -

i prepared model contains 2 vertices , 1 edge between them, v1, v2 , e1, while v1 instance or vertex of class a, , v2 vertex of class b. e1 instance of class e. wanted prepare schema in waterline kind of relation , schema looks this: identity:'a', connection:'ex1', attributes:{ title:'string', r : {collection:'b', through:'e', via:'a'} } identity:'a', connection:'ex1', attributes:{ title:'string', r : {collection:'a', through:'e', via:'b'} } while if use schema map orientdb fields shows collection:'b' linkset in class. want relate them via edges. there way skip mentioning collections , build relation map @rid of edge e1 out or in field of these classes needed? xeeb, don't mention waterline adapter orientdb using (there @ least 3). i'll assume it's waterline-orientdb . in schema example, defining "many-to-many through " association miss...

Fixing the node positions in the layout using gephi toolkit -

i trying create fruchtermanreingold layout using gephi toolkit. observed node positions getting changed same data. how fix node positions ? because layout shouldn't change if data same. edit there method node.getnodedata().setfixed(true); haven't tried it. 1 of colleagues trying implement spigot couldn't work

creating flume agent in hortonworks sandbox vm for streaming weather data into HDFS -

i configuring flume stream weather data, have written flume agent given below, weatheragent.sources= weather weatheragent.sinks = hdfs-write weatheragent.channels= memory-channel weatheragent.sources.weather.type = weather weatheragent.sources.weather.bind = api.openweathermap.org/data/2.5/forecast/city?id=524901&appid=********* weatheragent.sources.weather.port = 11111 weatheragent.sinks.hdfs-write.type = hdfs weatheragent.sinks.hdfs-write.hdfs.path = hdfs://localhost:8020/user/hadoop/flume weatheragent.sinks.hdfs-write.rollinterval = 30 weatheragent.sinks.hdfs-write.hdfs.writeformat=text weatheragent.sinks.hdfs-write.hdfs.filetype=datastream weatheragent.channels.memorychannel.type = memory weatheragent.channels.memorychannel.capacity=10000 weatheragent.sources.weather.channels=memorychannel weatheragent.sinks.hdfs-write.channel=memorychannel i getting error weather agent not contain valid channels making invalid. i new flume,i dont kno...

rest - HTTP POST response Location header when creating multiple resources -

the http/1.1 standard states if post operation results in creation of resource, response should include location header address of new resource. if resource has been created on origin server, response should 201 (created) , contain entity describes status of request , refers new resource, , location header (see section 14.30). and in section 14.30, for 201 (created) responses, location of new resource created request. now suppose api allows batch creation of resources post ing array collection resource url. example: post /books [ { "name": "the colour of magic", "published": "1983" }, { "name": "the light fantastic", "published": "1986" } ] since 2 \book\{bookid} resources have been created, should value of location header in case? the question http post response after multiple new resource creation? similar, asks respon...

android - Alertbox closing Automatically before Intent -

i want show alertbox before intent in activity.after click "ok" button intent should work in case alertbox showing intent working.i mean alertbox closing automatically before intent. activity code alert.showalertdialogpostive(changepass.this, "successfully submited", "password changed successfully", true); userfunctions userfunction = new userfunctions(); userfunction.logoutuser(getapplicationcontext()); intent dashboard = new intent(getapplicationcontext(), loginactivity.class); // close views before launching dashboard dashboard.addflags(intent.flag_activity_clear_top); startactivity(dashboard); // close registration screen finish(); and alert builder class @suppresswarnings("deprecation") ...