... in CTLIB, which gives factorial of n. However the alphabet "E" is repeated twice resulting in some duplicate results. Ignoring such duplicates, we get 95 combinations finally resulting in 8,553 total permutations. Program to generate all unique combinations and permutations: #include ...
... The C compiler is not the issue. Harbour does not provide those functions, so FWH provides them. But xHarbour provides them and then we have duplicates in FWH. I guess we should move them into a PRG and don't include such PRG in FWH for xHarbour... but we use the same prgs.txt for all the ...
... The C compiler is not the issue. Harbour does not provide those functions, so FWH provides them. But xHarbour provides them and then we have duplicates in FWH. I guess we should move them into a PRG and don't include such PRG in FWH for xHarbour... but we use the same prgs.txt for all the ...
//------------------------------------------------//// EXTRAER NUMEROS RANDOM SIN DUPLICADOS//------------------------------------------------//Function NumRandomNoDuplic() local n := 0, nLen := 10, nRandom, aRandom := {} While n < nLen nRandom :=...
FUNCTION RandomList( nNum ) LOCAL aList := ARRAY( nNum ) LOCAL nAt, aRandom := {} AEval( aList, { | u, i | aList[ i ] := 0 } ) DO WHILE LEN( aRandom ) < nNum nAt := HB_RandomInt( 1, nNum ) DO WHILE aList[ ...
// \samples\RANDOM2.PRG#include "FiveWin.ch"STATIC aNumerosFUNCTION RandomList() LOCAL cTexto := "" LOCAL cFile := "numeros.txt" LOCAL nSort // aqui inicia o sorteio considerando o range de 1 até 100&n...
Mira se ayuda: // \samples\RANDOM1.PRG#Include "FiveWin.ch"FUNCTION RandomList() LOCAL aList := ARRAY( 100 ) // 999999 LOCAL nAt, aRandom := {} AEval( aList, { | u, i | aList[ i ] := i } ) W...
I have to calculate a random number up to 1 10 I have to extract 1 at a time for 10 times and I don't have to extract a number that has already been extracted, what should I do?
Certainly you could put a popup in there with your message if desired. IMHO I would not. People don't want to be told they did something wrong by a computer. If at all possible, software should just fix the problem and be quiet about it. Thanks for the code Tim. I have a routine, but it is 16 lines...
I have used the following for many years: IF IsExeRunning( CFILENOEXT( hb_argv( 0 ) ) ) SHOWWINDOW( FINDWINDOW( 0, "Auto Shop Writer 11" ), 9 ) SETFOREGROUNDWINDOW( FINDWINDOW( 0, "Auto Shop Writer...
Silvio escrebió: " ahora tengo otro problema que tengo que solucionar, cuando un usuario ingresa inicia sesión y podemos bloquear la duplicación del exe en una computadora. Pero si ese mismo usuario cambia de computadora y entra al sistema con la misma cuenta, ¿cómo puedo bloquearlo? &nbs...
Silvio, This is from my note file: -------------------------------------------------------------------------------- Posted: Sun Sep 17, 2006 11:56 pm Post subject: Preventing more than one instance of an app running. Author: Antonio Linares -----------------------------------------------------------...