Typical approaches recommend reading the binary via FileStream and comparing it byte-by-byte.
Would a checksum comparison such as CRC be faster?
Are there any .NET libraries that can generate a checksum for a file?
...
Hi,
I’m working with Lucene 2.4.0 and the JVM (JDK 1.6.0_07). I’m consistently receiving “OutOfMemoryError: Java heap space”, when trying to index large text files.
Example 1: Indexing a 5 MB text file runs out of memory with a 64 MB max. heap size. So I increased the max. heap size to 512 MB. This worked for the 5 MB text file, but...
I'm really new to php but what I want to do is make a dynamic table of contents for some of my companies job offerings.
so if i put all the pdfs of the job descriptions in a folder called ../jobops with the php file located in root directory what would i need to do.
...
A while ago I wrote a plan management system for the council that I work for, which lets us store all the old and new plans in digital format with information associated with via a access database(I didn't know MS SQL server at the time).
Each plan has a unique plan ID which is just a auto incrementing int (primary key), a title and ...
Here is my current code (that i am very proud of for my first attempt at php)
<?php
$files = glob("/jobops/*.txt");
$indexcount = count($files);
sort($files);
print("<br>"+$indexcount+"<br>");
foreach ($files as &$file)
{
print("<a href=\"$file\">$file</a><br>");
}
?>
the problem is glob again works fine in the root directory (whe...
I'm using the follow command to get a list of FileSystemInfo's
IList<FileSystemInfo> requestFiles =
new List<FileSystemInfo>(
_RequestDirectory.GetFileSystemInfos(GetSearchPatern()));
Get search pattern returns "*.exr". The list still includes files that end with ".exr2", but does not include thos...
I am storing files into an image field in SQL server storing the string in hex after converting into using:
unpack("H*hex", $datastring);
If I read from the database and write to a file, then open the file locally I can open it up just fine. But if I try to send the file as an attachment to the browser the file becomes corrupted and u...
At work I've been dealing with some complex forms (publish pages of Symphony) that contain multiple image upload fields. I need a way to quickly merge $_FILES with $_POST, unfortunately you cannot simply merge the two with array_merge because they don't follow the same structure.
Basically if you have $_POST[a][b] it would be $_FILES[a]...
As, the title says. I'm encountering redefinition errors due to including header files multiple times. I know its because of that, but I don't know how to resolve. Yes, I previously posted the same problem in SO an hour ahead. But I wasn't able to explain properly (I think so) and didn't get answers expected. Here is the link:
C++ Redef...
Short of recursing and comparing dates of files/directories, is there a better way of getting a list of all files and directories that have been changed on an NTFS drive since a particular date?
...
I need to compress some binary files as quickly as possible with PHP - it needs to be reasonably fast and easy to use. What options can you fantastic people recommend? :)
Jamie
...
I have a folder C:\Scripts. In that folder I have 2 sub folders, Procedures and another Views. In the Procedures folder I have 2 files
proc1.sql
proc2.sql
in the Views table I have 2 files
view1.sql
view2.sql
I am trying to combine these files into one .sql file with the following batch file
Copy Procedures\*.sql proc.sql
Copy Vie...
I'm wanting to read hex numbers from a text file into an unsigned integer so that I can execute Machine instructions. It's just a simulation type thing that looks inside the text file and according to the values and its corresponding instruction outputs the new values in the registers.
For example, the instructions would be:
1RXY -> ...
Hi
How can I create the preview image for MS Office files like word, excel , power point in cocoa. Can anyone suggest me on this like how to handle those file?. I tried using the Bitmap representation of the .doc files.It dint work.. Which API i can use?..
thank you..
...
There is an asp.net page receiving some request parameters.
When everything is fine, it returns somehow a file to download.
When not, it inserts an error message into this page.
The file doesn't exists in hard-disk, it will be created by my page.
Do you know how to do that?
EDIT: In fact, the file exists in hard-disk, but it is embe...
I'm trying to build a blog/messageboard that uses static HTML files to serve content. I know MovableType used to manage their blog engiene this way, but using Perl CGI scripts. How do I edit/append to HTML files preferebly using PHP? What other methods would people reccommend?
...
I have one button and one textbox on form. When I click on the button, Microsoft Word is started. When the user closes Word, I want to get the file name that the user saved his work under to show up in the text box.
I am using the following code for button_click:
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessS...
We have a part of our program which can save a diagnostic file for the user to email to us so we can help them with problems. We have the option of saving it to the desktop, and it seems to be the prevailing idea at the time. However, I have these two questions:
Is there any instance where we WON'T be able to save to the desktop? I ...
I have quite a lot of music files but their title attributes have the track numbers infront of them, like 01.TrackName, 02.TrackName.
What is the best way to strip off integers from the file attributes?
Edit: I am using windows and all music files are MP3. Any solution as batch files, c++ or .net etc will be appreciated.
...
A pretty silly trivial question. The canonical example is f = open('filename'), but
f is not very descriptive. After not looking at code in a while,
you can forget whether it means
"file" or "function f(x)" or "fourier
transform results" or something else. EIBTI.
In Python, file is already taken by a function.
What else do you use...