Sunday, December 30, 2012

comment_icon 0 Slice of SQL

Wanna learn sql ? in a different way . lets try this.
Once there was a quy who went  shop and said “ give me few chocolates “. Shopkeeper sais do you have basket he said no .shopkeeper said go and bring the basket . he just created a basket . in database our basket is the TABLE  and we can create it by using this following statement.

SQL> create table basket(name varchar2(20),price number(4),quantity number(2));
(Output:>)Table created.

In above query > basket is the name of table .
name is the column of type character of length 20 .
price is the column of type number of size 4
quantity is the column of size 4.
After getting the basket he again went to shop and said give me 5 dairymilk,4 5star and 3 perk in this basket . we can do this in database by  “insert command”

SQL> insert into basket(name,price,quantity) values('dairy milk',20,5);
1 row created.

We can even do this in a simple way .

SQL> insert into basket values('5star',10,5);  

1 row created. (note: to use this all values need to be entered )
Now he just wants to crosscheck the basket so he checked the chocolates in basket similarly we can do this by using the  “SELECT command”

SQL> select * from basket ;
NAME                      PRICE   QUANTITY
-------------------- ---------- ----------
dairy milk                   20          5
5star                        10          5
perk                         15          3

where *  indicates all the column
Now when he  was going to meet his girlfriend ,he met with his friend and he took some chocolates from his basket. Now he just wants to confirm the number of 5star chocolates availbe so he counts the 5star chocolate. We can also do this in database using following command.
SQL> select name,quantity from basket where name='5star';
NAME                   QUANTITY
-------------------- ----------
5star                         5

Finally he meets with his girlfriend and gave basket to her. After going home the girl checks the basket and counts the number of types chocolate given by the guy. In database we use “Aggregate functions” for this .

SQL> select count(name) from basket;
COUNT(NAME)
-----------
3

From this tutorial what we learned is
  • Creating a table : create command.
CREATE TABLE table_name
(
column_name1 data_type,
column_name2 data_type,
column_name3 data_type,
....
)
  • Inserting values in table : insert command
INSERT INTO table_name
VALUES (value1, value2, value3,...)
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
  • Selecting or viewing the rows : select command
SELECT column_name(s)
FROM table_name
Or
SELECT *
FROM table_name
  • Selecting specific rows on conditions : where clause
SELECT column_name(s)
FROM table_name
WHERE column_name operator value
Operator and their meanings

Operator
Description
= Equal
<>  Not equal
Greater than
Less than
>= Greater than or equal
<= Less than or equal
BETWEEN Between an inclusive range
LIKE Search for a pattern
IN To specify multiple possible values for a column
  • Counting the number of rows: Aggregate function- count
Useful aggregate functions:
  • AVG() - Returns the average value
  • COUNT() - Returns the number of rows
  • FIRST() - Returns the first value
  • LAST() - Returns the last value
  • MAX() - Returns the largest value
  • MIN() - Returns the smallest value
  • SUM() - Returns the sum

Saturday, December 29, 2012

comment_icon 0 Remote control the Browser Window

remote control using framote
FRAMOTE
Someone said that Big surprises comes in small packages . Today i feel this line perfect for that framote . This is an awesome example of Ajax and iframe shown by Jaime Caballero .





What it is ? and how it works ?

framote enables you to control the remote browser and show the links which you want. You just need to give a starting URL(link) and it will provide you two different URL's (i). to share on remote devices (ii) to control those remote devices .

Where you can use this ?

This will be specially useful for the web Developers by using this they can test their applications on different browsers and multiple devices without opening the whole web on each of them one by one. yippee its free.

How to Use Framote Step by step

Step 1: go to framote and give a URL i say "http://www.how2labs.info/" and click create.

how 2 labs

Step 2: share the Framote URL and open Control URL in a new window to control the Framote URL 

framote in action
framote in action

Step 3: in Control URL provide the new URL you want to share and click change. the remote url will automatically get refreshed

change remote url framote
change remote url framote

Step 4: Don't forget to subscribe for new update :)

Friday, December 28, 2012

comment_icon 0 A Presentation Worth Watching For Software Testing Professionals

Software Testing matters a lot specially when you are working on a cross platform software or service.Here i am going to provide a latest example of that  "what are the challenges you need to face when you work on cross platform software." This presentation is actually prepared by John Resig and it talk about challenges crossed when testing mobile JavaScript. if we highlight the important things we will know that you need to collect a lot information before starting up things including the testing platform and environment.


Thursday, December 27, 2012

comment_icon 1 Learn The ART of Programming


Programming is an Art of problem solving. All good programmers love the programming and they will do this passionately that’s why they became good programmer and mastered this art.
If you want to be a good programmer you need to give your 100% and you have to start thinking logically.
Things to be taken care before Solving a Problem:
1.       Read the problem carefully and try to understand what is all about and what should be the final outcome/solution.
2.       Don’t get tensed by thinking that problem is very tuff and I can’t solve it, be positive.
3.       Don’t Ever try to solve the problem in single shot do it step by step (if don’t know the solution or how to solve it).

Let’s give it a Hit


Problem : you need to draw the shape given below

               
              *
            ***
          *****
        *******

Solution Approach:

If you see this problem carefully you can see that you have to draw the starts such that ,the number of starts in each line is 2n-1 i.e. (2*1-1=1,2*2-1=3..).
You also need to take care of space before the stars so it should form a pyramid.
So now you can see that problem is divided into two sections 
  1.  draw space
  2. draw star

        - - - *
        - - ***
        - *****
        *******
So this is the way you should solve the problems .
If still have doubts you can ask here. Feel free to drop your comments


                                                                 

Wednesday, December 26, 2012

comment_icon 0 Share your Files using Torrent

Now a days there are lot of websites for sharing your files but still the process become hectic if you are a new-bee or even professional .there is an easy way to share your files using the utorrent . I said easy because you need not to login or upload the file on website , you just need to drag and drop the file or folder on utorrent and it will give a link that you can share with your friends. Here i am going to show you how easy it is to do .


Step 1 : select file or folder and drop it to  utorrent .

drag and drop files
drag and drop

Step 2: click on Get Link button. it will create a link for sharing your files

get link button
Get Link

Step 3: now copy the link by clicking copy link button.

copy link
copy link

Step 4 : share link with your friends and you are done.

Steps to be followed by the person to download the files

Step 1: paste the given link in address bar of browser


Step 2: if you have you  utorrent  or any other torrent client copy the magnet link otherwise just click on download button.

copy magnet link or download
copy magnet link

Step 2: now we copy the magnet link so we add it to our torrent client.

add magnet link
Add torrent from URL


Step 3: now paste the magnet link and click ok button.

step 4: now your download will start.  enjoy downloading and file sharing :)

download files
downloading