Posts

Perl reads only the last line of my file? -

ok have file list of on 5000 names, 1 line each; file txt file generated microsoft excel. following code gave me output of 1. open filehandle, "< listname_fc2-3ss>0.txt"; chomp (my @genelist = <filehandle>); close filehandle; print "the number of item in list "; print scalar @genelist; i'm using '10 macbook air, perl 5.12.i tried output list , last line of file. tried code on tiny version of 10 names extracted hand myself , worked fine, reckon it's got delimiter? please help. ian try with local $/ = "\r"; before file reading. changes input record separator "\r" character.

r - Legend not displaying color -

i have drawn plot in r . plot(na,xlim=c(0,1),ylim=c(0,1), xlab=expression(delta),ylab="k", xaxs="i",yaxs="i",main = "zones of extreme equality , inequality in bo1") # empty plot cols <- c("red","black") legend("topright",legend=c("gini < 0.05","gini > 0.6"), density=c(na,na), angle=c(na,na), col=cols) the box in legend not getting coloured. wrong here ? try using pch : legend("topright", legend=c("gini < 0.05","gini > 0.6"), pch=15, col=cols)

sql - Analog of "select level from dual connect by level < 10" for Sybase? -

by select level dual connect level < 10 in oracle can generate sub-query of integer , transform sequence. is possible sybase? ps want find dates no data in table (missing days). in oracle as: select to_date('2012-01-01', 'yyyy-mm-dd')+level-1 dual connect level < to_date('2013-01-01', 'yyyy-mm-dd') - to_date('2012-01-01', 'yyyy-mm-dd') minus select distinct date tbl date between to_date('2012-01-01', 'yyyy-mm-dd') , to_date('2013-01-01', 'yyyy-mm-dd') in sybase analog minus is: select whatever table1 t1 not exists ( select 1 table2 id = t1.id ) but don't know analog connect level ... update there way create temporary table in sybase without storing data disk? the oracle syntax use hierarchical query used row generator. sybase has sa_rowgenerator system procedure can used generate set of integers between start , end value. the follo...

c# - why not using Request.Cookies.Clear() in ASP.NET web forms? -

i searched here on stackoverflow removing cookies site, couldn't find single answer suggesting use of request.cookies.clear() method. what's difference between: if (request.cookies["usersettings"] != null) { httpcookie mycookie = new httpcookie("usersettings"); mycookie.expires = datetime.now.adddays(-1d); response.cookies.add(mycookie); } and: request.cookies.clear(); thanks in advance! , sorry bad language, english not native! calling remove or clear remove server side collection held request.cookies (which copy of cookies client sent you). not cause server instruct client browser remove cookie. need set timeout have indicated above (see msdn - how to: delete cookie official guidance).

internet explorer - Wordpress site not working in IE -

this site works in major browsers, when tested on explorer in explorer 9 or earlier versions, went insane: margin-auto didn't work, absolute positions went different locations, menu disappeared , on... i using "naked" html5-blank-master theme, works in ie on other sites i've created. i've tried placing " <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> " no results. please help. here link site my site you have white space, or else, before doctype. some/most versions of ie go quirks mode if there in front of doctype including spaces. remove , see stand.

php - Utilising minimal MySQL queries when building a database-driven user system -

i'm building user system site using php , mysql datastore, don't particularly want run mysql query every time user logs in i'm thinking using sort of caching solution (such memcache) store user data. my question is, safe , practical practice employ? , if not, how can reduce mysql queries as possible? what amount of concurrent user site needs handle? in opinion overhead kind of caching redundant... if u'r still go memcache, concerning security , remember memcache application session object application; considered secure long users not have access it. other ways of reducing mysql overhead setting commonly-needed information in session variable after login.

opencv - Image stitching: NullPointerException -

i have run code. seems result.png not generated result: public class imagestitching { public static void main(string[] args){ matvector images = new matvector(2); images.put(0,cvloadimage("sample1.png")); images.put(1,cvloadimage("sample2.png")); iplimage result = new iplimage(null); int status = stitcher.stitch(images,result); if( status == stitcher.ok ) { cvsaveimage("result.png", result); } result = cvloadimage("result.png"); final canvasframe canvas = new canvasframe("my image", 1); // request closing of application when image window closed. canvas.setdefaultcloseoperation(javax.swing.jframe.exit_on_close); // show image on window. canvas.showimage(result); } } and error exception in thread "main" java.lang.nullpointerexception @ com.googlecode.javacv.canvasframe.showimage(canva...