Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:I know i have to long way to achieve my solution, but at first step i got stuck. I am trying to get solution my self till i get clue from this website.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
But 36,000 lines in a .conf file? I fear your problems are only just beginning, my friend...
1
2
3
5
Millions saw the apple fall, but Newton asked why.
I guess you missed mine then.
Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:I am trying to add those lines by keeping it in array & array will insert it into the file 1 by 1. & those line nothing but 4-5 characters each one. I hope this will work...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
And it doesn't change the fact that:
1. Updating .conf files at all is not generally a great idea.
2. 36,000 lines doesn't sound like a file - .conf or otherwise - it sounds like a database.
Millions saw the apple fall, but Newton asked why.
1
2
3
[stations]
5
Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:Now program is something like it read complete file & try to find out where "[stations]"
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
1
2
3
[stations]
5
Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:I am trying to use Winston Gutkowski's ways, but till now i done as above. Is this wrong?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I have 1 file extension as conf. 810 lines in that.
At 806 line number contain "[stations]
below that i want to add n number's of entries by swing program which like combobox shows 90,900,9000 select one.if any thing select if we consider this as m then (m*4) lines add in particular conf file.
So if i select 9000 then 9000*4=36000 lines in particular file.
For doing this i want to measure how much nanosec utilize by system. Trying to find out program which takes minimum time to do all thing.
line1
.
.
line805
[stations]
mandar added custom line1.
line808
line809
line810
Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:So all this comes under 'file handling in java'...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
No it doesn't, IF YOU FOLLOW MY ADVICE.
Don't try to update the file directly. Put your lines in a List and update that.
Millions saw the apple fall, but Newton asked why.
Millions saw the apple fall, but Newton asked why.
Mandar Khire wrote:Now in this program is there any mistake?
I worrying now about few things...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |