Skip to content

Instantly share code, notes, and snippets.

View JubbaSmail's full-sized avatar

Jubba Smail JubbaSmail

  • Amsterdam, Netherlands
View GitHub Profile
#include <windows.h>
#if define UNICODE
#define RegOpenKeyEx RegOpenKeyExW
#define RegEnumKeyEx RegEnumKeyExW
#else
#define RegOpenKeyEx RegOpenKeyExA
#define RegEnumKeyEx RegEnumKeyExA
#endif
#include <windows.h>
#if define UNICODE
#define RegOpenKeyEx RegOpenKeyExW
#else
#define RegOpenKeyEx RegOpenKeyExA
#endif
HKEY Open(HKEY root,LPTSTR path, REGSAM permission)
{
declare
x number;
begin
for i in 0..10 loop
dbms_output.put_line('+'||i);
end loop;
--------------------------
x:=10;
loop
if x < 0 then
declare
x number:=4.5;
begin
if x > 5 then
dbms_output.put_line(x || ' is big');
elsif x < 5 then
dbms_output.put_line(x || ' is small');
else
dbms_output.put_line(x || 'equal 5');
end if;
declare
-- variable_name [CONSTANT] datatype [NOT NULL]
x number:=1;
emp_hiredate date;
emp_deptno number(2) not null := 10;
city varchar2(13) := 'Damascus';
xyz constant number := 1400;
begin
x:=x+1;
emp_hiredate:='13-NOV-14';
begin
--cout<<"hello world"<<endl;
dbms_output.put_line('Hello World');
end;
select * from orders
--==========================================
select order_id,order_mode from orders
--==========================================
select order_id,order_mode from orders
where order_total > 7000
--==========================================
select count(order_id) from orders
--==========================================
select count(order_id) from orders
@echo off
Setlocal EnableDelayedExpansion
set flag=0
set x=0
if /i !flag! EQU 0 (
set x=1
echo x = !x!
)
echo x = !x!
@echo off
echo %time%
echo %date%
set hour=%TIME:~0,2%
set min=%TIME:~3,2%
set sec=%TIME:~6,2%
echo Hour: %hour%
echo Min: %min%
echo Sec: %sec%
pause
@echo off
ping 8.8.8.8 | find "time=" > NUL
if ERRORLEVEL 1 (
echo No Internet connection.
) else (
echo Internet connection available.
)
pause