I am just starting off with C#. I managed to get a list of running processes and getting a particular process ID. Can someone tell me how to get a list of files that are opened by a given process ID?
I want to search for files on the users mobile with specific extensions.
I tried searching but could not find any direct API's.
Is there a specific API's or is there tedious way of achieving the same.
Or is there a mechanism to call linux calls for find or something similar
Thanks
I'm working on a project involving some large XML files (from 50MB to over 1GB) and it would be nice if I could view them in eclipse (simple text view is fine) without Java running out of heap space. I've tried tweaking the amount of memory available to the jvm in eclipse.ini but haven't had much success. Any ideas?
I'm trying to parse the dmoz content/structures xml files into mysql, but all existing scripts to do this are very old and don't work well. How can I go about opening a large (+1GB) xml file in php for parsing?
I have a folder mounted on an Ubuntu 8.10 sever through cifs that I simply cannot change the permissions on once mounted.
Here is a breakdown of what's going on:
All files within the mounted folder automatically have their permissions set to -rwxrwSrwx regardless of whether the file is create on the windows server or on the linux machine.
I…
I am using following code to compute MD5SUM of a file -
byte[] b = System.IO.File.ReadAllBytes(file);
string sum = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(b));
This works fine normally, but if I encounter a large file (~1GB) - e.g. an iso image or a DVD VOB file - I get an Out of Memory exception.
Though, I am able…
Hello there,
.NET: How can I copy the files using Windows "Copy Files" dialog. I need to bulk copy multiple files. Does there exists any .NET 2.0 library/method that allows me to do it in crossplatform manner without invoking Windows platform specific libraries.
Thanks in advance.
I'm pretty new to writing python for windows (linux is no problem), and am having problems getting python to recognize files when running scripts, though it behaves fine in the command line
What am I doing wrong here?
def verifyFile(x):
#
return os.path.isfile(x)
This will return true (with a valid file, of course) when called from…
Dear all,
I would like to store and load numpy arrays from binary files. For that purposes, I created two small functions. Each binary file should contain the dimensionality of the given matrix.
def saveArrayToFile(data, fileName):
with open(fileName, 'w') as file:
a = array.array('f')
nSamples, ndim = data.shape
…
I have to implement a search feature which is able to quickly perform arbitrary complex queries to XML-data. If the user makes a query, all XML files must be searched to find possible matches.
The users will have lots of XML-Files (a few 10000 or more) which are typically a few kilobytes in size. All the XML-files have almost the same…
Hello,
I have ASP.NET project which do some file access and manipulation, the methods which I use for file access are below. Now I need to access files on another server shared folder, how to do that? I easily can change file path to shared folder path but I get "can't access" error because shares are password protected.
As I…
I need to store a dictionary to a file as fast as possible. Both key and value are objects and not guaranteed to be marked as Serializable. Also I prefer a method faster than serializing thousands of objects. So I looked into Mapped Memory Files support in .NET 4. However, it seems MemoryMappedViewAccessor only allows storage…
Greeting All,
I want to achieve transparent persistence of Java objects through memory-mapped files (utilize the OS paging/swapping mechanism).
My problem is: how can I move a Java object to my memory-mapped block ?
Plus, how can I force a new object instance to reside in such blocks ?
As you all know, a memory-mapped…
Hello.
I have two question:
I'm developing an iPhone application and I want to know when it is the first time the application is executed. I want to check some extended permissions from facebook the first time.
How can I know that? (first question)
Another way to solved this problem is to store the extended…
Hej,
it is relatively easy to use a file for emulating a block-device using losetup in Linux:
http://www.walkernews.net/2007/07/01/create-linux-loopback-file-system-on-disk-file/
Can anyone please give me a hint on what to look for in case I want to program my own block-device which is based on several files…
Suppose we have a config file with sensitive passwords. I'd like to version control the whole project, including the config file as well, but I don't want to share my passwords.
That could be good, if this config file:
password=secret
foo=bar
becomes
password=*
foo=bar
and the other users of the vcs could…
This is basically the result of a massive class C on the master having been refactored down the line into two smaller classes, C1 and C2. C was then made a subclass of C2 and cut down to a skeletal version for backward compatibility. So from that point on, master contained C, C1 and C2. On that master commit…
I have a project that is subdivided into a few directories with code in them. I'd like to to have g++ search for header files in the project's root directory, so I can avoid different include paths for same header files across multiple source files.
Mainly, the root/ directory has sub-directories A/, B/ and…
I want to read all files inside a given folder(path to folder) using FindFirstFile method provide in windows API. Currently I'm only succeeded in reading files inside the given folder. I could not read files inside sub folders. Can anyone help me to do this??
Hi all, I have around 8000 xml files that needs to be converted into text files. The text file must contain title, description and keywords of the xml file without the tags and removing other elements and attributes as well. In other words, i need to create 8000 text files containing the title,description…
i have an asp.net-mvc site where users can add content and links and the data gets saved in a database. They now want the ability to upload attachments to pages and i wanted to figure out a few things:
I have upload code that will upload files (pdfs, images, etc) but i wanted to see where i should be…
Hello There,
For a new project I need to load big XML files (200MB+) to a mySQL database. There are +- 20 feeds i need to match with that (not all fields are the same).
Now when i want to catch the XML I get this error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate…
In Windows XP, you could change the icon associated with a file type in Windows Explorer. In Windows 7, you have to do some registry hacking to change a file type’s icon. We’ll show you a much easier and faster method for Windows 7.
File Types Manager
File Types Manager is a great little utility from…
IDE: STS(Eclipse)
Server: Jetty-distribution-8.1.15.v20140411
I have created a SpringsMVC Project using Template available in STS tool(New-Springs Project- Springs MVC Project). I generated a war file(SpringsMVC.war) and placed it in /webapps folder of Jetty server. Now I started Jetty using JRE's…