Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~10K People Reached
Favorite Forums
Favorite Tags
Member Avatar for abra_ka_dabra

Is there ay inbuilt method to convert 2D array into CSV file? e.g. Can anyone give me a hint to convert [1,2;3,4] into a file output.csv?

Member Avatar for howemonster
0
408
Member Avatar for abra_ka_dabra

Training data: f(1)=0.1 f(2)=0.2 f(3)=0.3 Test data: f(9)=0.9 f(10)=1.0 f(11)=1.1 can you please tell me how the data will look like in training data file and test file?

0
87
Member Avatar for abra_ka_dabra

Just curious to know if we can download youtube videos using downloader using HTTpClient? import java.io.*; import java.net.*; public class trial { public static void main(String[] args){ setAndAuthenticateProxy(); try { URL url = new URL("http://www.youtube.com/watch?v=tQC7rO8cjLs"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); InputStream in = connection.getInputStream(); FileOutputStream out = new FileOutputStream("C://Temp/fo.flv"); …

Member Avatar for pbj.codez
0
205
Member Avatar for abra_ka_dabra

Can somebody explain me the use of "Delegate" and its equivalent in java... I am learning java programming and has encountered a C# program which use "Delegate" and pass on functions as arguments to another function.... I am trying to modify the C# program for use in java...

Member Avatar for sepp2k
0
617
Member Avatar for abra_ka_dabra

I am trying to download a zip file from a server using the following code but it gives me a tmp.zip of size 1kB. What is the mistake in this program? try { URL url = new URL("http://www.nseindia.com/content/historical/DERIVATIVES/2013/JUN/fo18JUN2013bhav.csv.zip"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); InputStream in = connection.getInputStream(); FileOutputStream out …

Member Avatar for JamesCherrill
0
244
Member Avatar for abra_ka_dabra

Hi Bhavcopy is the file containing the data of the prices of stock, derivatives etc in a given day for trade at a stock exchange. The stock market i am considering here is NSE India. I want to download the "Bhavcopyfrom derivatives section from the link http://www.nseindia.com/archives/archives.htm". The above link …

Member Avatar for pritaeas
0
195
Member Avatar for abra_ka_dabra

Could you please explain me what is a BufferedStream (what is a buffer and how it should be used?)? I have used a code that uses bufferedstream to write to a .txt file. I got the code while googling but don't know the theory behind how it works... please explain.

Member Avatar for abra_ka_dabra
0
177
Member Avatar for abra_ka_dabra

What is the difference between JDK and JRE? I know its silly to ask but i am shameless till i get my things get clarified... :D

Member Avatar for abra_ka_dabra
0
185
Member Avatar for abra_ka_dabra

I added a string into an arraylist, but when i want to retrieve it, it does not go into if conditional in the code below: ArrayList a=new ArrayList(); a.add("12"); System.out.println(Integer.toString(1)+","+Integer.toString(2)); if((Integer.toString(1)+Integer.toString(2))==a.get(0)){ System.out.println("this is working here"); } What is the problem here?

Member Avatar for abra_ka_dabra
0
137
Member Avatar for abra_ka_dabra

I want to create a .csv file. I am using the following code: FileWriter fWriter = null; BufferedWriter writer = null; try { fWriter = new FileWriter("fileName.csv"); writer = new BufferedWriter(fWriter); writer.write("This,line,is,written"); writer.newLine(); writer.close(); } catch (Exception e) { } Does it create a new file if it does not …

Member Avatar for stultuske
0
163
Member Avatar for abra_ka_dabra

Can somebody explain me how to use Comparator class for sorting using Arrays.sort? I have a 2d array.. supoose i want to sort the array 4 by 4 (let us say) using column 1 of array(let us say)...

Member Avatar for JamesCherrill
-1
328
Member Avatar for abra_ka_dabra

I am trying to read a CSV file having no. of rows=row and no. of columns=col by the following method: public static String[][] FileIntoArray(int row, int col, String FileName){ int Filerow=0; int Filecol=0; String line; String[][] FileArray= new String[row][col]; File file = new File(FileName); try{ BufferedReader bf = new BufferedReader(new …

Member Avatar for JamesCherrill
0
240
Member Avatar for abra_ka_dabra

How do i get the key of "tradeid3" ? Is there any inbuilt method that does it? import java.util.Map; import java.util.HashMap; import java.util.Iterator; public class abcd{ public static void main(String args[]){ Map m= new HashMap(); m.put("TRADEID1", "tradeid1"); m.put("TRADEID2", "tradeid2"); m.put("TRADEID3", "tradeid3"); } }

Member Avatar for stultuske
0
171
Member Avatar for abra_ka_dabra

I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). …

Member Avatar for JamesCherrill
0
6K
Member Avatar for abra_ka_dabra

running 'java -version' on my cmd prompt gives me the version of my JRE but when i run my programs as 'javac abc.java' it says 'javac' is not recognised as an internal or external command, operable program or batch file. I have set the Path variable by appending C:\Program Files\Java\jre6\bin …

Member Avatar for JamesCherrill
0
323
Member Avatar for abra_ka_dabra

In the code below, I am trying to convert the target[] strings to a given format in target1[] and then sorting them using bubble sort and store it in target2[] which is a date object array.. However, when the desirable format is "EEE MMM dd kk:mm:ss z yyyy", it is …

Member Avatar for JamesCherrill
0
252