I can run my Java Swing application from Eclipse without problems. But when I run it from a .jar-file, the images fails to load.
I load my images with:
setIconImage(Toolkit.getDefaultToolkit().
getImage(getClass().getResource("../images/logo.png")));
How can I load the images so they work even when I'm running from a .jar-file?
Hi,
I want to write the bulk of data into xml file ,the data coming from the backend(mysql) using cgi by httpservice, read the xml file and bind it into list...
can anyone send the sample code for this?
Thank's in advance..
Hi,
I have this code:
private static void saveMetricsToCSV(String fileName, double[] metrics) {
try {
FileWriter fWriter = new FileWriter(
System.getProperty("user.dir") + "\\output\\" +
fileTimestamp + "_" + fileDBSize + "-" + fileName + ".csv"
);
BufferedWriter csvFile = new BufferedWriter(fWriter);
for(int i = 0; i < 4; i++) {
for(int j = 0; j < 5; j++) {
csvFile.write(String.format("%,10f;", metrics[i+j]));
}
csvFile.write(System.getProperty("line.separator"));
}
csvFile.close();
} catch(IOException e) {
System.out.println(e.getMessage());
}
}
But I get this error:
C:\Users\Nazgulled\Documents\Workspace\Só
Amigos\output\1274715228419_5000-List-ImportDatabase.csv
(The system cannot find the path
specified)
Any idea why?
I'm using NetBeans on Windows 7 if it matters...
Hello,
Visual Studio C++ 2008
I have downloaded a sample project.
I converted the project from VS 7 to VS 9.
However, when I compile I get this error:
c1xx : fatal error C1083: Cannot open source file: 'WIN32': No such file or directory
Under project properties preprocessor definitions. I have WIN32 defined there.
I have never had this error before.
Many thanks for any suggestions,
How can i zip more than 1 file in GZipStream, i have 3 xml files and i want to zip them to one .gz file and when i decompress i should get all the 3 separate files.
Please help me with the code
Hi, In my project I need to watch multiple FTP Folders continuosly, if any new file comes i need pick the filename and do some process. If that is normal Windows/Local File System folder I can achieve this by using SystemFileWatcher of .net. Is there any thing like SystemFilewatcher to watch FTP folders?
Thanksnrk
hi.
I have fairly largefile, 20k lines long (auto generated).
It has been compiling okay, but after adding new if/endif preprocessor block, I started getting gcc internal errors: segmentation fault.
the code inside new preprocessor block is not being compiled, so I am not sure where the error is coming from. my only guess is memory, but as far as I can tell it does not exhaust computer memory.
Any thoughts?
I have a giant file (20 gigs) sitting on my source machine and I need to transfer it to my target machine. For the purposes of this question, let's assume that I do not have network connectivity between the two machines.
I need to break this file into a series of smaller files, write the smaller files to DVD(s), then re-assemble everything on the target machine.
Both source and destination machines are Linux boxes. Is there a way to accomplish this using tar? I have a feeling that I need to use the --multi-volume parameter. What are my options?
I need to be able to specify the size of the volume files, in order to make sure that each one will fit onto a single DVD.
Thanks!
Dear all,
I have a text file .let name is abc.txt .The file have info like this
jani
stay in USA
karim
stay in France
fara
stay in UK
Now i need to collect the information.the name is as nameString and the address is addressString.I have to put those information on anywhere else.So, i need all the name and address in a for loop.
Can anybody pls help me to collect this info.
Thanks in advance
Riad
How can I launch a new Git Bash window with a specified working directory using a script (either bash or Windows batch)?
My goal is to launch multiple Git Bash windows from a single script, each Bash terminal set to a different working directory. This way I can quickly get to work after booting computer instead of having to open Git Bash windows and navigating each one to the correct working directory.
i need to open a txt file and read it into a string in VBA, but i would like to only get the first 1000 characters.
the file itself is 20mb and i only need the first 1000 characters. is there a way to make this efficient?
I missed typed by scp command - didn't give target remote directory.
scp file root@remote-machine
It didn't say any errors and I don't know whether file is transferred or not . what happened here?
When i use this cmd line :
jar cmf arshad.mf ars.jar *.class
i get this error :
invalid header field name:Manifest-version
This is my manifest file :
Manifest-Version: 1.0
Main-Class:t
i made the manifest file with notepad in UTF-8 encoding - is there any problem with the manifest ?
I have a share folder ,which i want to grant access permission to few people only at certain times.i.e. while they try to access the folder ,i should be able to either allow or deny based on my wish.In short its run time access control ,not the static access control already present in windows.
Is there a provision to hook a exe as such?
I prefer to do it in C# .net
Hello all
i have application that convert data structure from the GUI to doc/pdf/rtf/html ... files
the structere logic contains the info about pages and data on each page so basccly i can convert it to every thing .
but my problem is that i wish to convert this structure to some kind of book that is
exe binary file . and i have no idea how or which ways i can do it ?
can you give me some ideas or solutions on who to embed book into exe file
Thanks
What's the simplest/canonical way to create an empty file in C#/.Net? Simplest way I can find so far:
System.IO.File.WriteAllLines(filename, new string[0]);
I was wondering if it were possible to dynamically create an XML layout file to be displayed to the user. The idea would be to be able to retrieve a layout file from a central server, which could display this dynamic, server driven GUI.
How do guys suggest to share a constants file between PHP and JavaScript, in order not to repeat code? XML file? I am assuming mixing up javascipt inside PHP would not be the right solution!? Thanks
I'm using simple code:
import urllib2
response = urllib2.urlopen("http://www.mysite.com/getfile/4355")
output = open('myfile.zip','wb')
output.write(response.read())
output.close()
The web-server is IIS + ASP.NET MVC 4
It returns FileResult wrapping a zip-file with "application/octet-stream" content-type.
The problem is that downloaded zip file is broken - only 4.1kB size, where it must be 24kB. When I type the url adress in web-browser directly - it downloads and opens fine.
Could you please, suggest, what's wrong with my Python code?
I have a problem with my Windows installation running very slow and my Windows folder being too large. I thought that the problems are related.
My Windows folder is 17.4 GB
I have 1807 folders totalling 2.4 GB that are prefaced with a $.
My System32 folder is 1.55 GB
My Microsoft.NET folder is 654 MB – I don't know what if any programs I have that are using it.
My Service Pack folder is 568 MB.
The Software Distribution folder is 536 MB
The ie8updates folder is 380 MB.
How can I reduce the size of these folders and could their size be why I am running do slow?
I have read this article from highscalability about stackoverflow and other large websites. Many large high traffic .NET sites such as plentyoffish.com, mysapce and SO all use .NET technologies and use SQL SERver for their database. In the article it says SO said
As you add more and more database
servers the SQL Server license costs
can be outrageous. So by starting
scale up and gradually going scale out
with non-open source software you can
be in a world of financial hurt.
I don't understand why don't high traffic .NET sites convert their databases to MySQL as it is waay cheaper then SQL Server