Hi,
I try to write and read object of class into and from binary file in C++. I want to not write the data member individually but write the whole object at one time. For a simple example:
class myc
{
public:
int i;
myc(int n) {i = n; }
myc(){}
void read(ifstream *in){in->read((char *) this, sizeof(myc));}
void...
I have been using stat() for checking the existence of a file, which I understand is better practice than trying to open a file.
However, stat() doesn't work for filenames containing unicode characters in other languages. Is there a wide character version of stat(), or something equivalent that I can use?
If not, what is the next accep...
I would like to read excel file in java. For that no classes are provided by java standard library. I have downloaded required classes but I am not able to import them.
One solution is jsp:usebean but they are near about 300-400 classes so I can't use usebean.
Please suggest another solution.
...
I looked and it doesnt seem possible but it might be. Using reflection i would like to know if two classes were compiled/defined in the same source file? I would like to use a class as a configuration file and found a way to do it per namespace but would like to use a per file solution
...
i need a solution to display open file dialog in html while clicking a div . the open file dialog box must open when the div is clicked.
note : i dont want to display the input file dialog as part of html page. it must be displayed as alert in javascript.
[i need open file dialog box when a div is clicked. it must be as like alert whic...
How do I build up an atomic file write operation? The file is to be written by a Java service and read by python scripts.
For the record, reads are far greater than writes. But the write happens in batches and tend to be long. The file size amounts to mega bytes.
Right now my approach is:
Write file contents to a temp file in
same d...
Hi,
is it possible to get a File or URI object for a file inside an archive with Java?
(zip or jar archive)
Thanks Hemeroc.
...
Hi,
Im have a xml config file called solrconfig.xml, it has this section in the middle of it:
<!--############ BEGIN replication settings DO NOT EDIT ################################-->
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replic...
I need to use AWT file choosers for my java app because we want to give users the native mac file chooser. Yes I know abut quaqua and we use it, but it does not use the native file chooser and mac users do not like it. The file chooser I am currently worried about sets the global propery:
System.setProperty("apple.awt.fileDialogForDir...
Hi everyone. I appreciate your effort tat helping newbies like me. I have the following problems and will appreciate urgent help.
PROBLEM NUMBER 1:
Using PHP and MySQL, I am able to upload picture successfully unto the server but not so with the file name of the picture even though other parameters in my form got inserted successfuly i...
How do I create a random unique filename in a directory (of my choice)?
Note: I don’t want this file in the system temp path but rather in the directory I specify
...
When I list files of a directory that has 300,000 files with Java, out of memory occurs.
String[] fileNames = file.list();
What I want is a way that can list all files of a directory incrementally no matter how many files in that specific directory and won't have "out of memory" problem with the default 64M heap limit.
I have Google...
I'm trying to open a simple .rtf file called test in C. I'm using Xcode. My code is:
#include <stdio.h>
#include <stdlib.h>
int main (int argc, const char * argv[]) {
FILE *filePtr;
filePtr = fopen("test.rtf", "r");
if (filePtr == NULL) {
fprintf(stderr, "Can't open \"test\"\n");
exit(EXIT_FAILURE);
}...
im trying to create a restaurant system that will create food items and such from a menu.
ill be learning jdbc soon and im sure that would help but for now i think the simplest way is too create my menu in notepad.
whats the best way to line up and read from a notepad file like a menu.
please try speak clearly, im not exactly sure of ...
hi
how can I share one or two aspx file in two separated solution
that if i change aspx file in both solution apply changes.
Is it possible in visual studio 2008 or in Team foundation server?
...
How can I check if a file exists in a war file? I know I can use
boolean doesExist = new File(myfile).exists();
but how do I use that in a java class in the war? The file.getAbsolutePath() just shows where the war file is running. I need to check if there is an image in another directory in the war that matchs the filename in the w...
I've been using Eclipse for about a week now and I'm loving it.. great software for the 'price'. :P However, I'm having a few issues getting started.
The most annoying, so far, has been opening files from outside of Eclipse, and having them set to open w/ Eclipse. When I open a file from the file-explorer or an external application (Win...
I have my own POSIX application which starts a child process. I want the parent process to be notified with the names of all files the child process reads or writes, as well as the file names of any child processes the child spawns, and any dynamic libraries it loads. Similarly, I need to monitor all child processes spawned by child proc...
hi ,
I am developing a ASP.NET by using c#.net and have many WMV files and have to watch the range of the file which I gave.The size of files are too big also the users shouldn't download the all of the file , should download between the range which I give . Is there anybody to help me ?
...
Hi folks,
I've got the problem that I have a MIME-encoded file with all relevant mail information (subject, from, to, ...) and want to send it over a defined SMTP server via C#.
I've looked at the MailMessage class and searched for a solution, but I couldn't find something fitting. Are you able to help me?
Thanks,
Matthias
...