Code Snippet

Just another Code Snippet site

Random Post :




[PL/SQL] Random

select dbms_random.random from dual;

RANDOM
_____________
1393936551

E.g.: Generating a random number between 0 and 1.

select dbms_random.value from dual;

VALUE
_____________
1

E.g.: Generating a random number from a range, between 1 to 1000.

select dbms_random.value(1,1000) num from dual;

NUM
_____________
611

E.g.: Generating a 12 digit random number.

select dbms_random.value(100000000000, 999999999999) num from dual;

NUM
_____________
175055628780

E.g.: Generating an upper case string of 20 characters

select dbms_random.string('U', 20) str from dual;

STR
_______________________
VUOQOSTLHCKIPIADIZTD

E.g.: Generating a lower case string of 20 characters

select dbms_random.string('L', 20) str from dual;

STR
____________________
xpoovuspmehvcptdtzcz

E.g.: Generating an alphanumeric string of 20 characters. There is a bug in Oracle 8i that results in special (non-alphanumeric) characters such as ‘]’ in the string. This is resolved in Oracle 9i.

select dbms_random.string('A', 20) str from dual;

STR
__________________
sTjERojjL^OlTaIc]PLB

E.g.: Generating an upper case alphanumeric string of 20 characters

select dbms_random.string('X', 20) str from dual;

STR
________________________
SQ3E3B3NRBIP:GOGAKSC

E.g.: Generating a string of printable 20 characters. This will output a string of all characters that could possibly be printed.

select dbms_random.string('P', 20) str from dual;

STR
___________________
*Yw>IKzsj\uI8K[IQPag

[Web Resources] +10 000 photos libres de droits

http://korben.info/10-000-photos-libres-de-droits.html

http://finda.photo/

http://korben.info/10-sites-photos-gratuites-illustrer-vos-sites.html

Little Visuals
Unsplash
Death to the Stock Photo
New Old Stock
Superfamous (nécessite de mentionner l’auteur)
Picjumbo
The Pattern Library
Gratisography
Getrefe
IM Free (nécessite de mentionner l’auteur)

Instant Logo Search : Search & download thousands of logos instantly

[Unix] Verifying Which Ports Are Listening

To determine which ports are listening for TCP connections from the network:

nmap -sT -O localhost

To check if a port is associated with the official list of known services :

cat /etc/services | grep 834

To check for port 834 using netstat, use the following command:

netstat -anp | grep 834

The lsof command reveals similar information to netstat since it is also capable of linking open ports to services

lsof -i : 834

Previous Posts Next posts