lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Lista Forumurilor Pe Tematici
lisp2arx | Reguli | Inregistrare | Login

POZE LISP2ARX

Nu sunteti logat.
Nou pe simpatie:
LaraTaner pe Simpatie
Femeie
19 ani
Prahova
cauta Barbat
24 - 52 ani
lisp2arx / Listof AutoLisp.100 / AutoLisp Random number generator for integer Moderat de zauchan
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 517
Inf: random number generator

    The seed for RND. This is the variable that is set by RANDOMIZE.
  Out:rr:integer

Code:

(if (equal  const_seed nil)
    (setq const_seed (atoi (substr (rtos (getvar "CDATE") 2 10) 14)))
   )
(defun php_rand_void(kmaxInt / rr ax)  ;;_ASSERT_OK
   (if (=  kmaxint nil) (setq;|a21613|;
     kmaxint 32767)) (setq;|a21641|;
     ax const_seed
     ax (/ (+ (* ax 214013) 2531011) (expt 2  16 ) )
     rr (boole 1  ax kmaxInt)
     const_seed (boole 1  ax 32767)) 
rr)

MainProblem cu SUA, nu este totalul multor trucurii ,(hotii, furturi- noi trebuie sai iertam9%=tva) educatia financiara americană este o Religie(ex. de religie=Catolicism, sau iudaism), Adică oameni din SUA au descoperit alt tip de religie2000anul, dogmatica-religioasa-economică .?> iar acum americanii au probleme cu recunoasterea acestei religiei.lor, de câtre Alieni pe alte planete.(Venus, sau Marte.. si de aceea ei ne sparg pe noi cu inflatia economică. Alieni Pleiadieni, asa zic pe internet, americanii.Sua isi mută dogmatica-religia lor.. in *secret* la economia; pe Marte hollow-black ascunsă de văzul lumii-clasice.(China, Isreael, Rusia...)

Code:

#region
php_rand_void
(if (equal  const_seed nil)
    (setq const_seed (atoi (substr (rtos (getvar "CDATE") 2 10) 14)))
   )
(defun php_rand_void(kmaxInt / rr ax)  ;;_ASSERT_OK
/*c2s: if (kmaxint==nil) kmaxint=32767;
       ax=const_seed,
       ax=(ax*214013 + 2531011) >> 16,
       rr=ax & kmaxInt,
       const_seed=ax & 32767;
*/
rr)
#endregion



autolisp random number generator for integer inf: random number   the seed for rnd. this the

61.5KB


_______________________________________


pus acum 3 ani
   
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 517
You can user cputicks and modulo for generating number/s inside the shortstring for Delphi or
Lazarus.
I think you can also use a random string to replace your integer. I have written a program to generate a random string. Look at this URL:

Code:

#region
(DEFUN make_rnd_string (/ lvar0 lvar1 lvar2 lvar3 lvar4 lvar5 lvar6
   lvar7 lvar8 lvar9)
  (setq lvar1
  (LIST "{" "}" "~" "[" "]" "_" "^" "*" "$" ":" "#" "@")
  )
  (setq lvar2
  (LIST "s"   "t"   "u"  "1"   "2"   "3"   "4"  "5"   "6"
  "?"   "#"   "@"  "["   "]"   "_"   "^"  "{"   "}"
  "r"   "x"   "y"  "h"   "i"   "w"   "c"  "d"   "k"
  "~"   "*"   "$"  ":"   "l"   "m"   "v"  "g"   "q"
  "p"   "z"   "n"  "o"   "a"   "e"   "f"  "j"   "b"
  "7"   "8"   "9"  "0"
    )
  )
  (setq lvar8 (list "j"   "b" "s"   "w"   "c"   "d" "k"   "p"
   "z"   "n" "l"   "m"   "t"   "u" "h"   "i"
   "v"   "g" "q"   "r"   "x"   "y" "o"   "a"
   "e"   "f"
  )
  )

i've been playing with bricscad for a night
.des file format appears to be unsecure
whoever cares about his/her code privacy - do not use .des format.

Code:

(setq lvar3 (rem (READ (SUBSTR (VL-STRING-SUBST   ""  "."  (RTOS (GETVAR "cputicks") 2 16)  )  12  2 ) )  12    )  )  
  (setq lvar4 (rem (READ (SUBSTR (VL-STRING-SUBST   ""  "."  (RTOS (GETVAR "cputicks") 2 16)  ) 12 2   )  )  48    )  )
  (setq lvar5 (rem (READ (SUBSTR (VL-STRING-SUBST   ""   "." (RTOS (GETVAR "cputicks") 2 16)  )   12   2 )  )  48    )  )
  (setq lvar6 (rem (READ (SUBSTR (VL-STRING-SUBST   ""  "."  (RTOS (GETVAR "cputicks") 2 16)   )   12   2  )   )   48     )  )
  (setq lvar0 (rem (/ (getvar "millisecs") 10000) 26))
  (setq lvar9 (rem (getvar "millisecs") 26))
  (if (= nil lvar3) (setq lvar3 1))
  (if (= nil lvar4) (setq lvar4 2))
  (if (= nil lvar5) (setq lvar5 3))
  (if (= nil lvar6) (setq lvar6 4))

bricscad is a good alternative to acad and there will be more and more bricscad users worldwide
if you want to sell them your apps you will have to chose between money and security

Code:

(setq lvar7  (STRCAT (NTH lvar0 lvar8) (NTH lvar3 lvar1) (NTH lvar4 lvar2)
               (NTH lvar5 lvar2) (NTH lvar6 lvar2) (NTH lvar9 lvar8)  ) )
  (if (VL-POSITION  lvar7 rnd_string_list  )
   (PROGN (setq lvar7 (make_rnd_string)))
    (PROGN (setq rnd_string_list (CONS  lvar7
     rnd_string_list)) lvar7 )  )
)
(DEFUN make_rnd_string12 ()
  (strcat (make_rnd_string) (make_rnd_string))
)



autolisp random number generator for integer you can user cputicks and modulo for generating

39KB


_______________________________________


pus acum 2 luni
   
Pagini: 1  

Mergi la