I have this snippet and there are 3 images and 3 folders in the directory. It echos the images just fine but it also gives me this error for each of the folders.
Notice: Undefined index: extension in D:\Data\Websites\wamp\www\StephsSite\PHP\manage.php on line 119
What i want to do is have it so if it finds a file with no extension(a ...
I have a for loop which references a dictionary and prints out the value associated with the key. Code is below:
for i in data:
if i in dict:
print dict[i],
How would i format the output so a new line is created every 60 characters? and with the character count along the side for example:
0001
MRQLLLISDLDNTWVGDQQALEH...
I'm working on an app that will transcode videos that are sent into a drop box. Because videos could take anywhere from a few minutes to a few hours to be sent to the dropbox, I want to be sure the file is done being written before my app begins processing it.
I thought the easiest way to do this would be to check the size of the file ...
When I using the following code to read file:
lines=file("data.txt").read().split("\n")
I have the following error
MemoryError
the file size is
ls -l
-rw-r--r-- 1 charlie charlie 1258467201 Sep 26 12:57 data.txt
...
I'm writing a utility program with C# in WPF that allows users to create role-playing scenarios, including monsters, items, characters, etc.
The user will create or import the elements (monsters, etc) and then use the imported elements to create scenarios. Everything used by the program is created within the program, so I don't have an...
Hello
Is there a way to prevent user viewing an file but still use it as included to another file in php? Hope you understood!
Martti
...
How to obtain a position in file (byte-position) from the java scanner?
Scanner scanner = new Scanner(new File("file"));
scanner.useDelimiter("abc");
scanner.hasNext();
String result = scanner.next();
and now: how to get the position of result in file (in bytes)?
Using scanner.match().start() is not the answer, because it gives the ...
With D and Tango library can I read and write in the ANSI encoding ?
...
Hi,
I would like to know if there's some library or API to convert a .dcm file to something more common?
we are using c#, so the library or API needs to support this language.
please...
...
Hi everyone!
I know I know, why am I using MP4 still?? It's because I have like 100 files already in this format and I need to upload to a website, I have the mp4 file embeded in the site already and the file played changes according to php.
but what I really need is a way to dynamically create a thumbnail or take a snapshot of the vid...
Is there an easy way to recursively ZIP a directory that may or may not contain any number of files and any number of levels of subdirectories?
...
If I do the following, does filehandle get closed automatically as it goes out of scope in Python:
def read_contents(file_path):
return file(file_path).read()
If it doesn't, how can I write this function to close the scope automatically?
...
Hello,
I have a script that each time is called gets the 1st line of a file. Each line is known to be exactly of the same length (32 alphanumerci chars) and terminates with a "\r\n".
After getting the 1st line, the script removes it.
Now I do in this way:
$contents = file_get_contents($file));
$first_line = substr($contents, 0, 32);
f...
I want to use the TcpClient and TcpListener to send an mp3 file over a network. I implemented a solution of this using sockets, but there were some issues so I am investigating a new/better way to send a file.
I create a byte array which looks like this:
length_of_filename|filename|file
This should then be transmitted using the above m...
I google'd a bit and read http://en.wikipedia.org/wiki/Portable_Executable but i can't seem to find when the Import adress table addresses are written. Does it happen on compilation? Or when the executable is ran?
...
Hi, friends i want to provide facility to my users to upload multiple images into my website using asp.net 2.0, using single file uploader i.e. want to upload all the image file from a folder. Or suggest me any alternate way. Help me. Thanks in advance.
...
I have a RefTables.pc file.
when i type make command.
This is my warning.
RefTables.c:109: warning: type defaults to `int' in declaration of `sqlcxt'
RefTables.c:111: warning: type defaults to `int' in declaration of `sqlcx2t'
RefTables.c:113: warning: type defaults to `int' in declaration of `sqlbuft'
RefTables.c:114: warning: type d...
I am rather new to Linux device driver programmring, but for debugging purposes, I would like to write a stream of data directly to a file. Or maybe I should aks the question differently:
I have a system-on-chip, where one module provides a data stream. The module has to be initlized with a write address. Instead of writing the data int...
Text gets accumulates piecemeal before being sent to client.
Now we use own class that allocates memory for each piece as char massive. (Anyway, works like char[][] + std::list<char*>).
Then we build the whole string, convert it into std::sting and then create boost::asio::streambuf using it. That's slow enough, I assume. Correct me if...
Hi All,
I have a file in tab delimited format with trailing newline characters, e.g.,
123 abc
456 def
789 ghi
I wish to write function to convert the contents of the file into a nested list. To date I have tried:
def ls_platform_ann():
keyword = []
for line in open( "file", "r" ).readlines():
for value in line....