1. Firebug
2. Web developer
3. ColorZilla
4. PHP Developer Toolbar
5. Toogle Web Developer Toolbar
6. FirePHP
7. CodeBurner
8. FireFTP
9. FireQuery
10. FlashFirebug
11. Console²
12. CSS Reloader
13. View Source Chart
14. Mobilify
15. Mobile toolkit
16. FoxyProxy
Wednesday, September 21, 2011
Saturday, September 17, 2011
Things to do after installing Ubuntu 11.04
1. Unity or gnome classic
After installation Ubuntu 11.04 starts up with Unity style.
If you not like Unity style, switch back to gnome classic.
Here's how to:
At the bottom of login screen there is a tab, from where you can choose the style you want.
2. Install updates
Just type in terminal:
After installation Ubuntu 11.04 starts up with Unity style.
If you not like Unity style, switch back to gnome classic.
Here's how to:
At the bottom of login screen there is a tab, from where you can choose the style you want.
2. Install updates
Just type in terminal:
sudo apt-get update && sudo apt-get upgrade
Thursday, September 8, 2011
Html layers containing Flash swf object
Today, i bumped into a problem. I was trying to make 2 layers, one containing an swf object. The swf object displays on top of all layers regardless of z-index.
So i googled around and found that the transparent parameter must be set to the object.
Example:
So i googled around and found that the transparent parameter must be set to the object.
Example:
Sunday, July 17, 2011
PHP Function to Check URL
The following PHP function is used to check if the URL exists. This php function will monitor the http requests and returns the header information. This function is very useful when you are validating the given URL
Check these out
http://hungred.com/how-to/php-check-remote-email-url-image-link-exist/
http://w-shadow.com/blog/2007/08/02/how-to-check-if-page-exists-with-curl/
function checkUrl($url) {
$root = _getRoot($url);
$ctx = stream_context_create(array(
'http' => array(
'max_redirects' => 5, // allows 4 redirects :/
'timeout' => 5,
)
));
$fp = @fopen($url, 'r', false, $ctx);
$ret['success'] = false;
if (! $fp) {
return $ret;
}
$ret['locations'] = array();
$ret['metaData'] = stream_get_meta_data($fp);
fclose($fp);
// analyze HTTP headers
foreach ($ret['metaData']['wrapper_data'] as $line) {
if (preg_match('@^Location: (.*)$@i', $line, $m)) {
if ($m[1][0] === '/') {
// root-relative URI
$m[1] = $root . $m[1];
} elseif (strpos($m[1], '://') >= 4) {
// full URL
$root = _getRoot($m[1]);
}
$ret['locations'][] = $m[1];
}
if (preg_match('@^HTTP/1\.[01] 200@i', $line, $m)) {
$ret['success'] = true;
}
}
return $ret;
}
function _getRoot($url) {
list($proto, $url) = explode('://', $url, 2);
list($host) = explode('/', $url, 2);
return $proto . '://' . $host;
}
var_export(checkUrl('http://microsoft.com/ie'));
// outputs
array (
'success' => true,
'locations' =>
array (
0 => 'http://www.microsoft.com/ie',
1 => 'http://www.microsoft.com/ie/',
2 => 'http://www.microsoft.com/windows/internet-explorer/default.aspx',
),
'metaData' =>
array (
'wrapper_data' =>
array (
... abunch of HTTP headers
),
'wrapper_type' => 'http',
'stream_type' => 'tcp_socket/ssl',
'mode' => 'r+',
'unread_bytes' => 3478,
'seekable' => false,
'uri' => 'http://microsoft.com/ie',
'timed_out' => false,
'blocked' => true,
'eof' => false,
),
)
Check these out
http://hungred.com/how-to/php-check-remote-email-url-image-link-exist/
http://w-shadow.com/blog/2007/08/02/how-to-check-if-page-exists-with-curl/
Saturday, July 16, 2011
Cool WEB
http://pelfusion.com/tools/26-worth-knowing-php-tools-resources-for-web-developers/
http://www.webdesignerdepot.com/2011/07/30-creative-qr-code-business-cards/
Create Rounded Corners with CSS3 Border-Radius Property
247 Hand Drawn Web Icons Free for Download
http://www.webappers.com/2011/03/24/css-modal-box-without-javascript-or-images/
http://www.webappers.com/2011/02/24/tutorial-on-how-to-send-text-messages-with-php/
http://www.webappers.com/2011/02/17/how-to-create-css-drop-shadows-without-images/
http://www.webappers.com/2011/02/15/avactis-2-with-visual-css-editor-visual-layout-editor/
http://www.webappers.com/2011/02/10/html5-game-framework-for-touchscreens-browsers/
http://www.webappers.com/2011/01/24/jquery-file-upload-with-upload-progress-bar/
http://www.webappers.com/2011/01/17/videojs-html5-video-player-with-pure-css-skins/
http://www.webappers.com/2011/01/07/how-to-work-with-new-web-technologies/
http://www.webappers.com/2010/11/24/20-things-i-learned-about-browsers-and-the-web/
http://www.webappers.com/2010/11/18/offline-learning-pack-for-jquery/
http://www.webappers.com/2010/11/09/ajax-file-uploader-with-progress-bar-drag-drop/
http://www.webappers.com/2010/10/21/how-to-create-html5-forms/
http://www.webappers.com/2010/10/06/add-notes-to-any-images-with-jquery-notes/
http://www.webappers.com/2010/10/01/240-flag-icons-in-every-size-you-need/
http://www.webappers.com/2010/09/23/pure-css-progress-bar-with-javascript-for-animation/
http://www.webappers.com/2008/11/11/free-glossy-modern-web-browsers-icons-download/
http://www.webappers.com/2010/09/08/open-source-wysiwyg-html-editor-using-jquery-ui/
http://www.webappers.com/2011/06/10/html5-drag-drop-image-file-uploader-jquery-plugin/
http://www.webdesignshock.com/news/css3-guide-features-properties/
http://www.webdesignshock.com/news/gradients-property-css3/
http://www.webdesignshock.com/news/css-class-id-single-sprite/
MUST
http://webdesigneraid.com/7-html5-videos-to-learn-for-beginners/
http://www.webresourcesdepot.com/15-must-have-bookmarklets-for-web-designers-and-developers/
http://dev.opera.com/articles/view/custom-html5-video-player-with-css3-and-jquery/
http://www.photoshoplady.com/the-100-most-popular-photoshop-tutorials-2008/
http://www.pageresource.com/
http://designtutorials4u.com/15-must-have-resources-for-web-designers/
WhAT are
http://www.webdesignerdepot.com/2011/07/30-creative-qr-code-business-cards/
Create Rounded Corners with CSS3 Border-Radius Property
247 Hand Drawn Web Icons Free for Download
http://www.webappers.com/2011/03/24/css-modal-box-without-javascript-or-images/
http://www.webappers.com/2011/02/24/tutorial-on-how-to-send-text-messages-with-php/
http://www.webappers.com/2011/02/17/how-to-create-css-drop-shadows-without-images/
http://www.webappers.com/2011/02/15/avactis-2-with-visual-css-editor-visual-layout-editor/
http://www.webappers.com/2011/02/10/html5-game-framework-for-touchscreens-browsers/
http://www.webappers.com/2011/01/24/jquery-file-upload-with-upload-progress-bar/
http://www.webappers.com/2011/01/17/videojs-html5-video-player-with-pure-css-skins/
http://www.webappers.com/2011/01/07/how-to-work-with-new-web-technologies/
http://www.webappers.com/2010/11/24/20-things-i-learned-about-browsers-and-the-web/
http://www.webappers.com/2010/11/18/offline-learning-pack-for-jquery/
http://www.webappers.com/2010/11/09/ajax-file-uploader-with-progress-bar-drag-drop/
http://www.webappers.com/2010/10/21/how-to-create-html5-forms/
http://www.webappers.com/2010/10/06/add-notes-to-any-images-with-jquery-notes/
http://www.webappers.com/2010/10/01/240-flag-icons-in-every-size-you-need/
http://www.webappers.com/2010/09/23/pure-css-progress-bar-with-javascript-for-animation/
http://www.webappers.com/2008/11/11/free-glossy-modern-web-browsers-icons-download/
http://www.webappers.com/2010/09/08/open-source-wysiwyg-html-editor-using-jquery-ui/
http://www.webappers.com/2011/06/10/html5-drag-drop-image-file-uploader-jquery-plugin/
http://www.webdesignshock.com/news/css3-guide-features-properties/
http://www.webdesignshock.com/news/gradients-property-css3/
http://www.webdesignshock.com/news/css-class-id-single-sprite/
MUST
http://webdesigneraid.com/7-html5-videos-to-learn-for-beginners/
http://www.webresourcesdepot.com/15-must-have-bookmarklets-for-web-designers-and-developers/
http://dev.opera.com/articles/view/custom-html5-video-player-with-css3-and-jquery/
http://www.photoshoplady.com/the-100-most-popular-photoshop-tutorials-2008/
http://www.pageresource.com/
http://designtutorials4u.com/15-must-have-resources-for-web-designers/
WhAT are
Friday, July 15, 2011
HTML clocks using JavaScript and CSS rotation
The two clocks below are just HTML. There are no Adobe Flash files or my beloved
HTML clocks using JavaScript and CSS rotation
<canvas> going on, just regular <div> and <img> tags. The way it works is by taking those images in an { overflow: hidden } <div> and rotating them, via JavaScript, using the proposed CSS transform property.HTML clocks using JavaScript and CSS rotation
Wednesday, May 18, 2011
3.3 - Konstruktor es Destruktor
Egy osztaly konstruktorai harom kategoria sorolhatok
- alapertelmezett(implicit)
- masolo(copy)
- mas konstruktor
- alapertelmezett(implicit)
- masolo(copy)
- mas konstruktor
3.2 - Statikus tagok
Az alabbi pelda szemlelteti a statikus tagok deklaraciojat, definiciojat es hasznalatat.
#includeusing namespace std; class InstanceCounter{ private: static int counter; //Deklaracio int i; public: InstanceCounter(int _i=0) : i(_i){counter++;} ~InstanceCounter(){counter--;} static int getCounter(){return counter;} }; int InstanceCounter::counter=0; //Definico int main(){ cout<<"Peldanyszam" << InstanceCounter::getCounter() << endl; InstanceCounter o1 o2 o3; cout<<"Peldanyszam" << InstanceCounter::getCounter() << endl; InstanceCounter * p = new InstanceCounter(10); cout<<"Peldanyszam" << InstanceCounter::getCounter() << endl; delete p; cout<<"Peldanyszam" << InstanceCounter::getCounter() << endl; return 0; }
3.0 - Osztalyok es Objektumok
Minden programozas nylev rendelkezik egy alapertelmezett tipushalmazzal es lehetoseget biztosit ennek felhasznaloi tipusok altali kiterjesztesere.
C nyelvben felhasznaloi tipust a struct kulcsszoval vezethettunk be.
C++ nyelvben a struktura tipus is atalakul, nemcsak adattagokat, hanem metodusokat is tartalmazhat. Az osztalydeklaracio a class kulcsszot es az osztalynevet tartalmazza. Pelda: class Alma;
Az osztalydefiniciot 2 forrasallomanyba szokas elhejezni. A fejallomanyban (.h) az osztaly definicio, az adattagokat illetve a metodus deklaraciokat tartalmazza es a metodusok definicioit egy C++ forrasfajlban szokas elhelyezni, ugy ahogyan a Stack modul eseteben is tetunk.
Pelda: datum.h
Egy osztaly tagjai haromfele lathatosaguak lehetnek
- privat (private)
- vedett (protected)
- nyilvanos (public)
C nyelvben felhasznaloi tipust a struct kulcsszoval vezethettunk be.
C++ nyelvben a struktura tipus is atalakul, nemcsak adattagokat, hanem metodusokat is tartalmazhat. Az osztalydeklaracio a class kulcsszot es az osztalynevet tartalmazza. Pelda: class Alma;
Az osztalydefiniciot 2 forrasallomanyba szokas elhejezni. A fejallomanyban (.h) az osztaly definicio, az adattagokat illetve a metodus deklaraciokat tartalmazza es a metodusok definicioit egy C++ forrasfajlban szokas elhelyezni, ugy ahogyan a Stack modul eseteben is tetunk.
Pelda: datum.h
class Datum{
private:
int ev, ho, nap;
public:
Datum(int _ev, int _ho, int _nap);
};
Egy osztaly tagjai haromfele lathatosaguak lehetnek
- privat (private)
- vedett (protected)
- nyilvanos (public)
2.6 - Kivetelkezeles
Ma mar minden programozasi nyelvben jelen van. Tulajdonkeppen egyfele hibakezelez altalanositasanak is tekintheto.
Olyan hibakat oldhatunk meg vele, amit helyben nem lehet megszuntetni.
Egyik nagy elonye , hogy a hagyomanyos kodot es a hibakezelo kodot szetvalassza.
A C++ nylevben a kiveltelesemenyt jelenzni lehet egy primitiv tipusu valtozo segitsegevel.
A fenti Stack osztaly egy absztrakt osztaly amely csak tipusdefiniciokat es fugvenydeklaraciokat tartalmaz, tehat tamogatja az absztrak adatipusokat, mivel nem ad meg semmi informaciot az adatok abrazolasara, illetve a muveletek implementaciojara vonatkozoan.
Az ilyen absztrakot osztalyokat feluleteknek is nevezzuk, mert feluletet biztositnak mas osztalyok szamara.
Erre epitjuk fel az Array_Stack konkrek osztalyt, amely az absztrakt osztaly konkret leszarmazotja lesz.
Az osztalyunknak ket konstruktora van az elso parameter nelkuli, a masodik a masolo konstruktor.
A C++ nincs automatikus szemetgyujtes ezert szuksegunk van a destruktorra, amely az objektum dinamikus helyfoglalasat semmisiti meg.
Pelad: stack.cpp
A fenti kod a Stack_Array osztaly metodusait implementalja.
Pelda: test_stack.cpp
Olyan hibakat oldhatunk meg vele, amit helyben nem lehet megszuntetni.
Egyik nagy elonye , hogy a hagyomanyos kodot es a hibakezelo kodot szetvalassza.
A C++ nylevben a kiveltelesemenyt jelenzni lehet egy primitiv tipusu valtozo segitsegevel.
class Error{...};
void f(){
if(feltetel){
throw Error()
}
}
// kivetel lekezelese
try{
f();
}catch(Error){
// kiveltelkezelo blokk
}
Pelda: stack.h#ifndef stack_h
#define stack_h
using namespace std;
class Staxk{
public:
class Stack_Overflow{};
class Stack_Underflow{};
virtual void push(char)=0;
virtual char pop()=0;
};
class Array_Stack : public Stack{
private:
char *s;
int top;
int max_size;
public:
Array_Stack(int max_size);
Array_Stack(const Array_Stack&);
~Array_Stack();
void push(char c) throw (Stack_Overflow);
char pop() throw (Stack_Underflow);
};
$endif
A fenti Stack osztaly egy absztrakt osztaly amely csak tipusdefiniciokat es fugvenydeklaraciokat tartalmaz, tehat tamogatja az absztrak adatipusokat, mivel nem ad meg semmi informaciot az adatok abrazolasara, illetve a muveletek implementaciojara vonatkozoan.
Az ilyen absztrakot osztalyokat feluleteknek is nevezzuk, mert feluletet biztositnak mas osztalyok szamara.
Erre epitjuk fel az Array_Stack konkrek osztalyt, amely az absztrakt osztaly konkret leszarmazotja lesz.
Az osztalyunknak ket konstruktora van az elso parameter nelkuli, a masodik a masolo konstruktor.
A C++ nincs automatikus szemetgyujtes ezert szuksegunk van a destruktorra, amely az objektum dinamikus helyfoglalasat semmisiti meg.
Pelad: stack.cpp
#include "stack.h" #includeusing namespace std; Array_Stack :: Array_Stack(int _max_size){ max_size = _max_size; s = new char[_max_size]; top = 0; } // masolo konstruktor Array_Stack :: Array_Stack(Array_Stack & _as){ this->max_size = _as.max_size; this->s = new char[max_size]; this->top = _as.top; } // destruktor Array_Stack :: ~Array_Stack(){ //cout<<"\nDestructor: "<< this->max_size<<"\n"; delete [] s; } void Array_Stack :: push(char c) throw (Stack_Overflow){ if(top >= max_size) throw Stack_Overflow(); s [top++] = c; } char Array_Stack :: pop() throw (Stack_Underflow){ if(top == 0) throw Stack_Underflow(); return s[--top]; }
A fenti kod a Stack_Array osztaly metodusait implementalja.
Pelda: test_stack.cpp
#include#include "stack.h" #include using namespace std; int main(){ Array_Stack as(100); try{ printf("\n%c", as.pop()); }catch(Stack :: Stack_Underflow x){ //cout<<"Stack_Underflow"<<"\n"; } return 0; }
2.5 - Dinamikus helyfoglalas
A dinamikus helyfoglalas futas kozben tortenik a memoria heap (halom) szegmenseben.
A valtozok kezelese ebben az esetben a programozo felelossege, a helyfoglalast a new , new[] operatorok vegzik mig a felszabaditast a delete, delete[] operatorok.
Pl:
Van egy Datum osztalyunk, keszitsunk belole peldanyokat.
A valtozok kezelese ebben az esetben a programozo felelossege, a helyfoglalast a new , new[] operatorok vegzik mig a felszabaditast a delete, delete[] operatorok.
Pl:
int *a = new int; // helyfoglalas egyetlen egesz szamnak *a = 10; delete a; // felszabaditas int *t = new int[10] // helyfoglalas egy 10 elemu egesz szamokbol allo tombnek for(int i=0; i<10; i++) t[i]=10; delete [] t; //felszabaditas
Van egy Datum osztalyunk, keszitsunk belole peldanyokat.
Datum *d = new Datum(); delete d; // ebben az esetben kotelezo hogy letezen a Datum osztalyunknak // parameter nelkuli konstruktora Datum *td = new Datum[10]; delete [] td; // a masodik megoldas letrehozni egy mutato tombot // es abban egyenkent inicializalni az elemeket int i; Datum **d = new Datum *[10]; for(i=0; i<10; i++) d[i] = new Datum(2005,10,i+1); for(i=0; i<10; i++) delete d[i]; delete [] d;
Tuesday, April 5, 2011
How To Use Phoenix Service Software To Recover Dead Nokia Phones
Things to be kept in mind before installing Phoenix Service Software:
- Remove Nokia PC Suite, Nokia Software Updater, Nokia Care Suite, Nokia Modem Drivers, Nokia Connectivity Drivers.
- Remove all other Nokia stuff from your system through Control Panel>Add/Remove Programs.
- Restart your PC.
- Do not connect your phone before installing Phoenix software.
- Now ensure you have no antivirus software or any other software running on your pc or in the system tray while you are using Phoenix. You should turn them off while using Phoenix. Make sure your system hasn’t got any hanging problem.
- Turn off your screensaver.
- Charge your phone battery to at least 50%. Although flashing takes only 8-9 minutes.
- Download Latest Version Of Phoenix Service Software
- If you have older version, no need to uninstall it the latest version will automatically replace it.
- Install the software. Be patient, it may take some minutes to install all the components.
- Don’t run Phoenix software now.
- Connect your Nokia handset to your pc with USB cable in PC Suite mode.
- Windows will start installing the connectivity drivers as soon as you connect the phone. Let it install completely.
- If your firmware file is in .rar format, first extract it using WinRar on desktop.
- On desktop you will find .exe file of your firmware file.
- Install the exe file. It will install it to default location of C:\Program files\Nokia\Phoenix\Products\
Be sure you install updated firmware. You cannot downgrade your phone’s firmware in BB5 phones which includes all new Nokia phones including N-Series. - Phoenix allows downgrading but your phone doesn’t allow it as your phone has some special security built into it. So no use of trying it. You’ll get an error message.
- You can reinstall your current firmware also if you have its package. It is supported. It can also sometimes solve little issues.
- You can get latest firmware files for your phone just search the net.
- Open Phoenix Service Software.
- Connect your phone in PC Suite Mode.
- In Phoenix, click File>Manage Connections.
- Now click New.
- Now select the type of cable you are using. If you are using DKE-2, CA-53 [N-Series] cable, select USB.
- Click Next. It will find your product and say FOUND. If it doesn’t find any, you can try changing your cable type by clicking Back.
- Click Next and then Finish.
- Now your cable type [USB] appears in the connection list. Select it. Click APPLY and then CLOSE.
- Now select File>Open Product.
- A list of RM code will open. Select your phone’s RM code. Like RM-133 for Nokia N73. Click OK
- Now select File>Scan Product.
- Your phone’s firmware info will appear at the extreme bottom of the Phoenix window.
- Now go to Flashing>Firmware Update.
- A window will open.
- On that window click Browse button [the one with three dots].
- A window will open with various products and various regions. Choose the region or country of your choice according to the language pack you want to install.
- Click Ok.
- Click Refurbish.
- Now your actual flashing has started. Don’t touch your phone or press any button until the flashing has finished. Also don’t touch your data cable and your computer system.
- At the end Phoenix will tell you to remove your phone as the flashing has finished.
- Now wait for your phone to reboot into latest firmware.
- The flashing procedure takes 8-9 minutes, a lot faster than Nokia Software Updater.
Note: You can install any firmware in dead phones whether it is latest and or the old one.
- The procedure is the same for flashing Dead phones.
- Start Phoenix. Connect your phone with USB Cable [phone is off at this time].
- Click File>Open Product. Select your RM code from the window that appears. Click OK.
- Click File> Manage Connections. Select No Connection. Then APPLY and CLOSE.
- Now straight away click Flashing>Firmware Update.
- A window will open. Click on Browse button [the one with 3 dots].
- A window will open with various products and various regions. Choose the region or country of your choice according to the language pack you want to install.
- Check the option “Dead Phone USB Flashing”.
- Click Refurbish.
- Flashing has started.
- After some seconds flashing will pause asking you to turn your phone ON.
- Press POWER button of your phone until backlight comes up.
- Flashing will proceed.
- Your phone will automatically start when the flashing finishes. After finish you can safely remove your data cable from handset.
Thanx for info: me.dhillon [me.dhillon@gmail.com] member, DotSIS, originally this is his work. Thanx.
Thursday, December 9, 2010
Tuesday, November 16, 2010
Lesson 05
Reporting Aggregated Data Using the Group Functions
?# What are group functions?
Group functions operate on sets of rows to give one result per group.
!# Types of Group Functions
* AVG, COUNT, MAX, MIN, STDDEV, SUM, VARIANCE
!# Group Functions: Syntax
Select group_function(column), ... From table [Where condition] [Order By column];
You can use AVG and SUM for numeric data.
Select AVG(salary), MAX(salary), MIN(salary), SUM(salary) From employees Where job_id LIKE '%REP%';
You can use MIND and MAX for numeric, character, and date data types
Select MIN(hire_date), MAX(hire_date) From employees;
COUNT(*) returns the number of rows in a tabel
Select COUNT(*) From employees Where department_id = 50;
COUNT(DISTINCT expr) return the number of distinct non-null values of exp.
To display the number of distinct department values in the EMPLOYEES tabel:
Select COUNT(DISTINCT department_id) From employees;
Group functions ignore null values in the column:
Select AVG(commission_pct) From employees;
The NVL functions forces group functions to include null values:
Select AVG(NVL(commission_pct, 0 )) From employees;
Creating Groups of Data:
GROUP BY Clause Syntax
Select column, group_function(column) From table [Where condition] [GROUP BY group_by_expression] [Order By column];You can divide rows in a table into smaller groups by using the GROUP BY clause.
All columns in the Select list that are not in group functions must be in the GROUP BY clause.
Select department_id, AVG(salary) From employees GROUP BY department_id;
The GROUP BY column does not have to be in the Select list.
Select AVG(salary) From employees GROUP BY department_id;
Using the Group by Clause on Multiple Columns
Select department_id, job_id, SUM(salary) From employees Where department_id > 40 Group By department_id, job_id Order By department_id;
Tuesday, November 9, 2010
Lesson 04
select to_char( salary, '$99,999,00') Salary
from employees
where last_name = 'Ernst';
select last_name, to_char( hire_date, 'DD-Mon-YYYY')
from employees
where hire_date < to_date('01-Jan-90','DD-Mon-RR');
select last_name,
upper(concat(substr(last_name, 1, 8), '_US'))
from employees
where department_id = 60;
select last_name, salary, NVL(commission_pct, 0 ),
(salary*12) + (salary*12*NVL(commission_pct, 0 )) AN_SAL
from employees;
select last_name, salary, commission_pct,
NVL2(commission_pct, 'SAL+COMM', 'SAL') income
from employees where department_id IN (50 , 80);
select first_name, length(first_name) "expr1",
last_name, length (last_name) "expr2",
NULLIF(length(first_name), length(last_name)) result
from employees;
select last_name, employee_id,
coalesce(to_char(commission_pct), to_char(manager_id),
'No commission and no manager')
from employees;
select last_name, job_id, salary,
case job_id when 'IT_PROG' then 1.10* salary
when 'ST_CLERK' then 1.15*salary
when 'SA_REP' then 1.20*salary
else salary end "revised_salary"
from employees;
select last_name, job_id, salary,
DECODE(job_id, 'IT_PROG', 1.10*salary,
'ST_CLERK', 1.15*salary,
'SA_REP', 1.20*salary,
salary) REVISED_SALARY
from employees;
select last_name, salary,
DECODE (TRUNC(salary/2000, 0),
0, 0.00,
1, 0.09,
2, 0.20,
3, 0.30,
4, 0.40,
5, 0.42,
6, 0.44,
0.45) TAX_RATE
from employees
where department_id = 80;
Lesson 03
select employee_id, last_name, department_id
from employees
where LOWER(last_name) = 'higgins';
select employee_id, concat ( first_name, last_name) Name,
job_id, Length (last_name),
instr (last_name, 'a') "Contains 'a'?"
from employees
where substr(job_id, 4 ) = 'REP';
select round (45.923,2), round(45.923,0),round(45.923,-1)
from dual;
select trunc(45.923,2),trunc(45.923),trunc(45.923,-1)
from dual;
select last_name, salary, mod(salary, 5000)
from employees
where job_id = 'SA_REP';
select last_name, hire_date
from employees
where hire_date < '01-FEB-88';
select sysdate
from dual;
select last_name, (sysdate-hire_date)/7 as Weeks
from employees
where department_id = 90;
Tuesday, November 2, 2010
Lesson 02
select employee_id, last_name, job_id, department_id
from employees
where department_id = 90;
select last_name, job_id, department_id
from employees
where last_name = 'Whalen';
select last_name
from employees
where hire_date = '17-feb-96';
select last_name, salary
from employees
where salary = 3000;
select last_name, salary
from employees
where salary between 2500 and 3500;
select employee_id, last_name, salary, manager_id
from employees
where manager_id in (100,101,201);
select first_name
from employees
where first_name like 'S%';
select last_name
from employees
where last_name like '_o%';
select last_name, manager_id
from employees
where manager_id is null;
select employee_id, last_name, job_id, salary
from employees
where salary >= 1000
and job_id like '%MAN%';
select employee_id, last_name, job_id, salary
from employees
where salary >= 1000
or job_id like '%MAN%';
select last_name, job_id
from employees
where job_id
not in ('IT_PROG','ST_CLERK','SA_REP');
select last_name, job_id, salary
from employees
where job_id = 'SA_ReP'
or job_id = 'AD_PRES'
and salary > 15000;
select last_name, job_id, department_id, hire_date
from employees
order by hire_date;
select last_name, job_id, department_id, hire_date
from employees
order by hire_date desc;
select last_name, job_id, department_id, hire_date
from employees
order by 3;
select last_name, department_id, salary
from employees
order by department_id, salary desc;
select employee_id, last_name, salary, department_id
from employees
where employee_id = &employee_num;
select last_name, department_id, salary *12
from employees
where job_id = '&job_title';
define employee_numb = 200
select employee_id, last_name, salary, department_id
from employees
where employee_id = &employee_numb
undefine employee_numb;
Lesson 01
Retrieving Data Using the SQL SELECT Statement
Basic SELECT Statement
From identifies the table containing those columns.
Writing SQL Statements
# SQL statements are not case-sensitive.
# SQL statements can be entered on one or more lines.
# Keywords cannot be abbreviated or split acros lines.
# Clauses are usually placed on separete lines.
# Indents are used to enhance readability.
# In SQL Developer, SQL statements can optionally be terminated by a semicolon(;).
# Semicolons are required when you execute multiple SQL statements.
# In SQL*Plus, you are required to end each SQL statement with a semicolon(;)
Basic SELECT Statement
Select *| {[DISTINCT] column|expression [alias],....}
From table;
Select identifies the columns to be displayed.From identifies the table containing those columns.
Select * From departments;
Writing SQL Statements
# SQL statements are not case-sensitive.
# SQL statements can be entered on one or more lines.
# Keywords cannot be abbreviated or split acros lines.
# Clauses are usually placed on separete lines.
# Indents are used to enhance readability.
# In SQL Developer, SQL statements can optionally be terminated by a semicolon(;).
# Semicolons are required when you execute multiple SQL statements.
# In SQL*Plus, you are required to end each SQL statement with a semicolon(;)
select department_id from departments; select last_name, salary, salary + 300 from employees; select last_name, salary, 12*salary+100 from employees; select last_name, salary, 12*(salary+100) from employees; select last_name, job_id, salary, commission_pct from employees; select last_name, 12*salary*commission_pct from employees; select last_name AS name, commission_pct com from employees; select last_name "name", salary*12 "annual salary" from employees; select last_name||job_id as "employees" from employees; select last_name || ' is a '|| job_id as "employee details" from employees; select department_name || q'[ Department's Manager ID:]' || manager_id as "department and manager" from departments; select department_id from employees; select distinct department_id from employees; describe employees; SELECT first_name, last_name, job_id, salary AS yearly FROM employees;
Friday, October 15, 2010
The Basic Windows Application
Windows programming is not difficult at all. Let's see the most common and basic program in this world: the Hello, World! program. If you’ve seen any elementary DOS-based C or C++ code, chances are that you’ve seen this code:
And this is how it look's "Hello, World!" Windows style.
compiled with vs 2008 express
// Hello, world! program #includevoid main() { printf("Hello, world!\n"); }
And this is how it look's "Hello, World!" Windows style.
#include// main Windows headers // the main entry point to your program int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { // show a very simple message box with the text “Hello, world!” displayed MessageBox(NULL, TEXT("\tHello, world!"), TEXT("My First Windows Application"), NULL); return 0; }
compiled with vs 2008 express
Subscribe to:
Posts (Atom)