Posts

jquery unwrap a ul nested inside another with the same id -

hello html looks (i didn't make mistakes 1 ul nested inside next , both have same id) <ul id="members-list"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <ul id="members-list"> <li>5</li> <li>6</li> <li>7</li> <li>8</li> </ul> </ul> i want use jquery().unwrap(); remove second ul , closing tag. leave li elements you have made 2 mistakes there can not more 1 element having same id. ul can not immediate child of ul. but if want remove nested ul try following line. $("#members-list ul li").unwrap() look @ jsfiddle

python - list comprehension joining every two elements together in a list -

how convert lst1 lst2 joining element 1 element 2 , on. lst1=[' ff 55 00 90 00 92 00 ad 00 c6 00 b7 00 8d 00 98 00 87 00 8a 00 98 00 8f 00 ca 01 78 03 54 05 bf'] to lst2=[ff55, 0090, 0092, 00ad, 00c6, 00b7, 008d, 0098, 0087, 008a, 0098, 008f, 00ca, 0178, 0354,05bf] tried not expiated in lst: lstnew = [] templist = i.split() lenlist = len(templist) #print templist index = 0 while (index < lenlist): print templist[index] + templist[index+1] index = index + 2 is ok: >>> lst = ['ff', '55', '00', '90', '00', '92', '00', 'ad', '00', 'c6', '00', 'b7', '00', '8d', '00', '98', '00', '87', '00', '8a', '00', '98', '00', '8f', '00', 'ca', ...

Multiple selection of dropdown menu and direct to a link -

i looking javascript or in jquery custom dropdown menu <form name="menu"> <select onchange="location = this.options[this.selectedindex].value;"> <option value="" selected="selected">courses</option> <option value="http://www.google.com">course1</option> <option value="http://www.youtube.com">course2</option> <option value="http://www.yahoo.com">course3</option> </select> <select onchange="location = this.options[this.selectedindex].value;"> <option value="" selected="selected">location</option> <option value="http://www.google.com">location1</option> <option value="http://www.youtube.com">location2</option> <option value="http://www.yahoo.com">location3</option> </s...

python 2.7 - no module named http.server -

here web server class : import http.server import socketserver class webhandler(http.server.basehttprequesthandler): def parse_post(self): ctype, pdict = cgi.parse_header(self.headers['content-type']) if ctype == 'multipart/form-data': postvars = cgi.parse_multipart(self.rfile, pdict) elif ctype == 'application/x-www-form-urlencoded': length = int(self.headers['content-length']) postvars = urllib.parse.parse_qs(self.rfile.read(length), keep_blank_values=1) else: postvars = {} return postvars def do_post(self): postvars = self.parse_post() print(postvars) # reply json self.send_response(200) self.send_header("content-type", "application/json") self.send_header("access-control-allow-origin","*"); self.send_head...

vba - I am getting out of script error, why? -

here code sub logic() 'declaring variables dim r long, long, k long, l long dim num() long dim del() long 'assigning values r = 2 = 0 k = 0 l = 0 redim num(0) redim del(0) until cells(r, 11).value = "" num(i) = cells(r, 15).value 'i m getting error on here del(l) = k - num(i) k = num(i) = + 1 redim preserve num(i) 'preserve value r = r + 1 l = l + 1 loop r = 2 l = 0 ubound(num) - 1 cells(r, 25).value = del(l) r = r + 1 next l end sub you growing num array forget same del array. believe need modify code this: i = + 1 redim preserve num(i) 'preserve value r = r + 1 l = l + 1 redim preserve del(l) ' add line

android - Sending an Audio file and a Text message to WhatsApp -

i want send mp3 file , text message contact on whatsapp. while able send either mp3 file or text message not able send them both together. here doing send text message :- intent waintent = new intent(intent.action_send); waintent.setpackage("com.whatsapp"); waintent.settype("text/plain"); waintent.putextra(intent.extra_text, text); startactivity(intent.createchooser(waintent, "share with")); and send mp3 file :- intent waintent = new intent(intent.action_send); waintent.settype("audio/*"); waintent.setpackage("com.whatsapp"); waintent.putextra(intent.extra_stream, uri); startactivity(intent.createchooser(waintent, "share with")); please suggest way can send them both.

sql - How to optimize a MySQL table? -

this question has answer here: optimizing simple mysql select on large table (75m+ rows) 2 answers i'm looking way improve performance of table. below mysql table. +----------+-------------+------+-----+---------+----------------+ | field | type | null | key | default | | +----------+-------------+------+-----+---------+----------------+ | receiver | varchar(15) | no | | null | | | depcode | varchar(12) | no | | null | | | sms | text | yes | | null | | | billable | varchar(5) | yes | | null | | | smsc | varchar(10) | yes | | null | | | senddate | date | yes | | null | | | sendtime | time | yes | | null | | | id | int(11) | no | pri | null ...