file

creating configuration file in php

hi, i want to create the configuration file , which will have the application id and update path two variable , when i will pass the application id in the api it will return the update path of that application id . how i will achieve this making of configuration file. regards rahul ...

What's the fastest way to remove duplicate lines in a txt file(and also some lines which contain specific strings) using python?

The txt is about 22,000 lines, and it's about 3.5MB. There are lots of duplicate lines in it. I simply want to remove the duplicate lines and also some lines which include specific strings not needed. My way is to read the file into a big list using readlines() method, then read the file as a big string using read() method. Iterate the...

File sharing not working on iPad

I am trying to get file sharing to work on my app in iPad. I've added UIFileSharingEnabled to the plist, I've queried the documents dir and written a file there (and verified it is there by looking at it through Organizer). iTunes just refuses to display the file sharing info in the device's apps tab. Does anyone know of any obscure s...

html input file action after file selected

I am in a predicament with input files. The project I am working on has added a jQuery extension that masks all input types and makes them more 'vibrant'. However it has also caused a lot of trouble in the updating of what is listed in these inputs. One such problem is the input with type file. It currently will not change what is being ...

[PHP] How download big file using PHP (low memory usage)

Welcome, I have to download big file (1xx MB) using PHP. How can i download this without wasting memory (RAM) for temporary file ? When i use $something=file_get_contents('http://somehost.example/file.zip'); file_put_contents($something,'myfile.zip'); I need to have so much memory that size of that file. Maybe it's possible to do...

Jquery File Tree - how to return folder name on folder click

Hi, I have installed and trying to customize Jquery File Tree so that, on click of folder name, the folder name and path are returned to the calling function. Currently it only expands and collapses folders, and returns the file name on click of file. So I need to return the folder too and cannot see where that is triggered. I am usi...

Best way to parse a file in Objective-c

Hello everyone. I am trying to parse out an apache-like config file using Objective-c. Where is the best place to start? I haven't done a lot of file read/write on this platform. Thanks! ...

Select random images using Linq/C#?

I am trying to select existing images from a directory. The image files are being renamed dynamically when they are created but the format they currently have cannot be changed. This is an example. client_2010_10_23_001.jpg Essentially, the images are names according to upload time and incremented. Perhaps split the file name into ...

What would be the best way to verify a user uploaded file?

After a file has been uploaded to the tmp folder, for example a pdf file, would php fileinfo mime check be enough to verify that the file is indeed a pdf file and is not infected? How do you verify that a user uploaded file has no virus? so that I could let users download it? My scenario is this: A user uploads a pdf file, I then let...

Use this progressbar for file download in Python

I found some code for a Tkinter status bar. I love this code and want to use it to display the progress of a file download. How would I add this functionality? Here Is The Code: import Tkinter class Meter(Tkinter.Frame): def __init__(self, master, width=300, height=20, bg='white', fillcolor='orchid1',\ value=0.0...

PHP & Javascript: Image file description properties (Summary tab)

Image files come with description properties like title, subject and keyword (summary tab). How do I "get" these properties in PHP? is there a function that allows me to the same in Javascript? ...

Extra character added to buffer when writing to a file in C.

mWhile attempting to make a backup copy of a file in C, I find that extra characters are sometimes generated by the algorithm below. I've also tried declaring the readBuffer within the while loop, but that did not solve the problem. Here's an example of the issue. Original File Contents Hello there. My name is Alice. Done. Backup F...

Free quality synchronization software? (backup software)

I have started working on larger projects using PHP, and I'm realizing how bad it would suck if the virtual machine I'm storing it all on were to crash or get deleted somehow. So I looked into synchronization in Ecplipse and got dissapointed. I was hoping for a function that would save my file to several locations instead of just one. A...

PHP is_file and server root relative paths

Hello! How can I use is_file with a path like: /folder/file.jpg please? Thank you! ...

Creating Lists from files in Scheme

I've worked out how to read in the file and it works using the following code: (define p (read(open-input-file "starbucks4.sxml"))) But how do i store p as a list with elements separated by \n characters. Thanks. ...

Open file in eclipse on mac 10.6

I have a deceivingly (at least for me) simple problem. I want to open a file in eclipse FROM Mac's finder. Whenever I try, I get the alert that Eclipse cannot open that file. Yet, from within Eclipse I can open the file, either by double clicking it in the Explorer/Navigator window or going file/Open File ... At the end of the day, I wa...

file descriptor leak in java program : too many open files

Hi, I have a program which suffer from file descriptor increasing. I see when I execute the command ls -l /proc/5969/fd where 5969 is the pid of the java program the number of file descriptor continuously increasing. but I am unable to open one of those files decriptors to see what file remains open : here is an example of the listing :...

how to open a matlab p-code file

Does anybody know how I can see the code of a matlab p-code file? ...

php file upload

Hi anyone can explain file upload process in PHP. I mean what happens in backend internally. like saving with temp name, moving to upload folder etc. I want it's step by step working. Thanks ...

C#: Maximum file name length for OLE file

Hi there, I used WinAPI function to create OLE file in C#. The WinAPI function is: [DllImport("ole32.dll")] public static extern int OleCreateFromFile( [In] ref Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, [In] ref Guid riid, uint renderopt, [In] IntPtr pFormatEtc, I...