file

Determining what is causing massive log file growth on a basically inactive SQL 2005 DB

I have a SQL DB in a test environment that ist he back end datasource for a test web site. There is no activity on the website (because it is in our test environment) but every couple of days the DB log files grow extremely large causing issues with backups, etc.. This is a test environment so there is no activity that we don't have co...

How to use open() a file in osx so that other threads can't remove it?

I want to implement a file level locking in my app. ...

how to write an address (pointer) in a text file that can be read and dereferenced in C

I would like to write an address in a text file, which can be read by fscanf and dereferenced by C after reading the pointer. How do I write the address in the file? edit: i don't mean to be rude, but i know that this is exactly what i need, so if anyone can please just list the answer, and not ethical reasons for why i shouldn't be doi...

Java. Read file from FTP but DON'T download it whole

I need to read CSV file header from FTP. As these files can be very huge, I don't need to download them. Is there a way to read first line of CSV file from FTP and abort connection? ...

Cocoa: Using UNIX based commands to write a file

I'm looking for help with a program im making. I create a *.sh file as follows: SVN_StatGenAppDelegate.h: NSWindow *window; NSTask *touch; NSArray *touchArguments; NSString *svnURLStr; NSString *SVNStatStr; NSString *destDirStr; SVN_StatGenApplDelegate.m: NSString *locationStr = [NSString stringWithFormat:@"%...

Count files in directories AND subdirectories? iPhone

I am trying to count entire files in a directory, including subdirectories. This is what I have to count files in the first folder: -(NSString *)numberOfPhotos { NSString *MyPath = @"/rootdirectory/"; NSArray *directoryContent = [[NSFileManager defaultManager] directoryContentsAtPath:MyPath]; return [NSString stringWithFo...

PHP upload filename

I'd like to have my PHP script upload a file with a certain filename in a directory of my choosing. However, the catch is that I need it to exist there immediately upon upload so I can moniter it on my server. I don't want to use a PHP extension or something - this should be very easy to transfer to any PHP setup. So basically: Is there...

file upload with php

Hi every body I am uploading file with php every thing is fine but move_uploded_file is not working every variable displayed record and all permission for file is set function uploadfile($filename) { $filetype=$filename["type"]; $filename=$filename['name']; $filetempname=$filename['tmp_name']; if($filetype=="applicat...

Creating a file in wwwroot

Hi, I have a website hosted in IIS at location C:/inetpub/wwwroot/sample and there is a folder in sample C:/inetpub/wwwroot/sample/work I can neither read nor write a file in this work folder. I am using C# to read and write. I have set the NTFS permissions to full access, yet the problem. Please Help Thanks ...

Ajax(jQuery) strange file post problem

Hello, I have a problem posting file via ajax jQuery function. I have something like this: $('#my_form').submit(function() { var serialized = $(this).formSerialize(); var sUrl = "xxx"; $.ajax({ url: sUrl, type: "POST", data: serialized, success: function(data) { ...

write file in network shared folder with UnauthorizedAccessException?

hi the win mobile 6 code tries to write files on network shared folder, but always gets UnauthorizedAccessException. I have checked permission and security setting on the folder and the code can read the file but just cant write to it. The code runs under administrator account which has full control over the folder and files. It is in vs...

file cretaed using exec could not be accessed immediately after creation?

HI I'm using exec in php to execute a command and it will create a .png file in a temp folder.. After creating that i'm trying to open that file and read contents and process them,, but i end up file could not read error.. I think the time taken by the exec to execute and create a file is the cause for the issue.. but i dont know ho...

Saving an loading a Numpy Matirx in python

Hi, Can someone gives me an example of how to save a 2-d matrix in a file and reloading it for furthur use? thanks ...

How to increase timeout values in GData.Client (Google API Ver 2) ?

Hi, I am trying to upload a 2MB file on Google Docs. In one of forum reply user suggested me to increase timeout values in GData.Client. But how can i do that? ...

exporting username and password from form data to textfile using php

when user submit the form need to export form data to text file.exporting username ,password and email from form data to text file for forgot password. please help us. Thanks & Regard pmms ...

explode is not working to split string

we unable to split the string following code.please Help us. <?php $i=0; $myFile = "testFile.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "no\t"; fwrite($fh, $stringData); $stringData = "username \t"; fwrite($fh, $stringData); $stringData ="password \t"; fwrite ($fh,$stringData); $newline ="\r\n"; fwrite ($...

How can I load file into web app through certain periods?

Hi all! I have next task: I need to load the same file into my web app several times, for example - twice a day! Suppose in that file I have information, that changes, and I need to load this info into my app to change the statistics for example. How can I load file several times (twice an hour, or twice a day)? What should I use? Is an...

Clojure: Equivalent to Common Lisp READ function?

Hi there. When I want to read in an S-expression stored in a file into a running Common Lisp program, I do the following: (defun load-file (filename) "Loads data corresponding to a s-expression in file with name FILENAME." (with-open-file (stream filename) (read stream))) If, for example, I have a file named foo.txt that cont...

how do i read strings from text files?

I like to read string from text file the text file consists of information below con = new MySqlConnection("server=localhost;user id=root; password=""; database=workplantype; pooling=false;"); i like to read server name such as"localhost" here and user id such as"root" here,how can i read this. ...

Get KDE to run a bash script.

I have a bash script that takes a file name as an arg. It works great from the command line. When I right-click a file in KDE and select "open with", then point it to my script, it doesn't run. What am I doing wrong? ...