How to create a file in Windows that would have attributes FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE set using Java?
I do want my file to be just in-memory file.
I have very large data set it is almost 450000 lines and two rows, i want to compute adjacency matrix using python, because previously i have tried to do it in matlab, and it shows memory error because of large data values. my data values also start from 100 and goes upto 450000,
Anyone can help me in this issue, as i am new to python.
I have to first import the file into python using excel sheet or notepad and then compute the adjacency matrix
I am using mmap call to read from a very big file using simple pointer arithmetic in C++. The problem is that when I read small chunks of data (in the order of KBs) multiple times, each read take the same amount of time as the previous one. How can I know if the disk is being accessed to fulfill my request or whether the request is being fulfilled from main memory (page cache) in calls after the first one.
Hey all,
We currently have a utilities class that handles a lot of string formatting, date displays, and similar functionality and it's a shared/static class.
Is this the "correct" way of doing things or should we be instanciating the utility class as and when we need it?
Our main goal here is to reduce memory footprint but performance of the application is also a consideration.
Thanks,
Matt
PS. We're using .NET 2.0
Given: An application that accesses a directory of files: some plain text, some binary files that adhere to a particular NSCoding implementation, and perhaps other binary files it simply doesn't understand how to process.
I want to be able to figure out which of the files in that directory adhere to my NSCoding class, and I'd prefer not to have to fall back on the naïve approach of loading the entirety of each file into memory, attempting to unarchive each.
Anyone have an elegant approach or pattern to this problem?
Hi,
I need to read and process a text file. My processing would be easier if I could use the File.ReadAllLines method but I'm not sure what is the maximum size of the file that could be read with this method without reading by chunks.
I understand that the file size depends on the computer memory. But are still there any recommendations for an average machine?
I would greatly appreciate your fast response.
Thanks,
Lev
Is there any advantage to using char*'s instead of std::string?
I know char*'s are usually defined on the stack, so we know exactly how much memory we'll use, is this actually a good argument for their use? Or is std::string better in every way?
I'm wondering what options one has in xhtml 1.0 strict to create a line on both sides of text like-so:
Section one
----------------------- Next section -----------------------
Section two
I've thought of doing some fancy things like this:
<div style="float:left; width: 44%;"><hr/></div>
<div style="float:right; width: 44%;"><hr/></div>
Next section
Or alternatively, because the above has problems with alignment (both vertical and horizontal):
<table><tr>
<td style="width:47%"><hr/></td>
<td style="vertical-align:middle; text-align: center">Next section</td>
<td style="width:47%"><hr/></td>
</tr></table>
However both options feel 'fudgy', and I'd be much obliged if you happened to have seen this before and know of an elegant solution.
Thank you for reading.
Brian
In Rails 'helper :all' makes all your helpers 'available' to all your controllers.
This is concise and convenient, but does it have any memory and/or performance implications compared to explicitly calling the helpers that each controller actually needs?
It's unclear form the docs whether using it involves 'require'ing all those files, or whether autoload is being used. I can't tell from the source in the Rails framework docs.
thanks
Hi,
I have to manage XML documents and Strings in my app.
In terms of efficiency and memory usage, will a collection like ArrayList be much more expensive than String[]? Also, I could store the content as a regular String or XML. Is working with XML also more expensive? (When I say expensive, I am referring to the use of system resources.)
If there are differences, are they significant?
Thanks,
Ray.
How to convert an large image and embed it into postscript?
I used to convert the bitmap into HEX codes and render with colorimage. It works for small icons but I hit a /limitcheck error in ghostscript when I try to embed little larger images.
It seem there is a memory limit for bitmap in ghostscript.
I am looking a solution which can run without 3rd party/pre-processing other then ghostscript itself.
I have a DOM element in memory that is yet to be injected in the page DOM.
I want to lookup an element by id inside this DOM element but document.getElementById wont work as the element is not yet in the page DOM.
Any ideas on how to do this?
I've always been interested in how you can throw some SQL at at database, and it nearly instantaneously returns your results in an orderly manner without thinking about it as anything other than a black box.
What is really going on?
I'm pretty sure it has something to do with how values are laid out regularly in memory, similar to an array; but aside from that, I don't know much else.
How is SQL parsed in a manner to facilitate all of this?
I have an 8GB Kingston compact Flash, and when I insert it into my mac it says that card is unredable and ask me for initialization. If i open Utilty Disk it show a card of 2,2 TB Generic Comact Flash, if I try to initialize that it give me error: POSIX reports: impossible to allocate memory.
How i can format that ? There's a way with fdisk or smt to get this card work ?
Thanks
CPU Cycles, Memory Usage, Execution Time, etc.?
Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?
How can i solve out of memory exception in list generic if adding new value
foreach(DataColumn dc in dTable.Columns)
foreach (DataRow dr in dTable.Rows)
myScriptCellsCount.MyCellsCharactersCount.Add(dr[dc].ToString().Length);
MyBase Class:
public class MyExcelSheetsCells
{
public List<int> MyCellsCharactersCount { get; set; }
public MyExcelSheetsCells()
{
MyCellsCharactersCount = new List<int>();
}
}
How can to evaluate a computerized device or a software application in the HCI field to the relation with these theories such as: "Senses (Visual, Auditory, Haptic) and cognition (short term and long term memory)" and based on the context where the device is used? Any help or advice is appreciated. Thanks
we have a situation that a stream (data from sensor or click stream data at server) is coming with sliding window algorithm we have to store the last (say) 500 samples of data in memory. These samples are then used to create histograms, aggregations & capture information about anomalies in the input data stream.
please tell me how to make such sliding window.
Can someone provide recommended reading, website resources or best practices to follow when programming with C. I am a proficient software developer with strong skills in Java and PHP.
Is there standard libraries these days which people use? Like what spring is to java? And standard design patterns for managing memory or even standard libraries for that fact?
I want to write solid, maintainable C programs.
GO THE RED PILL! :P
At a certain point, during the running of my app, I want Castle.Windsor to release everything cached in memory. Is this impossible for a singleton object?
I was wondering about the garbage collection that takes place in Java. Is it really able to handle all objects that aren't used and free up the most possible memory?
I also want to know how does the Java garbage collection compare to another language like lets say C#? And then, how does the automatic garbage collection measure up against manual collection from a language like C?
Python's itertools module provides a lots of goodies with respect to processing an iterable/iterator by use of generators. For example,
permutations(range(3)) --> 012 021 102 120 201 210
combinations('ABCD', 2) --> AB AC AD BC BD CD
[list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D
What are the equivalent in Ruby?
By equivalent, I mean fast and memory efficient (Python's itertools module is written in C).
I'm writing myself a class library to manage Active Directory.
I have an interface:
Public Interface ISourceAnnuaire(Of T as {IGroupe, ITop, IUniteOrganisation, IUtilisateur})
Readonly Property Changements As Dictionary(Of T, HashSet(Of String))
End Interface
This Changements property is used to save in memory the changes that occur on a particular element that is part of the source.
However, I am stuck with .NET Framework 2.0. What would be the closest .NET 2.0 for HashSet(Of String)?