-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, I've made a form containing a TVirtualStringTree that works in Delphi 7 and Delphi 2010. I notice that as I move between the two platforms I get the message '...parameter list differ..' on the tree events and that the string type is changing bewteen TWideString (D7) and string (D2010). The only…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a String that I needed access to the first character of, so I used stringname[1]. With the unicode support this no longer works. I get an error: [DCC Error] sndkey32.pas(420): E2010 Incompatible types: 'Char' and 'AnsiChar'
Example code:
//vkKeyScan from the windows unit
var
KeyString:…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, I am a long time Delphi 6 developer. Looking for a book on Delphi 2010. Not only on the new features available in Delphi 2010, but more importantly, guideline on how different it is to develop applications in Delphi 2010, the architecture, standard and convention, etc.
Thanks a lot.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello.
The situation is the following. Typically I use RAD Studio 2010 for Delphi development. I have some components I would like to redistribute in binary form (*.bpl without source). But I would like people to be able to use them despite of their Delphi version. But, for example, dcu files can…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I need create a programatic equivalent using delphi language... or could someone post a link on how to do grammars in peech recogniton using the delphi. sorry for my english...
XML Grammar Sample(s):
<GRAMMAR>
<!-- Create a simple "hello world" rule -->
<RULE NAME="HelloWorld"…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi, I am using .NET to create an artificial life program and I am using C#'s pseudo random class defined in a Singleton. The idea is that if I use the same random number generator throughout the application, I could merely save the seed and then reload from the seed to recompute a certain interesting…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
The challenge
The shortest code by character count that will generate (pseudo)random numbers using the Middle-Square Method.
The Middle-Square Method of (pseudo)random number generation was first suggested by John Von Neumann in 1946 and is defined as follows:
Rn+1 = mid((Rn)2, m)
For example:
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a random number generator:
int32_t ksp_random_table[GENERATOR_DEG] = {
-1726662223, 379960547, 1735697613, 1040273694, 1313901226, 1627687941,
-179304937, -2073333483, 1780058412, -1989503057, -615974602, 344556628,
939512070, -1249116260, 1507946756, -812545463, 154635395,…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am looking for a random number generator that can be biased. For instance, say I want a random number between 1-5, with the probability being:
1: Comes up 20% of the time
2: Comes up 10% of the time
3: Comes up 40% of the time
4: Comes up 25% of the time
5: Comes up 5% of the time
Is there anything…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Why do i need to create an instance of Random class, if i want to create a random number between 1 and 100 ....like
Random rand = new Random();
rand.Next(1,100);
Is there any static function of Random class to do the same? like...
Random.Next(1,100);
I don't want to create an instance unnecessaril…
>>> More