Why use binary files to stack up different versions on DMSs?
I’ve used both Liferay and Alfresco trying to use them as the Document Management System for an intranet.
How are Java ByteBuffer’s limit and position variable’s updated?
There are two scenarios: writing and reading
Writing:
Whenever I write something to the ByteBuffer by calling its put(byte[])
method the position
variable is incremented as: current position + size of byte[]
and limit
stays at the max.
If, however, I put the data in a view buffer then I will have to, manually, calculate and update the position
Before I call the write(ByteBuffer)
method of the channel to write something, I will have to flip()
the Bytebuffer so that
position
points to zero and limit
points to the last byte that was written to the ByteBuffer.
Reading:
Whenever I call the read(ByteBuffer)
method of a channel to read something, the position
variable stays at 0 and the limit
variable of the ByteBuffer points to the last byte that was read. So, if the ByteBuffer is smaller than the file being read, the limit
variable is pushed to max
This means that the ByteBuffer is already flipped and I can proceed to extracting the values from the ByteBuffer.
Please, correct me where I am wrong 🙂
Best practice to sync long paths to filesystems where path length is limited?
I wrote a sync tool to synchronize folders/files from Alfresco to Windows.
PROBLEM:
Are Python sockets suitable for file synchronization?
I’m working in an organisation with limited funds. They can’t afford a business account on Dropbox. However, they would find it useful to have all their files synchronized on local machines.
File storage for a blog component: database or filesystem?
I’m going to develop a fairly basic re-usable blog component, with simple CRUD operations using ASP.Net.
Interaction between programs
I am writing an interactive program in which it takes speech input from the user for a specific list of commands.
All images in one folder for a website?
When creating websites, is it better to have a lot of images in one folder, or have them separated?
Storing object-graphs with class-evolution in Java with transformation (long time archiving)
Abstract A common problem is to store objects (with graph), and to load them back. This is easy as long the stored object representation matches the executing code. But as time goes by, requirements change and stored objects do not match any longer the code. The stored objects should not loose their data, and the […]
Binary data storage scheme (saving user-uploaded files)
In our app we are currently saving binary data to the database (terrible, I know; but this is legacy stuff and it wasn’t my decision). We’re trying to migrate this data out to an external device and I’m trying to come up with a scheme to save these files.
Why do we need a format for binary executable files
When binary files (i.e. executables) are saved they usually have a format (e.g. ELF or .out) where we have a header containing pointers to where data or code is stored inside the file. But why don’t we store the binary files directly in the form of sequence of machine instructions.
Why do we need to store data separately from the code?
Secondly when the assembler creates a binary file is the file is among the above formats?