Posts

php - Mysqli update throwing Call to a member function bind_param() error -

hi have 70/80 field form need insert table instead of manually creating 1 huge insert statement firstly have created table in db names of inputs in form here code use create/alter table function createtable($array, $membermysqli) { foreach ($array $key => $value) { //echo "<p>key: ".$key." => value: ".$value . "</p>"; $query = "alter table questionnaire add ".$key." text"; if($stmt = $membermysqli->prepare($query)) { $success = $stmt->execute(); } } echo "<h1>array count: ". count($array) ."</h1>" ; } this works fine , altered table how wanted it. insert form values basic 1 field insert store id of row , have loop post variables updating row. here code that: $stmt = $membermysqli->prepare("insert questionnaire(userid) values (?)"); $stmt->bind_param('s'...

python - Plotting with lines connecting points -

Image
i'm creating program determine minimum, maximum, , percentiles of winds @ heights. file split 5 columns. code far looks this: import matplotlib.pyplot plt f = open('wind.txt', 'r') line in f.readlines(): line = line.strip() columns = line.split() z = columns[0] u_min = columns[1] u_10 = columns[2] u_max = columns[4] u_90 = columns[3] plt.plot(u_min,z,'-o') plt.plot(u_max,z,'-o') plt.show() as can see it's plotting each min , max @ specific altitude dot. how can adjust makes line instead. edited answer due comment to create line connects min values: store min values in list (using append) plot list the code: import matplotlib.pyplot plt f = open('wind.txt', 'r') min_vector = [] max_vector = [] z_vector = [] line in f.readlines(): line = line.strip() columns = line.split() z = columns[0] u_min = columns[1] u_10 = columns[2] u_max = columns[...

silverlight - Catastrophic error during OOB update using CheckAndDownloadUpdateAsync() -

i'm in dead end error, may experienced similar , knows how resolve? the problem when calling checkanddownloadupdateasync() request server sent , server returns either 304 or 200 http code. in case of 200 silverlight runtime performs update of application. doesn't happen me. strange thing works on mac, not on windows. request get https://somedomain.com/some.xap http/1.1 if-modified-since: mon, 01 jun 2015 15:13:18 gmt user-agent: silverlight host: somedomain.com response http/1.1 200 ok content-type: application/octet-stream last-modified: tue, 14 jul 2015 13:02:36 gmt x-request-id: v-5daa5e84-2a36-11e5-bbce-22000ac00b9d x-ah-environment: preprod x-cache-hits: 2 x-age: 1989 expires: tue, 14 jul 2015 15:14:18 gmt cache-control: max-age=0, no-cache, no-store pragma: no-cache date: tue, 14 jul 2015 15:14:18 gmt transfer-encoding: chunked connection: keep-alive connection: transfer-encoding x-akamai-staging: essl sl runtime gets valid 200 ok response, throws catastro...

r - understanding ggplot2 geom_map map_id -

this comes ggplot2 documentation: # better example crimes <- data.frame(state = tolower(rownames(usarrests)), usarrests) library(reshape2) # melt crimesm <- melt(crimes, id = 1) if (require(maps)) { states_map <- map_data("state") ggplot(crimes, aes(map_id = state)) + geom_map(aes(fill = murder), map = states_map) + expand_limits(x = states_map$long, y = states_map$lat) last_plot() + coord_map() ggplot(crimesm, aes(map_id = state)) + geom_map(aes(fill = value), map = states_map) + expand_limits(x = states_map$long, y = states_map$lat) + facet_wrap( ~ variable) } i don't understand how can work since there no common identifier in states_map data frame uses "region" name states column , crimes data frame labels states, "states." ties data map? in example poster renames columns of map data frame conform data ggplot2 documentation doesn't seem it. how? when rename columns of states_map in example above, "state...

java - How to customize the binding expression in Netbeans? -

Image
i have jcheckbox, when select it, must disable jcombobox. i try negate binding expression in mode: ${!enabled} but doesn't work, java application doesn't start. what's trouble? you have go selected property not enabled property of checkbox. and have bind combobox's enabled property checkbox's selected property. ${!selected}

jquery - Update element within a cloned div -

i have div <div id="mydiv"><h3 id="myheader"></h3 ></div> and have created few clones of div var $divclone1 = $('#mydiv').clone(); var $divclone2 = $('#mydiv').clone(); var $divclone3 = $('#mydiv').clone(); i want able set value of myheader different in each of 3 clones - idea list individual clones screen different myheader values. how can achieved jquery? ids should unique on page. i'd suggest using class names instead of ids. if need unique ids each element, apply them after cloning. i use jquery once reference original div, make clones of that. <div class="mydiv"><h3 class="myheader"></h3 ></div> var $mydiv = $('.mydiv'), $divclone1 = $mydiv.clone(), $divclone2 = $mydiv.clone(), $divclone3 = $mydiv.clone(); $divclone1.find('.myheader').attr('id', 'clone1').text('clone1'); // a...

osx - Phonegap installation fails using npm -

Image
i followed up , running phonegap on mac osx on every single step got stuck i have tried many solutions , fixes still nothing working. followed this answer still stuck. what cause these issues?! update1: when install cordova using sudo npm install -g cordova following: even when type cordova, -bash: cordova: command not found update2: i fixed cordova installation using following steps: sudo chown -r $user /usr/local sudo chmod -r 0775 /usr/local add path using this answer add path bash_profile using this link open terminal , type cordova -v , working displaying version phonegap still failing , can't seem find fix it