Anyone know how to test if a string is a valid file name in Mac OS X, other than trying to create file with that name?
The issue I'm having is that sometimes, a file name can be too large. OSX has a byte limit for filenames and with unicode characters you can't just check the length of the string since they can be more than 1 byte.
...
I want to input a file into an array, and if the file doesn't exist, the program exits. I have a lot of stuff to input from the command line, and if I make a typo the program exits and I have to enter it all again. How can I create an error message that keeps the program running, and lets me retry typing the file name right.
FILE *fp;
...
Hello-
I need some type of script or command that when triggered, opens up the most recent timestamped .jpg file within a specific folder ex: c:\images
I will use autohotkey to call the script/command (AHK may even be able to execute for all I know) at specific intervals.
Any help appreciated.
Thanks!
...
Is there any way in which .java files on a web server, that are linked via a tag, could possibly, conceivably, cause damage anywhere -- on the server or client machine?
I don't see how on Earth that could possibly happen -- we're talking about an ASCII text file and an anchor tag, but I have been dealing with an IT person who will no...
Hi,
I have a windows service that needs to send an attachment through email. This service does not have access to the file location. So, I need to write something that the windows service will call and get the file stream from.
What is the best approach to accomplish this.
I have tried creating a webservice that will write the strea...
i lost my VB6 Project source files accidentally. but i have the executable files. is it possible to convert the exe files to VB Projects? is there any opensource/free decompiler available?
...
I am building an update system in which I need to be able to replace a referenced jar of a running application jar at runtime. I am finding I am running into file locking issues on Windows when trying to perform file utility functions on the jar such as 'setLastModified'.
After some googling I found this snippet...
What I found in m...
For example:
$file = fopen("File.txt", "r");
$filename = $file->basename;
if there was a method like basename for file objects (file pointer resources).
...
With a html type=file, how can I tell if file was uploaded.
Is there something in the $_POST values to indicate so?
<form action="program" enctype="multipart/form-data" method="post">
<input type="text" name="textline" size="30">
<input type="file" name="datafile">
<input type="submit" value="Send">
</form>
...
With a html type=file, how can I validate to determine if a file was uploaded, (for client side validation using javascript or jquery)
<form action="program" enctype="multipart/form-data" method="post">
<input type="text" name="textline" size="30">
<input type="file" name="datafile">
<input type="submit" value="Send">
</form>
<script>
...
I have a problem and what I think is the solution. I feel that my solution is not new but don't know of any that have solved the problem the way I would like to.
I write custom websites that integrate with an off the shelf cross media platform. We have three installs of this platform. Dev, staging and production. Nothing surprising here...
Does someone know how to save and restore an object to a file on android ?
...
Im trying to use openFileOutput function but it doesnt want to compile... doesnt recognize de function. Im using android sdk 1.6. Is this a sdk problem ? Is this a parameter problem ?
import java.io.FileOutputStream;
public static void save(String filename, MyObjectClassArray[] theObjectAr) {
FileOutputStream fos;
try {
...
I have a directory that has rwxrwsr-x as its permissions and I need to set group to rwx. How can I do this on the command-line? I have root access.
...
How can I create a Uniform Type Identifier file for OS X with PHP?
...
Hi, if anyone hacks a site, then I would like to check which files are changed maybe in the last 24 hours in the directory htdocs, that means the files in the subdirectories form htdocs too. How to do this?
I will be happy for any suggestions,
Cheers
Nik
...
I'm a bit new to java, When I assign a unicode string to
String str = "\u0142o\u017Cy\u0142";
System.out.println(str);
final StringBuilder stringBuilder = new StringBuilder();
InputStream inStream = new FileInputStream("C:/a.txt");
final InputStreamReader streamReader = new InputStreamReader(inStream, "UTF-8");
final Buffe...
Is there any way that I can link a keyword in a TextView to a file or directory on the user's SD card? My app produces stack trace files when it crashes and I want the user to able to click a link in my About dialog to view either the latest one or the folder containing all of them. (Something like "If this app crashes, please send [link...
I've got a pretty big comma-delimited CSV log file (>50000 rows, let's call it file1.csv) that looks something like this:
field1,field2,MM-DD-YY HH:MM:SS,field4,field5...
...
field1,field2,07-29-10 08:04:22.7,field4,field5...
field1,field2,07-29-10 08:04:24.7,field4,field5...
field1,field2,07-29-10 08:04:26.7,field4,field5...
field1,fie...
Ruby
req = Net::HTTP.get_response(URI.parse('http://www.domain.com/coupons.txt'))
@play = req.body
req.body give me the entire page in to a string. What if I just want to read line by line? gets? Can you read line by line through a http get? Or do I just need to read a file from local?
The text file looks like this
1 John Ham 25,0...