Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Rahul Sud

Greenhorn
+ Follow
since May 27, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rahul Sud


First of all thanks to all for the comments.But i need more clarification as i have not much idea about the batch file etc.

My Original question was this :

I am working on windows so i want to create a batch file , which on particular run download all the log files from remote server via internet and store on given path directory in my system (remote server is on different country).




I will make it more elaborated.
Currently I am downloading logs via ssh FTP tool by manually click on that each time and save it in the specified folder.This is downloading logs from say Country X and I am in Country Y via a particular internet address with user id,password and port.
I don't want to do monitoring and want to do this work automate with batch file.So that whenever i need to download logs or file from ssh(server) which is on linux to my workstation which is on windows it will process in the automate way without any continuous monitoring.


This is all about where i need help.



Thanks,
Rahul


10 years ago
I am working on windows so i want to create a batch file , which on particular run download all the log files from remote server via internet and store on given path directory in my system (remote server is on different country).

This is all about where i need help.


Thanks,
Rahul
10 years ago
Hi Techies,


I want to create a batch file to automatic download logs from remote server over internet.I checked it out on google ,but not find out any appropriate help to proceed further.
Please help me in creating this.




Thanks,
Rahul
10 years ago
Hi Techies,


I am just stuck with simple problem.
The problem is suppose i have value like 12345678.00(say it can be differ).I want to convert it to 12.345.678,00 but with my approach i am getting 12.345,678.
For other values like 12345678.01 i am getting exact result 12.345.678,01.

The approach i used


Please help me or suggest me better approach.



Thanks,
Rahul
10 years ago
Thanks all for the explanation.
Yes I think interviewer also wanted to hear the answer what Christophe had explained....
10 years ago
Hi All,

How to avoid duplicate element/Values in ArrayList?This was interview question.
My Answer was better to use Set in place of ArrayList.When collection framework has such facility better to use that to avoid duplicate elements.

But interviewer was said no i want it only in ArrayList.I suggest to use equals and override it with hashcode and make some sort of comparison and just pick one and set in the ArrayList.

Then without any expression interviewer move to next question.


Please share me your inputs to this question.I answered on the basis of hit and trial there because never came across such scenario in real world application.



Thanks,
Rahul
10 years ago
Hi Techies,

We know that Spring is by default singleton.
Now the question is How it will behave when more than two request comes at same time on the same method.How that will be handled in the by Spring.
I suppose same instance will be shared but what is the normal approach to handle that.I mean the JVM behavior for this also.

Thanks,
Rahul

10 years ago
Hi Techies,

For Multiple struts config.xml file what will be order while loading with ActionServlet.

I think we will define different path in Action for each config.xml and based on the request it will load that.

Please give your suggestions?




Thanks & Regards,
Rahul
10 years ago

Hi Techies,

I have knowledge of EJB 2.1 and also idea about Spring AOP and DI but no idea about Spring transactions.
Is Spring transactions are similar to EJB 2.1 or there is difference?If there is difference ,Please highlight those differences?



Thanks,
Rahul
Hi Techies,

Sorry if this question is repeated ...I have searched but havent got this one...

Why developer use "Map m= new HashMap()" or "List l = new ArrayList()" in place of HashMap hm= new HashMap()" or "ArrayList al = new ArrayList()"

According to me Map or List is interface and it is hidding the implementation from client.


Please give your inputs and share your knowledge for this question.


Thank You,
Rahul
10 years ago
Hi Techies,


I am facing problem in identifying a new line character from a string.

Suppose I have a string lets say =


"RAHUL MAHAJAN" +
"" +
"" +
"RIDHAV SOOD"


In the above string three times the enter key has been used. Now I need to identify this writing a java code which can tell me how many enter key has been used. In short I need to identify the new line character.


Thanks,
Rahul
10 years ago
Thanks all....

This question was asked to my colleague in a interview.His expression was there with awkward sound abstract interface....Then he thinks to better answer it and he answered as same like interface but keyword abstract is used and it is redundant because interface is also abstract.

After weekend my colleague also discussed the same with me.I was also surprised because i never came across such abstract interface term.....


Any way yeah it make sense now after discussion with you guys
10 years ago
Hi,

Last weekend one of my colleague faced the interview.Interviewer asked him Interface Vs abstract Interface.
He knows Interface he defined it well but for abstract Interface he replied same like interface but keyword abstract is used and it is redundant because interface is also abstract.But here we are explicitly write abstract for abstract Interface.

Interviewer was not happy with the answer.

I am also thinking what can be the best answer.Also same like interface but keyword abstract is used.

Like say:

Please throw some light on this abstract Interface.



Thank You!

Regards,
Rahul
10 years ago
Hi Techies,

Please provide me link or any reference of good book where i can practice more about collections(List,Map,Set and their classes).
I read SCJP 6 Kaithy seira book.But in that no examples like conversion of one to other(HashMap to List or to Set etc).
Is there any reference link of javaranch or tips for all these permutations and combination of collections?

I know this forum is more of discussion for particular problem,where inputs from the new topic user is always awaited.But I think sometime suggestions or helpful tips are also welcome to brush up our java skills.


Thank You!


Regards,
Rahul
10 years ago