Hi, I need to convert a CSV file from iso to UTF-8 to keep the accents in the database.
French accents (é,è,ê, and the like) are not kept when I try to translate them to UTF-8, they are changed to "?".
I'm stumped.
I use the following function for the translation:
public static string iso8859ToUnicode(string src) {
Encoding...
Hello,
If one of my processes open a file, let's say for reading only, does the O.S guarantee that no other process will write on it as I'm reading, maybe
leaving the reading process with first part of the old file version, and second part of the newer file version, making data integrity questionable?
I am not talking about pipes which...
I have recently had a few issues when checking out a colleagues ASP.NET project, that causes the Project to get into a conflicted state because of the WEBINFO file being checked into SVN.
Does this file need to be in the repository or should we exclude it?
...
We have a SharePoint Document library, where we store html files with links to external files. Samples:
mypicture.jpg.html
mywordfile.docx.html
mypdffile.pdf.html
and so on. Now by default all Files show up with the HTML Icon, referenced in the DOCICON.XML file. Thats of course correct as the .html extension shows, it is a HTML file....
If you have 1,000,0000 source files, you suspect they are all the same, and you want to compare them what is the current fasted method to compare those files? Assume they are Java files and platform where the comparison is done is not important. cksum is making me cry. When I mean identical I mean ALL identical.
Update: I know about ...
I need to do a small application able to dump the contents of a CommView .ccf file.
Does anyone know the format of this file type?
Is the content mangled or encrypted?
Any help will be usefull :D
Thanks
...
I have the below methods:
public static byte[] ConvertFileToBytes(string filePath)
{
var fInfo = new FileInfo(filePath);
var numBytes = fInfo.Length;
var dLen = Convert.ToDouble(fInfo.Length / 1000000);
var fStream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
var br = new B...
I am realatively new to C#.
I need to open bunch of code files under some directory and get particular lines out that contains some matching string.
Its a simple problem, I can open files one by one using stream reader and then parsing them line by line.
I was wondering if there is more efficient way of doing the same. Like I am under t...
I'm writing an Windows Mobile application and I'd like to get a list of files in a certain folder on the device. Is there an API to use to read information about folders and files in the device file system?
...
This is in relation to this other SO question which asks how to overwrite an existing file.
The top answer is this:
FileStream file = File.Open("text.txt", FileMode.Create);
My answer was this:
FileStream fs = System.IO.File.Create(fileName);
As of when I wrote this question, the tally was 14-0 in favor of Open.
If votes are an i...
I would like to have a git repository that consists mainly of binary files.
I need to keep track of the changed, added and removed files to the repository, but I don't want for git to version the content of the files themselves.
In other words, I just need for git to keep track of changes (change log), but not the content.
Is this ev...
I'm trying to write a simple ruby script that will copy a index.tpl to index.html in all of the subdirectories (with a few exceptions). But I'm getting bogged down by trying to get the list of subdirectories
...
I'm trying to write a simple python script that will copy a index.tpl to index.html in all of the subdirectories (with a few exceptions). But I'm getting bogged down by trying to get the list of subdirectories
...
Hello,
I have a web control with some custom javascript. The javascript creates new file upload controls on the client dynamically using code similar to:
var newFileUpload = document.createElement('input');
newFileUpload.type = 'file';
container.appendChild(newFileUpload); // where container is a div
This exists in an ASP.NET form wi...
I can't seem to get a reliable timestamp using winapi functions. For example:
int main(int argc, char *argv[])
{
HANDLE file;
BY_HANDLE_FILE_INFORMATION finfo;
SYSTEMTIME systime;
file = CreateFile("test.txt",GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
GetFileInformationByHandle(file,
FileTimeToSystemT...
I have a variable in code that can have file path or url as value. Examples:
http://someDomain/someFile.dat
file://c:\files\someFile.dat
c:\files\someFile.dat
So there are two ways to represent a file and I can't ignore any of them.
What is the correct name for such a variable: path, url, location?
I'm using a 3rd party api so I can'...
Lets say I used a program that read a file and that the program was finished. Now ,
most likely that parts of the file still reside in the physical ram (lets assume I have huge amount of RAM).
Is there any way to know which parts of the file reside in the physical ram? Is there any tool that can do it or maybe a winapi function call?
...
How is the Best and fastest way to do it?
...
I often do the command such as:
mv folder $something_that_does_not_exist
mv files* $something_that_does_not_exist
Then, I realise that my files are gone. I cannot see them even in the folder "$something_that_does_not_exist". Where have my files and folders gone? How can I get them back?
...
Let's take an example. A "file1" -file has a content "file1", its own name. A "file2"-file has a content "file2", again its own name. The pattern continues until we have covered 77 files. What is the easiest way to do the 77 files?
Since I tend to have hard time in compiling, I sum up some details.
Intructions how to compile the codes
...