Wednesday, January 23, 2013

Vodafone USSD Codes

Vodafone Care USSD - *111#
Choose ur language
1.Hindi (on supported handsets only)
2.English

Option 2
Press Answer, type number, press call button
1.My Delights
2.My Balance
3.Last 3 Charges
4.Last 3 Recharges
5.Data Plan
6.Bonus Card
0.More

Option 0
Select from following options:
7.Best Offer
8.Low Balance Services
Press # for main menu

Option 7
1. 25 STD Min @ Rs8
2. Full Talktime 130
3. 1 GB Data @ Rs24
4. Bonus Card 46
5. 80 SMS @ Rs6
To know details select from above op

Option 8
Prepaid Low Balance Services
1.Balance Transfer
2.Balance Request
3.Call Me Back
4.Chhota Credit
5.My Delights
Press Answer button type no , press call button

Vodafone Offers USSD - *121#
Special offers for you are:
1. 25 STD Min @ Rs8
2. Full Talktime 130
3. 1 GB Data @ Rs24
4. Bonus Card 46
5. 80 SMS @ Rs6
0. More
Select from above options

Option 0
1.My Delights
Select from above options

Option 1
1. Bid to get Petrol worth Rs10000
2. Get Free Deals
3. Jhakas Deals
4. Majhi Maharashtrian Deals
5. Info
Press # for main menu

Vodafone Offers 2 USSD - *444#
1.Daily Bonus Cards
2.Night Bonus Cards
3.SMS Bonus Cards
4.My Delights
5.GPRS Packs
6.Happy Hour
For details,Type Option & Press Call Button

Vodafone Balance USSD - *141#

Vodafone Alerts USSD - *123#
Welcome to Vodafone Alerts!
1.Google Lite
2.Top Services
3.Money Saver Packs
4.More Categories
Reply with 1 OR 2 OR 3 OR 4 (tollfree)

Option 4
Categories
1.Sports Pack
2.Bollywood Pack
3.Daily Packs
4.Infotainment
5.Devotional
6.News Pack
7.Finance
Reply by 1 to 7 and press call

Option 1
Welcome to Google Lite
1.Weather
2.Definitions
3.Translate
4.Movies
5.Railways
6.Stock
7.Currency

Option 2
Top Services:
1.Jokes
2.Quran Pack
3.4 in 1 Sports
4.Love Daily
5.Astrology
For more info, reply with 1 OR 2 OR 3 OR 4 (tollfree)

Option 3
Money Saver Packs:
1.Devotional Pack
2.All News
3.Super Combo
4.Love Combo
For more info, reply with 1 OR 2 OR 3 OR 4 (tollfree)

Vodafone Caller Tunes - *567#

Tuesday, January 22, 2013

Parse all characters in char*

#include <iostream>

using namespace std;

void myfunc(char* char_in)
{
    bool empty = true;
    for(int i = 0; char_in[i]; ++i) 
    {
        if(char_in[i] != ' ' && char_in[i] != '\t' && char_in[i] != '\r' && char_in[i] != '\n') 
        {
            printf("Char* is not empty. Found a non space character @ %d\n\n", i);
            empty = false;
            break;
        }
    }
    if(empty)
    {
        printf("Char* is empty\n\n");
    }
}


int main()
{
    char* char_i = "    Hello   ";
    myfunc(char_i);
    
    system("PAUSE");
    return 0;
}

Friday, January 11, 2013

BIOS Boot Menu Bootable Devices

Following are the BIOS boot menu bootable devices typically found and their explanations

Bootable DeviceExplanation
USB FDCUSB Floppy Disk Controller: An external USB floppy drive
USB KEYAn external USB Flash drive that appears as a "Removable Disk". In other words, any external USB device that appears as a "Removable Disk"
USB HDDUSB Hard Disk Drive: An external USB hard disk. Could be either an external USB flash drive that appears as a "Local Disk" or "Fixed Disk" or an external USB hard drive. In other words, any external USB device that appears as a "Local Disk" or "Fixed Disk"
USB CDROMAn external USB CD ROM
CDROMAn internal CD ROM
IDE X
or
HDD
An internal Hard Disk Drive X. Where X is the number representing the order of hard disk
NetworkBoot via network, i.e. via ethernet



Tuesday, January 8, 2013

Small linux distros with ISO size 200MB or less

List of small linux distros with iso size 200MB or less

DistroISO SizeLast News
ROCK22006-07-27
MoviX/eMoviX10.82004-08-14
Tiny Core122012-11-02
Coyote17.72005-12-19
m0n0wall17.82012-11-12
Eagle222003-05-10
SliTaz34.72012-04-11
Freepia35.52003-08-30
ByzantineOS43.92004-04-04
Ophcrack462012-05-15
LNX-BBC482004-02-11
Luit502004-12-21
Damn Small50.62012-08-04
NuTyX522011-06-03
Syllable Desktop562010-06-09
Flonix592004-01-24
INSERT59.32007-02-16
IPCop60.32012-02-15
Knopperdisk62.42007-02-24
xPUD652010-11-03
SmoothWall68.92007-08-22
pfSense76.22012-12-21
IPFire77.92012-12-19
RUNT78.72007-02-02
LiveCD Router88.62005-04-12
CDlinux922011-11-08
MilaX932010-02-17
FreeNAS1032012-10-27
OpenELEC1042012-11-30
Grafpup1062007-06-02
Onebase1082005-08-17
Clonezilla1112012-12-18
Sorcerer1122004-06-21
Toutou1142010-02-04
Adamantix1162004-08-17
Finnix1172012-12-25
Feather1192005-02-28
Unity1192012-05-23
Hacao1202009-05-31
DNALinux1222006-04-20
Quirky1242010-11-27
Nature's1272005-03-23
Bluewall1292006-02-05
College1312006-07-19
GParted1332012-12-30
GeeXboX1362012-09-20
TurnKey1392012-08-30
Grml1452012-05-29
Trinity1462010-08-16
KnoppiXMAME1502004-02-17
Puppy1552012-12-04
LPS1812012-09-15
BeatrIX1822005-01-29
DragonFly1842012-11-03
Bonzai1862004-01-14
Debris1862009-11-29
Endian1862012-01-31
Annvix1902007-12-30
BU Linux1932006-08-23
Macpup1932012-08-18
StressLinux1942011-04-17
CensorNet1952004-09-22
PHLAK1952005-10-12
Blin1972005-02-05
Morphix1982003-09-24
T22002010-07-15
Hikarunix2032005-09-21
LAMPPIX2052004-06-04
Arudius2062006-02-08
LAS2092004-03-06
Liberté2132012-09-02
SENTINIX2132003-11-28
Thinstation2182012-02-10
Slax2192013-01-03

Monday, January 7, 2013

Linux Distros by ISO size

List of Linux Distros ordered by ISO size

DistroISO Size (MB)
2X OS270
64 Studio798
Absolute700
AbulÉdu2686
Adamantix116
ADIOS697
AgiliaLinux3011
AGNULA/DeMuDi558
aLinux629
AliXe329
Alpine237
ALT634
amaroK Live350
Ankur Bangla409
Annvix190
AnNyung248
APODIO674
aptosid509
Arabbix589
Arabian471
Arch417
ArchBang545
Archie325
Ares698
AriOS1458
Ark601
ArtistX3800
Arudius206
Asianux655
ASLinux1231
ASPLinux3994
AsteriskNOW583
Asturix626
ATmission711
Atomix888
Aurora SPARC2447
Aurox1068
AUSTRUMI243
AV Linux2523
B2D698
BackBox1099
BackTrack3142
Bayanihan700
BeatrIX182
Beehive519
BeleniX696
Berry602
BigLinux1346
BinToo4300
BioBrew2110
Bio-Linux2692
blackPanther699
BLAG684
BlankOn1666
Blin197
Blue513
Bluewall129
Bluewhite641988
Bodhi573
Bonzai186
BOSS1262
Bridge664
BRLix/Famelix698
BSDanywhere632
Buffalo696
BU Linux193
Burapha632
ByzantineOS43.9
CAELinux4094
CAINE1252
Caixa Mágica1572
Calculate2016
Canaima672
Caos1827
Càtix2301
CCux3941
CDlinux92
CensorNet195
Chakra1636
Chinese 2000638
Cinnarch642
CLE307
ClearOS596
Clonezilla111
clusterKNOPPIX597
Cobind636
Co-Create681
College131
Comfusion828
Commodore3882
Condorux623
Conectiva660
Connochaet392
Cool618
Coyote17.7
CrunchBang735
CRUX252
CTKArch560
Damn Small50.6
Danix697
DARKSTAR2399
Debian4446
Debris186
Deepin680
Defender673
Definity614
DEFT2570
Descent|OS1061
DesktopBSD1853
Devil50
DigAnTel680
DNALinux122
DoudouLinux691
Draco232
DragonFly184
Dragora624
Dreamlinux965
Dream Studio2391
dyne:bolic1661
Eadem539
Eagle22
eAR OS657
EasyPeasy839
easys664
Edubuntu2558
eduKNOPPIX698
Ehad702
Ekaaty2047
Elastix679
eLearnix248
Element626
elementary621
Elive690
elpicx1483
ELX699
Endian186
EnGarde636
Epidemic1479
ERPOSS2291
Estrella Roja700
ESware604
EvilEntity686
Evinux393
ExTiX1432
Feather119
Featherweight276
Fedora757
Finnix117
Flonix59
Foresight1227
FoX3093
FreeBSD2407
Freeduc700
Freeduc-Sup617
FreeNAS103
Freepia35.5
FreeSBIE671
Freespire681
Frenzy332
Frugalware4281
Fuduntu959
Fusion1709
GeeXboX136
Gelecek638
Gentoo3913
Gentoox245
GEOLivre690
GhostBSD609
Gibraltar493
gNewSense613
GNIX-Vivo519
GNOPPIX630
GNUstep224
GoboLinux671
gOS687
GParted133
Grafpup106
Granular699
Greenie1123
Grml145
Guadalinex938
Haansoft670
Hacao120
Haiku244
Hakin9496
Hancom649
Hanthana683
Haydar650
Hedinux553
Helix702
Hikarunix203
Honeywall320
How-Tux635
Hybryde1595
Hymera3044
Icepack574
IDMS367
Igelle587
Ignalum625+
Imagineos696
Impi700
IndLinux689
INSERT59.3
IPCop60.3
IPFire77.9
JackLab1616
JAMD688
Jibbed695
Joli OS691
Jollix530
K12Linux813
kademar2603
Kaella3616
KahelOS2868
Kalango591
KANOTIX4341
Karoshi621
KateOS698
Kiwi700
Klax341
kmLinux667
knopILS595
Knoppel692
Knopperdisk62.4
KNOPPIX697
KnoppiXMAME150
Kondara639
Kongoni664
Kororaa1365
Kubuntu954
Kurumin657
Kwort337
LAMPPIX205
LAS209
LBA-Linux652+
Legacy476
LFS615
LG3D264
Liberté213
Libranet679+
LIIS568
Linare699
Lineox2172
LinEspa636
LinEx1489
LinHES693
Linpus410
Linspire646
Linux4all672
LinuxConsole530
Linux-EduCD1143
linuX-gamers654
Linuxin696
Linux+ Live1802
Linuxo695
LinuxTLE695
Linux XP/Trustverse2823
Linvo737
Lite744
Litrix1293
LiveCD Router88.6
LiVux693
LLGP695
LliureX2490
LNX-BBC48
Loco641
Lormalinux699
LPS181
LRs664
Lubuntu692
Luit50
Lunar354
LuninuX1383
Lycoris564
m0n0wall17.8
Macpup193
Mageia3797
Magic690
Mandows590
Mandriva704
Mangaka2382
Manjaro779
Mayix642
MCNLive381
MeeGo864
MEPIS/SimplyMEPIS1336
MidnightBSD425
MilaX93
MiniNo644
MINIX336
Mint1045
MirOS656
MIZI434
Moblin754
Mockup346
MoLinux1186
Momonga3514
Monomaxos1639
Monoppix480
moonOS832
Morphix198
MoviX/eMoviX10.8
MSC.Linux696
Munjoy519
Musix1962
Mutagenix686
Myah OS695
Mythbuntu666
MythDora1180
Nasgaïa427
Nature's127
Navyn OS384
NeoShine/Cosix598
NepaLinux665
NetBSD313
Netrunner1411
NetSecL1870
Netwosix243
Nexenta539
NexentaStor580
NimbleX401
Nonux698
NST1441
NuTyX52
Ojuba687
OLPC656
Onebase108
OpenBSD226
OpenELEC104
OpenGEU687
OpenIndiana802
OpenLab698
openmamba681
OpenNA384+
OpenSolaris677
openSUSE629
Openwall442
Ophcrack46
Oracle2957
Oralux496
OS41471
Overclockix700
PAIPIX3416
paldo670
PapugLinux258
Parabola368
Pardus1168
Parsix1031
Parted Magic236
PC-BSD3571
PCLinuxOS3986
Pear822
PelicanHPC649
Pentoo1614
Peppermint536
Pequelin680
pfSense76.2
Phaeronix701
PHLAK195
Pingo2858
Pinguy1689
Pingwinek700
Pioneer657
Plamo2955
PLD426
Plop1001
Porteus186
Poseidon3731
pQui700
Progeny624+
Proxmox397
Puppy155
Puredyne1145
PureOS683
QiLinux4027
Qimo699
Qomo681
Quantian2726
Qubes1694
Quirky124
RAYS655
Red Flag1118
Red Hat3500
Redo249
redWall529
Resala690
Resulinux1007
ROCK2
Rocks Cluster2516
RoFreeSBIE2455
ROOT685
ROSA1488
rPath837
Rubix404
RUNT78.7
Sabayon1976
Sabily1623
SalineOS868
Salix664
SAMity/SAM679
Santa Fe600
SaxenOS702
SchilliX407
Scientific695
SCO665
Securepoint205
Semplice517
SENTINIX213
Shark585
Shift627
siduction1010
Skolelinux4486
Slackel1002
Slackintosh3936
Slackware2299
Slamd644274
SLAMPP1849
Slavix587
Slax219
SliTaz34.7
Slo-Tech549
SLYNUX713
SME Server653
SmoothWall68.9
SMS675
SNAPPIX622
Snowlinux935
SoL1815
SolusOS987
Sophos465
Sorcerer112
Source Mage291
SparkyLinux3913
SphinxOS659
Springdale/PUIAS4214
Squiggle/Freespire316
StartCom3902
StartOS/Ylmf677
STD/KNOPPIX STD497
Stella1226
StressLinux194
STUX697
SuliX604
SuperGamer8118
Super OS1873
Swift651
Syllable Desktop56
SymphonyOne633
SystemRescueCd350
T2200
Tails854
TA-Linux237
Tao700
Taprobane689
Thinstation218
Thiz650+
Tilix673
Tiny Core12
TinyMe230
tinysofa362
Toorox2395
Topologilinux2347
Toutou114
TPM/ThePacketMaster294
Trinity146
Trisquel696
trixbox595
Troppix645
TrueBSD1978
Trustix629
Truva670
TrX653
TumiX575
TupiServer462
Tuquito661
Turbolinux654
Turkix591
TurnKey139
UberStudent3562
Ubuntu753
Ubuntu Christian1255
Ubuntu Rescue234
Ubuntu Studio2130
Ufficio Zero654
UHU-Linux1530
Ulteo846
Ultima670
Ultimate3344
Underground645
UnitedLinux645
Unity96.4
Univention1858
Untangle423
UPR970
UserLinux456
UTUTO3710
Vector699
VENENUX1569
VideoLinux483
Vine1879
Vinux1427
VLOS1800
VMKNOPPIX676
vnlinuxCD604
Voltalinux310
VortexBox698
Vyatta213
wattOS675
Webconverger311
WHAX652
White Box2721
WIENUX918
Wifislax552
Wolvix665
WOW639+
Xandros540
Xarnoppix700
Xfld641
X/OS3655
xPUD65
Xteam691
Xubuntu693
Yellow Dog3409
YES462
Yoper354
Zen1136
Zencafe595
Zentyal628
Zenwalk922
ZevenOS700
ZoneCD243
Zorin1920

Friday, January 4, 2013

C++ Questions

Data structures internal to STL containers

VectorSetListMapHash-Set
Data StructureDynamic ArraySelf-Balancing BSTDoubly-Linked ListSelf-Balancing BSTHash Table

Abstract Class
Data StructureVirtual Method Table (vtable)

How does dynamic array allocate memory dynamically (growing & shrinking in run time)?

Binary TreeBinary Search Tree
A tree data structure in which each node has at most two child nodes.An ordered or sorted binary tree, with no duplicate nodes.

VectorList
A dynamic array, like C array (i.e., capable of random access) with the ability to resize itself automatically when inserting or erasing an object. Inserting and removing an element to/from back of the vector at the end takes amortized constant time. Inserting and erasing at the beginning or in the middle is linear in time. A doubly linked list; elements are not stored in contiguous memory. Opposite performance from a vector. Slow lookup and access (linear time), but once a position has been found, quick insertion and deletion (constant time).

Different types of traversal in Binary trees
1 Depth-first traversal
1a. pre-order traversal
1b. post-order traversal

2 Breadth-first traversal

Best Performance, O(1)Average Performance, O(log n)Worst Performance, O(n)
Binary Tree StructureWhen one searches the root nodeWhen you search a normal BSTWhen the unbalanced tree resembles a linked list (degenerate tree).

Abstract ClassSingleton Class
Use

Example scenarios why & when would we need derived classes
Because we have access to the source code of the Base class, we could add functionality directly to Base. However, there may be times when we do not want to, or can not. Consider the case where you have just purchased a library of code from a 3rd party vendor, but need some extra functionality. You could add to the original code, but this isn’t the best solution. What if the vendor sends you an update? Either your additions will be overwritten, or you’ll have to manually migrate them. It’s also common to for developers to release header files containing class definitions, but release the implementation code precompiled — this means you can use the code, but you won’t have the ability to modify it directly.
In either case, the best answer is to derive your own class, and add the functionality you want to the derived class.