Posts

Showing posts from August, 2011

spring - Multi-threading for reactor consumers -

i using reactor publish events throughout application , have different consumers respond events. here reactor configuration @configuration @enablereactor public class reactorconfiguration { static { environment.initializeifempty().assignerrorjournal(); } @bean public eventbus eventbus() { return eventbus.config().env(environment.get()).dispatcher(environment.shared).get(); } i expecting default ring buffer based dispatcher used , multiple messages sent single consumer should processed in parallel. instead seems processing events in synchronous fashion. thread shared-1 used process event1 consumer1 , after completing processing of event1, same thread starts processing of event2 on consumer1. how can achieve parallel processing in way should able send multiple events multiple consumers , events processed in parallel. i appreciate suggestions. this how dispatching events event bus dispatch(reactorevents.report_request_event, "",

html - PHP mySQL search not working -

<?php $username = "root"; $password = ""; $hostname = "localhost"; $db_handle = mysql_connect($hostname, $username, $password) or die ("could not connect database"); $selected= mysql_select_db("login", $db_handle); $output=''; if(isset($_post['search'])){ $searchq = $_post['search']; $query= "select * php_item name '%searchq%' or description '%serachq%'" or die ("could not search"); $result= mysql_query($query); $count= mysql_num_rows($result); echo $count; if($count <1){ $output = 'there no search results'; }else{ while($row = mysql_fetch_array($query)){ $mname = $row['name']; $price = $row['price']; $id= $row['itemid']; $output .= '&l

xcode - Problems uploading my iOS crash to crashlytics from a test built through Jenkins -

under xcode target build phases, have script enables crashlytics ios app. determined enable_crashlytics variable , whether set or not. can upload forced crash when deploy local xcode device script working correctly. however, when comes build via jenkins job, crashes not being uploaded. can see script build phases runs enable_crashlytics variable not set , therefore crashlytics disabled no crash reporting test build distributed via hockeyapp. in jenkins job @ build -> execute shell step, have enable_crashlytics=1 am missing else? thanks! the problem exporting enable_crashlytics environment variable in "execute shell" step. once shell step has completed, environment gone — variables not carried on subsequent build steps. so time xcode build step executes, particular environment variable no longer available. you can use envinject plugin inject environment variables during build. variables set using plugin available subsequent build steps.

php - Google maps slow from mysql table -

i reading mysql tables , generating xml file: https://developers.google.com/maps/articles/phpsqlajax_v3 to generate map, generate json file. my database contains several thousand records, generates 5000+ lines of json. the mysql query result different depending on many settings, , needs accessible multiple users @ same time. each time map loaded, json file parsed, map loads in 3-6 seconds (depend client device). is there way speed process, or alternative way achieve same result? any suggestion welcome. // cédric i don't see enough detail give specific advice, if in situation first question be: absolutely necessary load entire 5k lines of json each time map loaded? kind of data json contain that's being needed @ once? whole point of ajax load parts of resources they're resources (and google maps master @ this); i'd way load highest-level or most-immediate data when map first loads, load in more needed later on.

include - How to access data from other .php file in PHP? -

i have login.php , mainpage.php files , want access login.php 's user's data mainpage.php . should use require or include ? how connect files? require login.php; include login.php; best write object-oriented codes, i.e. mainpage.php would require('login.php'); just definition of let's class loginform , in mainpage.php do: $loginform = new loginform(); alternatively place logic functions , let mainpage.php call handlelogin() defined in login.php . in both of mentioned cases mainpage.php needs know definition of function/class, therefore should use require or require_once .

javascript - Exception in async function: Only on server, not on localhost -

i trying route working function "thank you" page people buy our products on external store. on localhost works fine on our staging server following exception: exception in callback of async function: action@http://taskwunderstaging-45398.onmodulus.net/12289f8cf999b67e6c6c6dcad1a5a5eded53f4e2.js:517:468 does have idea might causing this? the code in question follows: iron router endpoint router.route('/signup-partner', { name: 'signuppartner', where: 'client', waiton: function(){ return meteor.subscribe("packages"); }, action: function() { meteor.logout(function() {}); var query = this.params.query; //@todo verify query sha key! var userinfo = { email:query.email, firstname:query.firstname, lastname:query.lastname, }; var companyinfo = { companyname:query.company, street:query.street, city:query.city, zipcode:query.zipcode, country:query.country, taxid:q

r - subset data frame without specifying columns for plotting -

is possible subset data frame without specifying columns? keep getting error message "undefined columns selected". don't want specify column trying generate plot size of each point is: 1 - (a value associated data point) the annoying thing actual value i'm trying located in separate file (not in plotting data). so, in other words, if plotting x vs y, each point (x,y), there associated value (say z) in different file can locate based on sharing identical row.names(). have far (which doesn't work) this: cex.val <- 1 - mutsig[row.names(dataall)] plot(dataall, col="red", pch=16, cex=cex.val) mutsig , dataall data frames. fails each time requesting specified column. of course work if do: cex.val <- 1 - mutsig[row.names(dataall[1,])] but i'm subsetting 1 specific entry, , every point size based off 1 entry. i'd able plot every point own cex value based on mutsig subsets off row name of dataall point being plotted

android - Admob ads for multiple activites via XML -

hello i'm new admob have added admob main activity xml via below code provided google, thing ad contains on main activity.. planned paste same code other activities well.. right method ? or there way xml not java.. <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:layout_alignparentbottom="true" ads:adsize="banner" ads:adunitid="@string/banner_ad_unit_id"> </com.google.android.gms.ads.adview> thanks you can create separate layout called ad_view.xml or , include in other layouts include tag, this: ad_view.xml <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="t

node.js - Socket io emit message to client from express controller method -

i know have app.js create socket server, , pass instance down router, in turn can pass controller methods. shown here ( socket.io emit express controllers ) however, have controller method needs emit progress client happens listening, method can executed many different routes, , other controllers, , don't want have pass reference socket around these other parts of app. is there better way it? i thinking socketio helper module. app.js module passes reference io , can retrieved later.... app.js var io = require('socket.io').listen(server); require('./helpers/socketio').set(io); helpers/socketio.js var io=null; exports.set = function(socketio) { io=socketio; } exports.get = function() { return io; } then whenever need in app.. var io = require('./helpers/socketio').get(); io.emit('message', {a:1, b:2}); is there cleaner way this? return null, have check for. doesn't feel right.... modules cached a

jquery - .toggle() does not work with IE9 -

i want show information when hitting link can find here: http://jsfiddle.net/t4f8yer0/1/ html: <a href="#" class="more">show more</a> <br> <div class="toggle"> more </div> js: $(document).ready(function(){ $(".toggle").css('display','none'); $( ".more" ).click(function() { $(event.target).next().next().toggle( "slow" ); }); }); this works chrome , ie edge not ie9 or ie10. there solution problem? instead of: $(event.target); use: $(this); jsfiddle example different versions of ie have issues jquery normalizes, such you're seeing event.target.

php - Laravel - using a class in the same folder -

i looking have separate class handle validation of new user. folder structure is: | app | website | usercreator - usercreator.php - uservalidation.php in usercreator file trying use method in uservalidation class this: public function createuser($input) { uservalidation::validate($input); } however getting this: class 'website\usercreator\uservalidation' not found this validation class: <?php use illuminate\support\facades\validator validator; class uservalidation { public static $rules = array( 'first_name' => 'required', 'email_address' => 'unique:users' ); public static $messages = [ ]; /** * validate new user input * @param $input */ public function validate($input) { // validate } } do need instantiate class this? in controller? my controller is: use website\usercreator\usercreator usercreator; class usercreatorcontroller extends basecontro

python - Twisted callback loop blocking further data from being recieved -

when callback loop running in twisted, impression reactor still able send/receive data server, able function 'between' callbacks. however, when run script below, entirely ignores self.transport.write() line. server basic echo server twisted have on website. from twisted.internet import reactor, protocol twisted.internet.defer import deferred class echoclient(protocol.protocol): deferred = deferred() def connectionmade(self): self.deferred.addcallback(self.dothing) self.deferred.callback(0) def dothing(self, _): print 'xxx' self.transport.write('hello, world!') self.deferred.addcallback(self.dothing) def datareceived(self, data): "as data received, write back." print "server said:", data self.transport.loseconnection() class echofactory(protocol.clientfactory): protocol = echoclient def main(): f = echofactory() reactor.connecttcp('

jquery - Read placemark information from Google Map in Javascript -

i trying get/extract information of placemarker i.e title , coordinates google map has been loaded kml file. kml file hosted publicly google maps , loaded using v3 api, example: var ctalayer = new google.maps.kmllayer({ url: 'https://mapsengine.google.com/map/kml?mid=' + kmlid }); ctalayer.setmap(mymap); how can on client-side using javascript/jquery? my first thought screen scrape can't seem find placemarker... you need parse kml information placemark. google.maps.kmllayer doesn't give access that. if kml not on server, have access through proxy. you load kml using third party parser (like geoxml3 or geoxml-v3 , there many), internals available, but, depending on complexity of kml, might run performance issues.

Output of MATLAB Curve Fitting Toolbox does not match generated function -

Image
a similar question has been answered in past, part of question not answered ( matlab curve fitting tool, cftool, generate code function not give same fit ). i have set of data points meant show "ideal" curve mechanism studying. when ask curve fitting toolbox in matlab find 2-term exponential, great fit (r-square: 0.9998, adjusted r-square: 0.9997). however, when generate code fit, changes coefficients a, b, c , d. in toolbox, displays: general model exp2: f(x) = a*exp(b*x) + c*exp(d*x) coefficients (with 95% confidence bounds): = 4.698e+04 (-1.477e+13, 1.477e+13) b = 0.4381 (-1200, 1201) c = -4.698e+04 (-1.477e+13, 1.477e+13) d = 0.4381 (-1200, 1201) goodness of fit: sse: 0.002979 r-square: 0.9998 adjusted r-square: 0.9997 rmse: 0.006823 function generated curve-fitting toolbox: function [fitresult, gof] = createfit1(bgst, testst) %createfit1(bgst,testst) % create fit. % % data '

sql - Error while concatenating plpgsql var with query on cursor statement -

i getting error trying concatenate var sch in second for: error: syntax error in or next "||" sql state: 42601 character: 1151 does know how solve problem concatenation? create or replace function generate_mallet_input2() returns void $$ declare sch name; r record; begin sch in select schema_name information_schema.schemata schema_name not in ('test','summary','public','pg_toast','pg_temp_1','pg_toast_temp_1','pg_catalog','information_schema') loop r in select rp.id id,g.classified classif, concat(rp.summary,rp.description,string_agg(c.message, '. ')) mess sch.report rp inner join || sch || .report_comment rc on rp.id=rc.report_id inner join || sch || .comment c on rc.comments_generatedid=c.generatedid inner join || sch || .gold_set g on rp.id=g.key g.classified = (values('bug'),('imp

google bigquery - Big query "Where inner select" - can't join or union -

i get: (l1:268): join (including semi-join) , union (comma, date range) may not combined in single select statement. either move union inner query or join outer query. query: select a, count( distinct b, 999999) b, [dataset.partition_20121216], [dataset.partition_20130115], [dataset.partition_20130214] created between timestamp('2013-01-05 00:00:00') , timestamp ('2013-02-15 23:59:59.999999') , id in ( select id [dataset.partition_20121216], [dataset.partition_20130115], [dataset.partition_20130214] created between timestamp('2013-01-05 00:00:00') , timestamp ('2013-02-15 23:59:59.999999') , name = 'g’ ) group each order what did wrong? thanks. this limitation of bigquery sql syntax, change to select

python - Annotate plot in matplotlib -

i have 3 vectors a , b , , c in numpy. the vector b computed function of a: b = f(a) . i'm plotting b matplotlib plot(a, b) . the vector c has x-positions. want annotate plot @ x-positions in vector c y-values near values in vector b . it easy if compute y-value f(c) , plotting @ (x,y) = (c,f(x)) since got vector b computed values, cannot recalculate values values in c . i've tried plt.plt(a,b) x in np.nditer(c): plt.annotate("text", xy=(x, ?), xytext=(x, ?), arrowprops=dict(facecolor='black', arrowstyle="->")) but don't know y-coordinate.

c++ - Valgrind reporting invalid read on one system but not another -

i need run rather large software package on new machine work. application written in c , c++ , running on centos 6.5. the program builds fine, segfaults when go run it. using valgrind, see following error reported @ location of segfault: ==23843== invalid read of size 4 [stack trace here] ==23843== address 0x642e7464 not stack'd, malloc'd or (recently) free'd so reason reading memory aren't supposed , invoking undefined behaviour. when tar source files, take them centos 6.5 machine (w/ same kernel) , compile them (with same makefiles , same gcc version) program seems run fine. i ran valgrind on machine , expected see invalid read again. thought invalid read present, yet because behaviour undefined things happened work correctly on 1 machine , not on other. what found, however, valgrind reports no read errors on second machine. how possible? valgrind makes running environment more deterministic, not eliminate randomness. maybe other machine

Matlab if loop function, How to improve this function? -

i new matlab , trying figure how write following function in smart/efficient way. first create matrix y entries hl , , every line permutation of predefined length n . for example, n=3 first line of matrix y : h h h . want each line, create matrix of size n x n example entry (1,2) corresponds variable links entry y(1,1) y(1,2) , , entry y(3,2) corresponds variable links entry y(1,3) y(1,2) . possible? function a1=mystupidfunction(s , n) %n number of agents , s number of state, function %returns matrix of influence. stupid code must improved work %n agents x = 'hl'; %// set of possible types k = n; %// length of each permutation %// create possible permutations (with repetition) of letters stored in x c = cell(k, 1); %// preallocate cell array [c{:}] = ndgrid(x); y = cellfun(@(x){x(:)}, c); y = [y{:}]; a1 = sym('a1',[n n], 'positive' ); syms h l a_hh a_hl a_lh a_ll k=s i=1:n j=1:n

javascript - jquery animate background-size onload -

i'm working on wordpress site (it's in "coming soon" mode can't give link) client wants background image zoom slightly. figured achieve css animation, manipulating background-size. worked great!... except in safari , ie. why not use image , set z-index , use scale(), ask? well, want background on 1 post. , means 'post', not 'page', otherwise i'd set new page template , done. forced me specify background image on individual post body class (body.postid-23.custom-background {...}). so need way animate background-size, without hovering or clicking, page loads. before? appreciated. i'm not javascript/jquery coder, can use them enough make work sites. this want: $(function() { $("yourselector").animate({ backgroundsize: "100px 100px" }); });

c - How to mount image using mount(2) -

i cannot mount image on macosx 10.10 via c function mount() . i use following code ... char imgpath[m_imgname.size() + 1]; memcpy(imgpath, m_imgname.c_str(), m_imgname.size() + 1); struct hfs_mount_args data; data.fspec = imgpath; if(mount("hfs+", m_targetpath.c_str(), mnt_rdonly, &data)){ throw syscalltestexeption(errno, "mount() failed!", get_file_line_func_arg); } ... and when start program error "mount() failed! error(operation not supported device)." and image mounted if use following command: sudo hdiutil attach -mountpoint "${mountpointpath}" "${image}" also, when use mount() on linux - ok. following linux code: ... if(mount(m_imgname.c_str(), m_targetpath.c_str(), m_fstype.c_str(), 0, m_opts.c_str())){ throw syscalltestexeption(errno, "mount() failed!", get_file_line_func_arg); } ... there no hfs+ type in mount("hfs+", m_targetpath

java - How to pass variable data from a JFrame to another? -

let have textfield , button in frame 1, , after user clicked button, proceed next frame , display out of user entered in frame 1. have search web , non of worked me. try following: frame1.java public class frame1 extends jframe{ protected static frame2 frame2; protected jtextfield textfield = new jtextfield(); protected jbutton button = new jbutton("button"); public frame1() { jframe frame1 = new jframe(); frame1.setbounds(0, 0, 200, 100); frame1.setvisible(true); frame1.add(textfield, borderlayout.north); frame1.add(button, borderlayout.center); button.addactionlistener( newbuttonlistener( textfield,frame2.textfield)); } public static void main(string[] args) { frame2 = new frame2(); new frame1(); } } frame2.java public class frame2 { protected jtextfield textfield = new jtextfield(); public frame2() { j

Organising numbers from a text file into a 2 column matrix in MATLAB -

so trying organise .txt file in matlab. file contains width , height of triangles (except first value, number of triangles). numbers organised 2nd value width , 3rd value height of triangle 1, 4th value width , 5th value height of triangle 2,and on. file starts off this. 112 5 .2 1 3 1 2 3 5 54 8 81.4724 16.2182 .......................... so question is. how matlab read file, starting second value, , organise (in case 112 x2) matrix ? also, need specify how organises data ? need fill row 1 row 2 etc. so far have triagnlearea = struct(width, height, area) area = 0.5*width*height fileid = fopen('sampletext','r') = fscanf('sampletext',%f) you have correct. when you're using fopen , need specify fileid determines access point of have opened file. specifying filename, not correct. next, can read of values 1 single array, extract out first element number of triangles want , pull out rest of values. after, use reshape res

c# - ASP.Repeater getting and setting -

i have following asp:repeater setup: <asp:repeater runat="server" id="articleinforepeater"> <itemtemplate> <div class="col-md-9" style="margin-top: 30px;"> <h2><%#: eval("title") %></h2> <div style="margin-top:10px;"> <%#: eval("content") %> </div> </div> </itemtemplate> </asp:repeater> and want populate using list<> returned when item select list selected. my problem is, how set eval value. have seen question understanding asp.net eval() , bind() case have create whole new class set these 2 simple values? know simple task, seems rather drastic set 2 variables. if not, how set these 2 values? list trying use populate fields has properties corresponding name of eval field. i assume after use loop populate them? guess need command make populate field,

actionscript 3 - iOS AIR app not getting user input after closing barcode reader ANE -

i have simple air app ios has text field along scan button. on pressing scan button app launches ane based on pdf417.mobi sdk uses ipad camera decode pdf417 barcodes. ane works fine , returns scans air. on closing, closes camera , returns air can't interact air app @ all. no touches recognized whatsoever. i've added enter_frame event trace continuously can check if app still alive after closing ane , keeps on tracing. it's user input doesn't work. any ideas? thanks. i don't know pdf417.mobi sdk don't have use specific sdk theirs scan pdf417 @ all. the zxing library on android supports that: https://github.com/zxing/zxing , ios supports natively: https://developer.apple.com/library/ios/technotes/tn2325/_index.html for adobe air, support pdf417 plus other formats, may use ane of ours https://github.com/myflashlab/barcode-ane and here's how should initialize , set read pdf417 reference: import com.myflashlab.air.extensions.barcode.

ios - How to ensure remotely-fetched images in UITableView cells always filled? -

i have gotten question several times in job interviews: have uitableview , user scrolling fast. how make sure @ of cells' images being loaded server visible wherever user scrolls to. i can think of several techniques. instance have done use operation queue, loaded requests fetch images, , when user starts scrolling, empty queue , fill requests images wherever user going towards. another solution fill images super-low-resolution thumbnails e.g. 4-point gradient image, albeit bad one, there long before real image arrives. i key here "wherever user scrolls to". because of that, shouldn't start downloading images until know cells going visible. so watch uiscrollviewdelegate call: - (void)scrollviewdidenddecelerating:(uiscrollview *)scrollview at point, cells visible using: - (nsarray *)indexpathsforvisiblerows and spin off downloads images. putting together: - (void)scrollviewdidenddecelerating:(uiscrollview *)scrollview { nsarray *theinde

ios - Is it possible to add own metadata in captured Images in Swift -

i'm new swift , ios programming. to, mentioned above, insert own metadata captured images before save them album. i'm trying done code. saved image not contain own metadata, generated metadata. can please tell me i'm doing wrong? or maybe isn't possible add own new metadata table captured images? thanks lot help @ibaction func btnpressed(sender: uibutton) { capturepicture() } func capturepicture(){ stillimageoutput.outputsettings = [avvideocodeckey: avvideocodecjpeg] session.addoutput(stillimageoutput) if let connection = self.stillimageoutput.connectionwithmediatype(avmediatypevideo) { self.stillimageoutput.capturestillimageasynchronouslyfromconnection(connection) { (imagedatasamplebuffer, error) -> void in if error == nil { var asset = alassetslibrary() let imagedata = avcapturestillimageoutput.jpegstillimagensdatarepresentation(imagedatasamplebuffer)

iOS App Today Widget App Group Entitlement with Keychain Sharing Entitlement, Error on Device like Simulator -25243 (errSecNoAccessForItem) -

have application has been using keychain access bit , working fine. added today widget , added app group entitlement. all seems good, getting crash: couldn't add keychain item error domain=nsosstatuserrordomain code=-25243 "the operation couldn’t completed. (osstatus error -25243.)". when trying use keychain. this on device , not in simulator. using device because of testing push notifications. have tried cleaning, updating profiles, etc. xcode 6.3.1 mini ipad ios 8.3 the error -25243 caused trying access keychain access group don't have permissions because might missing entitlements.plist file or provisioning profile. so should following: check have entitlements file in project. try disabling/enabling entitlements. check app id has required permissions enabled , provisioning profile(s) use build schema when run app on devices have been regenerated new permissions/entitlements. if ok after checking above steps, 2 cents provisio

heapsort - Passing Objects through Heap Sort -

having issues trying pass object class sorted via heap sort. have class holds employee data such names, address, phone numbers , employee id. use heap sort pass class object , sort employee id. main issue converting heap sort structures can take objects. beginning data structures course we're not allowed use advanced techniques. road block i'm stumped how pass objects heap sort methods take primitive data types. office class: public class office_staff { public string name , dept , phonenumber; public int id, years; office_staff() { id = (""); name = (""); dept = (""); phonenumber = (""); years = 0; } office_staff(int empid ,string empname, string empdept , string empphone, int service) { id = empid; name = empname; dept = empdept; phonenumber = empphone; years = service; } public void setid(int empid) { id = empid; } public void setname(string empname) { name = empname; } public void s

php - Dynamically update expiry date based on a previous date using JavaScript -

i want supply effective date(initial date) , system automatically add one(1) year date supplied above, using javascript or other better method. <form action="<?php $_server['php_self'];?>" method="post"> <p> <strong style="color:black">software name:</strong> <input type="text" name="swname" value="" /> </p>&nbsp; <p> <strong style="color:black"> company <input type="text" name="coy" size="50" value=""> </strong> </p>&nbsp; <p> <strong style="color:black"> effective date <input type="date" name="sdate" value="" onblur="getyearval();" /> </strong> </p>&nbsp; <script>

angularjs - Is it possible to perform a Restangular GET with multiple query parameters? -

i've been attempting perform restangular multiple query parameters (for simple pagination) , doesn't seem possible--at least i'm trying do. here's i'm attempting do: restangular.all('elevation').get({ pageparam: page, pagesizeparam: pagesize }).then(function(data) { console.log(data); }); with expected response looking like: { totalrecords: 233, elevations: {...} } this not work , results in following: get http://localhost:24287/elevation/[object%20object] 404 (not found) i attempting utilizing customget results in same problem above. the way i'm able pass multiple query parameters using getlist . unfortunately when utilizing getlist unsurprisingly following error thrown: error: response getlist should array , not object or else to resolve issue, restangular documentation states in my response wrapped metadata. how data in case? section need use addresponseinterceptor i've done so: restangularprovider.addre

jquery - Make an ajax request based on the output from another ajax request -

what doing is, making jquery ajax call whenever user clicks button , if particular output call, 12345 , need make ajax call. can making second ajax call inside success callback, believe not nice way things done. tried different methods implement this. thing is, 2 ajax calls doesn't depend on each other. mean is, don't need pass data ajax 1 ajax2 . need make second ajax call if receive output, 12345 first call. did is var first_call= ajax_call_1; ajax_call_1.done(function(data) { if(data==='1234') { // call function perform second ajax call } else { // nothing } }); so question is, there other way implement this? mean better way this? new jquery deferred object , promise . going through documentation now. appreciate get. $(document).ready(function(){ $.ajax({ url: '/path/to/file', type: 'default (other values: post)', datatype: 'defaul

python - What's the use of a circular reference? -

in python can append list , accept assignment. >>> l = [0,1] >>> l.append(l) >>> l [0, 1, [...]] >>> l[-1] [0, 1, [...]] my question why? python allows rather throwing error, because there's potential use or because wasn't seen necessary explicitly forbid behaviour? is because there's potential use or because wasn't seen necessary explicitly forbid behaviour? both. lists store references, , there no reason prevent them storing otherwise-valid references. as potential uses, consider generic top-down-shooter type video game: a level contains reference each enemy , can draw , update them each frame. an enemy contains reference level , can (for example) query distance player or spawn bullet in level .

List of wordpress Sites on Azure cloud -

closingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosingclosing you can use azure resource management apis list of resources in subscription or resource group. id recommend using tags mark website wordpress , can use api query resource tags.

testing - Codeception click input radio -

on website i'm starting use codeception perform tests. on page have form has fields fill data perform email test content. problem form have input type radio. inputs inside on div. on end of post give example better perception of problem. problem can't check input. had tried used checkoption, selectoption, click functions , don't work. here html: http://pastebin.com/mddzmayv# how can solve this? how using codeception (webdriver, phpunit, etc)? if using in php , webdriver try this: $i->click('[name=[event_id"]'); good luck.

google cloud platform - Opencart 1.5 (ocStore): after coping to another hosting I see an infinite load of main page -

this not first time when see infinite loading after copying opencart shop - if source of page in browser - see code , loaded resources @ network tab @ chrome. after maybe 10 minutes of loading can see site looks without css. my steps: creating new vm @ google cloud, installation of mysql (+ creation user & "grant all"), installation of apache2, phpmyadmin, copy files old hosting , @ config.php change internal path. at /var/log/apache2/error.log no 1 error. apache , mysql working. vm fast enough , cpu ram not loaded much. restart of vm not help. where can problem? often, caused typo in config file http_server. make sure it's formatted http://www.domain.co.uk/ , else cause loop.

c# - How to re-initialize DataTable in Jquery -

i have requirement in have store state of datatable 'pagination', 'sorting', 'search' etc. have set ' bstatesave ' property ' true ' , working pretty well. know 'bstatesave' save state in form of cookie . have requirement in have reset datatable , reinitialize in case of user login. forex: if (sessionuserlogin == 'true') { $('#mytableid').datatable({ "bstatesave": false, "bdestroy": true}); $('#mytableid').datatable({ "bstatesave": true }); } else { $("#mytableid").datatable({ "bstatesave": true }); } as per above example " sessionuserlogin " tells if user login system, if flag( sessionuserlogin ) sets true, want destroy previous state , initialize table again can continue saving state. else condition used handle other postbacks in system after login of user want maintain state of table after postbac

regression - Matlab multivarible regresison with time dependent variables -

i'm trying develop code find significance of using auxiliary data source improve predictability of final product. have data ready in matlab, preferred program analysis. i'm trying solve following equation. p(t,i) = a(i) + b(i)*z(t,i) + c(i)*y(t,i) + d(i)*x(t,i) + e(i)*w(i) where, p, z, y, x, w known, t , indices , wish find values a, b, c, d , e minimise difference between existing value of p , predicted value of p. t = 1:20 , ~ 1:250000 eventually set value of e(i) 0 , see how improvement adding variable, before testing random number stream too. if more detail needed try provide it, many thanks. i've tried method suggested below because z, y , x values matrices output matrix sol 3 times width of t + 1 element of e. i've read further around , think method should 1 of either generalised linear model or panel regression model i'm not sure how set 1 up. i've re-read examples mathworks few times , still confused. you can calculate coeffici

Hide Soft-keys in android and not to show even on user interaction during the app -

note: please don't close question duplicate other answers hide softkey bar [navigation bar @ bottom 3 control buttons] till user interaction not there. hi, developing paint app in user can draw in ms-paint. to use full estate of user's screen, wish hide softkeys bar while user drawing or painting anything. so, know how hide soft-keys bar on user interaction [on interaction] soft-keys bar appear on screen. [before lollipop] is there way can hide soft-keys bar , appear after user has exited app. [i think have seen happening in of games] note: somewhere stated os shows soft-keys bar goofy app doesn't ruin user's experience. any lead appreciated. updates: 1. link had followed earlier: how hide soft-key bar on android phone? by soft-keys bar mean navigation bar @ bottom of screen shown in question in point 1. thanks. hide keyboard inputmethodmanager , set edittext focusable false trick. below code hide keyboard , set edittext focusable false

java - How to update/delete data in mysql using primefaces? -

i have primefaces page, displayed data mysql. table structure: +---------------------------+---------------+---------+ | id (pk, auto_increment) | name(varchar) | age(int)| +---------------------------+---------------+---------+ http://imageshack.com/a/img538/9755/2psvyf.png button add working, when want delete person or update, errors this апр 29, 2015 6:28:21 pm com.sun.faces.lifecycle.invokeapplicationphase execute warning: /pages/test.xhtml @40,84 listener="#{test.update()}": java.lang.nullpointerexception javax.el.elexception: /pages/test.xhtml @40,84 listener="#{test.update()}": java.lang.nullpointerexception @ com.sun.faces.facelets.el.tagmethodexpression.invoke(tagmethodexpression.java:111) @ org.primefaces.behavior.ajax.ajaxbehaviorlistenerimpl.processajaxbehavior(ajaxbehaviorlistenerimpl.java:54) @ org.primefaces.event.roweditevent.processlistener(roweditevent.java:41) @ javax

Turn restrictions not working in GraphHopper -

with graphhopper 0.4.0, cannot enable car + bike2 + foot turncosts=true systematically error, can use 2 modes. but graphhopper 0.4.1 , 0.5 graphhopper-web-0.5-20150422.180133-28-bin it’s worth, turn restrictions not taken @ in consideration in final graph whatever number of vehicles is, still have first error anyway more 2 modes. so, how increase flags? plus, if way set private, graphhopper not consider tag , use anyway in both 0.4 or 0.5. config file ##### vehicles ##### # # possible options: car,foot,bike,bike2,mtb,racingbike,motorcycle (comma separated) # bike2 takes elevation data account (like up-hill slower down-hill) # , requires enabling graph.elevation.provider below graph.flagencoders=bike2,foot # enable turn restrictions car or motorcycle. # need additionally set prepare.chweighting=no before using (see below , #270) graph.flagencoders=foot,bike2|turncosts=true #osmreader.bytesforflags=8 #osmreader.acceptway=car,bike,foot ##### elevation ##### # # populate