Posts

Showing posts from March, 2011

android - Force app to read from layout-ar -

i asking if there way force android application read arabic layout folders , arabic values folder whatever device language ? you can force different locale this: protected static void setlocale(final context ctx, final string lang) { final locale loc = new locale(lang); locale.setdefault(loc); final configuration cfg = new configuration(); cfg.locale = loc; ctx.getresources().updateconfiguration(cfg, null); } in case, use so setlocale(getapplicationcontext(), "ar") this take values "ar" folders (drawables-ar, values-ar, layout-ar, ...)

gcc - How to statically build ffmpeg with librtmp without root on centos 7? -

i forked stvs's batch build script here . added lines rtmp ? why it's not working , error got *** building ffmpeg *** error: librtmp not found if check config.log file gcc -d_isoc99_source -d_file_offset_bits=64 -d_largefile_source -d_posix_c_source=200112 -d_xopen_source=600 -i/usr/tmp/tmp/ffmpeg-static-test/target/include -i/usr/tmp/tmp/ffmpeg-static-test/target/include -static --static -std=c99 -fomit-frame-pointer -pthread -i/usr/tmp/tmp/ffmpeg-static-test/target/include/opus -i/usr/tmp/tmp/ffmpeg-static-test/target/include -wl,-z,relro -l/usr/tmp/tmp/ffmpeg-static-test/target/lib -c -o /var/tmp/ffconf.ciizes8o.o /var/tmp/ffconf.bbyd2amo.c gcc -l/usr/tmp/tmp/ffmpeg-static-test/target/lib -lm -l/usr/tmp/tmp/ffmpeg-static-test/target/lib -lm -static -wl,--as-needed -i/usr/tmp/tmp/ffmpeg-static-test/target/include -wl,-z,relro -l/usr/tmp/tmp/ffmpeg-static-test/target/lib -o /var/tmp/ffconf.govexkqq /var/tmp/ffconf.ciizes8o.o -lrtmp -lssl -lcrypto -ldl -lz -l/usr/tmp/

Django form with label directly in the Field, but disappear on typing -

i achieve same effect google login page label of text field shown in field itself. when characters typed in filed, label automatically disappeared. i know how achieve similar effect html + java script, like: <input type="text" name="" id="" value="email" class="gray" onclick="if(this.value=='email') {this.value='';this.classname='black'}" onblur="if(this.value=='') {this.value='email';this.classname='gray'}" /> but django form same effect? know can specify initial in charfield, won't disappear on typing. forms.charfield(max_length=100, label=_("email"), initial='xxx') there html5 prop called placeholdertext. here blogpost how use django forms. django html5 input placeholders excerpt: class myform(form): name = forms.charfield(widget=forms.textinput({ "placeholder": "joe recruiter" }))

c - WinUSB Bulk IN transfer fails on transfer size greater than maximum packet size -

i using winusb on windows host side communicate winusb usb device. usb device full speed device. able device handle , out , in data transfers. i facing issue bulk in transfer on fs winusb device. when loop of data pc device , pc, sizes 1 64 working fine. when transfer 65 bytes, first 64 bytes able read in pc. last byte missing. can facing same kind of issue or can suggest solution? regards, nisheedh first should read out maximum_transfer_size . sending, winusb "divides buffer appropriately sized chunks, if necessary" ( source ). also check remarks of winusb_readpipe : if data returned device greater maximum transfer length, winusb divides request smaller requests of maximum transfer length , submits them serially . if transfer length not multiple of endpoint's maximum packet size (retrievable through winusb_pipe_information structure's maximumpacketsize member), winusb increases size of transfer next multiple of maximumpacketsize

html - How to vertically align radio buttons with text on the same line? -

i wrote html below display 2 radio buttons , text. <input id="radio1" type="radio" checked="checked"/>create application name <br/> <input id="radio2" type="radio"/> create source name my issue radio buttons , text not aligning properly. radio buttons displaying little bit below text. how align radio buttons , text on same line proper alignment? demo vertical-align: middle: aligns vertical midpoint of box baseline of parent box plus half x-height of parent. the problem seems caused fact browsers commonly add random uneven margins radio buttons , checkboxes. use inline style, weird true: <input type="radio" style="vertical-align: middle; margin: 0px;"> label <br/> <br/> <input type="radio" style="vertical-align: middle; margin: 0px;"> label <br/> <br/> <input type="radi

android - Updating fragment view after AsyncTask finishes returns nullPointerException -

i developing app uses 3 fragments, (which actual pages). 1 fragment used listener, , on 2 others data being downloaded, , set textviews. working fine, until thought cool if fragment view update/refresh after async finished. problem throws me nullpointer exceptions, every time try updating fragment. btw. think might taking wrong approach type of fragments management, working, , want small cool feature, thought maybe don't need rewrite whole program. so mine mainactivity.java public class mainactivity extends fragmentactivity { //some uninportant initalizations @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // create adapter return fragment each of 3 // primary sections of app. msectionspageradapter = new sectionspageradapter( getsupportfragmentmanager()); // set viewpager sections adapter. mviewpager = (viewpager) findviewbyid(r.id.page

quartus - Error (10170): Verilog HDL syntax error at filename near text "input"; expecting ";" -

working 2014 version of quartus ii software (web edition), receive error 10170 when compiling following code: module shifter16 (a, h_sel, h) input [15:0]a; input h_sel; output [15:0]h; reg [15:0] h; @ (a or h_sel) begin if (h_sel) h={a[14:0],1'b0}; else h={a[15],a[15:1]}; end endmodule error received: error (10170): verilog hdl syntax error @ shifter16.v(2) near text "input"; expecting ";" you need semicolon @ end of first line: module shifter16 (a, h_sel, h);

Android Soft Keyboard Pushing Controls Up Titanium -

i can't seem figure out why appearance of soft keyboard whilst editing text field on android causes of controls pushed page. there way stop view or button being moved up? makes real mess! code: registration = {}; registration.view = titanium.ui.createview({ top : 0, backgroundimage : getfilepath + 'bg.png', }); registration.init = function(view, name) { var scrolview = titanium.ui.createscrollview({ top : viewtop, height : ti.ui.size, layout : 'vertical', scrolltype : 'vertical', showhorizontalscrollindicator : false }); registration.view.add(scrolview); var profileview = ti.ui.createview({ top : 10, height : 100, width : 100, //backgroundcolor : 'red', }); scrolview.add(profileview); var profileimage = ti.ui.createimageview({ image : getfilepath + 'profilepicicon.png', }); profileview.add(profileimage); var chooseprofileview = ti.ui.createview({ top : 8, width : devicename == 

SMP boot of ARM Cortex A9 sequence with MMU/cache enabled -

Image
i trying smp boot in u-boot on dual core arm cortex a9 system mmu/cache enabled. needed sequence of initializations. how should sequence of following things happen. in order? mmu page table setup set smp bit (core 0 , core 1) invalidate cache (inner cache) flushing of cache (inner , outer) when l2 cache must enabled? when scu must enabled? before smp bit or after? it great help, if can list down sequence of operations. thanks in advance this sequence following without issues (like earlier there asynchronous data aborts) main function isn't working, hence debugging on it. please review , suggest, if stil order or missing.

ios - Overriding default initializer when using storyboards (Constructor Dependency Injection) -

the typical approach taken when 1 needs pass/share variables among view controllers (using storyboards) grab reference target viewcontroller in prepareforsegue: method , use property injection so: - (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender { if ([[segue identifier] isequaltostring:@"segue_name"]) { // reference target view controller (optional casting) destinationviewcontroller *vc = (destinationviewcontroller *)segue.destinationviewcontroller; // pass objects/properties vc.whateverobject = object; } } the problem approach (as see in context of domain i'm dealing on current project) dependency on object being passed/injected not explicit. though kind of freedom (being able inject dependencies after initialization) welcome in use cases flexibility required, of time prefer feeling of safety constructor injection provides. especially in language objective-c passing around , sending messages ni

ios - Framework not found on restarting the xcode ot reopening the project -

Image
i have facing issue last 2 days. every time restart xcode or close project , reopen it, of frameworks give error i.e newrelic . remove references , again import , working have tedious work every time. what issue in code or xcode. edit: here snapshots of error: framework in build phase: the answer here... https://stackoverflow.com/a/25009037/1071320 ... solved issue me. if of parent folders in framework contained contain spaces, xcode going confused!

vba - outlook 2013 incoming mail -

i've build vba-project checks inbox on special emails, extracts attachement , save attachement on network. happens when user clicks on button. my problem want automate this. therefore i've tried rewrite vba project but when email arrives error message 'unzulässiger oder nicht ausreichend defnierter verweis' (tr. improper or no sufficient defined reference) i can't figure out , therefore i'm trying answer here. attached you'll find code placed in 'thisoutlooksession' private withevents items outlook.items private sub application_startup() dim objns outlook.namespace dim x integer set objns = getnamespace("mapi") set items = objns.getdefaultfolder(olfolderinbox).items end sub private sub items_itemadd(byval item object) dim objns outlook.namespace dim strpath, strauditpath, strsavpath, strfoldername string dim oattachment outlook.attachment dim objtrash outlook.folder dim intanlagen, inttotal, integer set objns = get

sql - i want to recover the value of column according to the last date till the date i will insert and want to recover the 2nd maximum salary -

employee table amount 100.62 04/04/2013 , 102.62 05/04/2013 , on, want recover value amount according last maximum date , want second maximum incremented salary of person and tried these query till noq problem i new in sql server , write like select amount employee max(date)<=15/04/2013 and select top1 employee(select top2 employee order salary desc) order salary you use offset fetch clause . example second query this: select * employee order salary desc offset 1 rows fetch next 1 rows

c++ - Removing an element from an array -

i need remove element profile[] array, move other elements in array fill in empty space. attempt @ doing first part of problem, gives -fpermissive error, advice? void deletecreature(int numcreatures, creatures profile[]) { (int x = 0; x < numcreatures; x++) { cout << "the following list of creatures take care of:" << profile[x].name << endl << endl << endl; cout << "what creature wish remove?" << endl << "creature name: "; cin.ignore(); getline(cin, profile[numcreatures].name); std::vector<int> array; auto = std::find(array.begin(), array.end(), profile[numcreatures].name); if (it != array.end()) { array.erase(it); } else { std::cerr << "could not find profile!\n"; } cout << "you have removed " << profile[x].name << "." << endl << endl;*/ }

Frama-C Neon missing C library files? -

i've compiled frama-c neon (ubuntu) along why2, why3 , coq. with previous versions (nitrogen) possible choose particular heap model, defining symbols like: #define frama_c_malloc_heap and on. the frama-c neon user manual suggests include file share/malloc.c , can't find it. frama-c nitrogen contains both share/malloc.c and share/libc/stdlib.c (including latter worked fine); frama-c fluorine 3 contains share/stdlib.c only; frama-c fluorine 2 contains neither ; frama-c neon contains neither; moreover fluorine 3 changelog lists "add missing c library files." are frama_c_malloc_* symbols deprecated or neon source distribution incomplete? yes, files in relation modeling dynamic memory allocation removed neon frama-c release.

machine learning - SVMlight train data formatting -

i trying classify reuters text using svm light train data not follow format <'line> .=. <'target> <'feature>:<'value> <'feature>:<'value> ... <'feature>:<'value> # <'info> it of form <'line> .=. <'feature>:<'value> <'feature>:<'value> ... <'feature>:<'value> # <'info> the target label in separate file. know there's option in svm light lets specify separate target label file cannot find on svm light website because arror message: reading examples memory...line must start label or 0!!! whenever load training data using svm_learn example1/train.dat example1/model any ? performing rigorous research realized there no syntax in svm light allows users specify external class label file training data. class labels must part of training data , should follow "target feature:va

asp.net mvc - Web Api Pdf download and routing -

so trying lean web api , implement in project. there 2 things not quite sure about i trying download pdf. web api in app server , consuming in web server. in web api have method in controller public class filescontroller : apicontroller { [actionname("getfile")] public httpresponsemessage getfile(string filename, string ceqrnumber, string latestmilestone) { var file = getlistoffilesbyceqrandmilestone(filename, ceqrnumber, latestmilestone); var path = file.filepath; var extension = file.fileextention; httpresponsemessage result = new httpresponsemessage(httpstatuscode.ok); var stream = new filestream(path, filemode.open,fileaccess.readwrite); result.content = new streamcontent(stream); if (extension == ".pdf") result.content.headers.contenttype = new mediatypeheadervalue("application/pdf"); if (extension == ".xlsx" || extension == "

hibernate search - Lucene phase query case insensitive -

i writing query exact match on 'city' field. field/property defined as: @org.hibernate.search.annotations.field(index = index.yes, analyze = analyze.no, store = store.no) private string city; if have value of "new york", want find match if user enters "new york", or variation of case. using standardanalyzer entity, know lowercase tokens. don't tokenize since want match phrase (analyze.no). i tried lowercase search value, no luck. query query = qb.phrase().onfield(.....).sentence(location.tolowercase()).createquery(); if don't lowercase search term , value 'new york', results returned. searching 'new york' not return result. if tokenize (analyze.yes), other cities 'new jersey' returned. know can use wildcard query (searchterm*), hoping able case insensitive search on phrase. not sure if that's possible unless use wildcard. thanks it sounds want use analyzer emits entire text single token wh

css - Centering text block within Bootstrap's carousel -

i'm trying center block of text (not each line of text) within bootstrap carousel item. if use div within carousel item , specify classes "container" , "center-block", block of text shifts right bit, isn't centered horizontally. hoping avoid using fixed margins center text. here's example of i've tried: <div id="mycarousel" class="carousel slide"> <div class="carousel-inner"> <div class="item active"> <div class="container center-block"> <h3>list</h3> <ol> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ol> <p> test of longer string</p> </div> </div> </div> </div>

android - Whenever I try to open a url in the internet browser from my application, the browser crashes and says something about an SD card. How can I fix this? -

the browser crashes fast read error can read says sd card. using real android device has sd card installed. here code of button pressed upen link: private void gotourl (string url) { uri uriurl = uri.parse(url); intent launchbrowser = new intent(intent.action_view, uriurl); startactivity(launchbrowser); } public void startnewactivitydresscode (view view) { intent intent = new intent(intent.action_view, uri.parse("https://www.adams12.org/files/dms/5060-042613.pdf")); startactivity(intent); }

Css overlay working in Firefox but someting is wrong in Chrome -

if take @ website using firefox www,bloomdesign,rs (replace both "," ".") and if click on word "usluge" menu, you'll see fine, if using chrome, not working. (only homepage. works other pages) does know how solve problem in chrome? thanks thanks setek, have found solution, i'll post here in case else faces same problem. overlay opacity doesn't work latest chrome update (33), have put opacity: 0.0x ; x number, instead of opacity: 0; i found code in js file , replaced overlay.fade('in'); with overlay.fade('in'); overlay.setopacity(0.01) ; not sure if has same javascript file, helped me solve problem.

sql server - What will be the output of the following SQL Transaction ? -

identify output following code print 'before transaction' select @@trancount begin tran t1 print 'after transaction t1 starts' /* value of @@trancount 1 */ select @@trancount begin tran t2 save tran t2 --save tran t2 print 'after transaction t2 starts' /* value of @@trancount 2 */ select @@trancount rollback tran t2 print 'after transaction t2 roll backs' /* value of @@trancount still 2 rollback failed due error */ select @@trancount ---------[it shoud 1,but why result coming 2?] rollback tran t1 print 'after transaction t1 roll backs' /* value of @@trancount 0 */ select @@trancount what reason improper output ? answer lies in code, have used save tran t2 , transaction t2 saved , rollback doesn't affect @@trancount value try run below query multiple times in sql server....you see value of @@trancount gets increased 1, every time execute query. select @@trancount begin tran t2 save tran t2 print 'after transaction t2

web services - How to Edit And Delete the Searched Data From JSON WebService Using Android -

i have searching data in listview webservice using json android, want modify , delete searched data. how put coding that? please me. // searching data webservice , binding in listview // private class jsonparse extends asynctask<string, string, jsonobject> { private progressdialog pdialog; @override protected void onpreexecute() { super.onpreexecute(); datetime = (textview)findviewbyid(r.id.textview1); status = (textview)findviewbyid(r.id.textview2); jobno = (edittext) findviewbyid(r.id.add_jobno); pdialog = new progressdialog(add_update_user.this); pdialog.setmessage("processing please wait ..."); pdialog.setindeterminate(false); pdialog.setcancelable(true); pdialog.show(); } @override protected jsonobject doinbackground(string... args) { jsonparser jparser = new jsonparser(); string flag="s" ; arraylist<basicnamevaluepair> params = new arraylist<ba

c# - How to requery 'CanExecute' of a single RoutedCommand? -

i need refresh canexecute state of 1 or more (though far not all) routedcommand objects. i know you can update commands using commandmanager.invalidaterequerysuggested(); since updates far more commands necessary, calling function performance problem in application. my initial hope calling canexecute() manually raise event if state changed, not case. when looking @ reference source then, canexecutechanged not seem accessible derived classes provide kind of extension routedcommand class allows raising event manually. public event eventhandler canexecutechanged { add { commandmanager.requerysuggested += value; } remove { commandmanager.requerysuggested -= value; } } any ideas how implement such mechanism? know delegatecommand , need routed command, don't think class can me. you can create own custom routedcommand , reimplement icommand , register additional event yourself. note using new supposedly safe here because wpf use icommand referen

cmake - Compile NMAKE created make files in Jenkins -

i quite new jenkins , build, question can silly. i have installed jenkins , installed plugins under jenkins msbuild, nant , clear case plugin , giving expected output. problem have own makefiles created in nmake each components , want compile cmake there no other way compile nmake under jenkins. just not getting ways it, please tell me plugin used compile make files created using namke under jenkins. xshell plugin solution. it runs nmake scripts on cmd , expected output. prompt response slav.

Django coin/points system ideas -

i creating web based game in django, in action require coins/points , every action need check if userprofile has specific coins action or not. have seen awards/rewards packages seems awarding/rewarding after action has been performed. need generic solution checks if user has coins action or not. for coins doing way: class userprofile(models.model): .... def deduct_coins(coins): self.coin -= coins self.save() def has_coins(coins): if self.coins >= coins: return true return false i not using django forms actions before each action ( crud ) operations doing following steps: check if user has required coins perform action deduct coins required 1- how can make process generic. 2- there custom signals other builtin signals, if how can use them. 3- can pre_save signal used scenario.

python - Example scrapy feed_export to FTP site needed -

i have simple scrapy project parsing site , generating json file locally (using command line). enhance project having export json tile ftp site, having looked @ scrapy doc , various forums understand done feed_export have no clue start. does have example or tutorial follow please? try example: scrapy crawl spidername --set feed_uri=ftp://user:pass@ftp.example.com/path/to/export.csv you can set feed_uri in settings file: feed_uri="ftp://user:pass@ftp.example.com/path/to/export.csv"

android - How to repeat the song untill not stop playing off -

how repeat song in android.the code follows. want repeat current song until stop. loop.setonclicklistener(new view.onclicklistener() { @override public void onclick(view arg0) { if(isrepeat){ isrepeat = false; toast.maketext(getapplicationcontext(), "repeat off", toast.length_short).show(); // toggleplay(songs.current_track); loop.setimageresource(r.drawable.ic_launcher); }else{ // make repeat true isrepeat = true; // toggleplay(songs.current_track); // make shuffle false // isshuffle = false; loop.setimageresource(r.drawable.ic_launcher); shuffle.setimageresource(r.drawable.ic_launcher); } } }); here complete code

javascript - how to make a 2nd button to click only when first button is clicked -

i have 2 input type: // first submit button: <input type="submit" value="save"/> // second button: <input type="button" value="go payment" id="payment" /> i want button id="payment" function/click when submit clicked when data saved . please provide suggestion. new jquery , javascript you can use .prop() this: $('#submit').click(function() { $('#payment').prop('disabled',false); }); make sure you're putting disabled attribute #payment button. <input type="button" value="go payment" id="payment" disabled /> fiddle demo

java - "Temporarily" set session timeout for method - setMaxInactiveInterval -

in web application user can call long running backend service (synchronous request). execution time service should not count websession timeout in code tried: handleuserrequest() { httpsession session = ...getsession(false); int oldmaxinactiveinterval = session.getmaxinactiveinterval(); session.setmaxinactiveinterval(big_value); <long running task> session.setmaxinactiveinterval(oldmaxinactiveinterval); } this not working expected. temporary session timeout not recognized "method call". user session times out according oldmaxinactiveinterval value. is possible do, want do? ;-) if oldmaxinactiveinterval defaultsession-timeout defined in web.xml example 60. means it's 60 minutes. when set using session#setmaxinactiveinterval() in second(1 mimnute) it sets default session timeout web app <session-config> <session-timeout>60</session-timeout> // 60 minutes </session-config> calling session.setmaxinactivei

android - Writing my own Google Mobile Ads (Admob) mediation adapter -

instead of using house ads create own sdk displaying adverts within apps. run alongside normal google mobile ads , control how own sdk displays ads via mediation settings in admob dashboard. existing mobile networks offer mediation adapters purpose. write own adapter cannot find documentation explains how done. any appreciated. admob provides customeventbanner , customeventinterstitial classes can that. see https://developers.google.com/admob/android/custom-events

c - dup2 - Creating a piping program -

i write program replicate functionality of program1 | program | programx so redirect programx's output programx+1's input. for sake of simplicity, start off 2 programs , single pipe. in pseudocode, approach looks this: 1. create pipe communication between child1 , child2 2. fork parent create child1 , fork parent again create child2 3. close unneeded pipe ends in children 4. redirect output of execvp() child 1 write-end of pipe via dup2, child2 receives whatever program puts out 5. child2 reads pipe , receives output program of child1 6. execute execvp() received data so far good, here have: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #define read 0 #define write 1 int main(int argc, const char * argv[]) { //create unidirectional pipe int apipe[2]; if(pipe(apipe)){ perror("pipe call"); exit(exit_failure); } //create child 1 ("sende

android - My list is null after the first getView() -

i using 2 different lists because need information both. getitem(position) gets item mchampionlist can retrieve id , champion mchampionliststatic list. first time calls getview(), mchampionliststatic populated , can information needed. after that, mchampionliststatic null. @override public view getview(int position, view convertview, viewgroup parent) { /// //holder stuff happens here, removed save space// /// champion champion = getitem(position); champion_static championstatic = mchampionliststatic.getchampionbyid(champion.getid()); holder.icon.setimageresource(mcontext.getresources().getidentifier(championstatic.getname().tolowercase(), "drawable", mcontext.getpackagename())); holder.name.settext(championstatic.getname()); return convertview; }

xml - LinkedIn API Doesn't Support All Characters? -

i want create share linkedin api, won't allow me use < or > obvious reasons. since use xml it's quite tricky. i've tried url encoding, backslash insertion, , html character replacement < > gt; , lt; var body = "\ <share>\ <comment>" + message + " </comment>\ <visibility><code>anyone</code></visibility>\ </share>\ "; how can include < or > without having linkedin server freak out when sees "unexpected character"? trying construct xml concatenating strings going error-prone. you've not said in question programming language you're using, modern language should have libraries build xml , handle necessary escaping you. alternatively this document suggests linkedin apis can work json xml, may easier approach particularly if you're working in language javascript.

vb.net - Simultaneous OleDbDataAdapter.Fill Calls on Separate Threads? -

first timer here, go easy on me. theoretically possible execute 2 oledbdataadapter.fill calls on separate threads simultaneously - or fundamentally flawed? consider form 2 buttons , 2 datagridviews. each button click launches worker thread using async \ await \ task.run pattern calls method return populated datatable , assigns 1 of datagridviews. .fill in first thread takes 30 seconds complete. .fill in second thread takes 1 second complete. when launched individually, both buttons work expected. however, if launch first worker thread (30 seconds fill), launch second thread (1 second fill), second datagridview not populated until first .fill call completes. expect second datagridview populate in 1 second, , first datagridview populate ~30 seconds later. i have duplicated issue in sample code both oledbdataadapter , sqldataadapter. if replace long running query simple thread.sleep(30000), second datagridview populated right away. leads me believe not issue design patte

javascript - jQuery Add row to table with dynamic ids' -

http://jsfiddle.net/wah5s/6/ function add_row_retail() { $(document).ready(function () { var table = document.getelementbyid("retail"); var row = table.insertrow(-1); var row_id = $('#retail').val('tr[id]:last'); console.log(row_id); var cell_init = row.insertcell(-1); cell_init.innerhtml = "blank"; }); } i trying id of table row( <tr> ) before added row, , add 1 this, proper parseint(...). doing same cell ( <td> ) next, every cell has unique id each table. can't seem find row's id. here "correct" code question function add_row_retail() { var table = document.getelementbyid("retail"); // row id var row_id = $('#retail tr:last').attr('id'); var row = table.insertrow(-1); var next_row_id = "tr_" + (1+parseint(row_id.match(/\d+/

git - Revert a Pull Request on master after other commits -

similar undo merge pull request? master has many many commits ahead of pull request. way undo old pull request correctly? cherry picking work in case somehow? note: pushed , not local.

ratingbar - Android using setNumStars to change stars during execution make the ratings act strange -

i'm using rb.setnumstars(int) change stars form given default value (say 5) new 1 app preferences (say 4). code performs ok , after refresh fragment, can see change in stars number integer set (the bar has stepsize of 1). the problem when try set rating on bar, filled stars not coincide rating value, , have touch in strange places come values, i.e. if touch fist star, rating = 1, if touch second, still have rating = 1 , filled stars 1 , fragment of second. if touch between second , third star, rating = 2 , 2 , fragment filled stars. imagine this: if f full star, p partial (but not in half star) , e empty star, if touch second star, , between 2nd , 3rd get: f p e e rating = 1 f f p e rating = 2 edit: images can found here: http://1drv.ms/1pyq3gs if return value 5, bar behaves expected, filled stars coinciding rating. i can not insert images, explain behavior, hope it's clear enough. does knows why happening , how correct it? it seems a

ruby - Jquery libraries not working properly in rails 4 -

guys have include 2 script tags in application header datepicker in form. when include these tags datepicker function works css responsive not working. when remove these scripts responsive css working datepicker function stop working.here below scripts tags as <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> when remove these tags calender datepicker not appear when remove these responsive works fine.for responsive have use 2 libraries shown below <link href="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js" rel="javascript" type= "text/js"> <link href="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" rel="javascript" type= "text/js"> kin

java - How to pass value from JInternalFrame to JDialog -

i want know how pass value string jinternalframe jdialog . jdialog child form , jinternalframe parent form. if can please show me simple example. here code , want pass id productdetails addquantity , tried use static it's not working public class productdetails extends javax.swing.jinternalframe { string id; public productdetails() throws exception { initcomponents(); } //this button go jdialog private void btnaddquantityactionperformed(java.awt.event.actionevent evt) { id = txtid.gettext(); addquantity aq = new addquantity(null, true); aq.setlocationrelativeto(aq); aq.setvisible(true); } } public class addquantity extends javax.swing.jdialog { productdetails pd; public addquantity(java.awt.frame parent, boolean modal) { super(parent, modal); initcomponents(); //i use showmessage show result show me nothing joptionpane.showmessagedialog(t