Posts

javascript - Checkbox to button focus -

i've got multiple forms on page. in 1 form i've got 3 text fields check box , button. when tab key pressed, goes 3 text fields , checkbox , no where. how can focus button ( submit ) after checkbox ( maths ) , first text field ( user_id ). <form id="form13"> user id :<input type="text" id="user_id" /><br> password: <input type="password" id="password" /><br> department: <input type="text" id="department" /><br> <input type="checkbox" id="maths" value="on"> maths <input type="submit" id="submit" value="submit" /> </form> $('#maths').keydown(function(e){ if (e.which == 9){ $('#submit).focus(); } }); if need handle tabbing in html forms. may need handle html attribute tabindex article learning purpose : <input id=...

c++ - Copy doesn't work in my string::copy implementation -

following on https://codereview.stackexchange.com/q/126242/23788 . i wrote string class , according feedback have changed stuff. there more should fixed? +operator doesn't work , not know i've done wrong. have segfault when "str+str". process finished exit code 139 and str.h class str { friend std::istream &operator>>(std::istream &, str &); friend void swap(str &s, str &t) { std::swap(s.data, t.data); std::swap(s.length, t.length); std::swap(s.alloc, t.alloc); } public: typedef char *iterator; typedef size_t size_type; str() : data(nullptr), length(0), capacity(0) { } str(size_type length, char char_to_fill) : str() { create(length, char_to_fill); } str(const char *s) : str() { create(s); } template<class in> str(in b, in e) : str() { create(b, e); } ~str() { if (data) alloc.deallocate(data, capacity); data = nullptr; } s...

python - BeautifulSoup returns an empty string? -

i don't know if question has been asked before, couldn't find solve problem (hopefully didn't misunderstand anything). i'm learning python @ moment, using python 3.5 ipython, , ran trouble using beautifulsoup. shown below, import bs4 examplefile = open('example.html') examplefile.read() >>> '<html><head><title>the website title</title></head>\n<body>\n<p>download <strong>python</strong> book <a href=“http://inventwithpython.com”>my website</a>.</p>\n<p class=“slogan”>learn python easy way!</p>\n<p>by <span id=“author”>al sweigart</span></p>\n</body></html>' examplesoup = bs4.beautifulsoup(examplefile.read(), 'html.parser') examplefile.read() >>> '' elems = examplesoup.select('#author') print(elems) >>> [] i'm able open , read example.html, after use beautifulsoup, when try...

ios - How to wait for a nested Alamofire request to complete -

i have 2 alamofire requests. both work fine on own. func getpatientid() { //puts patientid patientid variable usingoauth2(drchronooauth2settings, performwithtoken: { token in router.oauthtoken = token apicalltext = "last_name=" + self.lastname.text! + "&" + "first_name=" + self.firstname.text! alamofire.request(router.getpatientswithfilter()) .responsejson(completionhandler: { (result) -> void in if let data = result.data { let response = nsstring(data: data, encoding: nsutf8stringencoding) self.result.text = "\(response)" json = json(data: data) } self.result.text = "" if json!["count"].intvalue > 1 { self.result.text = "more 1 patient" patientid = "-1" ...

How to delete a common row from multiple tables using SQL -

i understand can delete multiple tables using joins. but, i'm not sure how that. tried using statement , didn't work either. delete trm, val mcs.stg_mdcr_trmntn_rpt trm, mcs.stg_mdcr_vldtn_rpt val trm.import_proc_id = 156; what's wrong with delete mcs.stg_mdcr_trmntn_rpt import_proc_id = 156; delete mcs.stg_mdcr_vldtn_rpt import_proc_id = 156; commit;

javascript - JQuery Filter Table for Start and End Date input fields -

i have table. table contains rows , 1 of columns in each row date. there 2 input text boxes above table; 1 input box represents date , other represents date. let's user enters in date, table display every row contains date , after. opposite goes if user enters date in input field; show rows dates leading date. along if user has , date. catch dates date , date along every row contains date in between those. what have completed far input field search entire body of table , output row whichever characters user has entered. jquery <script> $("#searchinput").keyup(function () { //split current value of searchinput var data = this.value.split(" "); //create jquery object of rows var jo = $(".fbody").find("tr"); if (this.value == "") { jo.show(); return; } //hide rows jo.hide(); //recusively filter jquery object results. jo.filter(function (i, v) { var $t ...

java - Server is not connecting -

i have void method called startserverconnection() connects server port, in case 7777. method called inside action listener button in class, clientgui . i'm pretty sure code correct, reason output "waiting connection..." public void startserverconnection(){ try{ serversocket = new serversocket(portnumber); while(true){ system.out.println("waiting connection..."); socket clientsocket = serversocket.accept(); system.out.println("connection established on port: "+clientsocket.getlocalport()); clientconnection clientconnection = new clientconnection(clientsocket); thread thread = new thread(clientconnection); thread.start(); } } catch(exception e){ e.printstacktrace(); return; } } edit client class, connectclient method: public void connectcl...