file

Dev C++ Wininet Upload file using HTTP

I want to upload "C:\test.txt" to webserver, when I am running program, file is not uploading and I am not getting any error. the complete C++ code can be find here and php code on webserver can be find here: "http://student114.110mb.com/upload.txt" or "http://student114.110mb.com/upload.php" kindly help me where I am doing wrong ...

php file upload capitalized filename issue

I have a pretty standard file upload form (that is also writing to a mysql db). It was working fine throughout my testing, then I went and tested a file that was named with all capital letters. The file would not upload. Simple solution I figured, just rename the file before the upload with 'strtolower' but no luck. Also tried strtou...

Setting windows creation date using POSIX api

I have a program (jhead) that compiles with very few tweaks for both Windows and generic Unix variants. From time to time, windows users ask if it can be modified to also set the "creation date/time" of the files, but I don't see a way to do this with the POSIX api. What I'm currently doing is: {     struct utimbuf mtime;     mtime....

Alternatives to keeping large lists in memory (python)

If I have a list(or array, dictionary....) in python that could exceed the available memory address space, (32 bit python) what are the options and there relative speeds? (other than not making a list that large) Let me emphasize "could". The list could exceed the memory but I have know way of knowing before hand. If it started to exceed...

Daemon writing output to file twice instead of once in C++.

I've written a daemon that writes the word "Beat" to a file, followed up the current date and time at 15 second intervals. However, each time I check the output file, the daemon appears to be outputting twice like this: Beat: Fri Jan 1 18:09:01 2010 Beat: Fri Jan 1 18:09:01 2010 where it should only have on entry. the entire...

Write to a CSV file on two columns

Hello all, I am trying to create a CSV file. I have done this. I have put the below in a loop with the first and last lines outside of the loop. $FileHandle = fopen('tech.csv', 'a+') or die("can't open file"); $stringa = $item." , ".$item2."\r\n"; fwrite($FileHandle, $stringa); fclose($FileHandle); However, it comes out like this in ...

how to access a shared folder on a windows machine with iphone SDK?

Hello, I was wondering if anyone could help point me in the right direction if I am trying to write the contents of a file from a shared folder on a windows machine to an array on the iphone over a wifi connection. could I do it with initWithContentsOfURL?? thanks for the help ...

How to parallelize file reading and writing

Hi, all I have a program which reads data from 2 text files and then save the result to another file. Since there are many data to be read and written which cause a performance hit, I want to parallize the reading and writing operations. My initial thought is, use 2 threads as an example, one thread read/write from the beginning, and a...

C++ - Failed loading a data file !

I have a simple data file that I want to load, in a C++ program. For weird reasons, it doesn't work: I tried it on Windows assuming the file was in the same directory: failed. I tried it on Windows by moving the file in C:\ directory: worked. I tried it on Linux putting the file in the same directory: failed. The snippet: void World...

Creating an MS Office document-like file format to expose document properties

Our application's "documents" are single binary files. Our customers have asked if we can add MS Office-like document properties to our document files so that they are easier for users to manage. By easier to manage, I mean the ability for Windows Explorer to display common document properties in tooltips. My research seems to indicate...

Weird CodeIgniter Upload Problem

Here's the lowdown. PHP, Codeigniter, LAMP. I've created a fixeee for you all to see my code. http://fixee.org/paste/s8jc04t/ Whenever I have mulitple file uploads (ex. fileupload1, fileupload2, fileupload3, etc.) and I tried to get the upload data from each one correctly, I seem to duplicate the first file data that was uploaded. Can...

Using Python csv module on updating file

I am using python's csv module to extract data from a csv that is constantly being updated by an external tool. I have run into a problem where when I reach the end of the file I get a StopIteration error, however, I would like the script to continue to loop waiting for more lines to be added by the external tool. What I came up with s...

File writes per second

I want to log visits to my website with a high visits rate to file. How much writes to log file can I perform per second? ...

double click to open file c#

I have a listbox filled with file paths. Does anyone know how to open the default program for the file when it's double clicked? For example, if one of the items in the listbox says "c:\test.txt", how do you open it in notepad? And if it's "c:\inetpub\wwwroot\sitetest\test.asp" how can it be opened in the default asp editor? Thanks. ...

R Language: Import multiline SQL query to single string

In R, how can I import the contents of a multiline text file (containing SQL) to a single string? The sql.txt file looks like this: SELECT TOP 100 setpoint, tph FROM rates I need to import that text file into an R string such that it looks like this: > sqlString [1] "SELECT TOP 100 setpoint, tph FROM rates" That's so that I ...

java api to send file through serial port

Hi geeks, I want to send a file from my PC to a remote device connected through serial port. So is there any API in java to send file over serial port? ...

Rename image file name in matlab

Hi I Load 10,000 image files from internet site and i save it in the folder to use it in my project (image retrieval system ), now i need to rename image file in a sequential name like (image1,image2,image3,....image10000) , any one can help me... I would like to inform you that I used matlab in my work thank ...

Getting an exception trying to upload and save a file upload on remote server but local box is fine

i have an asp.net mvc app that has a form that uploads a file. On my local box, of course it works fine but when i run it on a remote webserver i get this error: Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\directory\mytestfile.csv' is denied. ASP.NET is not authorized to access the requested resource....

How to scan a file in a different directory in java?

How do you scan a file with java that isn't in the directory the java file is in? For example: The java file is located at "C:\Files\JavaFiles\test.java" However, the file I want to scan is located at "C:\Data\DataPacket99\data.txt" Note: I've already tried putting another java file in the "C:\Data" directory and using the test.java fi...

Flash image upload with mandatory crop?

Anyone know of a Flash file (image) uploader that will force a user to resize and/or crop their image BEFORE uploading it? To then upload it as well. Basically, I don't want my server processing the image resize/crop. I want to specify a target aspect ratio and have the user resize and crop their image to make it fit. I've seen croppi...