Posts

java - Android Type mismatch help. Convert ArrayList to List? -

ok.. might hard follow.. app saves contacts sqlite database named contacts. contactactivity should load in sqlite database , create custom listview allows selection of multiple contacts via toggle button. the example following create custom lv allowing multiple selections has local contact class. running problems converting external dao contact class local contact class. contact.java dao class: package dto; /** * dto describes contact can create , respond survey * @author barnitek, bosticsa * */ public class contact { private int id; private string firstname; private string lastname; private string phonenumber; public contact(){ } public contact(int id, string firstname, string lastname, string phonenumber){ this.id = id; this.firstname = firstname; this.lastname = lastname; this.phonenumber = phonenumber; } public contact(string firstname, string lastname, string phonenumber){ this.firstname = firstname; this.lastname = lastname; th...

java - Maven multi modules tomcat deployment , module missing -

i have 2 module in parent pom. project depends on b project. followed here in project , added b project dependency. ok in build path, see b project under maven dependencies. <dependency> <groupid>mygroup</groupid> <artifactid>b</artifactid> </dependency> but when deploy project tomcat(mvn tomcat7:deploy ,or redeploy) , project deployed b project(packaging jar) wasn't deployed. (also tried system scope , target jar file systempath) i didn't understand issue, did miss something? (using tomcat8 , no eclipse specific answer please.) can try mvn install , manually copy generated war tomcat7 folder. maybe wrong tomcat7 maven plugin. additional information: in .m2 repository there wasn't project b's jar , installed , changed tomcat7 plugin solution alternetive maven war plugin , configured outputfolder tomcat8's webapps folder, works charm.

clearcase ucm - change the mastership of my stream to be able to deliver to parent stream -

i have following error when try deliver stream b parent stream a : cleartool: warning: trigger "dlvr_start_precondition" has refused let deliver_start proceed. cleartool: error: deliver_start preop trigger not allow operation. cleartool: error: unable integration. cleartool: error: unable deliver stream "a" was indicated change mastership of stream temporary able deliver parent stream. stream on different server parent stream. i see can done with: multitool chmaster –stream [ –ove·rride ] master-replica-selector stream-selector in case should following command? multitool chmaster –stream b the multitool chmaster man page mention: -str/eam [ -ove/rride ] master-replica-selector stream-selector ... transfers mastership of specified streams , associated objects replica specified master-replica-selector . specify stream-selector in following form: stream-selector [stream:]stream-name[@vob-selector] use -override option ...

linux - Deal with different directories in bash cron -

the problem... i use trick77's ip blacklist script configure firewall of apache server , able run script in terminal. however, when assigning bash script in ipset-blacklist crontab, not run no matter do. code written in crontab file root: @daily /var/bash/update-blacklist.sh what think culprit... since haven't done sort of thing before, believe path of bash script isn't set correctly... again, i'm not sure. i have seen others using line such path=/usr/bin:/bin:/usr/sbin:/sbin resolve problems involving script's location, but, don't know does. i set location of bash file /var/bash instead of /usr/bin , believe throwing things off. pardon lack of understanding. beginner when comes bash. any appreciated. what have done... per @etanreisner: added echo here >> /tmp/update-blacklist.out top of update-blacklist.sh , set cron run every minute ( * * * * * ). the file created. added type -p curl grep egrep ipset >> /t...

javascript - create nested divs with siblings using jquery -

it's been couple of days i'm struggling this, guys give me hand. i need create dom looks this. <div id="nestedaccordion"> <h2>walt disney world</h2> <div> <h3>magic kingdom</h3> <div> <ol> <li>one</li> </ol> </div> <h3>epcot</h3> <div> <ol> <li>two</li> </ol> </div> <h3>hollywood studios</h3> <div> <ol> <li>three</li> </ol> </div> </div> </div> i've tried: $('#sidebar') .append($('<div/>').attr('id', 'nestedaccordion').html('<h2>walt disney world</h2>') .append($('<div/>').html('<h3>magic kingdom...

.net - ProtoBuf-Net to do raw read -

i want have simple piece of code iterate through random stream of protocol buffers, , print out contents without having explicit understanding of structural contents. equivalent xmlreader.read() inside while loop using (protobuf.protoreader protoreader = new protobuf.protoreader(stream1, null, new protobuf.serializationcontext { })) { protoreader.readfieldheader(); while (protoreader.wiretype != protobuf.wiretype.none) { switch (protoreader.wiretype) { case protobuf.wiretype.fixed64: console.writeline(protoreader.readint64()); break; case protobuf.wiretype.fixed32: console.writeline(protoreader.readint32()); break; case protobuf.wiretype.startgroup: console.writeline(protoreader.readint32()); break; default: console.writeline(protoreader.wiretype); break; } } } however don't know how advance protocol bu...

Capping each member in an r array -

i'm new r , have losses data: losses=c(25,250,5,17,2,195,12,8,75,5,50,1); how cap each member of list @ 150? namely how perform min(150,x) each member of list? then want cap losses @ 'amount of insurance' array: aoi=c(150,250,100,125,300,200,80,250,100,350,500,120) see ?pmin , or parallel minima calculation: pmin(150,losses) #[1] 25 150 5 17 2 150 12 8 75 5 50 1 if need multiple times, beneficial collect variables in data.frame or list . e.g.: dat <- data.frame(losses,aoi) data.frame(map(pmin,dat,150)) # losses aoi #1 25 150 #2 150 150 #3 5 100 #etc...