Posts

python delete empty sub lists of list -

this question has answer here: modification of list items in loop (python) [duplicate] 3 answers i want delete empty sub list, ways failed, other ways successful. why ? worry way: data=[[],[],[],[],[]] rows in data: if len(rows)==0: list.remove(rows) print data the result [[],[]] .it isn't expected result [] the correct way(my friend tell me,thank him): list = [[],[],[],[],[]] a=list(filter(lambda x: [] != x, list)) print the result expected empty list [] avoid iterating on list while doing changes on it: data=[[],[],[],[],[]] rows in data: if len(rows)==0: data.remove(rows) print data instead, create new list: >>> lst = [] >>> data = [[],[],[],[1,2,3]] >>> >>> rows in data: if rows: #if rows not empty list lst.append(rows) >>> lst [[1, 2, 3...

python - scrapy start_requests not entering callback function -

i don't know why callback function (parse) not getting called start_requests urls.it gets terminated without entering parse function. this cbrspider.py file class cbrspider(scrapy.spider): name = "cbr" allowed_domains = ["careerbuilder.com"] start_urls = ( 'http://www.careerbuilder.com/browse/category/computer-and-mathematical', ) def start_requests(self): in range(1,2): yield request("http://ip.42.pl/raw", callback=self.parse_init) in range(1,2): yield request("http://www.careerbuilder.com/jobs-net-developer?page_number="+str(i)+"&sort=date_desc", callback=self.parse) in range(1,3): yield request("http://www.careerbuilder.com/jobs-it-manager?page_number="+str(i)+"&sort=date_desc", callback=self.parse) def parse_init(self, response): self.ip = response.xpath('//body/p/text()').extract() def...

continuous integration - How to fix failed tests count in teamcity for re-executed tests? -

we using teamcity selenium tests execution specflow+specrun , problem teamcity count re-executed tests. for example if test failed first time re-executed 2 times more, in teamcity see 3 tests failed, 1 test. also if first re-execution fail, other 2 success, reported in teamcity 2 failed, 1 passed, need reported 1 test has been passed. it possible configure in teamcity using service messages or else? updated: based on answer can gather logs using powershell script , change build status using teamcity service messages: $path = get-childitem %teamcity.build.checkoutdir%\projectfolder\bin\remote\testresults\specrun.log $file = get-content $path $total = $file | select-string "total:" $passed = $file | select-string "succeeded:" $failed = $file | select-string "failed:" write-host $( "##teamcity[buildstatus text='tests {0}, {1}, {2}']" -f $total, $passed, $failed ) teamcity behaving expected . teamcity reports testi...

assembly - memory adressing on intel ia 32 -

i know memory addressing can done multiples of word size intel 32 bits, allocating memory on stack in assembly can done //pseudo code sub , esp ,4 // allocating integer on stack sub esp, 8 // buffer of size 5 example b[5] so addressing done multiples of 4's. referring locals , parameters on stack done with // referring variable --ebp-4 but in disassembly see instructions like movb $0x41, 0xffffffff(%ebp) ,// refer ebp-1 example so refers memory 1 bytes. so refers 1 byte, not multiple of 4 bytes.the multiple of 4 bytes esp? or related every register? the multiple of 4 bytes esp? or related every register? note that sub esp, n doesn't access memory location, use related memory alignment instruction simple register-immediate subtraction, it use value. for performance reason if read 16 bits should on address multiple of 2, 32 bits should on address multiple of 4. called natural boundary alignment . 32 bit...

soapui - SOAP UI Error in Windows system -

i formatted system. on same system soap ui working fine. when click on button results, after importing wsdl, nothing happens. not showing error. the soap ui error log: 2013-07-23 12:49:30,196 error [errorlog] com.eviware.soapui.model.iface.request$submitexception: com.eviware.soapui.impl.wsdl.submit.requesttransportregistry$missingtransportexception: missing protocol in endpoint [https:/cccp.ext.nokia.com/eai_enu/start.swe?sweextsource=webservice&sweextcmd=execute&username=xxxxx&password=xxxxx] com.eviware.soapui.model.iface.request$submitexception: com.eviware.soapui.impl.wsdl.submit.requesttransportregistry$missingtransportexception: missing protocol in endpoint [https:/cccp.ext.nokia.com/eai_enu/start.swe?sweextsource=webservice&sweextcmd=execute&username=xxxxx&password=xxxxxx] @ com.eviware.soapui.impl.wsdl.wsdlrequest.submit(wsdlrequest.java:213) @ com.eviware.soapui.impl.wsdl.panels.request.abstractwsdlrequestdesktoppanel.dosubmit(abstrac...

versionone - How to query "Included items in the Backlog" for BuildRun from API? -

buildruns have 2 sets of backlog item "completed items in backlog" , "included items in backlog". querying "completed items in backlog" obvious, how "included items in backlog"? the source "completed items in backlog" buildrun.completedprimaryworkitems . "included items in backlog", source buildrun.changesets.primaryworkitems - is, of primary workitems associated changesets included in build run.

appcelerator - Pass project to another developer without changing package name -

i have pass project developer has continue maintenance , development. gave him package project contents he's unable build because guid bound developer account. can unregister app can freely continue development? have create new app new package name? way has publish new app in stores , not update old ones (which wouldn't do). thank alex if app not using appcelerator analytics or arrow can remove <guid> in tiapp.xml , re-register app new organisation. if use arrow/analytics need contact support@appcelerator.com have app transfered.