Reputation
8,956
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
19 48
Impact
~406k people reached

19h
comment What happens to lock's state and methods when a thread acquires a lock?
"Every object has an intrinsic lock associated with it. ..."
21h
comment Efficient File Storage
The issue of non-parallelizability will also influence how you design the hashing scheme. As mentioned above, the typical definition of file hashing means the file must be processed from beginning to end, which means every "file change" (e.g. modifying maybe 5% of the data) results in the whole file being re-hashed.
21h
comment Efficient File Storage
With respect to "98% similar", one has to research how that similarity could be exploited. If one rely on block checksums, it may fail to capture the similarity if the data was shifted by a non-integer-multiple of block size. Meanwhile, if the similarity consists of repeating fragments of data, one can choose appropriate compression algorithms based on the distribution of the lengths of such fragments.
21h
comment Efficient File Storage
The biggest problem in compression is that a naively designed system will compress from beginning to end - making it a strictly sequential (non-parallelizable) operation. To avoid this issue, look for compression methods that allow compression and decompression of individual blocks, yet allow multiple blocks to share the dictionary (a collective memory of redundancies or repeating patterns found in the data).
Sep
1
comment Strategy to avoid running out of memory in memory intensive application
See also: stackoverflow.com/q/2342023
Aug
30
comment What is the problem will happen if I create auto generate ID without using mysql auto increase of mysql table by my self?
It seems OP has abandoned the question; the comments hints at programmatically assigning IDs for a menu system, which would be somewhat like part of a GUI (be it web-based or whatever). Such IDs should only be generated rarely, e.g. when the system starts or when there is a change in the GUI menu system.
Aug
30
comment What is the problem will happen if I create auto generate ID without using mysql auto increase of mysql table by my self?
@Cambodiachannel Please add these details into the question.
Aug
30
comment How to *detect* if open source software is used in a commercial product?
@ddyer: that's correct; that is the obfuscation part which I didn't mention. My guess is that most infringement investigations focus on the easier cases first, that is, when the infringing party did not use obfuscation. Otherwise it would have taken an entirely different route - it would require one or more whistleblowers, and then some subpoena to collect evidence directly from the infringing party's workplace. The cost would only be justified if it is a dispute between two large commercial software companies where code theft is suspected.
Aug
29
comment Is there a design pattern for managing deep many-to-many relationships?
Are you sure you want to "reduce the amount of data"? Are you instead looking for ways to "reduce the amount of non-trivial code and logic" that needs to be written to implement the required behavior? (I notice that the ongoing management of the data requires relational data structure, similar to a database.)
Aug
28
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
@JonathonReinhart suggestion: you can mention "strict aliasing rule" in your question to help steer the discussion toward the more important aspects.
Aug
28
comment How to *detect* if open source software is used in a commercial product?
The question is also relevant for the case where a commercial proprietary code base is suspected to be stolen by a competitor, though the question isn't worded this way.
Aug
28
comment What Classes as a “C-derived” language
"low level language" specifically refers to assembly language. My guess is that, given the way it is described, the course specification does not consider the C language to be "low level language", i.e. it is considered a high-level language. @Deduplicator It is UK education, any definitions could happen.
Aug
28
comment What Classes as a “C-derived” language
There is too little information about this question that is publicly available from internet searches. From the only sample on "Paper 2 (1CP0/2A)" I can find on this official source,
Aug
28
answered How to *detect* if open source software is used in a commercial product?
Aug
28
comment How can you build an effective team in a hot desk workplace
workplace.stackexchange.com
Aug
28
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
Reuse of integer table index will actually suffer from the ABA problem, where an object (index 3) is freed, then a new object is created and is unfortunately being assigned index 3 again. Simply put, it is difficult to have safe object lifetime mechanism in C unless reference counting (along with conventions on shared ownerships to objects) is made into an explicit part of the API design.
Aug
28
answered Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
Aug
27
comment Rewriting a library licensed under AGPL but keeping the public interface
Notice that pending court decisions and legislative actions may change the legal aspect of that question. Current situation is that API is eligible for copyrights, but what constitutes a fair-use of API is not yet firmly decided.
Aug
26
comment How should an embedded OS be combined with user code?
(3) essentially requires you to create a module loader mechanism. Binaries don't work by concatenation; they work by having addresses, offsets and jump tables that point to the right places.
Aug
25
comment What would be the best way to implement priority based programming without adding too much of if-else processing logic
A simplified summary is that to implement the UI handling of a user "dragging and dropping" an item from one place to another place, one would implement a remove item followed by an insert item.