i'm learning java , have question regarding reading file want read numbers file contains strings well. here example of file: 66.56 "3 java 3-43 5-42 2.1 1 and here coding: public class test { public static void main (string [] args){ if (0 < args.length) { file x = new file(args[0]); try{ scanner in = new scanner( new fileinputstream(x)); arraylist<double> test = new arraylist<>(); while(in.hasnext()){ if(in.hasnextdouble()){ double f=in.nextdouble(); test.add(f);} else {in.next();} } catch(ioexception e) { system.err.println("exception during reading: " + e); } } my problem add 66.56,2.1 , 1 doesn't add 3 after "3 or ignores 3-43 , 5-42 can tell me how skip strings , add doubles here? thanks all said 3 ie; "3, 3-43 , 4-42 strings either u read string , split , check number @ " , - or put in space between characters , integers. jvm after compilation tre
i have header (2300x328px) , image (456x328px). want second image extend header left , right, header fills whole width availiable.it needs connect without overlapping, because there pattern. here image of mean: http://imgur.com/0ji3hae circles pattern (why should not overlap) , images extend header can repeated infinitely. for pattern align need align background pattern according header image (ex. center, left etc) , make sure pattern starts @ right place. i made fiddle explain mean - http://jsfiddle.net/taneleero/g99xa/ .header { background:url(http://i.imgur.com/bzvtzl4.jpg) repeat-x center; } .header img { display:block; margin:0px auto; }
Comments
Post a Comment