Posts

Showing posts from March, 2014

maven - HIVE: testMapPlan1(org.apache.hadoop.hive.ql.exec.TestExecDriver) Failed -

[info] hive query language ............................... failure hive appears have build correctly, however, testexecdriver failed: tests run: 8, failures: 8, errors: 0, skipped: 0, time elapsed: 23.331 sec <<< failure! - in org.apache.hadoop.hive.ql.exec.testexecdriver vagrant@vagrant-ubuntu-trusty-64:~$ uname -a linux vagrant-ubuntu-trusty-64 3.13.0-32-generic #57-ubuntu smp tue jul 15 03:51:08 utc 2014 x86_64 x86_64 x86_64 gnu/linux vagrant@vagrant-ubuntu-trusty-64:~/hive$ mvn clean install -phadoop-2,dist -x ... tests run: 8, failures: 8, errors: 0, skipped: 0, time elapsed: 23.331 sec <<< failure! - in org.apache.hadoop.hive.ql.exec.testexecdriver testmapplan1(org.apache.hadoop.hive.ql.exec.testexecdriver) time elapsed: 1.621 sec <<< failure! junit.framework.assertionfailederror: expected:<true> was:<false> @ junit.framework.assert.fail(assert.java:50) @ junit.framework.assert.failnotequals(assert.ja

python - How to properly escape %s in sql query -

i have following sql: sql = '''select distinct artwork_apple_url main_catalog (artwork_url null or artwork_url not '%s3-%') union select distinct artwork_apple_url main_collectioninstance (artwork_url null or artwork_url not '%s3-%') ''' cursor.execute(sql) this gives me formatting error -- how like %s3-%' in sql ( s3 part of amazon url). if use parametrized sql , quoting of arguments done db adapter you. it's easier , helps prevent sql injection. note appropriate placemarker (e.g. %s ) depends on db adapter using. %s appropriate mysqldb, ? placemarker symbol used oursql, example. sql = '''select distinct artwork_apple_url main_catalog (artwork_url null or artwork_url not %s) union select distinct artwork_apple_url main_collectioninstance (artwork_url null or artwork_url not %s) ''' cursor.execute(sql,

ios - Swift project crashing with Thread 1: EXC_BAD_ACCESS (code = 1, address = 0x0) -

i have been searching on solution problem. looks bad memory access, trying access object not exist. tried using nszombie see if came up, far tell nothing did. crashing @ declaration app delegate. appdelegate.swift @uiapplicationmain class appdelegate: uiresponder, uiapplicationdelegate { var window: uiwindow? func application(application: uiapplication!, didfinishlaunchingwithoptions launchoptions: nsdictionary!) -> bool { // override point customization after app launches parse.setapplicationid("removed on purpose", clientkey: "removed on purpose") pfanalytics.trackappopenedwithlaunchoptions(launchoptions) pffacebookutils.initializefacebook() return true } func application(application: uiapplication!, openurl url: nsurl, sourceapplication: string, annotation: anyobject?) -> bool { return fbappcall.handleopenurl(url, sourceapplication: sourceapplication, withsession: pffacebookutils.session()) } func applicationdidbecomeac

windows phone 8 - Soundeffect not playing in background -

i have application allows user take photos , save isolated storage upload server. trying play shutter sound when user clicks software capture button provided. documentation can find indicates soundeffect.play asynchronous sound should keep playing in background while logic continues, in case sound either partially plays or not have time play unless put breakpoint after play() or add thread.sleep(x) after call play(). private void btncaptureclick(object sender, routedeventargs e) { if (_photocamera != null) { playshutter(); _filename = guid.newguid().tostring(); //a breakpoint here allow sound play _photocamera.captureimage(); } } private void playshutter() { var info = app.getresourcestream(new uri("assets/camera.wav", urikind.relative)); try { _effect = soundeffect.fromstream((info.stream)); frameworkdispatcher.update(); using (_effect) { if (_effect.play()) { //thread.sleep(1000); //uncommen

Set password to postfix email users stored in mysql by php -

i developing server control panel, haven't been able set correctly user password in mysql database. the mysql query used store password following: encrypt('firstpassword', concat('$6$', substring(sha(rand()), -16))) yet, haven't been able replicate result in php (of cource, using static salt): don't match. here's php code have been working with: $salt = '1234567890123456'; $password = 'hello'; $hexhash = hash('sha512', '$6$'. $salt); // bda6a11cc3aa00b8fe46f0559e86b3e4be3a6646f7dca2df29da1db86cfd7fc0ceb9ca076d16f0296b82e120170f08e049f607cc6e2d7328976f8cb4e8cacf98 $binhash = hex2bin($hexhash); $hash = base64_encode($binhash); // vaahhmoqalj+rvbvnoaz5l46zkb33klfkdodugz9f8doucohbrbwkwuc4saxdwjgsfyhzg4tcyixb4y06mrpma== the password instead should 12nkz5xm5jeki . clues why mysql , php implementations differ? found out that, contrary i've found looking on google (some people tried use sha512 hash), m

css - Silver bars above and below Bootstrap 3 navbar -

Image
there thin silver or white maybe, bars @ top , bottom of bootstrap 3 navbar. i'm unable locate css class change. tried using chrome console work out i'm having no luck on one. can lend expertise? here jsfiddle some "code" needed here or can't post jsfiddle link? in boostrap.min.css file for: .navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent} change to: .navbar{position:relative;min-height:50px;margin-bottom:20px;border:none}

Capturing filename with python requests toolbelt -

i'm using python requests-toolbelt post large audio files. using requests post file so: files = {'file': open("test.mp3", "rb")} audio_headers = {'authorization': 'bearer ' + token} add_file = requests.post(file_url, headers=audio_headers, files=files) that grabbed file , added filename filename field, didn't work large files. so switched posting files requests-toolbelt multipartencoder so: files = multipartencoder({'file': open(file, "rb")}) audio_headers = {'authorization': 'bearer ' + token, 'content-type': 'audio/mpeg'} add_file = requests.post(file_url, headers=headers, data=files) in scenario file created, filename isn't captured. i tried defining files this: files = multipartencoder({'file': file, open(file, "rb"), 'audio/mpeg')}) any idea how pass file name? turns out needed follow example exactly... files = multipart

sublimetext2 - Sublime Text Multiple Files Hint -

i'm using sublime text editor, sublime text doesn't allow auto-complete or code hints between multiple files, instead hints functions or variables located in same file working on. how can code hints of function located in file? thanks. this package looking guess: https://sublime.wbond.net/packages/all%20autocomplete

javascript - Bootstrap table not working correctly on Chrome but works fine on Firefox -

Image
i've made table that's inside modal using twitter bootstrap 3. weird thing works fine on firefox , jsfiddle not on google chrome. <button class="btn btn-xs btn-default" data-toggle="modal" data-target="#competitor_modal"> competitor </button> <div class="modal fade" id="competitor_modal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true">&times;</span> <span class="sr-only">close</span> </button> <h4 class="modal-title

delphi - how to retrieve text from chrome website -

how can retrieve text web sites text boxes in delphi, example suppose type "dragon" in google's search box oppened on chrome, how retrieve text search box?? wm_gettext or getwindowtext works? want know how work on google chrome, found ie: uses shdocvw, mshtml; procedure gettextfromeditiexplorer(liststr: tstringlist); var shellwindow : ishellwindows; web_browser : iwebbrowser2; reg_shell_window : idispatch; dummy : ihtmldocument2; ovelements : olevariant; document : variant; windowscount : integer; elementscount : integer; formscount : integer; begin shellwindow := coshellwindows.create; //provides access collection of open shell windows windowscount := 0 shellwindow.count //iterate through number of windows in shell windows collection begin reg_shell_window := shellwindow.item(windowscount); //returns registered shell window s

java - String index out of range on button pressed -

having problems little hangman game i'm making. private void btntactionperformed(java.awt.event.actionevent evt) { btnt.setenabled(false); if(word.charat(0)=='t'){ lblspace1.settext("t"); } if(word.charat(1)=='t'){ lblspace2.settext("t"); } if(word.charat(2)=='t'){ lblspace3.settext("t"); } if(word.charat(3)=='t'){ lblspace4.settext("t"); } if(word.charat(4)=='t'){ lblspace5.settext("t"); } if(word.charat(5)=='t'){ lblspace6.settext("t"); } if(word.charat(6)=='t'){ lblspace7.settext("t"); } if(word.charat(7)=='t'){ lblspace8.settext("t"); } if(word.charat(8)=='t'){ lblspace9.settext("t&

ios - RestKit addFetchRequestBlock causes objects not to be mapped -

i have following fetch request block set deal deletion of orphaned objects: [objectmanager addfetchrequestblock:^nsfetchrequest *(nsurl *url) { rkpathmatcher *pathmatcher = [rkpathmatcher pathmatcherwithpattern:api_get_active_rides]; nsstring * relativepath = [url relativepath]; nsdictionary *argsdict = nil; bool match = [pathmatcher matchespath:relativepath tokenizequerystrings:no parsedarguments:&argsdict]; if (match) { nsfetchrequest *fetchrequest = [nsfetchrequest fetchrequestwithentityname:@"ride"]; return fetchrequest; } return nil; }]; since need allow users log out , log in, clear data core data using following: + (void) clearuserdata { nserror * error = nil; [[rkmanagedobjectstore defaultstore] resetpersistentstores:&error]; if(error != nil){ [wrutilities criticalerror:error]; return; } } however, if log out , log app, objects loaded first time logged in not loaded se

c# - Universal App NTLM working for Windows Store, but not Windows Phone -

i building universal app accesses web api data. when run authentication piece in windows store app, works , 200 response on login call (an http post call _url2 in code below) when run exact same code windows phone emulator, 401 unauthorized. here code i'm using access service: var handler = new httpclienthandler { allowautoredirect = true, preauthenticate = true, cookiecontainer = _cookies, credentials = new networkcredential(username, password), usecookies = true, automaticdecompression = decompressionmethods.gzip | decompressionmethods.deflate }; using (var client = new httpclient(handler, true)) { //client.defaultrequestheaders.connection.add("keep-alive"); // having connection = keep-alive causes phone throw exception... not needed, annoying client.defaultrequestheaders.accept.add(new system.net.http.headers.mediatypewithqualityheadervalue("*/*")); var res = await client.getasync(_url1); // works , neg

css - Make element transparent except border? -

is possible make entire element invisible except border or outline using pure css? "invisible", mean entirely transparent (i.e. visibility: hidden; or opacity: 0; ) visible surrounding border. text, children, background, et al., hidden. i know accomplished creating parent div around invisible element, curious whether or not possible achieve same effect without changing html. can done? hmm, think is: html <div id="element"> ... </div> css #element { width: 100px; height: 100px; border: 1px solid #000; } #element * { opacity: 0; }

c# - How to create SecurityStamp for AspNetUser in ASP .NET MVC 5 -

Image
when create user register action whe application running application user gets securitystamp. when add user by: if (!context.users.any()) { system.diagnostics.debug.writeline("inside"); var hasher = new passwordhasher(); try { var users = new list<applicationuser> { new applicationuser{passwordhash = hasher.hashpassword("testpass44!"), email = "informatyka4444@wp.pl", username = "informatyka4444@wp.pl"}, new applicationuser{passwordhash = hasher.hashpassword("testpass44!"), email = "informatyka4445@wp.pl", username = "informatyka4445@wp.pl"} }; users.foreach(user => context.users.addorupdate(user)); context.savechanges(); } catch (dbentityvalidationexception e) { system.diagnostics.debu

Prevent elasticsearch from being killed by OOM killer -

i'm new elasticsearch , i'm guessing way configured server sub-optimal since i'm running problem oom killer killing elasticsearch/java process after short while.this avoided having server configured correctly. please point out in configuration needs changed smooth operation of es? on both of these servers (which clustered), come es/java process having been killed. here current setup: =========================================== server 1 (frontend server) server has 8gb of ram , running gunicorn, flask, , django elasticsearch.yml: node.master: true node.data: true bootstrap.mlockall: true /etc/default/elasticsearch es_heap_size=5g max_open_files=65535 max_locked_memory=unlimited =========================================== server 2 (dedicated elasticsearch server) 8gb ram , no other applications running elasticsearch.yml: node.master: false node.data: true bootstrap.mlockall: true /etc/default/elasticsearch es_heap_size=5g max_open_files=65535 m

single sign on - Logging into Plone site with credentials passed through HTTP -

i using plone 4.3.3 , new plone development. here trying achieve: i have site going redirect plone site. in http url line redirects plone site pass username whereas plone site should automatically log user username in without asking credentials password. not care safety or encryption @ point. how achieve that? (i guess need somehow modify existing login view, how do that?) thanks. i had same problem , @ end i've developed own pas plugin. i've followed next steps: create pas plugin implement extractcredentials method following this example implement authenticatecredentials method following this example add plugin develop section in build.conf. start plone , open zope console. go acl_users folder , add plugin pas system there examples here can use templates.

android - Why is setting the text of a Spinner in onCreateView throwing a null pointer exception? -

i want set superficial text on spinner without having text appear item in spinner drop-down. i'm getting reference spinner's textview this: textview tv = (textview) spinner.findviewbyid(android.r.id.text1); tv.settext("test"); the problem throws npe when calling above code main body of oncreateview(). but if comment out these lines in main body of oncreateview(), works fine when set text using above code inside spinner's onitemselectedlistener . @override public view oncreateview(layoutinflater inflater, viewgroup parent, bundle savedinstancestate) { view v = inflater.inflate(r.layout.my_fragment, parent, false); spinner = (spinner) v.findviewbyid(r.id.myspinner); arrayadapter<charsequence> adapter = arrayadapter.createfromresource( getactivity(), r.array.options, r.layout.spinner_item); adapter.setdropdownviewresource(r.layout.spinner_dropdown_ite

node.js - Frame json-ld document to append children -

i'm trying create frame include every children inside array, detail (see example) must contain other nodes inside itself. this example of data i'm using, in expanded json-ld: [ { "@id": "a", "http://ontology.ayvu.net/#person": [ { "@value": "101023", "@type": "http://www.w3.org/2001/xmlschema#integer" } ], "http://ontology.ayvu.net/#detail": [ { "@id": "_:g70157685738360" }, { "@id": "_:g70157685722960" } ] }, { "@id": "_:g70157685722960", "http://ontology.ayvu.net/#deuda": [ { "@value": "oficina" } ], "http://ontology.ayvu.net/#detalle": [ { "@value": "100" "@type": "http://www.w3.org/2001/xmlschema#decimal" } ] }, { &

ruby on rails - Database design for optional fields -

i've got 3 tables: orders line_items products they're setup as: order has many products through line_items this allows me store in line_items such things product_id, quantity, price @ time of purchase, discount, etc... all point. what i'm looking achieve: i need have some products have user changeable status . meaning @ point in future after order has been processed, purchased product status can changed 1 status another. the product table has statusable boolean field tracks whether said product supports status. the question: would add status field in line_items? small amount of products require status feels waste i'm not sure how else approach hurdle. main concern being i'll end massive table application grows , specific products require optional fields. there 2 options this: create column in join model create separate "statuses" table, can use create specific status updates -- attribute

android - What happens if you publish then immediately unpublish on Google Play? -

so accidentally published on google play (oops, bad, thought submitting sort of review), , 5 seconds later when realized had done unpublished. i'm still waiting review ios version , want release both @ same time. my developer console app has changed now, , treats app app has been published (i can't replace apk, can view stats, etc.) so question this: every day wait losing precious visibility in "new apps" feature page? or when republish in few days appear @ top of list if had released day? i believe re-publishing not affect initial publishing date, yes, lose "precious visibility", because app new, not automatically mean on top of new releases category. there several other factors weighed in such ratings or downloads. also, publishing application put through review. it's faster apple app store , assuming passes review, published.

web services - populating spinner based on the previous spinner selection in android -

am not familiar android development,and came across situation cascade dropdown based on first spinner selection.i.e.,consider example in 1st spinner states data loaded web service using db helper class while selecting state name in 1st spinner need populate 2nd spinner based on 1st spinner selected item's id(stateid not spinner's selected item id) db means need select stateid selected state , want filter districts based on states. state table creation: create table states( stateid integer , statename varchar) district table creation: create table branches(_id integer primay key,districtname varchar,stateid integer) in have used load data states using arraylist , on spinner1.setonitemselectedlistener function loaded district values values loading per position of items in states spinner instead of need filter based on stateid in branch table. this code getting states: public arraylist<hashmap<string, string>> getstatesdata() { arraylist alist = new a

android - Facebook Login and Post To Wall works for first time only -

i have strange situation.i trying integrate facebook app.but login , post wall works first time.i struck past 2 days , not find solution. here code snippet: //.............facebook.......................... private static final string app_id = "my app id"; // instance of facebook class private facebook facebook = new facebook(app_id); private asyncfacebookrunner masyncrunner; private sharedpreferences mprefs; string access_token; long expires; //............facebook..............................// else if(actionid == id_facebook) { masyncrunner = new asyncfacebookrunner(facebook); filename=mylist.get(posglobal).get("foldername"); mprefs = getpreferences(mode_private); access_token = mprefs.getstring("access_token", null); expires = mprefs.getlong("access_expires", 0);

declaration - run time variable access in python -

i new python. here testing on example varialbe wordlist has been used in loop. do need declare manually before using it? or declared runtime? i tried manual declaration remains empty. i following example: http://www.sjwhitworth.com/sentiment-analysis-in-python-using-nltk/ if directly use this: wordlist = [i in wordlist if not in stopwords.words('english')] wordlist = [i in wordlist if not in customstopwords] it gives error: wordlist = [i in wordlist if not in stopwords.words('english')] nameerror: name 'wordlist' not defined i manually declared wordlist this wordlist = [] but remain empty in case: wordlist = [] wordlist = [i in wordlist if not in stopwords.words('english')] wordlist = [i in wordlist if not in customstopwords] print wordlist what wrong doing here? here's how list comprehensions work in python. have list x like x=[1,2,3,4] and increment values using list comprehension: y=[element+1 element

php - How to test this function? -

public static function flush_cache() { static::$_cached_objects[get_class()] = array(); } i don't know how test phpunit? project fuelphp framework . can give advice instead of trampling on question? lot there no "correct" way test this. reason is: have global state! testing static values difficult because share state between unit-tests (during 1 test-run). 1 unit-test can interfere , execution-order of unit tests becomes important. instead of using static value (which nothing else global state), should pass cache function (like dependency injection). case, have this: public static function flush_cache($cache) { $cache = array(); } // test function public function testflushcache() { $mycache = $array(); // uses cache, filling values. flush_cache($mycache); $this->assertequals(count($mycache), 0); } of course, have still take care instantiating cache in application. but suggest avoid global state, static cache (having sta

html - how to fit 3 gridview in a div horizontally with scroll in asp.net -

i have 3 gridview want them fit in 1 div scroll when scroll 3 move. ive done.. <div class="headerleft" style=" width:1299px; height:440px; border:1px solid gray; overflow: auto; "> <div id="div2" style="margin:50px; width:3300px;"> <asp:gridview id="goutlet" emptydatatext="no data available." runat="server" width="1000px" showfooter="true" autogeneratecolumns="false" horizontalalign="left" cssclass="gridview"> </asp:gridview> <asp:gridview id="gtracking" runat="server" emptydatatext="no data available." autogenerateselectbutton="true" autogeneratecolumns="false" horizontalalign=notset width="1000px" showfooter="true" onrowdatabou

java - Spring + MyBatis exception: Mapped Statements collection does not contain value for -

Image
i got exception when executed app: public class mainapp { private static applicationcontext context = null; static sqlsession session = null; public static void main(string[] args) throws illegalargumentexception { try { context = new filesystemxmlapplicationcontext( "src/main/webapp/web-inf/applicationcontext.xml"); session = (sqlsession) context.getbean("sqlsession"); ordermapper ordermapper = session.getmapper(ordermapper.class); int orderquantity = ordermapper.getallorder().size(); system.out.println("order quantity: " + orderquantity); session.commit(); session.close(); } catch (throwable e) { e.printstacktrace(); } } } here ordermapper interface: public interface ordermapper { public list<order> getallorder(); } ordermapper.xml <!doctype mapp

web services - Call SAP webservice from SAP by php with parameters -

i know how call sap webservice php, how can send parameters request? i tried following: #define authentication $soap_auth = array( 'login' => 'user', 'password' => 'password'); #specify wsdl $wsdl = "http://xxxxxx/sap/bc/srt/wsdl/bndg_e417ca96fb8a5ff1b4a8000c293c9303/wsdl11/allinone/standard/document?sap-client=100"; #create client object, download , parse wsdl $client = new soapclient($wsdl,$soap_auth); $head_data = new stdclass(); $head_data->material = 'wm-999996'; $head_data->indsector = 'm'; $head_data->matltype = 'fert'; $head_data->basicview = 'x'; #setup input parameters (sap likes capitalise parameter names) $params = array( 'headdata' => $head_data ); #call operation (function). catch , display errors try { $result = $client->standardmaterialsavedata($params); } catch (soapfault

xaml - Get date from DatePicker using c# in windows store app -

i want insert date value in database have class have date time attribute public datetime bookingdate { get; set; } i have date picker in xaml page named datepicker . want insert date value , how date using c#?? you can use date property , follow documentation datetimeoffset sourcetime = yourdatepicker.date; bookingdate = sourcetime.datetime; to convert offset , bind datetimepicker datetime newbookingdate; newbookingdate = datetime.specifykind(bookingdate, datetimekind.utc); datetimeoffset bindtime = newbookingdate; yourdatepicker.date = bindtime; adding datepicker (xaml)

java - Swing JTextArea caret events -

Image
are there events fired when caret "blinking"? (not when position changed or property changed etc, blink of caret horizontal line) how jtextfield displays hint (which disappears when user starts type): and the same functionality used in jtextarea: as can see, while caret blinkng, first letter overwritten. check method of defaultcaret protected synchronized void damage(rectangle r) you can override , add code there

multithreading - Have these two java.io.File thread safety issues been evaded? -

assuming win32filesystem , beginmultithreading runs many times simultaneously on shared multithreadingclass object, possible way can cause data-race or other threading issue? know not thread safe, because (1) argument setpath gets reused. see (2) path not final variable in java.io.file . however, can't seem find part code error out on own due threading issue. public class multithreadingclass { private holder h = new holder(); private string path ="c:\\somepath"; public void beginmultithreading(){ h.setpath(new file(path)); h.begin(); } } public class holder { private file path; public void setpath(file path){ this.path = path; } public void begin(){ system.out.println(path.getcanonicalpath()+"some string"); } } your example code has no multi-threading @ all. i'll assume either multiple threads operating on own multithreadingclass instance, or sharing common instance bet

android - Google map not loading data -

Image
i'v set google maps in application, went smooth , without errors, map not loading content. cat log says uses "google play services client version: 4452000" , right after "google play services package version: 5089038" , normal? this looks like: fragmentmanager fmanager = getsupportfragmentmanager(); fragment fragment = fmanager.findfragmentbyid(r.id.map_view); supportmapfragment supportmapfragment = (supportmapfragment)fragment; googlemap supportmap = supportmapfragment.getmap(); <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map_view" android:layout_width="match_parent" android:layout_height="400dp" android:name="com.google.android.gms.maps.supportmapfragment"/> i/google maps android api(23503): google play services client version: 4452000 i/dalvikvm(23503): not find method gui.a,

java - Find resources in project tree -

i have plugin project , need method find , open file in project plugin run. have in variable name of file should inside project. how can done ? thank ! for file resource inside plug-in: bundle bundle = activator.getdefault().getbundle("com.your.plugin.name"); if (bundle != null) { url fileurl; try { fileurl = filelocator.tofileurl(bundle.getentry("/path/to/your/file/from/the/plugin/root")); string filesystempathtoyourfile = fileurl.getpath()); } catch (ioexception exception) { // ... } } of course, you'll have make sure corresponding resource included in plug-in's binary build ( bin.include property in build.properties file, or binary build section in build tab of plug-in manifest editor). if file jar, may have export plug-in directory (not 100% sure, may depend of jar resource - add project's build path or launch configuration classpath).

What can I do to speed up the ruby execution time on a heroku server? -

so got rails app deployed on heroku. nothing fancy going on, small custom cms, used uploading , editing static pages. of time spent displaying pages, stored in db. there bit of heavy load each page display since pages stored markdown being rendered (and string-interpolatet). markdown rendering turned of, server still responding slow (avg. 600 ms). i'm trying reduce response time. graph in new relic tells me, app spends 80 % or 90 % of processing time, executing ruby code. thought make faster adding dynos, no matter how many dynos add, ruby processing won't speed up. i'm running on 1 dyno, ramping 4 should make (roughly) 4 times faster, no? tried 8 dynos still no significant difference (not afford 8 dynos anyways).

javascript - Node iterator failing when being used to instantiate objects -

i'm using javascript node iterator create instances of object attached elements within dom. following code i'm using , works fine: var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { if (node.attributes['data-sd-autocomplete'] && node.type === 'text') return nodefilter.filter_accept; } }, false ), nodelist = [], node; sdautocomplete.fields = []; while (node = nodeiterator.nextnode()) nodelist.push(node); // add new instances of sdautocomplete fields list (var = 0; < nodelist.length; i++) { sdautocomplete.fields.push(new sdautocomplete(nodelist[i])); } i tried shorten code make more concise, removing loop , replacing line within while loop directly instantiates node variable: while (node = nodeiterator.nextnode()) sdautocomplete.fields.push(new sdautocomplete(node)); but causes pag

get a row from dynamic table (jquery) -

i'm trying table using jquery reason cant specific row i can use help jquery $('table').on('click','tr:gt(0)',function(e){ row=$(this).closest("tr"); $('tr').css('background-color', ''); row.css('background-color', 'yellow'); }); html <table id="receivedfeeds" border="1"> <tr> <th>feed address</th> <th>feed name</th> <th>received from</th> </tr> </table> php function addsendedfeedtouser(){// create table of links , user send them connecttodb(); $username=mysql_real_escape_string($_session['username']); $sql=mysql_query("select * send_feed user_receive='$username'") or die(mysql_error()); while($row=mysql_fetch_array($sql)){ echo '<tr> <td>'.$row['feed_url'].'</td><td>'.$row['feed_name'].'</td> <td>'.