file

php - unset $this

I've made a class that acts like an file wrapper. When user call delete method, i want to unset the object (actually $this). Is there a way (workaround) to do that? The manual said no, there is no way... ...

HTML tags and attributes sored in xml file

Hi, Does anyone own or knows where can i find a xml file containing all the HTML tags and attributes? Thanks. ...

How do you read a file into a list in Python?

I'm a first year compsci student who's extremely lost on this assignment. We are supposed to prompt a user for a number of random numbers to be generated and saved to a file. He gave us that part. The part we have to do is to open that file, convert the numbers into a list, then find the mean, standard deviation, etc without using the...

log4j configuration file error detection

I'm currently writing a logger utilizing log4j. Once I load in a log4j.properties or a log4j.xml file, I was wondering if there was a way to detect if the logger configuration file is valid. If it isn't valid, I was hoping to load a default setting (that's located in another file) instead. Thanks ...

Relative file paths for Excel Data Connections

I have 7 csv files and one xls file. In the xls file I have 7 sheets (one for each csv file). I can create a data connection that will read each csv file into a given sheet. However, when I zip up the xls, and 7 csv files and send them to someone they are not able to open see the data in the xls file becuase it is trying to access the...

android file download

Hallo guys, im here in austria how are you doing? i have startet developing android and writing my own small app that gets files from a server to display the information in a ListView. I really spent a day to look after the best and easiest way to get files from a server. However i wrote the program and tested it - and now i have a seri...

RAMdisk slower than disk?

A python program I created is IO bounded. The majority of the time (over 90%) is spent in a single loop which repeats ~10,000 times. In this loop, ~100KB data is generated and written to a temporary file; it is then read back out by another program and statistics about that data collected. This is the only way to pass data into the secon...

Creation time of a file in java.

Possible Duplicate: How to discover a File's creation time with Java? Using the java.io.File class to open a file, I am able to get the last modified date with lastModified(). Is there a way to find the creation time of the file? ...

Subclassing file class in Python raises NameError

I have to do a very simple project in python where I add error checking to the built in file class. So far, I've got: class RobustFile(file): def __init__(self,name,mode): file.__init__(self,name,mode) I'm just starting out, but to make sure I hadn't messed anything up, I ran it. Well, right off the bat, I raised a NameE...

PHP file() adding slashes to single quotes

I have a PHP installation running 5.3.3 and when I use the code below: $sql = file('sql.txt'); var_dump($sql); All my single quotes are escaped. Why would this be happening. Magic quotes is enabled on the server (for some reason, it is out of my control) however I thought that magic quotes was only applied to GET POST COOKIE...

How do I set permission of file on samba network drive from windows

Hi all, I am accessing network drive (Z:\stream) on windows. Now the permission set on stream folder is like chmod -R 777 streams/ means all the files inside stream is at 777 but now i am copying some files from windows to this streams folder but permission on those files are not 777 ,i would like to have permission 777 on those files t...

Attached files rights for Drupal

hello, on my website i have two types of files that end users can download - one of them are available for all visitors, and second is only for registered users (users that are logged in). setting of drupal allows to set only if files are available for all users or only for users that are logged in. how can i achieve that some files a...

Why won't this file field not save on the node object?

With print_r I get: stdClass Object ( [field_car_image] => Array ( [0] => Array ( [filename] => HERMAN 096.jpg [filepath] => sites/default/files/HERMAN 096.jpg [filemime] => image/jpeg [filesize] => 933105 [status] => 1 ...

Compare two xml files using Junit

Hi, I am writing a JUnit test case which want to test whether a particular file is added with some content or not. In that case, I want to get the instance of the file before modification and another file instance of the same file after modification and want to check whether both are not equal. how to do that in Java Junit ? ...

How to upload a file in rails?

Hi, I'm new to rails. I want to know about file uploading process in rails. Can anyone please help me... Thanks, Althaf ...

Giving file write permission using php

I have a file in my project folder.How i can i give file write permission using php.I used this code chmod($file,0777); But it giving an error Warning: chmod() [function.chmod]: Operation not permitted The file is created by another user.Is their any way to do this .Thanks in advance ...

PHP file uploading headache

Hi there. I am having a tough time trying to upload files through PHP. My form: <form action="blah.php" enctype="multipart/form-data" method="post"> <p> Upload file: <input type="file" name="xmlfile"/> <input type="submit" name="upload_submit" value="Upload" /> </p> </form> Checklist: No 'smart' quotes in sight. Fine. Proper enct...

How to delete photo just taken in android program.

Hello. I have written a program that uses the Intent for the image capture to get a photo using the application in the phone. Using MediaStore.EXTRA_OUTPUT, I get a URI to the image, wich converted to a path results in something like "/external/images/media/NN" where NN is the number of the photo. Now, in my program, after I read and m...

AIR - Search Entire Computer For File?

how can i accomplish fast file searching in AIR for the entire computer? i simply want to supply a string, which would be a file name like MyTextFile.txt and have AIR search and return that file's path if it exists. ...

Matlab 'exist' returns 0 for a file that definitely exists!

I'm running Matlab 7.8.0 under Windows. I am calling an external utility using dos() which creates a file in the current directory. I the file is created correctly, but it cannot be seen by exist or fopen, which return 0 and -1 respectively. The filename is correct! >> pwd ans = I:\ >> ls file1.asc file2.asc file3.asc >> ex...