Posts

ios - Objective-C: Potential leak of an object stored into NSDictionary -

ios - Objective-C: Potential leak of an object stored into NSDictionary - i newbie objective-c. xcode highlights next code issue. _mycookies private variable of class store received cookies. @implementation messagesender { nsarray *_mycookies; } ... // socket open callback - (void) gotdata:(mysocket *) socket { nsdictionary *responseheaders = (__bridge nsdictionary*)cfhttpmessagecopyallheaderfields(socket.httpheaders); _mycookies = [nshttpcookie cookieswithresponseheaderfields:responseheaders forurl:[nsurl urlwithstring:@""]]; } the highlighted issues are: call function 'cfhttpmessagecopyallheaderfields' returns core foundation object +1 retain count object leaked: object allocated , stored 'responseheaders' not referenced later in execution path , has retain count of +1 how resolve one? using arc. want store cookies in class can later utilize them while sending request, want ...

semantics - Vocabulary term to model number of individuals of a class in RDF -

semantics - Vocabulary term to model number of individuals of a class in RDF - i want model dataset in rdf class name subject , number of individuals nowadays in class object. thinking of predicate model info i searched different vocabularies rdfs,skos etc , in http://lov.okfn.org/dataset/lov/ couldn't find apt one. any suggestions regarding vocabulary term model information semantics semantic-web owl rdfs vocabulary

python - an integer is required (got type tuple) Error -

python - an integer is required (got type tuple) Error - i recieving below error in python 3 idea? clientdtsocket.send(bytes(filename,"utf-8"),("localhost",8101)) typeerror: integer required (got type tuple) try calling clientdtsocket.sendto instead of clientdtsocket.send : clientdtsocket.sendto(bytes(filename,"utf-8"),("localhost",8101)) more info these methods: https://docs.python.org/3/library/socket.html python

android - SMS_SEND permission causes compile error and alert antivirus -

android - SMS_SEND permission causes compile error and alert antivirus - basically, searched through net , found big, fat 0 that. my app using sms sending service , need sms_send permission. when add together , run - eclipse says have errors in code , antivirus alert blocked android.trojan.sms_send.nr. don't care latter - because doesn't show without sms_send permission. all found in lint error checking: "looks permissions granted scheme apps permissions protection level signature or signatureorsystem granted scheme apps. if app regular non-system app, never able utilize these permissions." but matters - other app tha utilize permission fine. happened? need service in app. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mypackage.etc" android:versioncode="1" android:versionname="1.0"> <uses-sdk android:minsdkversion="16" android:targetsdkversion="19...

if statement - How I can fix this? I explain in program -

if statement - How I can fix this? I explain in program - // made 3 error in program. , want error show @ end. if there error, programme show error , close console , else, math class programme { static void main(string[] args) { string name; string color; string shipping; string error; int shirtcost; int shippingcost; int quantity; console.writeline("---------------------------------------------"); console.writeline(" welcome conestoga online shirts store"); console.writeline("---------------------------------------------"); console.writeline(" please add together name:" + environment.newline); name = console.readline(); console.writeline(environment.newline + "what colour purchase " + name + "?" + environment.newline); cons...

python - Why is this list comprehension giving me a syntax error? -

python - Why is this list comprehension giving me a syntax error? - this question has reply here: if else in list comprehension 8 answers i have next list comprehension. return [tower tower in state if tower != space else []] but when run it, python spits error: return [tower tower in state if tower != space else []] ^ syntaxerror: invalid syntax if remove else statement, runs fine. writing else statement wrong somehow? list comprehensions back upwards if not else ; if wanted utilize conditional look build iterable, utilize parentheses: return [tower tower in (state if tower != space else [])] but suspect wanted alter value of look in element expression instead: return [tower if tower != space else [] tower in state] or omit else if filtering: return [tower tower i...

Check Javascript Condition Every Frame -

Check Javascript Condition Every Frame - pretty much, question simple, , did search similar question before posting this. know how create javascript code repeatedly execute while page open, rather code running 1 time , beingness done or responding event handlers. pretty much want javascript equivilant of: $(document).ready(function() { }); but not want utilize jquery because less efficient. want check === status every single frame. use setinterval .. within window.onload function window.onload = function() { function test() { alert("test"); } setinterval(test, time_miliseconds); } javascript