Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.20
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
slsh /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
assoc.sl
1.05
KB
-rw-r--r--
colormap.sl
478
B
-rw-r--r--
life.sl
2.15
KB
-rw-r--r--
prime.sl
853
B
-rwxr-xr-x
saveobj.sl
13.64
KB
-rw-r--r--
slsmgex2.sl
486
B
-rw-r--r--
sort.sl
1.5
KB
-rwxr-xr-x
utmp.sl
1.5
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : life.sl
% This example provides an implementation of Conway's famous game of life. % It uses the SMG module from the modules directory. Make sure you % build it first. require ("slsmg"); require ("rand"); private define urand (m, n) { variable a = rand_uniform (m*n); reshape (a, [m, n]); return a; } % The algorithm for the game begins here. private define make_left (n) { variable a; a = Int_Type [n]; a[0] = n-1; a[[1:]] = [0:n-2]; return a; } private define make_right(n) { variable a; a = Int_Type [n]; a[[0:n-2]] = [1:n-1]; a[-1] = 0; return a; } private define life_init (nr, nc) { variable a; variable up, down, left, right; variable i; variable num_neighbors; a = typecast (5.0 * urand (nr, nc), Char_Type); a[where (a != 1)] = 0; up = make_left (nr); down = make_right (nr); left = make_left (nc); right = make_right (nc); return (a,up,down,left,right); } private define life_new_generation (a, up, down, left, right) { variable b; variable middle = [:]; variable i; % Make sure array contains only 0 and 1 a[where(a)] = 1; b = (a[up,left] + a[up, middle] + a[up, right] + a[middle,left] + a[middle, right] + a[down, left] + a[down, middle] + a[down, right]); b = typecast (b, Char_Type); i = where ((b < 2) or (b > 3) or ((b == 2) and (a == 0))); b[i] = 0; return b; } define life_print (a, old_a) { variable dims, i, j; (dims,,) = array_info (a); a = @a; a[where (a)] = 1; a[where (a and (old_a == 0))] = 2; slsmg_set_color (0); slsmg_cls (); _for (0, dims[0]-1, 1) { i = (); foreach (where (a[i,*])) { j = (); slsmg_gotorc(i,j); slsmg_set_color (a[i,j]); slsmg_write_string ("O"); } } slsmg_set_color (0); slsmg_refresh (); sleep (1); } define life (nr, nc) { variable a, left, right, up, down, new_a; (new_a, up, down, left, right) = life_init (nr, nc); a = new_a; do { life_print (new_a, a); a = new_a; new_a = life_new_generation (a, up, down, left, right); } while (length (where (new_a))); } slsmg_init_smg (); life (SLsmg_Screen_Rows, SLsmg_Screen_Cols);
Close