I have this open-source library that I'm having some trouble fixing a problem... This library allows to easily create an XML file to store application settings. But I'm having an issue saving the changes.
I have another application where I'm using this library and every time that application window is done resizing, I call the Save() me...
I want to get contents of a .php file in a variable on other page.
I have two files, myfile1.php and myfile2.php.
myfile2.php
<?PHP
$myvar="prashant"; //
echo $myvar;
?>
Now I want to get the value echoed by the myfile2.php in an variable in myfile1.php, I have tried the follwing way, but its taking all the contents includ...
I have a relatively simple question. Say I have a file but I only want to access line X of the file until line Y, whats the easiest way of doing that?
I know I can read in the lines one by one keeping count, until I reach the lines that I actually need, but is there a better more elegant solution?
Thanks.
...
This problem occurs when I try to hide a file in my directory with a tool named File Lock. This is not a regular hide as I can not see it in windows explorer.
Code:
string[] textFiles = Directory.GetFiles(@"c:\mydir")
//0 files returned
string[] textFiles = Directory.GetFiles(@"c:\mydir", "*.txt")
//1 file returned: "c:\mydir\."
File....
I'm using a ProgressEvent in Flash to determine how long something will take to download. I've got this:
progress = event.target.bytesLoaded/event.target.bytesTotal;
to set a percentage.
After some scratching of my head, I did a trace on the two values - and it turns out that "event.target.bytesTotal" is always equaling zero.
I ca...
I've tried many tutorials online on how to increase the upload file size for a SharePoint document library with no luck.
Any ideas on how to increase the limit of file upload to a document library?
I've tried:
http://spsstuff.blogspot.com/2006/03/how-to-change-maximum-file-upload-size.html
http://www.eggheadcafe.com/software/aspnet/29...
I have text file of this kind
File 1
-------
ABC 123
DEF 456
GHI 111
And I have another file
File 2
------
stringaa ttt stringbb yyy
Ouput
-----
stringaa ABC stringbb 123
stringaa DEF stringbb 456
stringaa GHI stringbb 111
Reading the file File 1 update File2 such that the Ouput is produced, any ideas.
...
I'm trying to read a line using the following code:
while(fscanf(f, "%[^\n\r]s", cLine) != EOF )
{
/* do something with cLine */
}
But somehow I get only the first line every time. Is this a bad way to read a line? What should I fix to make it work as expected?
...
My customer sometimes receives "spam" messages on their BizTalk file drop locations i.e files not of the type expected by the receive location filter eg a .doc instead of a .xls. The file adaptor does not have an option to delete such "junk" - probably for good reason- , and we can not stop the sender of these files from occasionally sen...
This may sound newbie but, I am trying to make an external header that does a function that is reading from a file a name like joey and saving it as a variable to the other code it read from but i cant figure it out...It will be like this...One code will get this name and it will write it to the file...Then i want to use this header to r...
I'm updating some old code to grab some binary data from a URL instead of from a database (the data is about to be moved out of the database and will be accessible by HTTP instead). The database API seemed to provide the data as a raw byte array directly, and the code in question wrote this array to a file using a BufferedOutputStream.
...
I'm writihg a program in C# that needs to repeatedly access 1 image file. Most of the time it works, but if my computer's running fast, it will try to access the file before it's been saved back to the filesystem and throw an error "File in use by another process".
I would like to find a way around this, but all my Googling has only yie...
Hello everyone,
Here is my code which opens an XML file (old.xml), filter invalid characters and write to another XML file (abc.xml). Finally I will load the XML (abc.xml) again. When executing the followling line, there is exception says the xml file is used by another process,
xDoc.Load("C:\\abc.xml");
Does anyone have any ideas wh...
On Unix, everything is a file, so you can use file i/o functions with pipes, files, sockets, etc. But on windows, the api you use depends on the type of i/o HANDLE you have.
My question is: given a HANDLE how do you determine what the underlying type is? For example, I have a HANDLE that's either real file, or a named/anonymous pipe. ...
I am looking for a nice wrapper for extracting media file attributes dependent of file type.
I am creating a bit of a generic media library that can handle video, audio, images etc.
They are not just .wmv or .mp3, i would like to be able to support various formats and dont want to pigeon hole myself to an sdk like WMP SDK that seem to on...
I wrote these lines but i have NullReferenceException. please help me how to fix it!
string FullPath = TempPath + FileName;
System.Drawing.Image Adimg = null;
Adimg = System.Drawing.Image.FromFile(MapPath(FullPath));
I put these lines in a Public bool method and TempPath is class property and FileName is input for the method.
excepti...
So the good old HTML file uploader tag only presents a browse button (without associated text input) when rendered in a HTML based Adobe AIR application. Upon clicking the browse button, nothing seems to happen. I would expect a popup window so I can select a file. I've seen examples of people using Javascript to call the AIR runtime...
Hi folks,
I want to populate dropdownlist with values stored in a resource file. What's the best approach for this?
I can create a SelectList and push it in Model in which case dropdown would be populated automatically.
But can I access resource file from a View ? If yes, should I?
...
Hi,
I have a requirement to move certain files after they has been processed. Another process access the file and I am not sure when it releases them. Is there any way I can find out when the handle to the file has been released so I can move them at that time.
I am using Microsoft C# and .Net framework 3.5.
Cheers,
Hamid
...
The requirements are :
Fact 1 : We have some data files produced by a legacy system
Fact 2 : We have some data files produced by a new system that should eventually replace the legacy one
Fact 3 :
Both the files are text/ASCII files,
with records being composed of
multiple lines.
Each line, within a record, consists
of a fieldname a...