Looking to use FastLZ in Python, or something similar. Tried Google and didn't find anything. Wondering if there is another algorithm with similar performance available in Python?
exhaustive:
- all keys in the dictionary, even if the keys are in a nested dictionary that is a value to a previous-level dictionary key.
sorted:
- this is to ensure the keys are always returned in the same order
The nesting is arbitrarily deep. A non-recursive algorithm is preferred.
level1 = {
'a' : 'aaaa',
'level2_1' : {'b': 'bbbbb', 'level3': {'c': 'cccc', 'd': 'dddddd'} },
'level2_2' : { 'z': 'zzzzzzz' }
}
hey,
I'm trying to programming a crossword creator. using a given dictionary txt file and a given pattern txt file. The basic idea is using DFS algorithm. the problem begin when the dictionary file is v-e-r-y big (about 50000 words). then i recive the :
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
i know that there is a part in my program that waists memory, but i don't know where it is, how to find it and how to fix it
How can I unzip a varbinary(max) value in a stored procedure? I'd like to implement or invoke a gunzip algorithm within TSQL code, preferably without enabling the CLR.
Hi,
Please share some good websites where I can learn more on String Processing Techniques and could grill myself more into different kinds of algorithm available in this field..
Thanks..
I want to know , What is the advantage of Lucene searching and indexing ?
Is searching with Lucene as fast as other searching algorithm like Quick Search?
What about indexing ?
I want to know more about advantage of Lucene rather that others .
thanks .
Talking about javax.crypto.Cipher;
I was trying to encrypt data using Cipher.getInstance("RSA/None/NoPadding", "BC"); but I got the exception: ArrayIndexOutOfBoundsException: too much data for RSA block
Looks like is something related to the "NoPadding", so, reading about padding, looks like CBC is the best approach to use here.
I found at google something about "RSA/CBC/PKCS#7", what is this "PKCS#7"? And why its not listed on sun's standard algorithm names?
I know you can generate all permutations from a list, using glob or Algorithm::Permute for example - but how do you generate all possible permutations from a regular expression?
i want to do like:
@perms = permute( "/\s[A-Z][0-9][0-9]/" );
sub permute( $regex ) {
# code - put all permutations of above regex in a list
return @list;
}
Hi all,
Is it possible to create a certificate template that uses SHA-2 (sha256, sha224, sha384, sha512), from a Windows server 2003 CA?
I know how to do it in Windows server 2008 based CA, with the new version (version 3) - it is possible to specify the hash algorithm (Under the "Cryptography" tab of the template properties). But is it possible in 2003 based CA?
Thanks.
I'm trying to design a program that draws graphs given a set of points (x, y), and it also should recognize the curve (straight line, hyperbole, parabola), with only the help of the points.
Is there an algorithm to do that?
hi,
i m doing my project in software testing. gnetic algorithm is the technique i want to use to generate automatic test data\test cases in matlab.
please help me in doing my project successfully.
thanks.
Hello! I Wonder if someone has used Markov Algorithm-based programming system or embedded facility in production or for scientific purpose.
I know about 'REFAL' programming language invented a thousand years ago, but it all seems to be dead, so..
Ref: http://en.wikipedia.org/wiki/Markov_algorithm
I have done some computer graphical programming recently, and I have no experience before. I used the library call CGAL(computer geometry algorithm library). Also, I noticed that there is class for triangulation and also class for mesh. Is mesh just a kind of triangle net? Do they have any differences?
Thanks!
I'm base64 encoding a JPG in AS3 and passing it to PHP where it would be decoded. It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm.
Is there a library or API for either language that would allow it to interface with the other? Alternatively, does anyone even know what PHP's default base64 map is? My Google searching is not yielding results.
Hello!
I've run into a little hurdle and wanted to see if somebody could help me!
I want to write an algorithm for an if statement that says:
if (for every 50 points)
{
//do something
}
I thought += 50 would do the trick, but nope.
Any ideas?
Thanks!
In terms of Artificial Intelligent and Logic Knowledge, What is the difference between sound and unsound reasoning?
Also, what kind of search Does ID3 algorithm use? Is it Breadth-first search?
Thanks
Hi all,
My source gave me the following lat and long codes from Amsterdam. But I can't get them working with Google Maps. Is there some logic behind it, or some kind of algorithm to convert them?
5,237,300,539,279,090 | 489,290,714,263,916
Should be something like this:
52.378268, 4.888859
How can one tell where the dots should be?
Thanks!
I'd like to build a webapp in Rails in which I'd like to determine every pixel's color of a given image (JPEG). Is there any possibility to do that with Rails or JavaScript? The goal is to write an algorithm which determines the "middle color" of the image and uses it for background color of the site.
Any suggestion would be appreciated.
Hi!
Is there an easy way to get the relative compliment of two sets? Perhaps using LINQ?
http://en.wikipedia.org/wiki/Complement_(set_theory)
I have to find the relative compliment of a set A relative to B. Both A and B are of type HashSet but I think the algorithm could be made more generation (IEnumerable or even ISet)?
I could use a solution in either vb.net or C#.
This is common interview question (according to some interview sites) but I can find no normal answers in Internet - some are wrong and some point to complex theory I expect not looked for in interview (like Bressenham algorithm).
The question is simple:
The circle equation is: x^2 + y^2 =
R^2. Given R, draw 0,0-centered circle
as best as possible without using any
floating point (no trigo, square roots, and so on, only integers)
Is there a short way to check/get for least significant bit in a 32-bit integer, in MIPS? It is obviously set for the odd numbers and an algorithm which checks for the whole number is odd or even can decide for this. But I just wonder is there a better way to do this...
I have some numbers stored in a vector . I want to find which number appears most in the vector.
Is there any easy/fast algorithm (STL or whatever) that does this ?
I split color image for 3 channels and made a contrast enhancement of each channel.
Then merged them together, I like the image at the result, but it has different colors.
Black objects became yellow and so on...
EDIT:
The algorithm I used is to calculate the 5th percentile and the 95th percentile
as min and max values, and then expand the values of image so that it will have min and max values as 0 and 255. If there is a better approach please tell me.
Say I make a static class like following with an extension method:
public static class MyStaticExtensionClass
{
private static readonly Dictionary<int, SomeClass> AlgoMgmtDict
= new Dictionary<int, SomeClass>();
public static OutputClass ToOutput(this InputClass input)
{
// clears up the dict
// does some kind of transform over the input class
// return an OutputClass object
}
}
In a multi user system, will the state management dictionary fail to provide correct values for the transform algorithm? Will a regular class be a better design or shoving the Dictionary inside the method a better design?
i have written a object selection algorithm which picks the objects by there color. i give every object an unique color and then i just have to use the glReadPixels method to check which object was selected
this works fine and is really fast but the problem is that the frame is displayed on the screen with all the picking-colors so the screen flashes every time you select something.
so my question is: how do i write everything in the correct display buffer but dont display it on the screen to avoid these flashes?