Posts

ios - Swift: Required initializer giving me an error message -

i have class named alarm inheriting nsobject, , in it, have property i'm having issue with, alarmlasttriggereddate: class alarm: nsobject { var alarmlasttriggereddate: nsdate override init() { super.init() } func encodewithcoder(acoder: nscoder) { acoder.encodeobject(alarmlasttriggereddate, forkey: "alarmlasttriggereddate") } required init(coder adecoder: nscoder) { if let alarmlasttriggereddatedecoded = adecoder.decodeobjectforkey("alarmlasttriggereddate") as? nsdate { alarmlasttriggereddate = alarmlasttriggereddatedecoded } } } i'm new swift, , not sure why i'm getting following errors: @override init: property 'self.alarmlasttriggereddate' not initialized @ super.init call @required init: property 'self.alarmlasttriggereddate' not initialized @ implicitly generated super.init call it seems way fix problem initialized in both places, that'...

Excel Defined Name List in Index dropdown -

Image
i have cells list following **mylist** 1 green 2 blue 3 red 4 yellow 5 special 6 special and have specials list defined special **special** apple banana grapes i have formula looks match , displays value in drop down if 2 listed in left-most column blue drop down selection. =index($a$15:$b$20,match($e20,$a$15:$a$20,0),2) but drop down cells 5 , 6 'special' not drop down defined list name(special) contents. how can include defined name in formula? set lookup table more closely represent following: base f20 data validation list's source: on following formula, =offset(index($b$15:$b$20, match(e20, $a$15:$a$20, 0)), 0, 0, 1, match("zzz", index($b$15:$d$20, match(e20, $a$15:$a$20, 0), 0))) the dynamic list in f20 should follow table lookup value in e20. if running out of room (c19:d20) may have relocate list altogether.

java - UCanAccess Exception: cannot getMetaData from ResultSet (invalid cursor state) -

i'm trying data access table , show on jtable. i'm using ucanaccess java 8 not support jdbc-odbc. my window class calls charging methods: ctrlgestionventas= new ctrlgestionventas(); ctrlgestionventas.cargarlistaventas(tbllistaventas); then, ctrlgestionventas.cargarlistaventas(tabla) fills jtable resultset: public class ctrlgestionventas { public void cargarlistaventas(jtable tabla) { resultset rs; dataventas dv = new dataventas(); rs = dv.getlistaventas(); try { tabla.setmodel(buildtablemodel(rs)); rowsorter sorter = new tablerowsorter(buildtablemodel(rs)); tabla.setrowsorter(sorter); tabla.gettableheader().setdefaultrenderer(new multisorttablecellheaderrenderer()); } catch (sqlexception e) { // todo auto-generated catch block e.printstacktrace(); } } public static defaulttablemodel buildtablemodel(resultset rs) throws sqlexception { resultsetmetadata metadata =...

haskell - Mapping a strict vs. a lazy function -

(head . map f) xs = (f . head) xs it works every xs list when f strict. can give me example, why non-strict f doesnt work? let's take non-strict function f = const () , , xs = undefined . in case, have map f undefined = undefined but f undefined = () and so (head . map f) undefined = head (map f undefined) = head undefined = undefined but (f . head) undefined = f (head undefined) = f undefined = () q.e.d.

sql server - TFS / SSDT Deployment in Multi Environment Scenario -

this scenario experiencing. in development environment, developers make changes in dev sql server, schema compare in visual studio 2013 / tfs, update tfs check changes in. now, in dev, there many stored procedures in database refer database called a, in sit environment database called b. when want deploy these stored procedures tfs sit environment, there (automated) way replace database database b, stored procs not break in sit? the workaround did generated publish script (via tfs > publish > generate script), copy , paste script ssms, replace reference database database b. however, quite manual (and not foolproof - have careful replace), wondering if there feature/capability exercise in more efficient manner? thanks in advance. cheers there functionality that, might require significant changes in workflow. you can use sql server database projects in ssdt store database code. in case, can declare project-level variable complementary database name, , refer...

arrays - JSON/Javascript object definition -

trying identify type of array, have multidimensional json array pull website, not using keypairs farmiliar with. structure follows. have included 1 array item show it's doing. "o": { "ah": ["id1", "12", "id2", "32", "id4", "4", "id5, "6"] }, my searches on both javascript , json objects , strings use semi-colon : define key , value. in end want loop through multiple items , print them out. to provide more clarification array structure: { "outer": { "item1":[ { "c": { "k": 26862, "n": "thename" }, "o": { "ah": ["id1", "0", "id2", "0", "id3", "0.98", "id4", "0.94", "id5", "5", "id6...

javascript - Website hosted on Google Drive not receiving JSONP from another website -

i developing website needs make jsonp calls external database. when test following code on computer, jsonp calls successful $.getjson("http://api.openchargemap.io/v2/poi/?output=json&distance=" + distbetween + "&latitude=" + x1 + "&longitude=" + y1 + "&distanceunit=miles&maxresults=1&callback=?",function(data){ alert("successful!"); } }); however, when test website through google drive, code doesn't work. google drive has service called editey, html, css, , js editor. can write code , have public see. when test code on google drive host, alert isn't being called. not familiar json, have cross-domain calls? if so, can fix problem? thanks.