Posts

c# - Invalid Object Name in ExecuteNonQuery -

i'm trying develop application allows track spending part of class. run error "invalid object name 'dbo.acctransactions" my windows form code: string command = "insert dbo.acctransactions (id, transact_id, payee, dateof, amount, category)" + "values (@id, @transact_id, @payee, @dateof, @amount, @category)"; sqlcommand cmd = new sqlcommand(command, con); cmd.parameters.addwithvalue("@id", 1); cmd.parameters.addwithvalue("@transact_id", 2); cmd.parameters.addwithvalue("@payee", payeetextbox.text); cmd.parameters.addwithvalue("@dateof", datetime.today); cmd.parameters.addwithvalue("@amount", convert.todecimal(amounttextbox.text)); cmd.parameters.addwithvalue("@category", categorytextbox.text); con.open(); cmd.executenonquery(); con.close(); my connection string: sq...

How to merge bins in R -

so, trying merge bins of histogram whenever number of observations in bin less 6. library(fitdistrplus) mydata <-read.csv("book2.csv",stringsasfactors=false) qf3<-as.numeric(mydata[,1]) histrv<-hist(qf3,breaks="fd") binvec<-data.frame(diff(histrv$breaks)) binbreak=histrv$breaks freq<-histrv$count datmean=as.numeric(mean(qf3)) datsigma=as.numeric(sd(qf3)) templist<-as.numeric()#empty list (i in 1:nrow(binvec)){ templist[i]=pnorm(binbreak[i+1],datmean,datsigma)-pnorm(binbreak[i],datmean,datsigma) } pi<-data.frame(templist) chisqvec<-(freq-length(qf3)*pi)^2/(length(qf3)*pi) xstat=sum(chisqvec) the above code provide histogram 5 bins contain less 6 observations, bins 6000-7000, 7000-8000, 8000-9000, 9000-10000, , 10000-11000. each of these 5 bins contain 2, 5, 2, 2, , 1 observations respectively. merge bins can have more 5 observations. in other words, have 2 bins 6000-8000 , 8000-11000 can contain 7 observations , 5 observations. d...

java.lang.NoClassDefFoundError: org/hibernate/Session hibernate jars is set -

Image
i inherited several projects javas in new job, i'm having problems settings. i'm facing problem researched common. "java.lang.noclassdeffounderror: org / hibernate / session", put jars unnecessary hibernate mapped in classpath. im using tomcat 7, hirbernat 4, jre7. every project extends compnet have necessary jars in lib folder. do need put mapped jars in project ? the erro catch here: @override public void init(servletconfig config) throws servletexception { super.init(config); hibernateutil.currentsession(); } classpath: <classpathentry kind="src" path="src"/> <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> <classpathentry exported="true" kind="lib" path="/compnet/lib/xstream 1.3/xpp3_min-1.1.4c.jar"> <attributes> <attribute name="org.eclipse.jst.component.dependen...

Ruby on Rails: Making a printable character sheet -

i'm planning on building online character builder in-development roleplaying system. have handle on of technical aspects of builder, 1 thing keep getting hung on how make printable character sheet. for rails application, best way approach this? using html pdf solution wicked_pdf work best, or better using prawn facilitate generation of sheet? or different trick? i've seen (in general) character sheet generators overlay information on top of fixed sheet - approach, or there better ways it?

F# transforming and aggregating a list of lists -

i have following set of data let results = [[true;false;true];[true;true;false];[false;false;false]] i want turn into let summary = [2;1;1] is can done of box? thinking list.collect can't work. thanks in advance based on sample, suppose want sum number of true values in 1st, 2nd, 3rd etc. elements of input lists, respectively. one way turn list of booleans list of numbers containing ones or zeros , aggregate lists. so, input, list numbers be: [[1; 0; 1]; [1; 1; 0]; [0; 0; 0]] this can using nested list.map : results |> list.map (list.map (fun b -> if b 1 else 0)) now need zip lists , add corresponding numbers. given first 2 lists, can using list.map2 follows: list.map2 (+) [1; 0; 1] [1; 1; 0] = [2; 1; 1] the whole thing can written single nice pipeline using partial application: results |> list.map (list.map (fun b -> if b 1 else 0)) |> list.reduce (list.map2 (+))

class - Android Variable Usage within Classes -

i have class within activity , can not use variables in subclass in activity class. why happening?! this in subclass: try { httpresponse response = client.execute(getrequest); inputstream jsonstream = response.getentity().getcontent(); bufferedreader reader = new bufferedreader(new inputstreamreader(jsonstream)); stringbuilder builder = new stringbuilder(); string line; while((line = reader.readline()) != null) { builder.append(line); } string jsondata = builder.tostring(); log.e("data", jsondata); person = new jsonobject(jsondata); email = person.getstring("email"); } catch (clientprotocolexception e) { e.printstacktrace(); log.e("no data", "nothing"); ...

box api - Integrating a Web Application with BOX.NET using Content API -

i in process of conducting poc integrating 1 of our corporate applications box.net. corporate application resides on amazon cloud , use app perform crud operations on box. can go ahead , start using content api (rest) provided box.net? on box side have go , register application obtain api key. please confirm if understanding correct. thanks that's correct. start using box.com api should go http://developers.box.com , api key application. depending on language code in, there sdks can use, or can code directly against rest content api. the box apis free build against. users login application have go through oauth2 flow allow application access box content.