Is there a reliable way to determine whether or not two files are the same? For example, two files with the same size and type may or may not be the same binarilly (yeah, I know it's not really a word). I assume that comparing one or two checksums of the files will help, but I wonder:
How reliable are checksums at determining whether t...
I'm trying to have libcurl download a local file with this name:
C:\Users\Lucas Meijer\Desktop\我能吞下玻璃而不傷.chinesefile
But can't seem to be able to find the proper url encoded string that will make libcurl find this.
...
Hi, I'm working on an update for an already existing iphone app. The existing version contains a .sql database file which is used in the app.
I would like to use a new version of this file in the update of the app. On the first startup of the existing app the .sql file is placed in the caches directory of the users iphone. From what I c...
Hi,
I'm writing an application that will ship in two versions: Android and PC version.
Is there a simple way to access files from the shared code?
Using java.io is simple, but I don't know how to access android resources or assets using it. And I can't write methods that operate on FileInputStreams instead, because some files contain r...
I want to completely replace one directory on the file system with another directory in a temp directory. The tricky part is that the files in the folder to be replaced could be being used at any time, causing the replace operation to fail.
I need to somehow wait on an exclusive lock on the directory so that I can delete all of its cont...
My application keeps on giving the following error relating to Unable to load config class org.apache.struts2.s1.ActionFormValidationInterceptor. Which jar or config file can I add to make this work?
Thanks,
2010-05-11 15:01:04,171 WARN com.opensymphony.xwork2.config.providers.InterceptorBuilder.warn:45 - Unable to load config class ...
I want to recurse several directories and find duplicate files between the n number of directories.
My knee-jerk idea at this is to have a global hashtable or some other data structure to hold each file I find; then check each subsequent file to determine if it's in the "master" list of files. Obviously, I don't think this would be ve...
We´ve migrated from CVS on AIX to SVN on Linux via CVS2SVN. The migration seems to have went well but when working in SVN we get a lot of Tree Conflicts that doesn´t seem to be conflicts at all? Looking at the revision graphs, one can see that the graph for e.g. trunk and a branch isn´t the same, i.e. they contain different sets of revi...
I have an asp.net website and I allready did .Dispose() here is my code below;
try
{
MailMessage newMail = new MailMessage(MailFrom, MailTo,
MailSubject, MailMsg);
if (MailAttachment != "")
{
Attachment data = new Attachment(MailAttachment,
MediaTypeNames.Application.Octet);...
let's say I opened a file, then parsed it into lines. Then I use a loop:
foreach line $lines {}
inside the loop, for some lines, I want to replace them inside the file with different lines. Is it possible? Or do I have to write to another temporary file, then replace the files when I'm done?
e.g., if the file contained
AA
BB
and ...
I would like to know if there is any way a file can be moved only if the destination does not exist - in other words, move only if it does not lead to overwriting.
mv --update
seemed first to be the solution, however, if the timestamp of the source path is newer than the destination, move will overwrite it and all attempts to circumve...
I'm currently working with extremely large fixed width files, sometimes well over a million lines. I have written a method that can write over the files based on a set of parameters, but I think there has to be a more efficient way to accomplish this. The current code I'm using is:
def self.writefiles(file_name, positions, update_valu...
I have a program (just exe) that is not able to OpenFile.
Its a log file to write to so I just need to place an empty file.
But I don't know the name or location of it, and have dug around the registry and ini and inf files to no avail.
-Should I use a system hook? FileWatcher, And ideas would be appreciated.
...
Hi!
I'm using AJAX with PHP to read from a file and update the div's innerHTML.
It works on Chrome and Firefox, but not in Internet Explorer.
I tried to use:
But I think it is useless, since I'm not refreshing the page.
if(!$newMsg || $newMsg == "") { // only reading from the file
// do nothing
} else {
$fileData .= "$new...
I have a text data file which contains text like this:
"[category.type.group.subgroup]" - "2934:10,4388:20,3949:30"
"[category.type.group.subgroup]" - "2934:10,4388:20,3949:30"
"[category.type.group.subgroup]" - "2934:10,4388:20,3949:30"
"[category.type.group.subgroup]" - "2934:10,4388:20,3949:30"
34i23042034002340 -----
"[category.ty...
Each day an application creates a file called file_YYYYMMDD.csv where YYYYMMDD is the production date. But sometimes the generation fails and no files are generated for a couple of days.
I'd like an easy way in a bash or sh script to find the filename of the most recent file, which has been produced before a given reference date.
Typic...
Hey Guys
Im looking for a jquery or ajax file uploader, Im currently using the FancyUploader which worked great until Flash brought out their update making all flash progress bars absolete, now whenever I try to upload large files... it will fill the progress bar to 100% in a matter of seconds even though the actual upload finished minu...
How does one paginate a large listing of files within a folder?
I can't see any functions in the PHP documentation that mention any way to specify an 'offset'. Both glob() and scandir() simply return all the files in the folder, and I'm afraid that won't be a good idea for a huge directory.
Is there any better way of doing this than si...
Hi,
I use Eclipse 3.5 on Windows, with PDT and Subclipse plugins, with both legacy projects using ISO-8859-1 encoding (latin-1), and newers ones wich use UTF-8. I configured my workspace to use UTF-8, and I configured old projects to use latin-1. But every time I open an old project, it use UTF-8.
With a workspace using latin-1 by defa...
Hi,
I have winforms application and it has reference to library MyLibrary.
MyLibrary has method:
string[] GiveMeNamesOfAirports()
{
string[] lines= File.ReadLines("airports.txt");
foreach(string line in lines)
...
}
And when I run my Winforms application:
I get error:
file couldn't be find.
I was trying other function:
string[]...