file

How to share a static variable between C++ source files?

Hello, I don't know if it is possible to do this, but I have tried several ways and nothing seems to work. Basically I need to access the same static member from several files which include the same class definition. // Filename: S.h class S { public: static int foo; static void change(int new_foo) { foo = new_foo; ...

View returned file from Webservice method

I already have a method in my webservice that returns a byte[] containing only the bytes of the file downloading. The invocation is something like: http://www.mysite.com/myWebservice.asmx with: string fileId = "123"; bytes[] fileContent = myWebservice.Download(fileId); What I wanted to do is be able to invoke this method or other (to...

php file error. silly small problem

works fine on the desktop with xampp but when i upload it to my webhost it doesnt. The file x.csv is in the same dir $csv_file = "x.csv"; $handle = fopen(($csv_file), "r"); the error i get is- fopen(x.csv): failed to open stream: No such file or directory in /var/www/html/x/admin/import_one.php on line 12 Where am I going wrong? ...

Redirecting stdout to a file in C through code

Hi, I am having the output in stdout. how to redirect that to a new file through code ? While we run the program we can redirect like ./sample > test.txt. how to make this happen when executing the sample program itself ? (C programming) Thanks, Vinod. ...

Read Data From Text File PHP

Hi, I'm just wondering how I can read a text file in php, I'd like to have it display the last 200 entries (their each on a new line) from the text file. Like John White Jane Does John Does Someones Name and so on Thanks! ...

How can I asynchronously monitor a file in Perl?

I am wondering if it is possible, and if so how, one could create a perl script that constantly monitors a file/db, and then call a subroutine to perform text processing if the file is changed. I'm pretty sure this would be possible using sockets, but this needs to be used for a webchat application on a site running on a shared host, and...

FindFirstChangeNotification API

I am using FindFirstChangeNotification API to monitor the changes happening in a particular folder.But how to exclude a particular file(present in the watching folder) change notification Only. ...

Read txt file using Javascript

I am taking a text file from user and then posting that file back to the browser using ajax storing the content in db and then showing the content back to user page using Jquery post response. Now i want to something like this.. Read the text file from the user computer using javascript. Display the content and when he submits the page...

Inexpensive ways to add seek to a filetype object

PdfFileReader reads the content from a pdf file to create an object. I am querying the pdf from a cdn via urllib.urlopen(), this provides me a file like object, which has no seek. PdfFileReader, however uses seek. What is the simple way to create a PdfFileReader object from a pdf downloaded via url. Now, what can I do to avoid writing...

in c shell, how to open a file that contains a single digit

I need to open a file using c shell. The file contains a single integer, and I need to put it into a variable, increase it and put back into the file. Meaning, if the file contains the number 5, I need, after the program runs, that the file contains the number 6. Any suggestions? ...

I need to find a file in directory and copy it to a different directory

I merely have the file name, without extension (.txt, .eps, etc.) The directory has several subfolders. So, the file could be anywhere. How can I seek the filename, without the extension, and copy it to different directory? ...

How to retrieve files/documents that are not found on the web server machine.

I am trying to create an export feature for a user to be able to download documents into a zip file. I have the feature working when the files are located on my local and I can use an absolute path on my local. But after talking to the infrastructure team, I found out that the documents are not stored on the same machine as the web serve...

IPhone sdk accelerometer delegate question

in my app the accelerometer lags. a lot. i think it might be to do with the fact that all of my code is running through my main . h file which is also the accelerometer delegate like this: @interface MainView : UIView <UIAccelerometerDelegate> { IBOutlet UISlider *sensitivity; float valueX; CGPoint pos; NSTimer *maintimer; NSTimer ...

How can I access a specific range of bytes in a file using Perl?

What is the most convenient way to extract a specified byte range of a file on disk into a variable? ...

How can I tell what files are currently open by a process (i.e. my app)?

I am using a Lucene.Net index and want to give the user an option to move the index, but am having trouble closing it down so the directory/contents can be moved (I keep getting access denied exceptions). I need to be able to have some more information so I can debug this problem, such as being able to tell what files are currently open,...

Directory Search

This is a simple question and I am sure you C# Pros know it. If you want to grab the contents of a directory on a hard drive (local or otherwise) in a C Sharp program, how do you go about it? ...

Using pipes inside a class in C++

I'm trying to use this tutorial to make plots with Gnuplot in C++. However I will be using the pipe to Gnuplot from within a class, but then I run into some problems: I've got a header file where I declare all variables etc. I need to declare the pipe-variable here too, but how do I do that? I've tried doing it straight away, but it do...

How do i get readdir ignore directories in C/C++?

Hello all, I am reading the content of the current library with readdir, but I would like to treat only files and not directories. How do I know that I am pointing to a directory and not to a file? Thank you ...

reading excel file in vb.net

can anyone help me on how to know EOF of excel using vb.net? i have this code but it crash when i try delete the proceeding rows from row 6 to downward. my problem is, my code was still reading a null values of rows that i deleted in excel.. this is my code: Dim xlsConn As New OleDbConnection Dim xlsAdapter As New OleDbDataAdapter Di...

C#/.NET: Retrieving the contents/file attributes from a file inside a recycle bin

Hi, I just wanna ask if there's a possibility to retrieve the contents of a 'dump' file from the recycle bin programatically. The contents that I'm looking for are file attributes like 'Date Last Modified, 'Data created', 'size', etc (without restoring the file itself to the original location to preserve the original attributes found wh...