Posts

objective c - Parse iOS Unit Testing a subclass of PFUser -

i'm trying unit test (with xctest) subclass of subclass of pfobject getting warnings such subclasses part of testing target: class mysubclassofsubclassofpfobject implemented in both /var/mobile/containers/bundle/application/84c7811f-348e-42ef-9ff4-f243db669591/myapp.app/myapp , /var/mobile/containers/data/application/a84479a8-1acd-4f7b-b02d-a28cb412cd14/tmp/myapptests.xctest/myapptests. 1 of 2 used. 1 undefined. i'm getting exception subclass of pfuser: *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'tried register both parseuser , parseuser native pfobject subclass of _user. cannot determine right class use because neither inherits other.' i've installed parse 1.12 via cocoapods , running xcode 7.2. my podfile looks this: target 'watchi' use_frameworks! pod 'parse' end target 'watchitests' end in test target build settings, i've added $(srcroot) user header search paths...

c# - Linq union two tables where on has an extra column -

i using union combine 2 tables audit , message . both have same column names except audit has column called deletedate . try use union merge both table if deletedate not exist, sets deletedate method null. commented out trying work. when uncomment code, error. there work around? here code var audit = in _audit.getall() .where(a => a.pint == pint && a.createdate < startdate && (enddate == null || enddate > a.createdate)) select new { a.mint, a.mid, a.desc, a.pstring, a.ptype, a.mtype, a.createdate, // a.deletedate, a.pint }; var message = in _message.getall() .where(a => a.partnerint == partn...

MySQL: group by hour AND by other distinct fields -

i have 'logs' table, in search results' counters stored, search query , user searched it. my goal display results grouped hour, i'm having issues when using group because i'm losing distinct users / queries in process. here's fiddle: http://sqlfiddle.com/#!9/484c01/7 as can see, results being count according results no. output not correct. in advance help. there data size limits on can returned following method, if want preserve distinct row values of non-grouped-by-columns when doing group by , can use group_concat mysql function combine each row's value 1 row separated commas. see http://dev.mysql.com/doc/refman/5.6/en/group-by-functions.html#function_group-concat usage examples. important: sure read documentation's note on group_concat_max_len , max_allowed_packet in link provided above.

entity framework - Convert String to Int in LINQ to Entities -

i trying duplicate following sql statement linq entities query (where "products" table mapped entity) ... note iqueryable ... of have seen posted solutions convert either search parameters , or dump results ienumerable , proceed convert there. dealing 100's of millions of records , cannot afford load 200 million records memory, have filter through them again. like, if possible in single query databse. select * products model_code = '65' , cast(serial_number int) > 927000 , cast(serial_number int) < 928000 i have tried following ... int startsn, endsn; startsn = 9500 endsn = 9500 if (!int.tryparse(startserialnumber, out startsn)) throw new invalidcastexception("the start serial number not valid value"); if (!int.tryparse(endserialnumber, out endsn)) throw new invalidcastexception("the end serial number not valid value"); iqueryable<product> resultlist = base.context.products.where(b => ...

android - How to set visibility of TextView? -

i want check! example - if (tv.visible == true) showmessage ("yee it's visible") else ("its not visible"); hope you're understand! you provide little information, think after... textview tv = (textview)findviewbyid(r.id.textview); tv.setvisibility(view.invisible); you need adjust id own. edit: can check see if textview invisible by: if (tv.getvisibility() == view.invisible) { // something. }

Jetty 9.3.6 + Spring: HTTPS automatically redirected to HTTP -

i don't know why https request automatically redirected http, , that's problem: the original request: remote address:127.0.1.1:7171 request url:https://w-rli09-ben:7171/main/app/test request method:get status code:302 found response headers: content-length:0 date:sat, 16 jan 2016 01:02:11 gmt location:http://w-rli09-ben:7171/main/login server:jetty(9.3.z-snapshot) the jetty + spring debug logs: 2016-01-15 16:58:58 debug o.e.j.s.session:347 - scavenging sessions @ 1452905938843 2016-01-15 16:58:58 debug o.e.j.i.managedselector:234 - selector loop woken select, 1/1 selected 2016-01-15 16:58:58 debug o.e.j.i.selectchannelendpoint:159 - onselected 1->0 r=true w=false selectchannelendpoint@33c50677{/127.0.0.1:56564<->7171,open,in,out,fi,-,14176/30000,sslconnection}{io=1/0,kio=1,kro=1} 2016-01-15 16:58:58 debug o.e.j.i.selectchannelendpoint:186 - task selectchannelendpoint@33c50677{/127.0.0.1:56564<->7171,open,in,out,fi,-,14176/30000,sslconnection}{io=1...

Android proguard error com.google.ads.util.i: and setMediaPlaybackRequiresUserGesture(boolean) -

i trying create apk file, when press finish on export dialog, got error, , apk not created. cannot find on net far, maybe here can help? error: proguard returned error code 1. see console warning: com.google.ads.util.i: can't find referenced method 'void setmediaplaybackrequiresusergesture(boolean)' in class android.webkit.websettings should check if need specify additional program jars. warning: there 1 unresolved references program class members. input classes appear inconsistent. may need recompile them , try again. alternatively, may have specify option '-dontskipnonpubliclibraryclassmembers'. java.io.ioexception: please correct above warnings first. @ proguard.initializer.execute(initializer.java:321) @ proguard.proguard.initialize(proguard.java:211) @ proguard.proguard.execute(proguard.java:86) @ proguard.proguard.main(proguard.java:492) i tried add -dontskipnonpubliclibraryclassmembers but...