Tuesday, 18 June 2013
Setting Installation Of Android Application To SD Card
Follow the steps below to enable installation of new softwares to the SD card on the android phones by default (Tested on android 2.2).
- Enable USB debugging on phone (from somewhere in Settings->About Phone)
- Connect device with PC using USB cable
- Open command prompt/terminal
- Open android debugger bridge (change directory to the location where android sdk is installed)
- Type: adb.exe devices
- Type: adb.exe shell
- On the new console, type: set pmInstallLocation 2
Here, 2 means External memory
Note: "get pmInstallLocation" can be used to query for the available locations you can install softwares to.
That's all. Hope it helps :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Wednesday, 12 June 2013
Simple Pie Chart Implementation In Turbo C
This implementation makes use of pieslice() function which draws and fills the pie slice with centre x, y and radius r. The function also requires the start angle and end angle.
#include <stdio.h> #include <conio.h> #include <graphics.h> #include <math.h> #define MAX 20 #define X_CENTRE getmaxx()/2 #define Y_CENTRE getmaxy()/2 #define RADIUS 100 struct pie_data { char desc[100]; int freq; int color; int style; float angle; }; int main() { struct pie_data data[MAX]; int gd = DETECT, gm; int i, j, k, n, total_freq = 0, start_angle = 0, end_angle = 0, xmax, ystart = 80, yend; printf("Enter the number of items: "); scanf("%d", &n); for (i = 0, j = 1, k = 1; i < n; i++) { printf("Enter the item title: "); scanf("%s", data[i].desc); printf("Enter the item frequency: "); scanf("%d", &data[i].freq); total_freq += data[i].freq; data[i].color = j; data[i].style = k; if (j++ >= 13) j = 1; if (k++ >= 11) k = 1; } for (i = 0; i < n; i++) { float angle; data[i].angle = 360 * (data[i].freq /(float) total_freq); } initgraph(&gd, &gm, "C:\\TurboC3\\BGI"); xmax = getmaxx() - 150; setaspectratio(10000, 10000); for (i = 0; i < n; i++) { end_angle = start_angle + data[i].angle; setcolor(data[i].color); setfillstyle(data[i].style, data[i].color); pieslice(X_CENTRE, Y_CENTRE, (int)start_angle, (int)end_angle, RADIUS); start_angle = end_angle; yend = ystart + 40; bar(xmax, ystart, xmax + 70, yend); ystart = yend + 15; outtextxy(xmax + 80, ystart - 20, data[i].desc); } getch(); closegraph(); return 0; }
Below is the screenshot for sample run:

Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 11 June 2013
Congratulation To SLC Graduates From Iris Academy
We would like to congratulate all the SLC appeared students and the Iris Academy and wish for the bright future ahead.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 2 April 2013
Step By Step Turbo C++ IDE In Ubuntu 12.04
First thing first, download Turbo C from internet. For your ease, I've uploaded it HERE.
We will have to install dosbox to run the windows dos mode applications so lets install it:
Once you install dosbox, unzip the content to somewhere in your $HOME directory. In my example, I unzipped the content of the Turbo C zip file into ~/Tools/TurboC3/. Now launch the dosbox by typing dosbox in the terminal. A dosbox emulation window will appear which will look like your old DOS system.
In the window, type the following (make sure you type appropriate path for your installation):
C:
cd TurboC3
INSTALL.EXE
And, then follow the on-screen information. Refer to the screenshots below:







Once the installation finishes, you can then run the Turbo C by mounting the drive again and then navigation to C:\TC (cd C:\TC\BIN). If you need to use the Turbo C++ IDE frequently, my suggestion would be to add an autoexec entry in your dosbox configuration. The default configuration file resides in ~/.dosbox/dosbox-0.74.conf (My version of dosbox is 0.74 hence the file name, by default). Open up this file and in the section of [autoexec], add the lines below:
mount C: ~/Tools/
C:
cd TC\BIN
TC.EXE
Adding this entry will run the above commands during the startup of dosbox thus giving you the Turbo C IDE interface directly on running dosbox.
I hope this helps :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Sunday, 31 March 2013
Simple Line Drawing In Turbo C Graphics
#include <stdio.h> #include <conio.h> #include <graphics.h> int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\\TurboC3\\BGI"); line(100, 100, 350, 100); line(100, 100, 70, 140); line(70, 140, 130, 140); line(350, 100, 380, 140); rectangle(70, 140, 130, 200); rectangle(130, 140, 380, 200); getch(); closegraph(); return 0; }
I hope it proves useful for learning purpose.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Implementation Of BLA Line Drawing Algorithm
Bresenham Line Drawing Algorithm for |m| < 1
Algorithm
1) Input two points (x1, y1) & (x2, y2).
2) Determine the differences dx = x2 - x1 and dy = y2 - y1.
3) Calculate the initial decision parameter P0 = 2dy - dx.
4) For each xk along the line starting at k = 0,
if Pk < 0,
a) put a pixel at (xk + 1, yk)
b) Pk+1 = Pk + 2dy
else
a) put a pixel at (xk + 1, yk + 1)
b) Pk+1 = Pk + 2dy - 2dx.
5) Repeat step 4 for dx time.
6) End
Source Code
#include <stdio.h> #include <conio.h> #include <graphics.h> #include <math.h> int main() { int gd = DETECT, gm; int x1, y1, x2, y2, dx, dy; int x, y, i, p0, pk; printf("Enter x1, y1: "); scanf("%d %d", &x1, &y1); printf("Enter x2, y2: "); scanf("%d %d", &x2, &y2); dx = x2 - x1; dy = y2 - y1; x = x1; y = y1; p0 = ( 2 * dy - dx); initgraph(&gd, &gm, "C:\\TurboC3\\BGI"); pk = p0; for (i = 0; i < abs(dx); i++) { if (pk < 0) { putpixel(x, y, WHITE); pk += (2 * dy); } else { putpixel(x, y, WHITE); pk += (2 * dy - 2 * dx); } (x1 < x2)?x++:x--; (y1 < y2)?y++:y--; delay(50); } getch(); closegraph(); return 0; }
Make sure to provide an appropriate path for graphics library.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 26 March 2013
Implementation of DDA Line Drawing Algorithm
Digital Differential Analyzer
Algorithm
1) Input two points (x1, y1) & (x2, y2).2) Determine the differences dx = x2 - x1 and dy = y2 - y1.
3) Choose step size as the bigger value between the absolute values of dx and dy.
4) Determine x-increment = dx/step_size and y-increment = dy/step_size.
5) Start from (x0, y0) = (x1, y1).
6) For i -> 0 to stepsize:
a) draw pixel at (xi, yi)
b) set xk = xk + x-increment
b) set yk = yk + y-increment
Source Code
#include <stdio.h> #include <conio.h> #include <graphics.h> #include <math.h> int main() { int gd = DETECT, gm; int x1, y1, x2, y2, dx, dy, stepsize; float xinc, yinc, x, y; int i; printf("Enter x1, y1: "); scanf("%d %d", &x1, &y1); printf("Enter x2, y2: "); scanf("%d %d", &x2, &y2); dx = x2 - x1; dy = y2 - y1; stepsize = (abs(dx) > abs(dy))?abs(dx):abs(dy); xinc = dx/(float)stepsize; yinc = dy/(float)stepsize; x = x1; y = y1; initgraph(&gd, &gm, "C:\\TC\\BGI"); putpixel(x, y, WHITE); delay(10); for (i = 0; i < stepsize; i++) { x += xinc; y += yinc; putpixel(x, y, WHITE); delay(50); } getch(); closegraph(); return 0; }
Make sure to provide an appropriate path for graphics library.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 19 March 2013
How To View Your Gmail Access History Details
In order to access the gmail history log details, you need to scroll down to the right bottom of your gmail inbox where you will notice the option to view the detail of your account which looks like below:

Moreover, it seems like that the details now include the user agents and/or access type information along with the IP address and time of access to the gmail account.
If you're concerned about unauthorized access to your mail, you'll be able to use the data in the 'Access type' column to find out if and when someone accessed your mail. For instance, if the column shows any POP access, but you don't use POP to collect your mail, it may be a sign that your account has been compromised.
For more information, refer to this page.

Moreover, this feature lets you log out all of your sessions other than the current session. This can come quite handy whenever you have forgotten to sign out or someone else is having an unauthorized access to your account.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Friday, 15 March 2013
Uploaded.net 48 Hours Premium Membership Coupon To Redeem
Coupon code: UBTIZYMM
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Saturday, 9 March 2013
Check Battery Status From Terminal [How To]
present: yes
capacity state: ok
charging state: charged
present rate: unknown
remaining capacity: unknown
present voltage: 12276 mV
samar@Techgaun:~$ cat /proc/acpi/battery/BAT0/info
present: yes
design capacity: 4400 mAh
last full capacity: unknown
battery technology: rechargeable
design voltage: 10800 mV
design capacity warning: 250 mAh
design capacity low: 150 mAh
cycle count: 0
capacity granularity 1: 10 mAh
capacity granularity 2: 25 mAh
model number: Primary
serial number:
battery type: LION
OEM info: Hewlett-Packard
The first command provides the general status of the battery and the second command provides the detailed information about battery. The other way is to use the upower command that talks with the upowerd daemon. Upowerd daemon is a default daemon in ubuntu and few others for power statistics. Below is the command to see battery details:
native-path: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0
vendor: Hewlett-Packard
model: Primary
power supply: yes
updated: Sat Mar 9 10:12:17 2013 (5 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: empty
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 47.52 Wh
energy-full-design: 47.52 Wh
energy-rate: 0 W
voltage: 12.28 V
percentage: 0%
capacity: 100%
technology: lithium-ion
If you wish to install acpi for future uses, you can do so by typing the command below:
Play around with different switches by looking over the help and man pages. You will find this tool quite useful :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Friday, 8 March 2013
Encrypt/Decrypt Confidential Data Using OpenSSL
If you wish to have full strength cryptographic functions, openssl is a perfect choice. Forget about all other tools that promise to provide high end encryption for your confidential data. Openssl is more than enough for most of your cryptographic needs. Personally, I can't just rely on some random software that promises to provide full strength cryptography but lacks documentations and detailed reviews. Openssl, however, has a well structured documentation and is an open source implementation.
Openssl supports several ciphers such as AES, Blowfish, RC5, etc., several cryptographic hash functions such as MD5, SHA512, etc., and public key cryptographies such as RSA, DSA, etc. Openssl has been widely used in several softwares most notably the OpenSSH.
Now that we know some basics about what OpenSSL is, lets move on encrypting/decrypting files/data using openssl. OpenSSL can take any file and then apply one of the cryptographic functions to encrypt the file. As an example, we encrypt a confidential file 'priv8' with a password "hello" below:
In order to decrypt the encrypted file, we can run the following command:
Now that you know the basic syntax, you can choose among several available cryptographic functions. There are several other symmetric ciphers available for use. The full list of these ciphers is provided by the command:
I hope this helps for your file encryption needs :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thursday, 7 March 2013
Make An Encrypted Call On Android Using RedPhone
RedPhone is an open source communication encryption android software that well-integrates with the system dialer and lets you use the default system dialer and contacts apps to make calls as you normally would. The tool is written by Maxie Morlinspike, the same guy who wrote a famous tool called SSLStrip for performing HTTPS stripping attacks.
Install RedPhone
It is an open source tool licensed under GPL v3; the github README says, RedPhone is an application that enables encrypted voice communication between RedPhone users. RedPhone integrates with the system dialer to provide a frictionless call experience, but uses ZRTP to setup an encrypted VoIP channel for the actual call. RedPhone was designed specifically for mobile devices, using audio codecs and buffer algorithms tuned to the characteristics of mobile networks, and using push notifications to maximally preserve your device's battery life while still remaining responsive.
If you wish to understand more on Encryption protocol, you should refer to the WIKI.
Install RedPhone
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
E-Paath - A Perfect Computer-based Learning Tool For Your Children
Developed by OLE Nepal in collaboration with the Department of Education (Nepal), this web-based software provides several modules of online lessons for classes 2-6. The software consists of 18-30 lessons organized in a weekly fashion for four subjects: Nepali, English, Mathematics, and Science. The contents for science are available in both English and Nepali languages. However, mathematics is available only in Nepali language.
E-paath is a flash based content and hence requires flash player and can be run through any of the major web browsers such as Mozilla Firefox, Google Chrome, etc. Since e-paath is a web based content, you can run it in any platform without any problem (I had to change a little bit of code in karma.html file to run the tool smoothly in Linux but its still fine; having a web server to serve the pages solves all errors though).
You can download e-paath from HERE. For installation help, you can refer to this page. You can also access the software online from HERE. Btw, there is no specifically linux version of tool available in the website (except for Sugar desktop environment) and don't try to mirror the online version of e-paath as flash contents seem to be internally referencing the configuration files. Your best bet is to download either of the two available versions and then delete all the unnecessary stuffs in there. It just runs fine.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 12 February 2013
Chaining The Proxies With ProxyChains
ProxyChains is a tool for tunneling TCP and DNS traffics through chain of several proxy servers which supports HTTP, SOCKS4, and SOCKS5 proxy servers. Hence, this tool leverages several usages such as anonymity, bypassing filters, running any program through proxy servers, etc.
You can DOWNLOAD proxychains from SourceForge. In ubuntu, you can directly install it from repos:
Once you have installed the proxychains, you need to configure this tool. The global configuration file is located at /etc/proxychains.conf so if you wish to have your own configuration file, you could either create the proxychains.conf file in the current working directory or at $HOME/.proxychains/proxychains.conf.
In my example, I'll edit the global configuration file by issuing the command:
First, we will have to select the kind of chaining option we want to use. We can use one of the dynamic_chain, strict_chain, and random_chain chaining options. In most cases, it is good to just use the dynamic_chain so we uncomment the line containing dynamic_chain and comment all other chaining options.
Then we need to grab some proxies and then insert at the end of our configuration file which would look like:
socks5 192.168.2.90 3128
socks5 1**.1**.*.* 8080
You could add as much as proxy servers in the list. Btw, the asterisks in the above example do not mean wildcards, they are just there to symbolize some proxy server. There are free sites on the Internet which provide big database of different kinds of proxies. Even several proxy scrapers are available all over the internet and you could even write one on your own. So getting list of good proxies is not the difficult job. Once you finish the configuration, you can run any command through proxychains. The syntax is as simple as below:
For example, below is the example nmap scan run through the proxychains:
P.S. If you are interested in some GUI for using proxychains, you can use ProxyChainsGUI. Lastly, the default package from Ubuntu repository seems to be missing the proxyresolv command so I would recommend to compile the source code locally.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thursday, 7 February 2013
NCell Paisa Double For Prepaid and Pro Classic customers
With the Ncell's Paisa Double offer, you will be able to double the said amount. Ncell says that it is a new offer that acknowledges the loyalty of Ncell customers by providing them various amounts to double.
Once you have enough main balance, you can activate the offer by dialing 1212. In order to utilize the scheme, you have to follow the steps as below:
- Dial 1212 and listen to find out what amount you can double. Then press 1 to get the double of the said amount. Alternatively, you can also dial *1212# and press 1.
- After you press 1, the said amount will be deducted from your main balance and the double of it will be added as your Paisa Double balance.
While the offer sounds great, it is only applicable within Ncell network. You can use the Paisa Double balance to make calls, send SMS and MMS within Ncell network and even to access internet. You can subscribe Ncell Paisa Double offer only once and it will be auto-renewed every week until you deactivate or till the offer ends.
Dial *101# to know your remaining Paisa Double balance. If you wish to deactivate the service, type R and send it to 1212 through SMS. However, you can again activate if you wish within the offer period.
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Wednesday, 30 January 2013
Search Text Over Multiple PDF Files In Linux
The pdfgrep tool lets you perform grep style search over multiple pdf files easily from the terminal. It depends upon the poppler package and under ubuntu, you can just type the command below to install pdfgrep.
Once pdfgrep is installed, you can perform any kind of search like you would do while using the grep command. Enjoy grepping the PDF files :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Tuesday, 29 January 2013
Turn Your Greasemonkey Script Into Firefox Extension
Greasemonkey Compiler
I hope the URL proves useful to you guys :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Swasthani.com Swasthani Ripper
From the site itself, Sri Swasthani Brata Katha is a very popular ritual observed in Nepal in the Poush month (January – February) during winter. Goddess Sri Swasthani, known to grant wishes of her devotees, is worshipped for the whole month of Poush. The Swasthani Brat Katha (story) is recited everyday. The month long telling of the tales are dedicated to the Goddess and the stories that are mainly narrated are those of Swasthani Devi, Lord Shiva and other Gods.
#!/bin/bash ############################################### # Swasthani.com Swasthani Ripper # # Samar @ http://www.techgaun.com # ############################################### if [[ ! -f /tmp/swasthani.txt ]] then wget http://www.swasthani.com/ -O - | egrep '<li class="leaf( first| last)?"><a href="/swasthani/' | grep -o '<a .*href=.*>' | sed -e 's/<a /\n<a /g' | sed -e 's/<a .*href=['"'"'"]//' -e 's/["'"'"'].*$//' -e '/^$/ d' > /tmp/swasthani.txt fi while read -r line do wget "http://www.swasthani.com$line" -O - | egrep 'data="soundFile=http://www.swasthani.com/system/files/' | cut -d\" -f6 | cut -d= -f2 | wget -nc -i - done </tmp/swasthani.txt
Save the above file as swasthani, then chmod for executable permission and run it. If you have problem copying above code, you can check the Swasthani Downloader at GitHub. Enjoy listening Swasthani, geeks :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
How To Check Which Groups You Belong To
From the man page, the groups command does is:
Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed).
So if you are interested in finding what group a particular user is in, run the command as below. Replace samar with your USERNAME and you are good to go:
samar : samar adm cdrom sudo vboxusers ....
I hope this proves useful :)
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Saturday, 26 January 2013
NCell PRBT Settings Information
Original Link: PRBT Information @ Ncell
Q1.What is PRBT?
PRBT service enables the ones who call you to listen to a popular melody or sound instead of the regular tone. The sound or melody is heard by the caller till the call is answered. Your friends and partners, regardless of operator, location and phone model while calling you can hear melodies, sounds and personal greetings chosen by you instead of usual phone tone.
Q2. How to activate PRBT service?
PRBT can be activated by one of the following ways:
I. SMS: On your Message box type A and send it to 900227
II. IVR: Dial 9208 and follow the instruction.
III. USSD: Dial *100*2# and follow the USSD guide instruction.
Q3. How to set a PRBT?
Any PRBT of your choice can be set via SMS, IVR or Web once the user has activated the PRBT service. Stated below are the ways a subscriber can set a PRBT.
I. SMS: Type BUY
II. Web :
i. Log on to prbt.ncell.com.np
ii. Click on Order for your choice of PRBT song
III. IVR: Dial 9208 to choose the tone of your choice.
Q4. What are the features with new PRBT system?
The PRBT system allows a subscriber to perform the following:
I. SMS
a. Download multiple PRBTs at once
Example:
Down
b. Gift PRBT to friend
Example: Gift
II. Web
To activate any of the features below, the user will have to login with mobile number and password on prbt.ncell.com.np
a. Assign different PRBT to different callers.
i. Click on MY PRBT > PRBT Settings > Advanced Setting
b. Create Group and allocate a PRBT for a group.
i. Click on MY PRBT > Group Management
c. Play different PRBT in different time slots.
i. Click On MY PRBT > PRBT setting > Add
d. Copy a PRBT from a friend.
i. Click on MY PRBT > Copy PRBT
Q5. How much does a PRBT cost and what is the validity?
Each PRBT will attract Rs. 10 excluding the taxes.
Q6. Is there monthly subscription price?
Yes. There will be Rs 10 monthly subscription price without applicable taxes. The subscription will be renewed automatically unless the subscriber chooses to discontinue the service.
Q7. How deactivate PRBT?
You can deactivate by any of the following ways:
I. SMS : In your message box type R and send it to 900227
II. IVR : Dial 900 follow instruction
III. USSD : Dial *100*2# and follow the instruction
Read more...

Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |