

Actually we build using the VC compiler, just not inside VS or a VS project. That system doesn't scale well for our needs. While this is an interesting approach I'm still favoring the monitoring of the file activity external to the compiler for serveral reasons:
1. We have C/C++ and C# projects in our tree, and possibly other languages as well that I haven't had to deal with yet.
2. We deal with a number of different building tools that may not have output options like the more mature C/C++ compilers do.
3. Since I have a number of differnt build tools I need to track dealing with each one separately and maintaining the output processing code for handling each tools output sounds like a big task and fragile
Taking a more build tool agnostic approach to gathering this information I feel will make the tool more reliable and take less maintenance work. I won't be trying to track down all of the differnt build tools we use and the necessary command line options to gather the information. And then have to figure out how to process each tools output to gather the information I need.
Adam





I need some error correction for an integer of 32 bits.
I've found several solutions, like 'reed solomon', 'FEC', 'parity bit'. But all of those are for a lot of bits.
I just need error correction for 32 bits and the error correction should be maximum 24 bits.
Does any of you have any idea of how to clear this problem and which of the error corrections I should use (or even create one myself)?





Hello,
http://en.wikipedia.org/wiki/Hamming_code  that one is pretty easy, scalable (you decide of length of data chunk, longer chunk  lesser bits will be taken for correction purposes).
Why parity bit is for lot of bits? You can use 1 parity bit for 2 bits of data, for 20 bits, for 200... (of course it will be less effective).
Btw  Hamming codes can correct error bits, not only check if data is not corrupted.





I see, hamming_code would be great indeed (thank you). But it's only possible for single error correction. In the best case I would like to correct every bit, but that's impossible, but I would like to have the highest efficiency.
I'm now busy with trying parity, horizontal + vertical + diagonal. And then check if the parity's are ok.
But is there another way than the hamming? Because I think this one is not really efficient.





Hello,
Actually, I think that Hamming is very efficient for what it offers (especially for longer streams, you add 1 bit for every *2 bits of data), if you need more bits corrected  use shorter version etc.
If I have understand you well and by
Deresen wrote: trying parity, horizontal + vertical + diagonal
you mean putting input into matrix and adding parity bits to every row/column, then you won't be able to fix any bits if you will have 2 errors (this is sometimes true, sometimes not, but still, you can't guarantee correcting 2 bits) and the cost of parity bits is much higher then using hamming.
You can also google for Convolutional code, but I don't know much about them, so I can't guarantee it is what you have been lookng for.





whats wrong with ReedSolomon?
If I understand your requirements, you need an RS(4,1) code over GF(2^8) or RS(8,2) over GF(2^4), and because the codeword size is small you can use Euclid's algorithm to efficiently compute the key equation rather than BerlekampMassey (modified).
check this link out:
http://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction[^]





To be honest, I did not really understand the reed solomon error correction.
And I've read this '2 byte errors per 32byte block', this also means 2 bits per 32 bits. And that's to less for me.
The big problem is that I also have to check the error correction, if that is right. So I have to correct that stream also. Is this a possibility with reed solomon? And could you please give a small example of how the reed solomon works, for instance with a byte?





ReedSolomon does provide the ability to detect errors and also correct them, RS is actually quite trivial to understand and implement, RS operates offof a basis type which is called a symbol. A symbol can be any size from 2bits and up.
My suggestions were based on two symbol sizes, either an 8bit or 4bit symbol size. The 4bit symbol size would be recommended in your case, as it means 8 symbols per your data block (32bits). The proposed code of RS(8,2) over GF(2^4) means any two of the 8 symbols can have any number of bit errors (14 bits of error/burst error), from this upto both symbols of error can be accurately DETECTED and CORRECTED.
Further more if you happen to know which bits are in error you can increase the correction capabilities 2 fold via erasure correction methods.
If you're familiar with C++ the following library has RS code examples for various bit sizes: http://www.schifra.com/downloads.html[^]





Thank you very much for your time.
This will give me enough homework for a while.
Let's dive into C++ again.





What is the expected nature of errors? Is there a significant likelihood of having multiple independent bit errors, or would bit errors more likely be concentrated?
Correcting multiple independent bit errors is very hard; it is clearly impossible to do twobit correction on 32 bits of data with less than 11 bits of ECC data (using 42 bits to code a 32bit word, allowing for zero, one, or two errors, there would be 1,765 ways each code word could be represented; a 10bit ECC would only allow for 1,024).
On the other hand, if all bit errors will be localized in some particular fashion, error detection and correction becomes much simpler. For example, if all errors will be within a single byte, one can store a parity byte along with enough parity information to detect errors in each byte. If a problem is indicated with any byte, the parity byte will allow it to be corrected.





Hi everyone!
I'm working on a project and i need to do what follows:
i have an array of strings,example:
house3
house2
green23
green.5
H6
H01
G19
G78
..and so on.
I have to extract only the recurrent strings: house,green,H,G.
Any idea about it? (the language is java but doesn't matter, i just need the idea!)
Thanks in advance,
Enrico.
Program your life ^^





The following should give you some ideas:
http://en.wikipedia.org/wiki/Patricia_tree[^]
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
 John Carmack





What are you gonna do exactly ?
Do you want to identify the strings that contain house,green,H,G ?





not exactly. I have some strings and i have no idea which they are.
I have to identify the recurrent substrings such as house, green...but i don't have them as input..
Program your life ^^





Some of the problem parameters aren't clear: Do the recurrent strings always start at the beginning of the line? Do you just ignore nonletters (numbers and punctuation)?
If the answer to both of these questions is yes, you can do this:
1. For each line
2. Extract the string of just the letters from the beginning of the line.
3. See if this string is in a hash table. If so, it's a recurrent string.
4. Else insert this string into the hash table.
If the strings don't always start at the beginning of the line, you have to do multiple insertions for each string: the whole string, the substring starting at the 2nd letter, 3rd letter, etc...





You need to look at using a data structure like a Trie[^], or as was already pointed out Patrcia Trie[^]. The Wikipedia articles should give you enough information to get started on an actual implementation.
Scott Dorman Microsoft® MVP  Visual C#  MCPD
President  Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are.  Buckaroo Banzai





When you aren't a mathematician, it's a pain. When you know what its called, there are pages and pages of info. But people rarely put "The DooDingle algorithm calculates the surface area of a dodecahedron cut by a given XYZ plane" on their webpages.
So half the battle is trying to find out what you should be Googling for.
(Incidentally, I'm trying to find a method of locating the bounding triangle in a Delaunay triangulation for any given coord XY, where the vertices of the triangles are a random set of XYZ coords. Then I can work out the Z at any XY, given my grid).





Try Googling for Delaunay. I have seen it there as well as under "Convex Hull".
Dave.





Hi! I am working on a graphing application which plots math functions (for example sin(x)). At this stage the program works but in some cases the graph isn't correct. The program calculates the points of the graph and finds the point (x,f(x)). But some calculations return very small numbers an the graph is not correct. In order to fix this I decided also to calculate the limits of the function in the non defined points (for example lim 1/x, x>0). If someone has stumbled upon some articles or knows something about the problem, let me know. (Google only showed me the math definition of the limit, but I couldn't find an algorithm). Thanks!
Still learning...





It might be a good idea to identify which inputs return wrong answers, then try to find a pattern in the errors. Fixing the underlying bug will produce a more reliable program than adding a patch involving limits.





Hi......i need help in ASP.NET for vs 2005 to develop an e commerce website for my final year B.Tech. project....plz guide me...........specially how to develop credit cart verification transaction and shopping cart module??????????





Well, you'd normally start out by defining your requirements. Possibly you'll want to draw some high level use cases out of these, and then you'll want to break these down into a more detailed design. From there, you can pull together your basic code.





Pete O'Hanlon wrote: Well, you'd normally start out by defining your requirements. Possibly you'll want to draw some high level use cases out of these, and then you'll want to break these down into a more detailed design. From there, you can pull together your basic code.
Very good advise...
If you want to try doing some Data Flow Diagrams(DFD's). Could help with how you want to the project to flow.





My objective is to made an online shopping website based on ASP.NET 2.0 ,for which i m using visual studion IDE and prograaming in C#............i need a good ebook on ASP.NET which includes session management as well as database handling......I have made modules.......I m facing difficulty in shopping cart implementation and credit card verification modules..........





Dear shriyangika,
First of all you should be knowing how the data is flowing.take paper and pencil note down everything what ever coming in your mind about the project ..
as you told
shriyangika wrote: I have made modules.......I m facing difficulty in shopping cart implementation and credit card verification modules..........
whats the module.. how it looks like...and what exact problem you are facing... if you can tell all these it will helpful for the one who is trying to help you here..
vikas da





You're tackling the problem from the wrong side here. You're talking the technology end when, what you should be doing, is actually working out what the problem really is.





i explained technology and tools which i m using to implmnt my project...actuall y i m facing problem in database handling and database management in ASP.NET......i have already decided for modules and.....rest of the things.......but how to use database through ASP.NET controls.......i mean dataset and datagrid view control....
Designing of pages i hv done..........but database handling i m nt able to do...





I am a student of final year MCA doing a project on intelligent tutoring systems ,i dont know which algorithm to use that will suit best to my project.... help me!





I'd say you should design a data structure that models what the student knows, and how well they know it. Then use this data to select tutorial topics. Then give quizzes and use the results to update the data structure.





I have binary tree
And I want to traverse this tree level by level
that's mean print the level zero then level one ....etc
how can I do that





where you get the binary tree from?
as far as i know there is not one included in .Net framework (or whatever your using)(I may be wrong).
But basically you would need to know how it works before you can move through it.
If you made your own then you should know this answer.





thanks so much
I am study data structure specially non linear data structure
and I need algorithm to solve my problem I know about BFS but I think
this used in graph only my be my teacher Will Not accept this BFS in binary tree
thanks another time





A binary tree IS a graph. You can use a BFS quite easily on a binary tree.






You need to find out about 'recursion' techniques





I'm sure there must be a reasonably simple way to do this.....probably something recursive.
I have X apples and want to split them into groups with a maximum M apples in each group. I want to have the minimum number of groups, but for each group to be 'as equal as possible'.
I think the min number of groups is simply CEILING(X/M, 1)
e.g.,
X = 9, M = 4, groups would be 3, 3, 3 (not 4, 4, 1)
X = 137, M = 25 :: (23, 23, 23, 23, 23, 22)
X = 23, M = 5 :: (5, 5, 5, 4, 4)
etc.





Kyudos wrote: I want to have the minimum number of groups, but for each group to be 'as equal as possible'.
That is two requirements, they may (and will) be conflicting at times.
X=5 and M=2, now what is best: 2+2+1 or 1+1+1+1+1 ???
when the first requirement is dominant, then #groups=CEIL(X/M)
when the second requirement is dominant, then #groups=X/largest factor of X lessequal M
when a more complex optimum is defined, it will be somewhere in between...





Well, because groups are 'expensive' (I'm not actually using apples ) minimising the number of groups trumps 'evenness'.
I think this works:
Min Number of groups G = CEIL(X/M)
Lower Bound LB = FLOOR(X/G)
Upper Bound UB = CEIL(X/G)
No. UB = (X/G  LB) * G
No. LB = (G  No. UB)





Correct, although I would write that as #UB=X%G





Suppose I have some number (say between 100 and 1000) of lines of fixed text, each containing 13 pairs of characters; each character pair will be rendered in hardware as a single glyph. The hardware supports multiple character sets of 250 glyphs each, but any particular line is restricted to using one character set.
How would one go about packing things as efficiently as possible so as to minimize the number of glyphs that have to be duplicated in multiple character sets?
Note that I am well aware that using rigid character pairs is not the optimal means of compressing text, but the display hardware that will render the text is sufficiently feeble that it can't handle much else.






hello all,
I don't seem to understand how free space is calculated in NTFS.
I have a 512MB Drive (NTFS)
Cluster size = 4k (512b per sector, 8 sectors per cluster)
$BITMAP file has 4 clusters (Last Cluster is 4032 bytes)
so the total bytes would be 3*4*1024 + 4032 = 16320
so the total clusters it can address 16320*8 = 130560
now 130560*4096 = 510MB (total usable disk space i am guessing)
now if i calculate the total bits that are 0 in $Bitmap that should
give me the total free space
But total 0 bits are only 424.. that means only 424 clusters are free i.e.1696KB
But the disk is 441MB full and 68.6MB free.
(i have really checked my free 0's code it looks ok)
Can anyone please explain this to me?





This is only a guess, I don't know much at all about NTFS. Is the freespace calculation also including the asyetunused space in the allocated clusters as well?





I have a problem that I'm thinking there must be a clever algorithm for. Given a set of points and a matrix that describes the distance between each possible pair of points, what I want to do is for any given point find two other points that are as far away as possible from the original point, but also as far apart from each other as possible.
I was thinking of doing something like this:
1) pick a random point, let's call it A
2) sort all other points in order of their distance from point A
3) pick the point that is furthest from A, let's call it B
4) For all remaining points (i.e. not A or B) average their distances from both A and B and sort them in order of this average distance
5) pick the point with the highest average distance from A and B, lets call it C
This should at least give me A and B as far apart as possible, but, depending on how the points are distributed, it might be possible C is quite close to A or B.
Also I'd like to extend the method to cope with picking more than three points. In other words, if I need a point D, I could basically repeat steps 4 and 5 (averaging A, B and C rather than just A and B this time), but it seems like it's not very efficient.
Any ideas?





You need a value function that gives a quantitative evaluation of the three (or more) points. For example, the value function could be the sum of the three distances between the three points.
Then for a given point, go through all possible pairs of other points, and select the pair that gives the highest score for your value function.
After two points are selected, for the third point (the innermost loop) you only have to calculate two distances, which is simple and fast. This avoids the complexities of sorting and averaging, which can make your algorithm slower.





Thanks for the suggestion. If I'm following correctly then what I have is this:
1) Pick a random point
2) For each possible pair of other points calculate a value (I actually used area  it seemed to work better than total distance) and keep track of the highest scoring pair so far
3) Once I've checked every pair I now have three points that cover a maximum area of the space
The only thing I'm not sure of is the best way to expand this into more points (it's not critical that I do this right now, but I'd like to know). It seems that it would quickly get outifhand to do the same thing with all possible triples and/or quadruples, etc.





If you want the maximum area, you need to look at all triples instead of starting with a random point.
If there are a lot of points and/or you expand this into more points, it may be slow. Here's a possible shortcut: Determine the convex hull of your point set, and look through combinations of those (fewer) points.
The convex hull is roughly the outline / most extreme points in your set, so will probably have the points that enclose the maximum area.
There are many pages of convexhull algorithms (e.g. http://en.wikipedia.org/wiki/Convex_hull_algorithms[^]) Try to find a simple one that can be easily implemented.





Hi,
Wjousts wrote: find two other points that are as far away as possible from the original point, but also as far apart from each other as possible.
That is two requirements, and they may or may not contradict each other.
Assume the same problem in one dimension; our example has 5 points at coordinate 0, 1, 2, 99, 100.
Now what are the points that meet your requirements with respect to the point at 0: is it 99 and 100 (maximizing requirement 1) or is it 1 and 100 (maximizing requirement 2), or something else?
You should first give an accurate requirement; if it is really unambiguous, you can then write a mathematical equation (a "cost function") or a software method that calculates how suitable a candidate solution is.
Once that is done, a suitable algorithm can be searched. For small problems, a brute force algorithm can be sufficient (i.e. just consider all possibilities, calculate all costs, and pick the lowest one).
For some cost functions, a smarter algorithm could be found, e.g. alphabeta pruning might reduce the solution space.





Looking for the opposite of Djikstra's algorithm  which finds shortest path between two points.





Firstly I'm sorry for writing this question here,because I didn't find the Java forum.Anyway I need to help for java code of DXBall.(Also I have to use Eclipse editor to do it).Is there anyone can help me about it? if there is please contact with me with meagle87@hotmail.com.



