Posts

Featured post

linear regression - Trying to get confidence/prediction intervals with `predict.lm` in R, but I keep getting an error regarding my dichotomous variable -

i have dataset looks this: time size type 1 22 151 0 2 31 92 0 3 26 175 0 4 35 31 0 5 27 104 0 6 5 277 0 7 17 210 0 8 24 120 0 9 9 290 0 10 21 238 0 11 33 164 1 12 20 272 1 13 16 295 1 14 43 68 1 15 36 85 1 16 26 224 1 17 25 166 1 18 18 305 1 19 35 124 1 20 19 246 1 my aim simple: run regression , confidence/prediction intervals. i run regression so: fit.lm1<-lm(time~size+type,data=project3) i want 95% confidence intervals , 95% prediction intervals mean time when size equal 200. want cis/pis type = 0 , type = 1. code is: new_val <- data.frame(size= c(200,200),type=c(1,0)) ci<-predict(fit.lm1,newdata=new_val,interval="confidence") pi<-predict(fit.lm1,newdata=new_val,interval="prediction") i following errors: error: variable 'type' fitted type "factor" type "numeric"

orchardcms - change base url in local copy in Orchard CMS -

i want copy website (orchard 1.7.2.0) localhost, test things before on live site. ik copied database , de web directory , configured iis. in orchards database changed base url in settings_sitesettings2partrecord table. changed database connection in settings.txt now when enter new base url in browser redirected original url. how can prevent this? can't find other reference original url. thanks in advance answer. i found out went wrong. there rewrite in database originial url (for removing www in url). removed , works.

python - More Issues with overlapping labels in Tkinter -

i having problem tkinter. issue follows. i retrieve information database. wish print out based off few user selections. want print out columns a, b, c want print out columns, a, b, c, d want print out columns a, b, d, e also, when query, not know ahead of time how many results have. queries give 1. give 200. print them, this... while x < results.num_rows() : result = results.fetch_row() author = result[0][0] title = result[0][1] conference = result[0][2] year = result[0][3] location = result[0][4] label(root, text=title).grid(row=startrow,column=0,columnspan=5,sticky=w) label(root,text=author).grid(row=startrow,column=6,columnspan=1,sticky=w) label(root,text=year).grid(row=startrow,column=7,columnspan=1,sticky=w) label(root,text=conference).grid(row=startrow,column=8,columnspan=1,sticky=w)

Extract Sender IP's from emails in an Outlook (2010) Folder -

to clear, want extract sender ip's group of emails without going file | properties on every single one. there great many go through. output text file fine. i wondering if possible? perhaps there's app that! thanks time. is programming question? need extract pr_transport_message_headers property (dasl name http://schemas.microsoft.com/mapi/proptag/0x007d001f ) using mailitem.propertyaccessor.getproperty , parse data explicitly in code. ip address not guaranteed there of course.

Add an .egg to the python path in osx -

i'm working pycharm , set remote debugging pydev. ready except when want debug tells me message in pycharm console: warning: wrong debugger version. use pycharm-debugger.egg pycharm installation folder. so i'm working in virtualenv python logged on the virtualenv , set python path .egg (i copied .egg documents make easier). pythonpath="$pythonpath:./documents/pycharm-debug.egg" or pythonpath="./documents/pycharm-debug.egg:$pythonpath" this didn't work, tried other method append sys.path location of .egg didn't work either. what doing wrong? thanks in advance edit: forgot mention i'm on osx edit: ok sorry that, misunderstood. so need add path environment variable, sorry. using bash script that, this: pythonenv.sh #!/bin/bash export pythonpath="$pythonpath:./documents/pycharm-debug.egg" then call script this: source pythonenv.sh at point got env variable in shell, remember after close shell

python - can't seem to get an output from my class -

i can't seem figure out wrong code , why not getting out. can't seem figure out how expand rectangle. instructions: create method called expand takes offset value , returns copy of rectangle expanded offset in directions. >>> r = rectangle(30, 40, 100, 110) >>> print(r) rectangle(30, 40, 100, 110) >>> r1 = r.expand(offset=3) >>> print(r1) rectangle(27, 37, 106, 116) the original rectangle should not modified. >>> print(r) rectangle(30, 40, 100, 110) negative values should return shrunken rectangle. >>> r2 = r.expand(-5) >>> print(r2) rectangle(35, 45, 90, 100) this have far: class rectangle: def __init__(self, initx, inity, initw, inith): self.x = initx self.y = inity self.w = initw self.h = inith def __str__(self): return('rectangle(' + str(self.x) + ',' + str(self.y) + ','

mysql - Android Notification: GCM or Service -

i notify (create notification) user whenever receives in-app request. i'm using mysql database php - regular stuff. whenever value of user_id_req field changes 0 1 , app should create notification. able on app start notificationmanager , checking db in real-time, meaning value changes. should use gcm handle requests or service runs in background , checks database every minute? you should absolutely use gcm this, rather polling model. it bad practice make network request every minute - lead significant battery usage. moreover, unless have service hold wake-lock (which really kill battery), device go sleep , requests stop until user wakes device again. issue unless register app wake , trigger service on boot, polling stop whenever user restarts device. it happens gcm tutorials have create service . don't let confuse you. if you're showing notification user, don't need service , simple broadcastreceiver work fine.