file

Java: file write on finalize method

In my understanding a singleton object will destroy only when the application is about to terminate. So in C++ I write a Singleton class to log my application and in that Singleton logger's destructor I log the time when my application was terminated. Things worked perfectly in C++. Now I want to have that same logger in Java, as in j...

Char error C langauge

i have a project for a course, i did almost everything but i have this error i dont know who to solve it... the project about doing our own shell some of them we have to write our code, others we will use the fork method.. this is the code, #include <sys/wait.h> #include <dirent.h> #include <limits.h> #include <errno.h> #include <std...

asp.net webbrowser file download

Hi, I have a webbrowser in my windows form application. I navigate a page and after document completed i click "download" button with javascript. cleary ; wb.Document.GetElementById("btnDownload").InvokeMember("click"); then save file dialog shows up. But I need to get this file as stream. thanks. ...

Trouble getting Flash socket policy file to work.

Basically I'm using Flash to connect to a Java server. Despite my Java application replying to the <policy-file-request/>, in the Flash debug log it lists (not sure about the order as there are lots): * Security Sandbox Violation * Connection to 192.168.1.86:4049 halted - not permitted from http://127.0.0.1:8888/Current/wande...

How to create File with the FILE_ATTRIBUTE_TEMPORARY in C#?

How to create File with the FILE_ATTRIBUTE_TEMPORARY in C#? (So to store Data in Ram but be able to use it as normal file) ...

Various File Format Structure Information Available

Is there any URL that explains various file format structure information? ...

Question about using an access database as a resource file in Visual Studio.

Hi I am trying to embed a Microsoft Access database file into my Class assembly DLL. I want my code to reference the resource file and use it with a ADODB.Connection object. Any body know a simpler way, or an easier way? Or what is wrong with my code, when i added the resource file it added me dataset definitions, but i have no idea what...

download file from the android web browser in sdcard?

HI. I have a Android application in which I want to download file from the web browser file link. But I don't know how can do it? Help me. ...

midi input in python

Hello I'm coding a demo in python and I need to read a MIDI file in python (no real-time stuff is needed). In particular, I'm looking for a library which preserves channel information. The most promising libraries I found are: http://code.google.com/p/midiutil/ http://www.mxm.dk/products/public/pythonmidi Any experience with those?...

iPhone Documents directory and UIFileSharingEnabled, hiding certain documents.

I want the user to be able to access the files in the documents directory but am using core data and dont want the user to be able to access the store (the sqllite db), can i hide it from the user while still allowing file sharing, or can i put it in another directory where it will still get backed up? ...

Problem with writeData

Hi, I have a problem with my code. I want to create a XML file like this: <name>myName<name> <x>myX<x> <y>myY<y> <z>myZ<z> but my file is: <name>myName<name><x>myX<x><y>myY<y><z>myZ<z> Can i have this text formatting? This is my code: -(void)salvataggioInXML:(NSString*)name:(float)x:(float)y:(float)z{ NSArray *paths = NSSearc...

File permissions question

If I need a php-page to have access to upload images and move images from a folder on the server, what permissions would I set on the folder then? I know we have "Owner", "Group", and "Others". But what does the server (or the php-code itself) count as? Owner? Also, would I need to set the php-page with the upload script with some spec...

Filter for jar-file by analyse with findbugs

Hi, I have a jar-file, which I want analyze with findbugs through build.xml. I use "class location =....jar" - pattern. The jar-file contains several folders, but I need to analyze only one folder. How can I specify that ? Thanks in advance ! ...

Memory Efficient file append

i have several files whose content need to be merged into a single file. i have the following code that does this ... but it seems rather inefficient in terms of memory usage ... would you suggest a better way to do it ? the Util.MoveFile function simply accounts for moving files across volumes private void Compose(string[] files)...

How to open link to pdf file in new tab using html

I have an html page which contains link to open pdf file. however this link opens in adobe reader when i click on it. I have set target property to blank. but it doesnt work either. I want to open this pdf file in new tab in the same window. ...

Best AJAX file uplaod control in asp.net mvc project

can any one guide me which file upload is best for me asp.net mvc project. ...

Ideas for multiplatform encrypted java mobile storage system

Hi I have some questions (read Doubts part) regarding implementing encrypted storage (kind of encrypted filesystem) on Android, Blackberry and J2ME. I need your advice, you cryptography masters. I know this question is a bit long a maybe too verbose, but please try to read it till the end (I have so many related questions that I couldn'...

windows bat file: how to strip the path-part from a absolute filepath

hello i have a variable like this: set file=c:\dir\foo\bar\file.txt how can i get just the path-part into another variable? echo %pathpart% should give c:\dir\foo\bar\ thanks! ...

Android: How to read a txt file which contains Chinese characters?

Hallo, i have a txt file which contains many chinese characters, and the txt file is in the directory res/raw/test.txt. I want to read the file but somehow i can't make the chinese characters display correctly. Here is my code: try { InputStream inputstream = getResources().openRawResource(R.raw.test); BufferedReader bReader = new B...

Replace text in file with Python

I'm trying to replace some text in a file with a value. Everything works fine but when I look at the file after its completed there is a new (blank) line after each line in the file. Is there something I can do to prevent this from happening. Here is the code as I have it: import fileinput for line in fileinput.FileInput("testf...