I have the following code that tries to tie arrays to files. Except, when I run this code, it only creates 2045 files. What is the issue here?
#!/usr/bin/perl
use Tie::File;
for (my $i = 0; $i < 10000; $i++) {
@files{$i} = ();
tie @{$files{$i}}, 'Tie::File', "files//tiefile$i";
}
Edit: I am on windows
...
How do I count the number of files in a directory using Java ? For simplicity, lets assume that the directory doesn't have any sub-directories.
I know the standard method of :
new File(<directory path>).listFiles().length
But this will effectively go through all the files in the directory, which might take long if the number of files...
My WPF application gets a file from the user with Microsoft.Win32.OpenFileDialog()...
Private Sub ButtonUpload_Click(...)
Dim FileOpenStream As Stream = Nothing
Dim FileBox As New Microsoft.Win32.OpenFileDialog()
FileBox.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
FileBox.Filter = ...
Hi guys, I'm trying to call resources (images, for example.) from my website to avoid constant updates. Thus far, I've tried just using this:
@sprite.bitmap = Bitmap.new("http://www.minscandboo.com/minscgame/001-Title01.jpg")
But, this just gives "File not found error". What is the correct method for achieving this?
...
Hello!
I am exploring file/images uploads in Django. I have a model with Photo class which has thumb ImageField. I uploaded thumb with admin panel and I made template which just gives <img src='{{photo.thumb.url}}' />. Unfortunately I don't get any images and when I try to get direct link it says "page not found". It seems that django e...
Many hex editors, such as Hex Workshop, can even read large-sized files while keeping a relatively small memory footprint, but still manage to keep scrolling smooth. I'm looking for the best way to achieve this, and so I have several related questions.
Should I just use FileStream?
- Is its buffering based on the current Seek location?...
How can I write a program which can test throughput of disk in Windows systems using c++?
What's the mainly steps and APIs that I can use to programming?
...
I'm about to start on a little project i'm trying to do where I create a C++ program to store inventory data into a file ( I guess a .txt will do )
• Item Description • Quantity on Hand
• Wholesale Cost • Retail Cost • Date
Added to Inventory
I need to be able to:
• Add new records to the file
• Display any record in the f...
Hi,
I have just made a file upload form, and so far I have it so that users can only upload their own .mp3's;
Currently, all my form does is change the filename to $username . " - " . $title; in which the variables they enter;
The form is still in beta, however, and I am asking if there is a way I can view the file information (for ....
I'm trying to test some streaming file upload/download code that I've just written, but I need a huge (bigger than my memory, as in > 4GB) file to test on. What's a good way to quickly generate a file of a specific size (but no particular data inside)?
I know that I could just look around my hard drive for an appropriately-sized file, ...
I have a LARGE project in visual studio 2008. It has an accumulation of a few years of trying things out and often excluding (not deleting) files from the project. I need a way to permanently delete any excluded file. There are thousands of files and hundreds of folders. Doing it manually in solution explorer would take too much time....
As most of you may be following my line of questions already know, i'm trying to create a program that can serialize multiple structs to a .dat file, read them back in via loading it's serialization, edit the contents, and then re-write them to the file and so on. It's a inventory program I am trying to do and I can't get it to work for ...
using System;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
namespace regex
{
class MainClass
{
public static void Main(string[] args)
{
Regex exp = new Regex(@"e(-)?m[a@]il(s)?|input|output|padr(ão|ões)|máquina(s)?|reconhecimento",
RegexOptions.IgnoreCase |...
I am building an ASP.Net C# web application that will be using lots of sound files and image files. Considering performance, would it be best to store all files in SQL as image data type and retrieve from the database or store/archive the hard file on the server and store the path in sql? Im curious about the pros and cons - other than t...
Possible Duplicate:
Storing Images in DB - Yea or Nay?
Hi
At the moment each Company on my website have 1 picture they can add to their profile.
I save that image into the database....its their Company Logo.
Now i want to allow them to add more pictures. Now i don’t know if i must save it all in the database or save it in fo...
If I transfer a file over the internet from computer A to computer B using C# using one of the many ways to do file transfers with .NET, What is the best way to tell if the file on computer A and computer B is the same?
I am thinking that MD5 hashes would be a good way to tell. It seems like that is a widely accepted way to tell. Howeve...
How would one search for files on a computer?
Maybe looking for certain extensions.
I need to iterate through all the files and examine file names.
Say I wanted to find all files with an .code extension.
...
I want to read a list the names of files in a folder in a web page using php.
is there any simple script to acheive it?
...
Is there some mechanism by which I can be notified (in C#) when a file is modified on the disc?
...
I assume everyone here is familiar with the adage that all text files should end with a newline. I've known of this "rule" for years but I've always wondered — why?
...