Is there anyway this program can work the way I want it to work!!??
Since I had no idea, how to make a new line in .txt in my program(writeBytes("\n") will just make a rectangle in the .txt file)..i decided that I should make a method..below:
public static String makeLine(int bytesReq)
String lines = " ";
//bytesReq /= bytesReq;
for(int i = 0; i < bytesReq; i++)
lines += lines;
return lines;
}I wanted program to create a string of empty spaces..depending on the number so I can use it later...in this code..which transfers the stuff inside my link list into the .txt file...
public static void loopList()throws IOException
try
RandomAccessFile rand = new RandomAccessFile(filet, "rw");
EmpLink current;
current = first;
if(first==null)
delay(options.geTime());
System.out.println("List is empty!");
else
//rand.seek(filet.length());
while(current != null)
for(int i = 0; i < options.getLoops(); i++)
rand.seek(filet.length());
rand.writeBytes("ID: "+current.emp_id + " Name: " + current.fname + " Surname: " + current.lname+" ");
rand.seek(filet.length());
rand.writeChars(makeLine((int)filet.length()/2));
current = current.next;
delay(options.geTime());
System.out.println("TRANSFER COMPLETE!!");
System.out.println();
catch(Exception enk)
System.out.println("");
System.out.println("There has been a fatal error during execution!!");
System.out.println("");
}when I compile it seem to work but when I run it...it has a OutOfMemoryException..and I don't know why..later I used the length of the string of the ID, Firstname, Lastname but then...something weird happens....
all of them is repeated three times in .txt and I have no clue why?..
And right now the .txt file has some kind of east asian characters written in it and is 513KB and still don't have a clue why...
all I want is to have the next set of data go into the next line....
Please help...
DaDonYordel wrote:
Since I had no idea, how to make a new line in .txt in my program(writeBytes("\n") will just make a rectangle in the .txt file)..i decided that I should make a method..below:
public static String makeLine(int bytesReq)
String lines = " ";
//bytesReq /= bytesReq;
for(int i = 0; i < bytesReq; i++)
lines += lines;
return lines;
This returns a string 2^bytesReq long because it doubles in length on every pass.
Similar Messages
-
I am trying to restore a backup onto my iphone from itunes on a pc windows 8 but it asked me for a backup password which I cant remember, is there anyway that I can reset the password and not lose my backup? Any help is very appreciated
Try entering the password on your iPhone
-
I lost my iphone4 n now have an iphone5. I never had it enabled with iCloud.
Is there anyway I can retrieve the photos n contacts onto my iphone5???ONly way is to restore from backup http://support.apple.com/kb/HT1766
If you imported the pics from your camera roll to your computer, you can sync it back using itunes.
If you don't have either, then sorry there is no way to get those photos on your phone. -
I changed my "invert colors" to negative and i love the way the apps look. But is the anyway i can keep all the apps looking like that but keep all my pictures the normal colors?
no
-
Is there anyway that I can view the program code behind the vi diagram?
e.g. to view the vi code in C++ instead of G.
G is translated into assembly code directly.
There is no low level language like c needed.
So there is nothing to view except assembly coding.
greetings from the Netherlands -
I have only had my iphone 5s for two months and the charger has stopped working. Is there anyway that I can recieve another.
take it to an Apple store genius bar ,it has 12 months warranty and they will check it out
-
Hello, I have deleted my hotmail account and it deleted all the names with my contacts. Is there anyway this can be fixed?
Yeah, add the Hotmail mail account back to the device. It sounds like your missing contacts were synced to your Hotmail account.
-
While Installing this error is coming This Program can not display the pag
When I Try to Install SAP B1 8.8 on Win server 2008.
I am receiving this message.
This Program can not display the page
The website is encountering Problem
There might be a typing error in the address
At the time of Installation which site we need to access.
My Internet is working.
Still i am facing this Problem please suggest me what should I do.HI Ram ,
Internet is not required while Installation .
Go through :
Re: SAP Business Installation
Thanks
Ashish -
Having trouble retrieving a word document,
I cant find my assignment anywhere on my Mac, and when i look at where i saved it, its like it has reverted back to when i first saved it, without all my work that i have completed.
Is there anyway that i can retrieve my work?Hey merodi,
I dont fully understand your problem here,
1. Did your computer shut down or 'die' or did you save and then you cant find it?
2. Have you tried looking in spotlight (little magnifying glass up the corner)
3. Have you tried opening the program again? In word and pages, if the program exited forcefully, opening it again will restore the document. -
My mom updated her iPhone to iOS7, and now she has my contacts. Does this mean that she has access to all of my photos as well? How can she 'unlink' our phones? Or, is there anyway that I can get my stuff to disappear from her phone? We share iTunes account so I think we are both on the same iCloud.
Welcome to the Apple Community.
If you are using the same ID as a primary iCloud login, then yes she can see your photos in photostream if you have it enabled.
You can use the same ID for iTunes so you can share all your purchases, but you need different ID's for iCloud.
Unfortunately, the mess caused by sharing the ID, will need to be sorted manually, once you both have your own ID's. -
i dont remember the first apple id that link with my clash of clans apps. the problem now is i need to link my COC village and it keep saying "please log in with correct game center" is there anyway that i can retrieve my old apple id? please help me i dont want to lose my village, i have spent my money on that game to much. hmmm
thanks mate, but the problem is im using different apple id now, and after about 1 year play coc and today i want to link the village , suddenly coc said that
thats mean im playing this village with different apple id and it not saved. and the problem is i dont remember the first apple id and password that i use first time to download this game. hmmm it was so confusing, why coc and game center just make this thing saved with a new game center account. -
How can I get this program to work -- Adobe Send or Adobe SendNow
How can I get this program to work? I have used Adobe SendNow successfully for several years and am on automatic renewal and getting nothing but frustration for my money! I have been unsuccessful at sending anything in the past several months. Today while working on a deadline and many unsuccessful attempts to upload files, I signed up for a free trial at a competitor in order to get my files sent. Want a refund -- or better yet, keep my money and get it to work right again.
You can't.
Sounds like it he gave you a stolen iPhone or at least a worthless one. -
iTunes error: This program can't start because iAdCore.dll is missing from your computer. Try reinstalling the program to fix this problem.
Windows 7 Professional. AMD 64 bit processor. New install of itunes.
Unable to uninstall. Unable to reinstall. Sigh.THANK YOU! turingest2
See Troubleshooting issues with iTunes for Windows updates.
This Fix WORKED!!!!! And had aready tried MANY others first...
https://discussions.apple.com/docs/DOC-6562#iadcore <-- This is a direct link to solution... -
Layout - This Program can not display the webpage
Hi Experts,
I am trying to create adobe forms in Webdynpro ABAP, for that I created a Webdynpro component and then view in it and created the required attributes and nodes and the pdfsource as xstring type.
When I go to Layout tab it showing "This Program can not display the webpage" and in route element container I created an element and gave as of Interactive forms but the system is not creating any interface nor going into adobe live cycle designer.
Is it the problem with the Live Cycle Designer or what exactly I have to do now.
Please help me out.
Thanks,
PraveenHi.,
This seems that u didnt maintained host entries.,
Click Run -> enter drivers -> goto etc folder -> double click on hosts file -> open with note pad.
there u need to enter the host entries., like .. 192.....<server_address> <tab> <domain> <tab> <host>
ask ur basis team., they will configure that..,
hope this helps u.,
reply if u need some more clarifications.,
Thanks & Regards
Kiran -
Is there anyway this can be done?
I am building a po number form, is there anyway that I can put a command in that everytime it opens it puts a new po number in in consecutive order?
I need to make it so that who ever opens it, it will auto generate that number thanks for whoever helpsFirst you have to write the web service. This typically uses a
database and some kind of locking to provide the updated number. In
other words, the number has to be kept SOMEWHERE. A direct database
connection is another possibility.
Aandi Inston
Maybe you are looking for
-
SRM 4.0: Source of Supplier not copying in line item on Shopping Cart
We are using SRM 4.0 in an extended classic setup and currently experiencing a problem with the source of supplier not being copied on line items. The user stated that when copying a line items in a shopping cart the source of supplier is not copyin
-
Does anyone know if a logic board from Dual USB G3 12" will fit in a Dual USB G3 14"?
-
Calendar sync between iCal, Outlook 2011 and 2010 and iCloud
All, I'm having trouble syncing calendars on my devices and I haven't been able to find a workable solution yet. I know this topic has been covered extensively, but I haven't found anything that works. I want to be able to sync my calendars (email wo
-
Repository changes in online mode in HA environment
Hello, Is it possible to make changes to the rpd in online mode within a highly available (horizontally scaled on two virtual hosts, Host1 and Host2) OBIEE 11g environment without disrupting users? Here's what currently happens in my environment, and
-
Windows 7 64bit Office 2010 64bit and Captivate v5.5
I am due to have a new PC with Windows 7 64bit and Office 2010 64bit. I am running Captivate v5.5. Does anyone know if I am going to run into any problems with the above PC spec when working with Captivate v5.5? Thanks in advance, Noel