This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#if define UNICODE | |
#define RegOpenKeyEx RegOpenKeyExW | |
#define RegEnumKeyEx RegEnumKeyExW | |
#else | |
#define RegOpenKeyEx RegOpenKeyExA | |
#define RegEnumKeyEx RegEnumKeyExA | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#if define UNICODE | |
#define RegOpenKeyEx RegOpenKeyExW | |
#else | |
#define RegOpenKeyEx RegOpenKeyExA | |
#endif | |
HKEY Open(HKEY root,LPTSTR path, REGSAM permission) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
x number; | |
begin | |
for i in 0..10 loop | |
dbms_output.put_line('+'||i); | |
end loop; | |
-------------------------- | |
x:=10; | |
loop | |
if x < 0 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
--cout<<"hello world"<<endl; | |
dbms_output.put_line('Hello World'); | |
end; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
Setlocal EnableDelayedExpansion | |
set flag=0 | |
set x=0 | |
if /i !flag! EQU 0 ( | |
set x=1 | |
echo x = !x! | |
) | |
echo x = !x! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
ping 8.8.8.8 | find "time=" > NUL | |
if ERRORLEVEL 1 ( | |
echo No Internet connection. | |
) else ( | |
echo Internet connection available. | |
) | |
pause |