Menu

  • Home

  • Forums

  • Adamsinfo Blog




  • [Valid RSS]

    Latest Blog Postings at adamsinfo

    Linux LUKS Crypt HOWTO

    Linux Controlled Door Entry

    PHP Security

    Website Security Scan

    Linux Consultant - Server Management, Basic Housekeeping

    SSHing from a compromised machine

    PHP Programmer - Logical Operators

    PHP Programmer - Numeric Shorthand

    PHP Programmer - Reading from files

    PHP Programmer - strlen, count and substr

    PHP Programmer - strpos, finding the position of a word in a string

    PHP Developer - Serialize

    PHP Developer - Loops in General

    UK VPN Hosting

    Freelance PHP Programmer - Managing Estimates

    String replacement with sed

    PHP Developer - Looping through database results

    Easy Reverse Engineering

    Move Xen Guest from loopback filesystem to LVM

    Setting up an LVM filesystem

    Installing and Configuring Xen with guests

    dd progress update

    Xen, LVM and friends

    Copy/Export MySQL User Priviledges

    Linux Consultant - How to recover a compromised server

    Recursive FTP/HTTP Download

    New Rapidswitch Server

    BASH Script - Blank Out CC Details

    Hosting - Users too quick to judge?

    Embedded Linux Programmer

    PHP Programmer - Modulo Operator

    UK VPS

    Hosting

    Linux C setuid setgid tutorial

    Linux Security Freelancer - Securing a node - Where to start?

    Linux Consultant - Disk Speed

    Security Consultant - Man In The Middle Attacks (MITM)

    Self Signed Certificates

    Security Consultant - London Site Visits

    Security Consultant - Scope of work

    Contact Me

    PHP MySQL Developer - A Freelancer in London

    PHP MySQL Developer - Using MySQLi Prepared Statements to Avoid SQL Injection

    Blog fork()s some children

    Shrinking/Resizing ext3 Partitions

    Installing Linux on the Embedded PPC50 Touchscreen

    How to Find and Replace data in MySQL

    Looking for a New Linux Project

    Multithreaded Tunnel Proxy and OpenVPN experiment

    Linux - Exim, Avenger and SpamAssassin Tips

    Linux Color Directory Listings

    Web Application Security Consultant Methodology

    What is my IP?

    Good UK VPS Provider?

    Security Consultant - Ports & Port Knocking

    Shell Return Codes - Ping Monitoring

    Security Consultant - PHP Developer - SQL Injection Attacks

    Security Consultant - PHP Developer - Exploiting Common PHP Code Flaws

    Multithreaded Multi-Connection TCP Proxy Tunnel Update

    Security Consultant

    Security Consultant - Basic NMAP Usage

    Linux NAT Masquerading HOWTO

    Multithreaded TCP Proxy Tunnel Code

    PHP Developer - PHP Sessions

    Using the Phidget Interface Kit under Linux

    Multithreaded TCP Proxy Tunnel

    The Linux Robot - In hindsight

    The Linux Robot - Dancing Beat Recognition

    brctl: Creating a network bridge

    cPanel rebuild all DNS zones

    at, batch scheduling

    Simple text sorting

    shPanel - the Linux System and Hosting Control Panel

    Creating an MD5 on Linux with md5sum

    Admin Management System

    An idea - cPanel like host management

    htop - top on steroids

    Copy files securely from host to host with SCP

    Linux SCREEN Command

    Linux DHCP Server

    Simple MySQL Developer Intro

    umount: device is busy

    How to create a simple disk image formatted to ext3

    Linux piping and redirecting stdin stderr stdout

    BASH Shell Scripting - Sort a string alphabetically

    Linux Command History

    Linux diff and patch

    bc - Linux command line calculator

    How to upgrade from Debian Etch to Lenny

    Local and Remote Kernel Upgrades - Failsafe Grub

    Linux and the Huawei HSDPA 3G E220 modem for mobile broadband

    Linux PPTP (Poptop) VPN Setup with MPPE and MPPC

    Linux Squid Transparent Proxy

    A Beginner's Guide to Object Oriented Programming (OOP) in PHP5 - Classes, Objects and Methods

    DNS based Load Balancing

    How to reset forgotton MySQL root password

    How to recover your Linux root password

    How to remove the tray icon from VNC (RealVNC) with XN Resource Editor

    Linux IP Address Configuration Static or DHCP

    Blackberry Bold - Today Theme

    A rudimentary PHP POP3 example

    PHP - fsockopen, TCP and UDP

    PHP - Ternary Operator

    The Linux Robot - Progress, Software & a Video

    Simple POP3 Communication HOWTO

    Linksys WRT54G Serial Console

    A BIND9 zonefile and commentary

    Debian Lovers - Why I love Voyage Linux

    The Robot - Progress and a Video

    The Robot: Hardware working and ready to go, a few minor glitches

    Using distcc for distributed compiling on an alix 3c2

    The Robot: Independant, moving, talking, and controlled via WiFi

    Linux: AVIT Research USB to TTL Cable

    Some simple filtering and sniffing with tcpdump

    The Robot: Base, Wheels, Motors, and Sabertooth Motor Controllers

    The Robot: A body, Sensors and Good Progress

    The Robot: More good progress

    The Robot: Phidgets USB Interface Board Kit works

    Linuxuk.org - A good resource

    The Robot: Successful installation of Debian onto the Alix 3c2 board

    Robot Update

    rsync over SSH, SSH key login, public keys, automated backups

    mknod tutorial

    Linux on a Mikrotik 532a , Part 5 Final - OpenWRT and Custom Scripts

    Robot: Initial Hardware Order [rev 2]

    Help Debian, today's Linux news.

    Linux on a Mikrotik 532a, Part 4 - Customization, Debian Scripts, Shaping, Firewall, NAT, picoLCD

    The Robot: Hardware List, Wheel Plan, More Ideas, Steps to launch

    Robot

    Linux Robot, more hardware ideas

    Linux Robot - Watch this space

    Diffie-Hellman Key Exchange

    True Infrastructure On Demand

    PHP MySQL Developer

    PHP, MySQL, Apache2 install HOWTO on Debian

    APNIC Box - Linux on a Mikrotik 532a, Part 3 - Installing Debian, Prebuilt Disk Image

    APNIC Box - Linux on a Mikrotik 532a, Part 2 - Hardware Modifications

    APNIC Box - Linux on a Mikrotik 532a, Part 1 - The Device

    Linux Consultant

    Playing poker on Linux

    DNS Hijacking, ISP Packet Modification, Morals and Privacy

    The Legality of Peer to peer software

    APNIC Box

    Linux Benchmark, IO statistics and system statistics with dstat

    Thoughts on "Google denies disassembling Vista code for Chrome"

    Great news for adamsinfo.com

    95th percentile billing explaination

    Wireless Hacking, Problems with WEP, Wireless Security and WPA

    Adam's Custom Kernel

    Going Green, PC Hibernation, Saving Money & Common Sense

    NetCat tutorial for Linux & Windows, HOWTO, nc

    Using picolcd on linux, lcdproc, routerboard, liblcdusb

    Quick Linux and Windows OpenVPN HOWTO and tutorial, including VPN routing

    Linux virtualization, vmware, xen, hosting, and squeezing the most out of your resources

    Extending tc and iproute2. Linux routing split access multiple uplinks multiple isps iptables masquerading

    VMware Time Problems

    Resume & Portfolio

    Bandwidth Limiting HOWTO with linux, tc and iproute2

    Exim, MySQL, Courier IMAP, Courier POP3 & Spamassassin - vdomain and vuser set up.

    LAMP Optimization

    Split access SSH problems

    Custom linux router, routing, split access and more..

    Custom linux router, the story..

    Linux device names & mounting

    Hello world!

    Elementary Google Chrome / Chromium Theme

    This is a quick post: elgandoz told us that he created an Elementary theme for Google Chrome / Chromium. If you use the Elementary theme created by DanRabbit or the Elementary Mod we just posted, your browser will finally fit in with the rest of your desktop:




    Download Elementary Chromium© www.webupd8.org 2009-2010. | What's New on the World Wide Web

    Posted on 9 February 2010 | 8:35 am

    Get Instant Access to Wikipedia from your Browser

    If you are an avid fan of wikipedia then a good thing will be to access Wikipedia content from your browser window instantly. Here are some cool plugins for two of the most popular web browsers, which will help to find wikipedia entries for a any selected word or phrase you might come accross. [...] Related posts:Chrome Extension for Taking Screenshots Inside Browser Swiftfox – Fast Light Weight Browser for Linux Based OS 6 Most Popular Extensions for Google Chrome

    Posted on 9 February 2010 | 7:53 am

    Some Interesting SEO Questions & Answers by Google

    Few days back Google webmasters had proposed to the webmasters quiz, a Webmaster Quiz to test our knowledge on SEO and the subject. They published the responses which can be viewed here. Its an interesting quiz I think all bloggers and websites owners must take to see if what they ask, we knew it [...] Related posts:Top 10 SEO Mistakes in Blogging Done Due to Wrong SEO Knowledge 10 Best Free Online SEO Tools By Google Microsoft’s Free SEO Tool to Help You Rank Better in Bing, Yahoo & Google

    Posted on 9 February 2010 | 7:05 am

    Wordpress : Lets Allow Our Commentators To Edit Their Comments

    Humans are not machines. We all do mistakes. So, when we comment also we make mistakes. But, most of the websites won't allow us to edit these comments to correct our mistakes! Now what to do? As site owners, I don't think we like to see some unreadable rubbish as comments right? Related posts:The Secrets of Getting Comments for Your Blog Lets install the latest Grub 2 on Ubuntu 9.04 Have a file that you don’t know how to open? How To Set Up Wordpress in Your Home PC Come Out of that Dark Cave if You Want to Blog!

    Posted on 9 February 2010 | 6:30 am

    Why your program should have an actual configuration file

    Why your program should have an actual configuration file

    Every so often, someone says something like 'you know, our program has a configuration file but also supports runtime reconfiguration via some magic. Clearly this is wrong, so what we should do is get rid of our configuration file and just make sure the running state is persistent'. If they're feeling nice, they add that the running state will be saved as an XML file.

    Every time people say this, sysadmins cry. Here is a very important thing for real deployments of your program in real environments: configuration files are a good thing because they are really easy to manage. Running state that is updated by applying changes (often non-idempotent changes) is much harder.

    First, let's get something out of the way: machine generated, automatically updated XML files are not configuration files in any conventional sense that is useful to sysadmins. They are an internal persistence mechanism that may, perhaps, have vaguely useful and inspectable contents (but generally not). So regardless of XML or not, if you go down this route you do not have a configuration file but instead a program with configuration state that persists over reboots and restarts.

    Let's inventory some of the things that you lose when you merely have persistent configuration state without actual configuration files:

    you cannot configure the program without the program actually being running. Programs often have undesirable behavior when started in an unconfigured, misconfigured, or inaccurately configured state.

    Among other things, this means that you can't prepare alternate configurations in advance; you must build them on the fly.

    (Or you must build them on another machine or in another instance of the program, shut both down, and port the magic persistence database over in whatever form it is in, assuming that it does not have host or instance specific data buried in it that you must scrub out.)

    you cannot atomically make a bunch of changes, having them all take effect at once by putting a new configuration file into place and restarting the program (well, unless there's an explicit 'batch changes together' mechanism). Instead you must make the changes reconfiguration operation by reconfiguration operation. Much like before, this can result in the program temporarily operating in a highly undesirable state. At a minimum, it's going to complicate planning changes. corollary: you can't easily switch configurations or choose different configurations based on outside conditions.

    automatically updating configuration files clash, potentially badly, with attempts to maintain configuration files through version control systems, automated deployment mechanisms, and so on.

    it is (or should be) easier to understand a configuration that is written out in a configuration file than one that is the implicit results of applying a bunch of configuration change operations.

    (If it is not, let's be honest here: you need a better configuration file format.)

    it is much easier to update configurations by providing new files than it is to update configurations by applying configuration changes. There are lots of mechanisms to put new files into place; there are very few to carefully run sequences of commands, keeping track of what ones have already been executed successfully.

    I could go on, but I think I'm going to stop now; I hope that you get the point. Configuration files don't exist merely because those other programmers are lazy people, they exist because they're actually a pretty good solution to a whole bunch of problems at once. Getting rid of them is almost never forward progress.

    Posted on 9 February 2010 | 5:34 am

    Gestalt IT’s Tech Field Day: I’m in!

    Completely out of the blue last week, I got an email from Stephen Foskett discussing something called a “Tech Field Day” put on by his company, Gestalt IT. I was really busy and didn’t get a chance to really look into anything until that night.

    As it turns out, the email was talking about a novel idea in the blogosphere that had been put on last year and ended up being such an amazing success that it’s being repeated now. This idea is the Tech Field Day.

    There are companies out there making very cool things that people should know about. At the same time, there are some really great bloggers out there writing great pieces about cool things. Stephen Foskett and Tech Field Day is devoted to connecting those two groups in a very personal way.

    The idea is impressively simple. A group of bloggers, 15 or so, gather together, crowd onto a bus, and go visit companies. Sort of like a tech version of the Partridge Family, except the singing has been replaced by deep dive presentations from engineers and chief officers from companies trying to expand the state of the art in IT. Cool, huh?

    The benefit that the companies derive is that news of their new technologies and products gets spread via word of mouth and through trusted channels. If the technology and products are actually good, that is. The blogger delegates attending the event aren’t paid shills. Every one of us has the understanding that what we write will be an honest representation of what we see, experience, and think. If I don’t like a product, I’m not going to write nice things about it because our bus pulled up to their building. The bus will take me to the next place, regardless of what I write.

    The benefit to the bloggers is, first and foremost, building a community amongst ourselves. In this electronic world, we think we know someone pretty well if we IM with them, rather than just shoot emails and the occasional twitter mention. And it is possible to know someone well over the internet. But it’s something entirely different to know them in person. We are still humans, and we still relate to each other, and so much of the rudeness, bravado, and opinionated difference on the internet melts away when you shake hands with someone and look them in the eyes.

    There are a lot of other benefits to the writers, as well. Seeing what companies are offering first hand, learning from the engineers who implemented the products themselves, and a mental break from the ruts that we all find ourselves in from time to time. The combination of these should make for some really nice writing.

    The community that spawned from the first Tech Field Day sounds like it was special. The individual bloggers created a tribe of incredibly intelligent people brought together to be with each other, to experience new technology, and to take home experiences different than they’d had previously. According to all of the mentions that I’ve seen, it was incredibly successful.

    And so last week, I got my email. I’m honored to have been considered, and after talking to Stephen for a while on Friday, I really saw the vision, and i was sold.

    The next Tech Field Day is in Boston, MA, and is scheduled for Spring of 2010.

    The last time that I talked to Stephen, not all of the vendors had been scheduled, so if you’re in the Boston area and think that your company has something cool and exciting to talk to an array of industry bloggers about, drop me a line and I’ll get it to Stephen (or just email him, at the address on the delegate list, below).

    The full delegate list isn’t finished, either, but will be updated as it’s filled out here. If you read a lot of blogs, several of those names should be familiar. If they aren’t now, I’m sure they will be, because every one of them is a great blog to read and learn from.

    If anyone has any questions at all, drop them below, and I’ll do my best to answer everything. Thanks, and I hope that you’re as excited about this as I am!


    Posted on 9 February 2010 | 3:54 am

    When Linux Nerds Choose Mates from the Windows Herd.

    Look...let's face this together.  Dating can suck.

    Now when you are young, it's an adventure.  One has relatively little "baggage", the emotional scars are few and the dating world is your oyster...so to speak.

    And you haven't even begun to think about their therapeutic value yet.

    Ah, youth...

    But then you find yourself at midlife, choosing from a large pool of potential crisis'.  There are so many to choose from. 

    Maybe there is a divorce or two under your belt, some strong political or religious beliefs that are deeply ingrained, and oh yeah, there's that messy incident with the hacking conviction...

    Those tend to narrow down the potential list of candidates for life-long bliss.

    Throw your use/obsession of Linux into the mix and what do you get?

    More than likely a room at your mom's house and a NASA-level computer bank in her basement.  The neck beard and questionable hygiene habits don't help matters any either.

    You come to realize that there is more to life than bash scripts and LAN parties with other Linux Geeks.  Well, at least for some of us.  So you decide to put yourself back on the dating market.  Where do you start?  I think we can all rule out LUG meetings, Linux Foundation events and the laundry mat. The ratio for men to women at these locations is bleak.

    Let's say, just for argument, that you miraculously run into someone that bothers to look at you twice....I mean without pity or fear and the strong urge to call 911.  How does a Linux Geek approach someone?

    "Hi, wanna see my raid array"?


    "Did you know that almost half of Cray supercomputers run Linux"?


    "So...your home directory or mine?"

    You realize, returning to your mom's basement, that these lines didn't provide optimum results.  Combing the internet for dating tips, and possibly your hair, you decide that just maybe the passion of your life isn't congruent with finding someone that will touch you,

    I mean aside from accidentally.

    Let's further assume that you are able to cast off or conceal your geekness, get a haircut, trim your beard and join the rest of society.

    Yeah, I know it's a stretch but work with me here...

    You actually find yourself on a third date and she hints that she wants to develop a "relationship".

    You probably haven't been able to completely hide the fact that you are good with computers.  Some things bubble to the surface regardless of how hard you try to keep them secret.  She's running Windows Vista on her home computer and she is complaining that her computer is running slow and that she keeps getting these annoying popups.  She wants you to come over and fix her computer.

    You know better than anyone that the last time you were alone with a female in her home, it was that disastrous misunderstanding with your cousin's best friend.  That whole "I'm-sorry...I-was-just-trying to-get-the-cap-of-my-thumb-drive-that-popped-off-and-landed-in-your-lap" thing didn't work out so well for you.  At least she slapped you...

    Sure, that counts as female contact...kinda.

    So there you are, just you and her...alone in her apartment and sitting in front of her computer.  You can smell her perfume (it's actually just soap but it smells wonderful to you just the same).  You can't help but notice her long hair and how it flows across her shoulder.  You focus again on the screen in front of you...clicking on the start menu.  You know it's going to take three minutes just to open the dialog box.  After all, this is Windows. 

    This is your chance.

    "You know, if you didn't use Windows, you wouldn't have these problems".

    Here it comes but you are used to it by now...the blank stare...the look that communicates:

    "Uh..., what?"

    You go on to explain that there are different operating systems for a computer...that Windows is only one option. She bites her lower lip in contemplation then smiles and nods enthusiastically.

    "Oh no, I have an operating system. It's called Facebook."

    You patiently explain that Facebook is just a web-based interface that allows her to share some of her life with her friends and that the operating system is simply a means she uses to interact with her computer.

    She seems a bit exasperated.  "I have that already." she says.  "It's called Internet Explorer...I use it all the time."

    You take a deep breath and reach for your laptop.  In the case, you have a live cd and you tell her that you want to show her what Linux is.  You go on to explain that Linux is free and that she can use it without any real worry about viruses.

    She refuses.

    "Hey, I don't want you putting things on my computer just yet....I mean, I don't even know you very well.  Those popups say that I have a virus and all they want to do is help me take it off.  All I have to do is click the button and they will take care of it for me.  I just met you.  I don't know what kind of stuff you are going to put on there...you might put spyware on there or something." 

    "I think you better leave now".

    The last word she says to you rings in your ears:

    "Pervert!"

    Back in the basement, you slam down another Red Bull and contemplate the whole dating thing.

    "That's IT" you mentally exclaim.  "Facebook!  I'll meet someone on Facebook".

    Maybe she'll even post a picture less than 5 years old.

    Maybe you will...

    Or not.

    And for this you even shaved.

    All-Righty Then...

    Posted on 9 February 2010 | 1:56 am

    The Bruno Knaapen Technology Learning Center is Established

    It was just a short time ago that Scot Finnie announced a long-time Linux Advocate had fallen terribly Ill.  His name is Bruno Knaapen and he is the author and maintainer of Brunolinux.com.  We wrote about Bruno at Blog of helios and told you that we planned to dedicate a technology learning center to him.  I began speaking with different people about various possibilities and locations for the center.  It became obvious after a short time that we were not going to be able to find a suitable place any time soon.

    I feel a sense of urgency in getting this done and after almost a month of frustrating meetings and disappointments, it occurred to me that the answer was right under our fingertips.

    As we've written about this week, The Christo Rey Catholic Church houses a 25 computer learning center for the residents of East Austin.  The HeliOS Project provided the computers and manpower to make this place a reality.  This center serves the disadvantaged people in the area and we are proud to provide instructors and volunteers to teach computer classes there and maintain the equipment. 

    I had a meeting with Christina Collazo, the Director of a non-profit, Centro de Aprendizaje ¡Sí Se Puede! that serves this church and the surrounding community.  She agreed that the answer was simple.

    We will dedicate this learning center to Bruno Knaapen.

    Father Jayme, the leader of this church gave us his blessing for this dedication and his church offers prayers for Bruno and his family.

    The Bruno Knaapen Technology Learning Center will actively seek those who need computer and technology training.  We will not only focus on technology training but assist those who seek employment and teach them resume and job search skills.  We will also maintain our focus on teaching children the skills they need to compete in this technology-centered world.

    As Bruno has done for years, so shall we follow in his footsteps, bringing awareness to those who seek it. 

    We hope to have the banner in place next week.  Anyone who cares to help us upgrade some of the equipment and help us get this done is encouraged to do so.  There are several things we will be needing.  Specifically, we are in need of a decent digital camera, (We now have a camera thanks to our long-time friend Gavin) 512 sticks of pc133 laptop ram, desktop ram of all kinds in 512 megs and up, computer speakers and external usb cd/dvd writers.

    Bruno has shown us the importance of tenacity and courage.  We will simply provide a place where those lessons will live on.

    All-Righty Then...

    Posted on 9 February 2010 | 1:37 am

    Memo to Dell: Sort Out Your Ubuntu Strategy

    Dell's Ubuntu strategy once again faces Fear, Uncertainty and Doubt (FUD). Multiple times in the past 12 months or so, Dell's strong Ubuntu efforts have been undermined by disappearing desktop offerings. ...Full Article

    Posted on 9 February 2010 | 1:15 am

    What’s Likeable About Likewise Open for Ubuntu

    Traditionally, configuring Ubuntu servers to integrate with Microsoft Active Directory was not a lot of fun. It wasn't exactly difficult, but it involved editing lots of PAM and Kerberos configuration ...Full Article

    Posted on 9 February 2010 | 12:27 am

    Worst TV Licence Excuses

    I decided to have a look around on the internet to find the worst (and some funny) TV Licence excuses when people who haven't got an up-to-date TV Licence get caught. • My dog watches it while I'm at work to keep him company - not me. • The subtitles on my TV are set to French so I'm not paying a UK tax for something I can't read. • My wife has her hair done twice a week, so we find it difficult to pay. • I haven't renewed my licence because my wife flushed it down the toilet, along with my wallet. • My husband has just spent 3,000 pounds on this massive flatscreen digital TV so we can't possibly afford a licence. • I couldn't make my last payment as my baby was sick on my shoulder and I didn't want to go to the shop smelling of sick because the guy I fancy works there. • I have not been making payments because a baby magpie flew in to my house and I have had to stay in to feed it. • I [he] forgot to pay as my [his] girlfriend had hit me [him] over the head with a hammer. • I'm not paying for a politically partisan media controller when I don't watch anything it produces. • I want the license abolished cos I really think a media completely controlled by right-wing plutocrats will provide me with better programming and accurate news. • I was stuck to the sofa thanks to Derren Brown's show on Friday night. • Because my [her] cat had got sick down the back of the set and blew it up. &raquo; <a href="http://www.tvlicensing.co.uk" target="_blank" title="TV Licensing">TV Licensing</a>

    Posted on 8 February 2010 | 10:44 pm

    Google Might Unveil Gmail's Social Features Tomorrow

    The Wall Street Journal reports that a new Gmail module might be released which will integrate status updates as well as content from YouTube, Picasa and potentially other social media websites. WSJ is unclear as to when it will launch, though.

    These Gmail social features might be unveiled tomorrow, as apparently there is an event where Google will let everybody know about "some innovations in two of most popular products", as TechCrunch reports.

    The even will start @ 10 am and TechCrunch will do a live coverage.© www.webupd8.org 2009-2010. | What's New on the World Wide Web

    Posted on 8 February 2010 | 9:20 pm

    Schiller defends App Store approval policy

    ‘Schiller claimed 90%of rejectionswere for technical reasons such as bugs or functions that didn’twork as intended’

    Faced with the exodus of some high-profile developers of iPhone apps, Apple senior vice-president for worldwide product marketing Phil Schiller granted a rare interview to explain the company’s App Store approval process, which has been variously condemned as confusing, arbitrary and controlling. Schiller spoke to BusinessWeek days after Joe Hewitt, who created the Facebook iPhone app, announced he would no longer develop for the iPhone. Hewitt, who also helped develop the Firefox browser, said his decision ‘had everything to do with Apple’s policies’, which he alleged were ‘setting a horrible precedent for other software platforms’. Another Mac and iPhone developer, Rogue Amoeba, also announced it wouldn’t develop any more iPhone apps after its Airfoil Speakers Touch app was blocked by Apple over alleged trademark infringement.
    While Schiller promised Apple would be more flexible, he dedicated most of his interview to defending the company’s approach, and pointed out that Apple approves the vast majority of apps submitted to it by developers. Schiller claimed 90% of rejections were for technical reasons such as bugs or functions that didn’t work as intended. He said that when these problems were fixed Apple approved the apps. Schiller said the remaining 10% of rejections were rejected as ‘inappropriate’. ‘There have been applications submitted for approval that will steal personal data, or which are intended to help the user break the law, or which contain inappropriate content,’ said Schiller. ‘We’ve built a store for the most part that people can trust. You and your family and friends can download applications from the store, and for the most part they do what you’d expect, and they get onto your phone, and you get billed appropriately, and it all just works.’ Schiller pointed out that developers send Apple around

    Source of Information : MacUser.January 2010

    Posted on 8 February 2010 | 6:20 pm

    How to Import / Export OR Backup / Restore MySQL Database in Ubuntu Linux with mysqldump

    Backup of database is very important  in Database Projects. You can recover your data when  problems occurs. A variety of  backup strategies are used in  MySQL.  You can choose any one of them. This can also use for Installing your Software from One system to Another. This Method is not Distribution Specific, You can Use same command in Fedora, Mandriva, Debian, SUSE etc.. My Heading is for helping Ubuntu users in  Search.

    Export / Backup MySQL database:

    Utility named mysqldump  can be used to dump a database or a collection of databases for backup or for transferring the data to another MySQL server. The dump file is a text file which contains SQL statements to create the table and/or populate the table.

    How to  export / Backup a  Mysql database to a .sql file
    # mysqldump -u USERNAME  -p DATABASENAME > FILENAME.sql

    USERNAME is the MySQL admin user
    DATABASENAME  is the name of the database that need to be exported /Backup
    FILENAME.sql is the name of the file where your data will be exported

    Now It will ask for password,Enter  MySQL admin password. 

    You can dump all databases by doing:

    # mysqldump -u root -p --all-databases > all_my_data.sql

    Now We can See How to Import/Restore MySQL database:Below is the simple command through which you can restore / import the already exported MySQL database file (.sql)

    # mysql -u USERNAME -p DATABASENAME < FILENAME.sql


    You will be prompted for the MySQL administrator password.

    Posted on 8 February 2010 | 5:38 pm

    Comment on Xen.org Pamphlet Available in Polish by Tweets that mention Xen.org Pamphlet Available in Polish – blog.xen.org -- Topsy.com

    [...] This post was mentioned on Twitter by Özgür Yüksel and The Xen® Hypervisor, Planet Xen. Planet Xen said: Xen.org Pamphlet Available in Polish: Thanks to Igor Wawrzyniak for translating the Xen.org 2 page pamphlet in... http://bit.ly/aBppAS #xen [...]

    Posted on 8 February 2010 | 4:24 pm

    Comment on Xen 3.4.3 Release Candidate 2 Available by Tweets that mention Xen 3.4.3 Release Candidate 2 Available – blog.xen.org -- Topsy.com

    [...] This post was mentioned on Twitter by Özgür Yüksel, The Xen® Hypervisor and Planet Xen, Jared Cowart. Jared Cowart said: Xen 3.4.3 Release Candidate 2 Available - http://blog.xen.org/index.php/2010/02/08/xen-3-4-3-release-candidate-2-available/ [...]

    Posted on 8 February 2010 | 4:23 pm

    22 Best Popular Firefox Themes


    In Past, we covered cool add-ons for firefox users and attractive tips. Now making more color on Firefox, we bring for you 22 Popular themes of Firefox. This collection has collective for multiple taste of Firefox lovers, like simple and colorful. These are most downloaded themes for Firefox in recent times. You can easily download and customize your Firefox.



    Here are 22 Best Popular Firefox Themes
    Silvermel



    Rain 3.0

    Qute 3.3.2

    Phoenity Modern
    Nemesis
    Iowa State Cyclones Theme 3.0
    Washington Capitals NHL

    FireHawke 3D 1.6
    CrystalFox Modern 2.0
    Abstract Zune 3.0.1

    Walnut2 for Firefox


    Gradient iBlu 1.0.8

    Black Stratini

    Red Cats (green flavor)

    PitchDark for Fx 3.6.1

    Chromifox Extreme 3.6

    Gradient iCool (Blue)

    ACE Foxdie


    NASA Night Launch
    Charamel Firefox ThemeSuper Mario Bros. 3 Firefox theme

    Posted on 8 February 2010 | 4:13 pm

    Xen.org Pamphlet Available in Polish

    Thanks to Igor Wawrzyniak  for translating the Xen.org 2 page pamphlet into Polish. Check it out at http://www.xen.org/files/Marketing/XenPamphlet_po.pdf.

    Posted on 8 February 2010 | 3:27 pm

    Xen 3.4.3 Release Candidate 2 Available

    From Keir: I’ve tagged 3.4.3-rc2 at http://xenbits.xensource.com/xen-3.4-testing.hg. Please test!

    Posted on 8 February 2010 | 2:42 pm

    Resealable Can

    <img src="http://www.dalehay.com/images/twistcan.jpg" alt="Resealable Can" border="0" align="right" style="padding: 4px;" />Always annoyed by your drink going flat when you buy a can of pop? Well you don't need to worry anymore as there's now a new resealable can with a twist-shut lid that can supposedly keep your drink fizzy for upto 24 hours after first being opened. The price of the can is £1.19 though as it's likely to be more expensive to manufacture, though the can isn't the regular 330ml size - it's a bit bigger, being sold in 485ml cans. The can is due to be released in April 2010.

    Posted on 8 February 2010 | 1:09 pm

    openSUSE Survey 2010 – Participate now

    Participate in the openSUSE survey 2010 to give feedback to the openSUSE project about the distribution, the openSUSE tools environment and the project in general. Let the project know where things are in good shape and areas where improvement is needed. There are also some questions to get some demographic knowledge about users. The survey will take about 8 mins. The survey will be online

    Posted on 8 February 2010 | 12:15 pm

    Design patterns : Factory Method

    Factory method defines an interface for creating an object, but lets the subclasses decide which class to instantiate. Factory method lets a class defer instantiation to subclasses. Factory method makes the design more customizable and only a little more complicated. Other design patterns require new classes whereas factory method requires only a new operation. Factory method is quite similar

    Posted on 8 February 2010 | 12:10 pm

    FSArchiver - Filesystem Archiver for Linux

    FSArchiver is a system tool that allows you to save the contents of a filesystem to a compressed archive file. The filesystem can be restored on a partition that has a different size, and it can be restored on a different filesystem. Unlike tar/dar, fsarchiver also creates the filesystem when it extracts the data to partitions. Everything is checksummed in the archive in order to protect the data

    Posted on 8 February 2010 | 10:54 am

    Best CD and DVD burning software

    When I first started burning CDs few years ago, Nero was my favorite program. It was simple to use it got the job done. I also tried Roxio Easy CD Creator back in the old days, but I didn’t like its interface and it wasn’t as reliable as Nero. Nero 6 is still my favorite [...]

    Posted on 8 February 2010 | 10:21 am

    5 Top Messengers To Have a Little Chat With Your Friends

    Today there are lots of chatting going on in the net! Most of the people come online to chat with their friends! Because of this, the messenger has become a very important tool when your using a PC. So, Do you have a good messenger with you? Want to try out a new one? Related posts:Meebo Bar : Now You Can Chat With Your Friends Within Tech Hamlet Facebook: Share Photos and Videos Through Email Facebook to Twitter How To Make Your Own Theme in Windows 7 How to Install the Latest Pidgin in Ubuntu 9.10

    Posted on 8 February 2010 | 6:30 am

    Using SCAN - Single Client Access Name to Connect to 11g R2 RAC from JDeveloper 11g

    The ability to have a single / simple connect string for a RAC cluster seemed like something worth trying which SCAN allows us to have as part of 11g R2. Trying to understand how SCAN works and it's setup was not what I had time for so I took an existing setup and verified I could connect from JDeveloper 11g without any issues.

    The tnsnames.ora alias was defined as follows. As you can see there is nothing to suggest we are connecting to RAC here, but we are.

    RAC11G2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = apctcsol1.au.oracle.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = J11G2)
    )
    )

    Being able to connect from SQL*PLus was what I first tried and that worked fine.

    d:\temp>sqlplus scott/tiger@RAC11G2

    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Feb 8 09:15:59 2010

    Copyright (c) 1982, 2007, Oracle. All rights reserved.


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options

    SCOTT@RAC11G2>
    So from JDeveloper here it shows it can connect fine as well as expected.




















    So from a JDBC client we would be connecting as follows ensuring we use a URL which indicates the use of service name as follows.

    private static final String url =
    "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)" +
    "(HOST=apctcsol1.au.oracle.com)(PORT=1521))" +
    "(CONNECT_DATA=(SERVICE_NAME=J11G2)))";We could also use a connect string as follows:

    private static final String url = "jdbc:oracle:thin:@apctcsol1.au.oracle.com:1521/J11G2";Here are some of the commands I ran to verify the SCAN setup and ports on one of the remote RAC instances. RAC Instances register to SCAN listeners as remote listeners.

    Check we have SCAN listener configured

    [oracle@auw2k3 ~]$ srvctl config scan_listener
    SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521

    Check status of SCAN listeners

    [oracle@auw2k3 ~]$ srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node auw2k4
    SCAN Listener LISTENER_SCAN2 is enabled
    SCAN listener LISTENER_SCAN2 is running on node auw2k3
    SCAN Listener LISTENER_SCAN3 is enabled
    SCAN listener LISTENER_SCAN3 is running on node auw2k3

    [oracle@auw2k3 ~]$ ps -aef | grep -i SCAN
    oragrid 20168 1 0 Feb05 ? 00:00:12 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit
    oragrid 20179 1 0 Feb05 ? 00:00:11 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -inherit

    Finally verify that the service I need to connect to existed on the SCAN listener

    [oracle@auw2k3 ~]$ lsnrctl services LISTENER_SCAN2

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 08-FEB-2010 10:05:41

    Copyright (c) 1991, 2009, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
    Services Summary...
    Service "J10G" has 2 instance(s).
    Instance "J10G1", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k3-vip)(PORT=1521))
    Instance "J10G2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k4-vip)(PORT=1521))
    Service "J10GXDB" has 2 instance(s).
    Instance "J10G1", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER
    (ADDRESS=(PROTOCOL=tcp)(HOST=auw2k3)(PORT=55880))
    Instance "J10G2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER
    (ADDRESS=(PROTOCOL=tcp)(HOST=auw2k4)(PORT=31825))
    Service "J10G_TAF" has 2 instance(s).
    Instance "J10G1", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k3-vip)(PORT=1521))
    Instance "J10G2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k4-vip)(PORT=1521))
    Service "J10G_XPT" has 2 instance(s).
    Instance "J10G1", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k3-vip)(PORT=1521))
    Instance "J10G2", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (ADDRESS=(PROTOCOL=TCP)(HOST=auw2k4-vip)(PORT=1521))
    Service "J11G2" has 2 instance(s).
    Instance "J11G21", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=auw2k3-vip)(PORT=1521)))
    Instance "J11G22", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=auw2k4-vip)(PORT=1521)))
    Service "J11G2XDB" has 2 instance(s).
    Instance "J11G21", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER
    (ADDRESS=(PROTOCOL=tcp)(HOST=auw2k3)(PORT=63414))
    Instance "J11G22", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER
    (ADDRESS=(PROTOCOL=tcp)(HOST=auw2k4)(PORT=62891))
    Service "sv1" has 2 instance(s).
    Instance "J11G21", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=auw2k3-vip)(PORT=1521)))
    Instance "J11G22", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    REMOTE SERVER
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=auw2k4-vip)(PORT=1521)))
    The command completed successfully
    [oracle@auw2k3 ~]$http://feeds.feedburner.com/TheBlasFromPas

    Posted on 8 February 2010 | 3:49 am

    SCAN 11g R2 JDBC Load Balance Test

    Now that I have a SCAN 11g R2 setup I was able to quickly verify the load balancing of connections using a SCAN URL as shown below. I find it very useful to have such a simple JDBC URL. No matter what nodes are added or removed I never have to alter my client JDBC URL again for this RAC cluster.

    Output

    Test Started at Mon Feb 08 13:59:21 EST 2010
    Obtaining 5 connections

    =============
    Database Product Name is ... Oracle
    Database Product Version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    =============
    JDBC Driver Name is ........ Oracle JDBC driver
    JDBC Driver Version is ..... 11.2.0.1.0
    JDBC Driver Major Version is 11
    JDBC Driver Minor Version is 2
    =============
    Connection #0 : instance[J11G22], host[auw2k4], service[J11G2]
    Connection #1 : instance[J11G21], host[auw2k3], service[J11G2]
    Connection #2 : instance[J11G22], host[auw2k4], service[J11G2]
    Connection #3 : instance[J11G21], host[auw2k3], service[J11G2]
    Connection #4 : instance[J11G22], host[auw2k4], service[J11G2]
    Closing Connections
    Test Ended at Mon Feb 08 13:59:22 EST 2010

    Code

    package au.support.jdbc.scan;

    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.ResultSet;
    import java.sql.SQLException;

    import java.sql.Statement;

    import java.util.Date;

    import oracle.jdbc.pool.OracleDataSource;

    public class LoadBalanceTest
    {
    private OracleDataSource ods = null;
    public final String userId = "scott";
    public final String password = "tiger";

    private static final String url =
    "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)" +
    "(HOST=apctcsol1.au.oracle.com)(PORT=1521))" +
    "(CONNECT_DATA=(SERVICE_NAME=J11G2)))";

    public LoadBalanceTest() throws SQLException
    {
    ods = new OracleDataSource();
    ods.setUser(userId);
    ods.setPassword(password);
    ods.setURL(url);
    }

    public Connection getConnection() throws SQLException
    {
    return ods.getConnection();
    }

    public void run () throws SQLException
    {
    Connection[] connArray = new Connection[5];

    System.out.println("Obtaining 5 connections");
    for (int i = 0; i < connArray.length; i++)
    {
    connArray[i] = getConnection();
    }

    for (int j = 0; j < connArray.length; j++)
    {
    if (j == 0)
    {
    DatabaseMetaData meta = connArray[j].getMetaData ();

    // gets driver info:

    System.out.println("\n=============\nDatabase Product Name is ... " +
    meta.getDatabaseProductName());
    System.out.println("Database Product Version is " +
    meta.getDatabaseProductVersion());
    System.out.println("=============\nJDBC Driver Name is ........ " +
    meta.getDriverName());
    System.out.println("JDBC Driver Version is ..... " +
    meta.getDriverVersion());
    System.out.println("JDBC Driver Major Version is " +
    meta.getDriverMajorVersion());
    System.out.println("JDBC Driver Minor Version is " +
    meta.getDriverMinorVersion());
    System.out.println("=============");
    }

    getInstanceDetails(connArray[j], j);
    }

    System.out.println("Closing Connections");
    for (int y = 0; y < connArray.length; y++)
    {
    connArray[y].close();
    }
    }

    public void getInstanceDetails (Connection conn, int i) throws SQLException
    {
    String sql =
    "select sys_context('userenv', 'instance_name'), " +
    "sys_context('userenv', 'server_host'), " +
    "sys_context('userenv', 'service_name') " +
    "from dual";

    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(sql);
    while (rset.next())
    {
    System.out.println
    ("Connection #" + i + " : instance[" + rset.getString(1) + "], host[" +
    rset.getString(2) + "], service[" + rset.getString(3) + "]");
    }

    stmt.close();
    rset.close();
    }

    public static void main(String[] args)
    {
    LoadBalanceTest loadBalanceTest;
    try
    {
    System.out.println("Test Started at " + new Date());
    loadBalanceTest = new LoadBalanceTest();
    loadBalanceTest.run();
    System.out.println("Test Ended at " + new Date());
    }
    catch (SQLException e)
    {
    e.printStackTrace();
    System.exit(1);
    }
    }
    }

    http://feeds.feedburner.com/TheBlasFromPas

    Posted on 8 February 2010 | 3:05 am

    Opera 10

    www.opera.com/browser

    0pera has long been the most innovative of the big web browsers. The latest release introduces yet more new features and the software's rendering engine has been optimized to make it much faster at loading JavaScript-heavy sites such as Google Mail and Facebook. It's also had a stylish makeover from British designer Jon Hicks (creator of the Firefox logo). There are two versions of Opera available: the standard one and a Labs release which contains Unite, an add-on designed to transform Opera into a web server. This experimental edition is available to download from http://unite.opera com but for now we'll concentrate on the main browser.



    BROWSE THE WEB WITH OPERA
    Often overlooked, Opera is actually one of the top browsers for speed and features. Here are some highlights

    It's now a standard feature in most browsers but Speed Dial made its debut in Opera. It displays your most frequently accessed sites as thumbnails on any new tab. Click a blank square to add a site. 1 The Configure Speed Dial 2 link lets you add a background and change the number of sites on display.

    One of the most noticeable changes in Opera 10 is the addition of a resizable tab bar. Click and drag the handle 1 downwards and thumbnails of the open sites will appear above their respective tabs. Hovering your mouse over a tab will display a larger thumbnail of the site.

    Opera supports widgets. To add some, go to Widgets, 1 Add Widgets and browse the selection. When you find one you like, click Launch. You'll be asked if you want to keep it or not. Widgets float above all windows, not just your browser, and can be toggled on and off (individually) from the Taskbar.

    Opera Mail is a combined email client/newsreader. To use it, go to Tools, 1 'Mail and Chat Accounts'. Choose the type of account you want 2 and follow the set-up instructions. When you've finished, a Mail menu 3 and Mail panel 4 will appear. Opera 10 also offers separate integrated support for webmail.

    You can download BitTorrent files directly in the browser using the program of your choice - Opera is the default. 1 Click the preferences button 2 to adjust the upload/download speeds and change the listen port. 4 Use the search box to search for BitTorrent files. Click the link to download a file.

    Opera lets you subscribe to feeds using any feed reader. Click the RSS button in the address bar and the feed will be laid out across a page. Select a feed reader from the drop down menu. The default is Opera Mail but other options include Bloglines and Google Reader. Click the button to subscribe.

    Opera is very standards-compliant but, if a website won't display properly, you can pretend you're using IE or Firefox. Go to Tools, Quick Preferences, Edit Site Preferences. Click the Network tab. 1 In the identification box, choose a browser to identify 2 or masquerade as. Click OK and then reload the page.

    The Opera Turbo feature uses compression technology to speed up page loading on a slow connection. To activate it, click the Turbo button 1 at the bottom of the screen. However, it's not designed to run on a speedy broadband connection and may reduce the quality of web pages noticeably.

    Source of Information : Ultimate PC and Web Workshops Winter 2009

    Posted on 7 February 2010 | 6:53 pm

    Planetarium Software for Young Children in Ubuntu / Debian Linux : Stellarium


    Stellarium is a free open source planetarium Software for your computer. It shows a realistic sky in 3D, just like what you see with the naked eye, binoculars or a telescope.
    Features
    default catalogue of over 600,000 stars extra catalogues with more than 210 million stars realistic Milky Way  Drawing of the 88 constellations with their names Drawing of more than 40 messiers objects (Orion, M31 etc..) very realistic atmosphere, sunrise and sunset the planets and their satellites a powerful zoom, time control telescope control eclipse simulation  Available in Windows, Mac and Linux Platform
    How to Install Stellarium in Ubuntu / Debian Linux
    Open a terminal
    $ sudo apt-get install Stellarium Or Use Synaptic Package Manager 

    Posted on 7 February 2010 | 5:00 pm

    Download Free MPlayer For Windows

    Window Media Player is used within the Windows. In Recent times, we covered the different media players as replacement of window Media Player like VLC, FLY, window Lite Media. Today, we bring another powerful replacement of window media Player MPlayer for Windows users. MPlayer is open source and freeware app that designed for recent all types of Video and AudioCodecs.


    Features of MPlayer
    Mplayer is simply interface and award winning opensource media playerSelf-contained "all-in-one" installer (made with NSIS)More than 192 Video- und 85 Audiocodecs supported natively
    Latest optimized MPlayer builds by Celtic DruidImproved version of MPUI front-end (compiled with Delphi7 Professional)Binary Codec Package for Windows (included in Full-Package only)Full multi-language Unicode support (more than 20 languages to choose)Optimized builds for: Athlon-XP, Athlon-64, Core 2, Pentium-4, Pentium-4 Precott, Pemtium-MGeneric build that runs on all CPUs (Runtime Detection)Download Free MPlayer

    Posted on 7 February 2010 | 3:42 am

    Most useful things on the Internet

    Few days ago I was thinking about how we lived our lives before Internet came along and how many changes Internet brought, especially in the last 10 years or so. Do you remember the good old times? We used to go out more and play games there instead on our PCs and game consoles, we used to write [...]

    Posted on 6 February 2010 | 5:11 am

    Design patterns : Builder

    The purpose of a builder is to separate the construction process of a complex object from its representation so that the same construction process can be used to create different representations. The participating actors are a "director" which interprets the information and invokes the "builder" to get the object built. The builder creates parts of a complex object each time it is called and

    Posted on 5 February 2010 | 12:49 pm

    New Twitter Friends Followers version

    Today I have released  version 2.0 for my Twitter Friends and Twitter Followers Joomla! 1.5 Modules. I have removed some minor bugs and most of all I speeded up the cache usage. The cache usage is now much better and quicker. So your site will not be affected by loading the cache file anymore. Happy Downloading ! Twitter Friends Twitter [...]

    Posted on 5 February 2010 | 4:52 am

    Linux LUKS Crypt HOWTO

    Linux kernels now support encrypted filesystems. Setting one up should take 5 minutes, or 3 hours if you’re like me and can’t read. Firstly, install the right tools: apt-get install cryptsetup Make a new partition, and initialize it with: cryptsetup luksFormat /dev/sda3 mycrypto Where /dev/sda3 is your newly created partition and ‘mycrypto’ is your name for the [...]

    Posted on 4 February 2010 | 11:07 pm

    7 of the Best Free Linux Calculators

    One of the basic utilities supplied with any operating system is a desktop calculator. These are often simple utilities that are perfectly adequate for basic use. They typically include trigonometric functions, logarithms, factorials, parentheses and a memory function.
    However, the calculators featured in this article are significantly more sophisticated with the ability to process difficult mathematical functions, to plot graphs in 2D and 3D, and much more.
    The calculators also typically support the Reverse Polish notation (RPN). This is a prefix notation wherein every operator follows all of its operands. In other words, instead of pressing 6 + 8 and the enter key, in RPN you type in 6 8 +.

    Keep reading +Linux system administration and security

    Posted on 4 February 2010 | 12:09 pm

    The only valid measurement of code quality

    It’s either this way or no way to measure the quality of the code. With Special thanks to : ML and OsNews

    Posted on 4 February 2010 | 11:27 am

    How to get the query string value in perl cgi script

    In this tutorial we will see how to get the query string value using very simple perl CGI script. When we hit a URL from the web browser with a query string say http://mistonline.in/cgi/data.cgi?program=php In which program=php is the query passed.Now we will see how we get the same value using perl CGI script. Here is the code #!/usr/bin/perl #Script [...] Related posts:How to run a SQL query in phpMyAdminHow to run CGI or Perl Scripts in IBM Http Server [IHS] or Apache ServersSimple PHP Login Script

    Posted on 2 February 2010 | 9:46 pm

    KDE 4.4 RC3 is OUT!

    Upgrade in openSUSE11.2, read here.

    ANL

    Posted on 2 February 2010 | 3:42 am

    How to fix the Ctrl-Y Ctrl-Z inconsistency in GNOME Terminal with international keyboard layouts

    This blog post describes and fixes an inconsistency between some keys with or without Ctrl in GNOME Terminal with international keyboard layouts.

    In GNOME Terminal, with the Hungarian and German keyboard layouts the keys Y and Z are switched with respect to the US English layout. So when the national layout is active, one of the keys yields the string "z", but when the same key is pressed with Ctrl, it yields "^Y", instead of the expected "^Z". All other applications (e.g. GIMP, Firefox, xterm) work as expected, except for those using VTE (e.g. GNOME Terminal).

    Here is a script which fixes this on Ubuntu Hardy and Ubuntu Karmic:exec perl -we '
    use integer;
    use strict;
    my $fn = $ARGV[0];
    print STDERR "info: vtefix library filename: $fn\n";
    die "error: file not found: $fn\n" if !open F, "

    Posted on 1 February 2010 | 8:32 am

    openSUSE 11.3 Milestone 1 OUT NOW!

    Check out the details here.

    ANL

    Posted on 1 February 2010 | 4:06 am

    Linux Controlled Door Entry

    Having recently moved to a new apartment, one of the first things that I decided to do was build an RC entry system Here’s some pictures: The black box at the top is a simple Velleman RC control kit and the black box below is a 240VAC->12VDC regulated converter.  The Velleman RC receiver has [...]

    Posted on 31 January 2010 | 4:08 pm

    How to swap two nodes in a doubly linked list

    This blog post gives example C code how to swap two elements (nodes, items) of a doubly linked list. The code works for both circular and non-circular lists, even if the two arguments are the same, or if they are adjacent in the list. (It is surprisingly complicated to give a correct and elegant solution.)#include <stdlib.h> /* NULL */

    typedef int node_data_t; /* can be any other type as well */

    struct node {
    struct node* prev;
    struct node* next;
    node_data_t data;
    };

    /** If node1 and node2 are non-NULL members of a doubly-linked list
    * (circular or not), swap their data fields.
    */
    void swap_data(struct node* node1, struct node* node2) {
    node_data_t temp_data = node1->data;
    node1->data = node2->data;
    node2->data = temp_data;
    }

    /** If node1 and node2 are non-NULL members of a doubly-linked list
    * (circular or not), swap their data fields. If node1 or node2 is the head
    * of the non-circular list, return the new head.
    */
    struct node* swap(struct node* node1, struct node* node2) {
    struct node* temp;
    temp = node1->next;
    node1->next = node2->next;
    node2->next = temp;
    if (node1->next != NULL)
    node1->next->prev = node1;
    if (node2->next != NULL)
    node2->next->prev = node2;
    temp = node1->prev;
    node1->prev = node2->prev;
    node2->prev = temp;
    if (node1->prev != NULL)
    node1->prev->next = node1;
    if (node2->prev == NULL)
    return node2;
    node2->prev->next = node2;
    return node1;
    }

    The code above is based on the discussion at http://bytes.com/topic/c/answers/219236-double-linked-list-elements-swap

    swap_node is simpler, and it's also faster if the data is small (i.e. at most 2 pointers). However, swap_node cannot be used when there are external pointers inside the data.

    Posted on 31 January 2010 | 10:38 am

    Unix - delete file with hyphen at beginning

    Accidentally one of my script created a file named '-1264924755.done' (i.e. filename starting with a hyphen).

    When I tried to remove this file:

    $ rm -1264924755.done

    rm: invalid option -- 1
    Try `rm ./-1264924755.done' to remove the file `-1264924755.done'.
    Try `rm --help' for more information.

    This is because the command line parser treats the filename as a command line switch (because of the hyphen). So commands like mv, rm etc treats the file name itself as a parameter(option) to the command.

    The ways to delete such files:

    1) Referencing the filename to the command via its path location (so that the special character is not the first character after the white space)


    $ rm ./-1264924755.done

    or

    $ rm ~/work/temptest/-1264924755.done

    2) A special way:

    $ rm -- -1264924755.done

    Related posts:

    - Find last modified directory in UNIX
    - Grep and print control character characters in UNIX
    - Find process running time in UNIX
    - Bash - save command in history without executing it
    - Display file permissions in octal in UNIX

    Posted on 31 January 2010 | 8:15 am

    Open source in 2010

    Is 2010 the "year of open source"? Probably not, but by the end of the year expect to see open source software everywhere. 

    Mobile Linux


    2010 is going to be a huge year for open source software (OSS) in the mobile sector and we can expect to see OSS appearing on everything from mobile phones to netbooks to tablets.
    Of course, thanks mostly to the open source Symbian operating system, open source is already the dominant player on mobile phones, despite the disproportional hype given to proprietary systems such as Apple's iPhone and RIM's Blackberry. But Nokia hasn't done a particularly good job of promoting Symbian's openness since it acquired it in 2008.
    Google, on the other hand, has done wonders with its Android OS which is now right up there with the likes of the iPhone and is getting better all the time. Android will, without a doubt, be in the headlines throughout the coming year as Google takes other mobile makers on head-to-head.


    + Keep reading...
    Linux system administration and security

    Posted on 27 January 2010 | 10:46 am

    Sed - save changes to same file

    Sed receives text input, either from stdin or from a file, performs certain operations on specified lines(or all lines) of the input, one line at a time, then outputs the result to stdout or to a file. Today I am going to show how we can use sed to do some operation on a file (mainly substitute, which is the most popular with sed) and write back the results to the same file.

    Input file:

    $ cat file.txt
    port:9903
    os-version:VERSION
    codename:hardy
    status:active

    Lets try to replace the word 'VERSION' in the above file with '8.04'

    $ sed 's/VERSION/8.04/' file.txt
    port:9903
    os-version:8.04
    codename:hardy
    status:active

    So, be default sed outputs the result to 'stdout'.

    Append or redirection to the same filename will be wrong !!

    $ sed 's/VERSION/8.04/' file.txt > file.txt


    Newer sed versions (e.g sed version 4.1.4), there is a useful command line option:

    -i[SUFFIX], --in-place[=SUFFIX]

    Description: edit files in place (makes backup if extension supplied)

    Lets try this option:

    $ cat file.txt
    port:9903
    os-version:VERSION
    codename:hardy
    status:active

    $ sed -i 's/VERSION/8.04/' file.txt

    $ cat file.txt
    port:9903
    os-version:8.04
    codename:hardy
    status:active

    It worked; the result is printed to the same filename.

    We can also mention the backup extension like this:

    $ cat file.txt
    port:9903
    os-version:VERSION
    codename:hardy
    status:active

    $ sed -i.bak 's/VERSION/8.04/' file.txt

    $ cat file.txt
    port:9903
    os-version:8.04
    codename:hardy
    status:active

    The original content of the input file is backed up here:

    $ cat file.txt.bak
    port:9903
    os-version:VERSION
    codename:hardy
    status:active

    With older version of 'sed' editor (where this -i option is absent), we can write the result to a temporary file and then in the next step we can move the temporary file back to the original file like this:

    $ cat file.txt
    port:9903
    os-version:VERSION
    codename:hardy
    status:active

    $ sed 's/VERSION/8.04/' file.txt > file.txt.tmp
    $ mv file.txt.tmp file.txt

    And to work with more number of files (say perform the same replacement as above in all the .cfg files in current directory, including sub-directory)

    for file in $(find . -name "*.cfg")
    do
    echo "Replacing on : $file"
    sed 's/VERSION/8.04/' $file > $file.tmp
    mv $file.tmp $file
    echo "Replacement done on : $file"
    done

    Related posts:

    - Add Change Insert lines to file using sed
    - Substitute character by position using sed
    - Case insensitive search and replace using sed
    - Accessing external variables in sed and awk
    - Delete next few lines using sed

    Posted on 27 January 2010 | 3:17 am

    Helping Haiti: With Crystal of the International Medical Corps…

    It has been in the recent news the devastating twin earthquakes that mostly flattened Haiti. While the rest of the world stared with horror and shock many people has lost their home, their family, their near and dear ones in a few minutes of nature’s whims. Help poured in from all quarters and my friends [...]

    Posted on 25 January 2010 | 2:17 pm

    Upload Your Scripts For Free

    Hello visitors, I have now introduced a new option in Mistonline.in , My visitors can easily upload their own scripts or can share with me the URL of your website so that i can post your tutorials also in my website.All this  for Free , you dont even need to register.You have to just provide [...] Related posts:Simple file upload script using phpAdd to favorites or bookmarking using javascript in firefox and internet explore [IE]Secure PHP Scripts

    Posted on 24 January 2010 | 2:05 pm

    originalip option in dansguardian

    I upgraded my firewall on Mandriva 2009.1 to 2010 and got into problem with dansguardian. Client computers got DansGuardian 400 - Bad Request , url is malformed for certain sites such as google and facebook. I suspected it must be related to new option introduced by newly installed dansguardian (2.10.1.1). In changelog, I got this:


    Jan 21 17:18:39 firewall6 dansguardian[1090]: Destination host of dnl-15.geo.kaspersky.com did not match the original destination IP of 95.211.85.42
    Jan 21 17:18:40 firewall6 dansguardian[1111]: Destination host of www.google-analytics.com did not match the original destination IP of 72.14.213.113
    Jan 21 17:18:40 firewall6 dansguardian[1074]: Destination host of us.bc.yahoo.com did not match the original destination IP of 216.252.124.30
    Jan 21 17:18:40 firewall6 dansguardian[1072]: Destination host of dnl-11.geo.kaspersky.com did not match the original destination IP of 38.117.98.202
    Jan 21 17:18:41 firewall6 dansguardian[1091]: Destination host of dnl-04.geo.kaspersky.com did not match the original destination IP of 38.117.98.199
    Jan 21 17:18:42 firewall6 dansguardian[1083]: Destination host of dnl-07.geo.kaspersky.com did not match the original destination IP of 38.117.98.199
    Jan 21 17:18:42 firewall6 dansguardian[1116]: Destination host of newsrss.bbc.co.uk did not match the original destination IP of 212.58.226.73
    Jan 21 17:18:43 firewall6 dansguardian[1076]: Destination host of dnl-11.geo.kaspersky.com did not match the original destination IP of 38.117.98.202
    Jan 21 17:18:43 firewall6 dansguardian[1086]: Destination host of dnl-02.geo.kaspersky.com did not match the original destination IP of 38.117.98.196
    Jan 21 17:18:49 firewall6 dansguardian[1270]: Started sucessfully.


    After diff'ing between previous dansguardian.conf (currently in use) and the current version of the file (not in use). It turned out that originalip option was the culprit. It was on by default if it wasn't in there. To turn it off, I must tell it off as below:


    # Network Settings
    #
    # the IP that DansGuardian listens on. If left blank DansGuardian will
    # listen on all IPs. That would include all NICs, loopback, modem, etc.
    # Normally you would have your firewall protecting this, but if you want
    # you can limit it to a certain IP. To bind to multiple interfaces,
    # specify each IP on an individual filterip line.
    filterip = 192.168.6.6

    # the port that DansGuardian listens to.
    filterport = 8080

    # the ip of the proxy (default is the loopback - i.e. this server)
    proxyip = 127.0.0.1

    # the port DansGuardian connects to proxy on
    proxyport = 3128

    originalip = off

    This is what changelog says about originalip option:

    Fri 5th June 2009 - DansGuardian 2.10.1.1 - stable
    Add "originalip" option to dansguardian.conf, for determining the original destination IP in transparent proxy set-ups, and ensuring that the destination domain of the request resolves to that IP. This can help to address a particular transparent proxy security vulnerability (US-CERT VU#435052), but because of certain limitations - only implemented on Linux/Netfilter; potential breakage of websites using round-robin DNS - the code is not enabled by default. Enable by passing "--enable-orig-ip" to the configure script. Fix a crash which could occur when dealing with simultaneous incoming connections in configurations using more than one listening socket. Fix a crash when checking time limits on item lists. Fix potential usage of uninitialised memory during phrase filtering.

    Luckily, Mandriva package was built with --enable-orig-ip enabled.

    Cheers.

    Posted on 22 January 2010 | 3:19 am

    Extract Audio (.mp3) from Video Files Like .flv, .mov, .avi and Others with Ubuntu

    It is very easy to extract the audio track from video files using Linux. All you need is ffmpeg and some codecs. Let’s get started… Note: The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages. 1. Add the Medibuntu’s repository [...]

    Posted on 20 January 2010 | 8:49 pm

    Stripping comments from a file

    You can run this command to strip comments (line starting with a #) and empty lines from a file in Linux:

    cat /etc/squid/squid.conf | grep -v ^# | grep -v ^$
    I usually run this command on squid.conf, a file heavily commented.

    To save the lines to file squiD.conf, you can run:

    cat /etc/squid/squid.conf | grep -v ^# | grep -v ^$ > squiD.conf
    Have fun!...

    Posted on 20 January 2010 | 7:49 am

    Guest Post: Selecting a Linux Distribution

    If you are planning to learn the ways of using and operating Linux then you should try to gain proper knowledge about it. You must try to decide the type of version that you are planning to utilize, when it comes to Linux as your operating system. You should know the ways to choose the right [...]

    Posted on 14 January 2010 | 1:08 am

    Domain management on mobile

    It was pure delight to find out that GoDaddy — arguably the #1 domain registrar in the world — has an app for the iPhone / iPod touch. According to the App Store, it was posted late last year. Sometimes I get an inspiration for a domain name, and it’s now so much easier and [...]

    Posted on 12 January 2010 | 3:05 pm

    My Apostille Woes and Shashi Tharoor…

    My book was published this July and I got my first royalty statement soon after. My contract with Galileo Press was executed in the US and hence this required me to apply for a TIN to get the actual payment as well as claim tax exemption from the Indian Government. The process, it seemed, was [...]

    Posted on 8 January 2010 | 7:54 am

    How to Resume Partial File Transfers

    I work primarily with UNIX and Linux machines and scp is my main choice to transfer files with. It is both convenient, short and secure. Example: scp localfile user@remotecomputer:/path/to/target/dir Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%. I found a solution at joen.dk ,which uses rsync to [...]

    Posted on 8 January 2010 | 5:03 am

    Sabayon 5.1 Gamers Linux Screenshots

    I noticed that Sayaon 5.1 Gamers edition live DVD is available for download. Or you can buy Sabayon DVDs. I’ve used and reviewed the Gentoo-based Sabayon many times before and have been very impressed with the Live CD’s out-of-the-box functionality. I was quite excited to crack open Sabayon Linux 5.1 “Gaming” for obvious reasons. The Sabayon [...]

    Posted on 29 December 2009 | 12:13 am

    FAQ: How to install manual pages in Solaris?

    In order to use install man pages for various commands in Solaris it is necessary to get two packages: SUNWman and SUNWdoc. You can check if they are already installed using commands ‘pkginfo SUNWdoc' and 'pkginfo SUNWman', or just try ‘man man‘. If they are not present in your system you can install them from [...]

    Posted on 25 December 2009 | 12:47 pm

    Sexy Christmas Wallpapers

    Ho-ho-ho, see below a set of Sexy Christmas Wallpapers… Happy holidays! P.S. Previous hot post is here.

    Posted on 23 December 2009 | 7:01 am

    Banking with Facebook - Probably not the best idea ever

    Mike Bailey at Skeptikal.org wrote up last week about a new Facebook app called MyMoney. MyMoney is an application that according to its creators allows you to:

    Manage your finances right from your Facebook profile, simply and securely! MyMoney is an online home banking application that interacts with a variety of financial institutions, so you can view your account balances, transfer money between accounts, review histories, and much more.  

    Sounds kind of cool? Hold your horses. In a post dripping with sarcasm (letting you know in case your detector is a bit off) he says:

    I know you're thinking this is a bad idea, and are concerned about MyMoney's security. Don't worry, I checked it out. They have "multiple layers of security protecting...data and accounts." The application iframes you into their site (hosted on https://mm.galaxyplus.com). If you forget the URL, they left zone transfers enabled for you, so you can just select from a list of galaxyplus.com subdomains. The iframe's URL has a parameter called "fb_sig_user." If you manipulate this parameter, you get to see the contents of all your friends' accounts (presumably so you can borrow money without all that awkward asking). The only thing I don't like about this application is that they left error reporting on. I don't like seeing those ugly ASP stack traces every time I use an HTML tag as a form parameter. Lol!

    Note to readers: online banking should be done in a virtual machine if at all possible, and that is all that you should do with VM, nothing else. If that is too much of a hassle, at least download and install a browser like Firefox or Chrome and use that browser exclusively for your banking.

    If you'd like to read the entire (hilarious) post, click here. 

    Did you like this article? If you want to get more articles like it, please consider subscribing to the Bud Boy Tech RSS feed by clicking here.

     

     

    Posted on 11 December 2009 | 4:13 am

    Unbiased Motorola Droid Review

    Verizon Droid Smart PhoneIf you've been looking for a review of the Motorola Droid from the perspective of the average geek, check out a friend of mines review here. I worked with Andy at a previous company and he is both an excellent Network Administrator and writer, so I hope you enjoy it!

    Posted on 5 December 2009 | 4:56 am

    Issues With an Orphaned .attribute^ File

    We had intriguing problem related to a Unix-based directory. This directory was mapped to Windows via Citrix.

    On the Windows side, the initial thought was that the folder was simply "hidden" via the attributes, which would be normal. However, the attributes for the folder didn't show the hidden option selected.

    Recently, we performed an account migration activity on the Unix side. The culprit turn out to be an orphaned .attribute^ file on the Unix side. Apparently, this file's username and group was deleted prior to migration, and its state unexpectedly caused the directory's contents to be invisible to Windows-based viewers.

    At any rate, we finally noticed the file with the ls -al command. The .attribute^ file was removed from the Unix side and viewing was back to normal on the Windows side.

    Posted on 24 November 2009 | 10:38 am

    Start and Stop Tomcat from within the Eclipse IDE

    Starting and stopping Tomcat from within the Eclipse IDE, once set up, can speed up your Java Web Application development time because you won't have the extra step of opening the terminal to start and stop Tomcat. The following instructions assume you have Eclipse installed and Tomcat installed.

    Step 1: Open up the External Tools Configurations in Eclipse. In Eclipse's toolbar click on the little icon with a run symbol and the toolbox, then External Tools Configurations... .



    Step 2: In the dialog box that pops up, right-click on Program and select "New".



    Step 3: Give the new run configuration a name such as "Stop Tomcat", and in the "Location" text field enter "/Library/Tomcat/bin/shutdown.sh". You need to adjust the path of the shutdown.sh to match the file's location on your computer. Also, if you're using a Windows machine you need to call shutdown.bin instead. Click "Run".



    Step 4: Create another configuration for starting Tomcat be repeating steps 1 through 3.

    From now on, starting and stopping Tomcat as well as building your projects is accessible with a click of the mouse. Just click the little down-arrow next to that icon with a run symbol and the toolbox, and you'll see a list of the run configurations that you have set up.



    Piece of Cake!!

    Posted on 15 November 2009 | 8:20 pm

    Set Tomcat Memory Heap Size

    If your Java Web Application running on Tomcat ever crashes and throws the exception:

    SEVERE: Servlet.service() for servlet WebAppServlet threw exception
    java.lang.OutOfMemoryError: Java heap space

    , you need to increase the allocated memory that Tomcat has for running applications. This is accomplished by adding "-Xms256m -Xmx512m" to the catalina.sh file found in the "bin" directory of the Tomcat installation, where 256 and 512 should be replaced with appropriate values for your application. Xms mean starting heap size and Xmx means maximum heap size. I was able to increase the memory allocated to Tomcat on a Mac running Mac OS X Leopard with Tomcat 6.0.20 installed. These instructions should work for any *nix machine, but I can't guarantee it.

    Step 1: Open up the catalina.sh file with any text editor.

    Step 2: Search for "JAVA_OPTS=" in the file and in particular locate the following lines of code:


    if [ -z "$LOGGING_MANAGER" ]; then
    JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
    else
    JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
    fi


    Step 3: At the end of the JAVA_OPTS definitions add "-Xms256m -Xmx512m".


    if [ -z "$LOGGING_MANAGER" ]; then
    JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms256m -Xmx512m"
    else
    JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Xms256m -Xmx512m"
    fi


    Step 4: Save the file and restart Tomcat.


    Piece of Cake!!

    Posted on 15 November 2009 | 6:59 pm

    ftpconfig - Setup Anonymous FTP

    To setup an anonymous FTP account, you might consider using the ftpconfig script. It seems to be a lot easier to setup an anon FTP account with Solaris 10 than it was for Solaris 8. The anon users log in and then they are given restricted access to a mini-root filesystem.

    Here is the syntax.

    # ftpconfig someftpdir
    or
    # ftpconfig -d someftpdir

    If you have problems, you may have to check files in the /etc/ftpd directory. Hint: check the ftpaccess file

    Posted on 14 November 2009 | 1:18 am

    Introduction to Computer Vision with the OpenCV Library on Linux

    Author: Lubos Rendek

    Abstract The purpose of this document is to help a reader to get started with Computer Vision library OpenCV on Linux system. OpencCV is a multi-platform library, but this article will be focused only on OpenCV using Linux operating system ( although, just the installation of the OpenCV library and video camera is platform-specific, all examples in this article should compile on any platform where OpenCV is properly installed such as  Mac OS, MS Windows and etc.).  Reader will be guided through a step-by-step guide on how to install and use some of the basic functions of OpenCV library such as displaying images, playing a video or using a video camera to process a video input stream.

    Conventions used in this article:

    $ - execution on the command line by a non-privileged user# - execution on the command line by a superuserthe actual command to be executed on the command line or code of program to be compiled
    OUTPUT: output produced on the command line by command executionNOTE: general notes and additional informationIntroductionIn simple words a Computer Vision is a scientific field which attempts to provide a sight to the machine. This scientific field has expanded rapidly in recent years. Among researchers this growth is because of many improvements of vision algorithms and among the computer vision hobbyists this is due to the cheaper hardware components and processing power.  OpenCV library plays a great role in the Computer Vision field as it helps greatly to reduce cost and preparation time of computer vision research environment needed by university students, hobbyists and professionals. OpenCV also provides a simple to use functions to get the work done in a simple, effective and elegant manner.  OpenCV was started by Intel, and later it was transformed to an open source project now available on SourceForge.net. OpenCV library has multi-platform availability,  and it is partially written in C++ and C language. Despite the fact that this library is available on many Linux distributions from its relevant package repositories, in this article we will attempt to install and use OpenCV library compiled from a source code downloaded from SourceForge.net web site.


    The reasons for compiling a source code may include:
    new version 2.0.0 recently released and more features available
    some bugs fixed which affected Linux OpenCV 1.0.0 versions ( such as cvGetCaptureProperty() etc. )more support is available for OpenCV 2.0.0 version than for former 1.0.0 version

    This article will start with installation of OpenCV on Debian 5.0 ( Lenny ). Later a reader will be guided through a number of examples on how to use OpenCV to display an image, play a video and use camera to capture the video input stream.

    Posted on 10 November 2009 | 10:58 pm

    Traveling with my Globe T@ttoo

    I’ve been traveling around Mindanao these past few months and, to keep myself connected to the Internet I’ve been bringing along my Globe Tattoo broadband device. No matter where I am, and even if I’m on vacation, I can’t imagine not being able to connect to my email, social networking services, etc., so I don’t [...]

    Posted on 27 October 2009 | 12:36 pm

    Setting up and using memcached & memcache on Linux CentOS 5/Plesk 9

    The second part of my tutorial on optimizing your server for hosting high traffic websites: installing and configuring memcached and the memcache php extension for your server. This is a little easier than the first step (setting up nginx as reverse proxy, see article below) and can be applied to any kind of dynamic website.


    What's the point ?
    On highly dynamic websites such as forums, news sites or any user content based website, the database server load is often very high. The more traffic you get, the more cluttered your database server becomes, sometimes rendering your website completely unavailable to visitors. Using a data caching daemon will allow you to save some data in memory instead of fetching the data from the database every time. You should know that memcached is used by major websites such as Wikipedia, SourceForge, SlashDot... need I say more?

    What is memcached ?
    Memcached is the daemon running on your server. Its usage is extremely simple, there are no configuration files, all you do is start the daemon on a given port, and your websites will connect to this daemon to store data in memory. Yes, the data is stored in your RAM. So when starting memcached you'll have to decide how much RAM memcached will be allowed to use. If you start memcached with a 1GB memory space, memcached will store this much data; when the cache is full some of the older data will begin to disappear from the cache.

    What is memcache ?
    Memcache, in our case, is the PHP extension that will allow us to connect to and make use of Memcached. This PHP extension is not part of the default ones so you'll have to download and install it (see step 2). It provides classes as well as functions that I must admit are very easy to use and understandable. In this article, I provide a mysql+memcache wrapper class for anyone to use.

    What is the difference between memcached and memcache ?
    Well if you've read the two points above, you should already know. In short, memcached is the daemon running on your machine; memcache is the PHP extension allowing you to make use of memcached.


    1. Setting up memcached

    I haven't found memcached in my repositories (might aswell try # yum install memcached just in case?) so I'll download the source and compile it. First go get the latest version from the official website.
    # wget http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz
    # tar zxvf memcached-1.4.1.tar.gz
    # cd memcached-1.4.1
    # ./configure
    If like me you get this message "libevent is missing" or something, you can run this command:
    # yum install libevent-devel
    And then run configure again:
    # ./configure
    Install memcached:
    # make install
    That's it, you're set! That was pretty easy wasn't it? We'll now see the command line arguments for starting memcached:
    # memcached -d -m 1024 -l 127.0.0.1 -p 11211 -u nobody
    The arguments are:
    -d : start as daemon, running in the background
    -m 1024: allow memcached to use up to 1024 MB of RAM (1GB)
    -l 127.0.0.1: listen on local interface
    -p 11211: listen on port 11211
    -u nobody: run as user "nobody"

    If you're not sure how much memory you should allocate to memcached, try running this command first:
    # free
    It will tell you how much free RAM you've got left.
    Note that upon starting memcached, if all is OK, you will see no output message. To see if memcached is correctly started, run this command:
    # ps aux | grep memcached
    You should be seeing something like this:
    nobody   13133  0.0  0.0  43580   732 ?        Ssl  07:11   0:00 memcached -d -m 128 -l 127.0.0.1 -p 11211 -u nobody
    user     13143  0.0  0.0   4152   648 pts/0    R+   07:11   0:00 grep memcached



    2. Setting up memcache PHP extension
    The memcache PHP extension should be found in the classic repositories, so try this command:
    # yum install php-pecl-memcache
    If you're lucky (why should you be unlucky anyway?) the install will work fine and you'll be seeing these messages:
    Installed: php-pecl-memcache.i386 0:2.2.3-1.el5_2
    Dependency Installed: php-pear.noarch 1:1.4.9-4.el5.1
    Complete!
    Just for reference, here's a link to the official memcache website, if you need to grab the sources.

     Let's see if memcache was installed properly. First restart the httpd:
     # service httpd restart
    Then place a simple php file on your website containing the following code:
    phpinfo(); 
    Open the PHP file in your browser (eg. http://mydomain.com/phpinfo.php ) and have a look at the output. If you can find a "memcache" section looking like the following picture, it means memcache was successfully installed.

    We will now have a look at the memcache configuration file. First locate your php module configuration files folder, in my case /etc/php.d/ . You should find the newly installed "memcache.ini" configuration file. Open it up to see a list of configuration keys and their meaning.
    The default options are just fine, but if you're interested, you should know that memcache offers load-balancing features through the "allow_failover" configuration key. I'm not going to make use of this feature so I will not be editing any of the settings.


    3. Using memcache in your code
    Unfortunately, installing both components isn't enough. You'll have to edit your code in order to make use of the caching features. Be reassured though, it couldn't be easier! There are a couple of functions you'll need to use, nothing complex.
    If you want to find out the complete listing of the memcache php functions, visit the official website. Basically we'll be using 5 methods:
    - Memcache::connect($host, $port, $timeout): connect to your daemon
    - Memcache::get($key) : fetch data from your cache
    - Memcache::set($key, $var, $flag, $expire): store data in your cache
    - Memcache::delete($key): remove data from your cache
    - Memcache::close(): disconnect.

    You can cache any data that you want:
    $mc = new Memcache;
    $mc->connect("localhost", 11211);
    $saved_data = $mc->get("saved_data");
    if (!$saved_data) {
      $saved_data = file_get_contents("myfile.txt");
      $mc->set("saved_data", $saved_data, MEMCACHE_COMPRESSED, 60*60*24*7); // store for 7 days
    }
    echo $saved_data;
    $mc->close();

    Applied to MySQL queries:

    $mc = new Memcache;
    $mc->connect("localhost", 11211);
    $news_articles = $mc->get("news_articles");
    if (!$news_articles) {
      $news_articles = array();
      $query = "SELECT * FROM news_articles ORDER BY article_id DESC LIMIT 0,10";
      $result = mysql_query($query);
      while($row = mysql_fetch_assoc($result)) $news_articles[] = $row;
      $mc->set("news_articles", serialize($news_articles), MEMCACHE_COMPRESSED, 60*60*24*7); // store for 7 days, but don't forget to rebuild the cache when a new article is posted!
    } else {
      $news_articles = unserialize($news_articles);
    }
    // Display articles..
    $mc->close();
    As you can see in the example above, I use the "serialize" and "unserialize" php functions. Why is that? The reason is because the Memcache::get() function always returns a string. So if you want to store an array of data (or an object), you'll have to serialize said array, and unserialize it after having read it from the database.
    If you know a better workaround for this problem please feel free to leave a comment.


    4. Wrapper class for memcache & mysql
    I have just written a simple wrapper class for MySQL, making use of the powerful caching system offered by memcache. You can download the class here, I included a simple example for testing the class.
    The principle is very simple: when executing a query, the script will check if the query result is already in the cache. If the data is in the cache, it is returned immediatly (no query executed). if the data is not in the cache, the query is executed, and the results are then placed in the cache with the specified "time to live".

    Here are the wrapper class functions:
    function MySQLMemcache($mysql_info, $memcache_info, $autoconnect=true, $enable_logging=true);
    function connect();
    function disconnect();
    function dataQuery($query, $usecache=true, $ttl=0);
    function nonDataQuery($query);
    function fieldDataQuery($query, $field, $usecache=true, $ttl=0);

    More documentation is provided inside the actual php file.

    Thank you for reading, feel free to leave a comment if this article has been helpful to you.
    I'm finished with my server optimization thematic.
    TTFN!

    Posted on 30 September 2009 | 8:03 am

    Setting up nginx as reverse proxy on Linux Centos 5.2 (and Plesk 9)

    Following my blog article on optimizing your web server by using nginx and memcached, I'll now detail the first step: setting up nginx as reverse proxy on your server. This is going to be a bit tricky, and you'll be getting your hands dirty, so be warned.

    What does this consist in?
    Well basically, your website will be served by two daemons: nginx for the static content (images, js, css, html...) and Apache for the dynamic content. Nginx will be listening on port 80, will serve static content to visitors, and redirect any dynamic data query to Apache, running on another port -- in our case we'll be using port 8080.

    What is nginx?
    Nginx is a lightweight open-source http daemon (http server). It is said to be extremely fast, a lot more than Apache, and I have to admit by personal experience this seems to be very true. Using nginx for serving static content dramatically improved the speed of my high traffic website. Actually, some major websites such as Wordpress.com, *cough* Youporn.com, use nginx exclusively for serving web content.

    Major issues
    This configuration is a bit tricky and can be difficult to achieve particularly if you have numerous domains & subdomains. There are several issues with this configuration:
    1) I happen to be using Plesk 9 (admin control panel) for easy domain & subdomain management. Unfortunately it doesn't seem to be compatible with nginx at the moment, it only works with Apache. So we'll run into a few problems very soon.
    2) We'll have to work out the configuration files manually (including vhosts - virtual hosts configurations)  so be careful about what you're doing or you might run into annoying problems.
    3) Plesk rebuilds the virtual hosts configuration files every time you make the slightest change in the web configuration.

    Step 1: download and install nginx
    nginx requires the PCRE library. If it's not installed on your system, run the following command:
    # yum install pcre
    # yum install pcre-devel
    Try these libraries aswell just in case they aren't on your system already:
    # yum install zlib
    # yum install openssl
    # yum install openssl-devel
    # yum install gcc


    Visit the official nginx website (nginx.net) and find the latest version. From your shell, run this command:
    # wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
    Unzip the files with the following command
    # tar zxvf ./nginx-0.7.62.tar.gz
    Change directory to the nginx folder
    # cd nginx-0.7.62
    Run the following commands:
    # ./configure
    If you get no errors, you're all set, go on with the next couple of commands. If you get an error, try to make sure all the libraries are installed.
    # make
    # make install

    2. Nginx base configuration
    Congrats if you've made it this far! Now let's have a look at the base configuration of nginx. By default, the main configuration file should be found here: /usr/local/nginx/conf/nginx.conf or /etc/nginx/nginx.conf
    Open it up and we'll have a look at some of the settings:
    - worker_processes : the amount of processes that will be ran. In most architectures, 1 process = 1 core; so if you want to fully make use of your multi-core CPU, might aswell use as many processes as your CPU has cores. In my case my CPU's a quad-core, so I'll be using 4 worker processes.
    - worker_connections : how many connections a process will accepted simultaneously.
    For more configuration keys, I suggest having a look here ! Excellent article.
    If you can't be arsed, here's the configuration I'll use:
    - user apache apache; # might aswell use the same user and user group as apache! this will allow nginx to have read permissions on the same files as apache
    - #tcp_nopush on -- leave this commented.
    -  tcp_nodelay on; # to be inserted below #tcp_nopush on;

    - keepalive_timeout 30; # should be enough unless your site's really slow
    - gzip on; # yeah, why disable it? unless you have a really crappy CPU...
    - gzip_proxied any; # proxied requests will also be gzipped
    - gzip_comp_level 2; # set gzip compression to 2 (from 1-fast to 9-highly compressed)


    There isn't much more to configure here, so we'll start configuring Apache. But before doing so, there's one little additional configuration directive we'll add to nginx.conf, which will make handling virtual hosts a lot easier. In the nginx configuration folder, create a new folder: sites ( /usr/local/nginx/conf/sites/ ).
    In the configuration file, below the configuration directives you've put above, insert that new one:
    include /usr/local/nginx/conf/sites/*.conf; 

    3. Configuring Apache
    This is where it'll get dirty. If like me you run Plesk, you probably already have some vhost configuration files all over. You'll have to edit these configuration files one by one, after having modified the main conf file.

    - Open your main apache configuration file, probably located somewhere like: /etc/httpd/conf/httpd.conf. Find the "Listen" directive at the beginning of your configuration file. It's probably already set to listen on port 80, so change it to port 8080, and add the line below.
    Listen 8080
    NameVirtualHost X.X.X.X:8080
    Replace X.X.X.X by your actual server IP address. Save and close the file.

    - Open your vhosts configuration files one by one, we're going to make some changes. If like me you're using Plesk, the config files for each domain should be located here: /var/www/vhosts/mydomain.com/conf/httpd.include
    Replace all references of port 80 by 8080.
    Example:
    < VirtualHost 49.32.113.160:80 > => < VirtualHost 49.32.113.160:8080 >
    ServerName   mydomain.com:80  =>  ServerName   mydomain.com:8080
    Do the same for all domains and subdomains that use port 80. We can't allow Apache to use port 80 as it'll be used by nginx! No need to edit the 443 references though, we'll still use Apache for all our https content.

    - Once you've edited the configuration files of all your websites, reload your httpd service: service httpd restart.
    An error may (or may not) appear upon restarting: [warn] VirtualHost 49.32.113.160:8080 overlaps with VirtualHost 49.32.113.160:8080, the first has precedence, perhaps you need a NameVirtualHost directive.
    No need to worry, the fix is simple. Pick one of the vhosts configuration file. Find a vhost directive section such as this: , and add below: NameVirtualHost X.X.X.X:8080 where X.X.X.X is your server's IP address. Save the conf file and reload httpd.

    If your httpd reloads without warnings or error, you can proceed to the next section. Otherwise, read carefully the steps I've described above to see if you missed anything.
    You can test your changes by accessing your website on port 8080, for example: http://www.mydomain.com:8080/ . Your website should load, even though there might be some display errors due to the port change.

    Major issue: when you make any change to the web configuration in Plesk, Plesk rebuilds the vhosts configuration files, which means you'll have to make these changes every time you modify the configuration! There may be some way to prevent this, if you know any, please let me know by posting a comment, I'd be very grateful.

    4. Configuring nginx as reverse proxy

    So far, we've only installed nginx, and made Apache listen on port 8080 instead of 80. If you stop here, everything's pretty much broken. So read on.
    The next step is to configure nginx in order to redirect dynamic content requests to Apache, and return them to the user properly. Start by creating a new file in the nginx configuration folder (same folder as your nginx.conf). Name this file proxy.conf. In this file we'll define the proxy settings. I won't detail each of the settings, this would take ages and you might aswell use the settings below as they should be valid for most sites:
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;Credit: papygeek.com
    Paste the above lines in the proxy.conf file you've created. We'll be using this file to configure the proxy options in each of our virtual hosts. That's not all though, there is a problem introduced by the proxification of our architecture: how is Apache going to know the real client's IP address? Since nginx will forward the http requests, Apache will be receiving the nginx IP address, in other words, your local IP (your server's IP address). In order to fix this problem, an apache module was created: mod_rpaf.

    Begin by installing said module:
    # wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
    # tar zxvf mod_rpaf-0.6.tar.gz
    # cd mod_rpaf-0.6
    # make rpaf-2.0 && make install-2.0
    If you run apache2, replace "apxs" by "apxs2" in the command below. If apxs/2 isn't installed on your machine, run this command first: yum install httpd-devel
    # apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
    # a2enmod rpaf

    # service httpd restart


    5. Configuring the virtual hosts

    Let's now see the final part of this tutorial: configuring the virtual hosts for nginx. First go to your "sites" folder, which you created in the nginx configuration folder (default should be /usr/local/nginx/conf/sites/ ). We'll do this the clean way: for each domain hosted on your machine, create a new .conf file.

    Here is the configuration for the "mydomain.com" domain (and thus the content of your mydomain.conf) :
    server {
      listen      80;
      server_name www.mydomain.com;
      access_log      off; # Apache already creates access logs, I'd disable them unless you really need them
      error_log       /var/log/httpd/nginx.errors.mydomain.com.log warn; # error log, level "warn":
      # Forward requests to Apache! This is the key to our system
      location / {
        proxy_pass         http://www.mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }
      # Select files to be deserved by nginx
      location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/httpdocs; # the httpdocs folder of your domain
        expires           7d; # caching, expire after 7 days
      }
    }

    # same configuration, without the www.
    server {
      listen      80;
      server_name mydomain.com;
      access_log      off;
      error_log       /var/log/httpd/nginx.errors.mydomain.com.log warn;
      location / {
        proxy_pass         http://mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }
      location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/httpdocs;
        expires           7d;
      }
    }


    # subdomains! replace "mysubdomain" by your subdomain name

    server {
      listen      80;
      server_name mysubdomain.mydomain.com;

        access_log      off;
        error_log       /var/log/httpd/nginx.errors.mysubdomain.mydomain.com.log warn;
      location / {
        proxy_pass         http://mysubdomain.mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }

      location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/subdomains/mysubdomain/httpdocs; # httpdocs folder of your subdomain
        expires           7d;
      }
    }


    Feel free to copy the subdomain section as many times as you have subdomains.
    Try your nginx configuration by running the following command:
    # /usr/local/nginx/sbin/nginx -t
    You should be receiving this message, provided you've done it correctly:
    the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    configuration file /usr/local/nginx/conf/nginx.conf test is successful


    6. Setting nginx as service & startup
    I've written an init.d script for you to use. Nearly all the credit goes to Slicehost for writing the original Ubuntu one; the one I wrote is for CentOS, although it should work for other systems: download here. Unzip it and place it in your /etc/rc/init.d/ folder. If you have placed the nginx binary in a different folder, you'll have to open up the script and change the $DAEMON path. Give it execute permissions ( chmod +x /etc/rc/init.d/nginx ), after which you'll be able to use the following commands:
    Starting the server: # service nginx start
    Stopping the server: # service nginx stop
    Reloading the configuration: # service nginx reload
    Restarting the server: # service nginx restart

    If you wish, you can add the "service nginx start" command in the /etc/rc.local file, this will allow you service to be ran on startup.

    Well, I guess that's about it!
    The next article will deal with memcached, so stay tuned!
    Clem

    Posted on 29 September 2009 | 3:33 pm

    Strategie-online.nl – Online Strategie

    Het laatste nieuws op Online Strategisch gebied! Het hebben van een online strategie is tegenwoordig een veel gebruikte marketing term, maar wat houdt het nu in? Geinteresseerd in het laatste nieuws op Online Strategisch gebied? Wat is online strategie? Neem even een kijkje op www.stategie-online.nl of check de MaxServ Twitter http://www.strategie-online.nl

    Posted on 28 September 2009 | 2:27 pm

    C++ : Understanding pointers

    Author: Lubos Rendek

    Introduction

    This article is intended to all programing enthusiasts on all levels who do wish to understand pointers in C++ language.  All code presented here is not a compiler specific and all examples will be written in plain ANSI C++. Debate about pointers can stretch for miles, and you would need to go really far to master it all. If you really want to run that far, this article gives you a clear understanding of fundamental concepts about pointers and prepares you for that journey. However, those who are new to C++ programming make sure that  you are able to write and run your own C++ “hello world” program, and also it is recommended that you have a basic understanding of C++ functions and classes. If you need to refresh your knowledge about how to compile and run C++ program, use functions and classes, please read an appendix at the end of this document before you continue reading this article.

    What is a Pointer?

    Pointer is a variable that stores a memory address. OK, that is simple ! But, what is a memory address then? Every variable is located under unique location within a computer's memory and this unique location has its own unique address, the memory address. Normally, variables hold values such as 5 or “hello” and these values are stored under specific location within computer memory. However, pointer is a different beast, because it holds the memory address as its value and has an ability to “point” ( hence pointer ) to certain value within a memory, by use of its associated memory address.

    Retrieving a Variable's Memory Address

    OK, enough talking and let's get down to the pointer business. To retrieve a variable's memory address, we need to use address-of operator &.

    #include <iostream>
    int main()
    {
    using namespace std;
    // Declare an integer variable and initialize it with 99
    unsigned short int myInt = 99;
    // Print out value of myInt
    cout << myInt << endl;
    // Use address-of operator & to print out
    // a memory address of myInt
    cout << &myInt << endl;

    return 0;
    }

    OUTPUT:

    99
    0xbff26312

    The first line of the output contains an integer value 99 and on the second line, there is a memory address of myInt printed out. Please note that your output will be different.


    Assigning a Variable's Memory Address to a Pointer

    Before we can assign a memory address to a pointer, we need to declare one. Declaring a pointer in C++ is as simple as to declare any other variable with one single difference. Asterix symbol " * " needs to be add and located after variable type and before a variable name. One rule has to be followed when assigning memory address to a pointer: pointer type has to match with variable type it will point to. One exception is a pointer to void, which can handle different types of variables it will point to. To declare a pointer pMark of type unsigned short int a following syntax is to be used:

    #include <iostream>

    int main()
    {
    using namespace std;

    // Declare and initialize a pointer.
    unsigned short int * pPointer = 0;
    // Declare an integer variable and initialize it with 35698
    unsigned short int twoInt = 35698;
    // Declare an integer variable and initialize it with 77
    unsigned short int oneInt = 77;
    // Use address-of operator & to assign a memory address of twoInt to a pointer
    pPointer = &twoInt;
    // Pointer pPointer now holds a memory address of twoInt

    // Print out associated memory addresses and its values
    cout << "pPointer's memory address:\t\t" << &pPointer << endl;
    cout << "Integer's oneInt memory address:\t" << &oneInt << "\tInteger value:\t" << oneInt << endl;
    cout << "Integer's twoInt memory address:\t" << &twoInt << "\tInteger value:\t" << twoInt << endl;
    cout << "pPointer is pointing to memory address:\t" << pPointer << "\tInteger value:\t" << *pPointer << endl;

    return 0;
    }

    OUTPUT:

    pPointer's memory address: 0xbff43314
    Integer's oneInt memory address: 0xbff43318 Integer value: 77
    Integer's twoInt memory address: 0xbff4331a Integer value: 35698
    pPointer is pointing to memory address: 0xbff4331a Integer value: 35698

    The diagram above is a high level visual abstraction of how are variables stored within a computer memory. Pointer pPointer starts at memory address 0xbff43314 and takes 4 bytes. Pointer pPointer holds as a value a memory address of a short int twoInt ( 2 bytes ) which is 0xbff4331a. This address is stored as a binary data within a pointer's memory space allocation. Therefore, dereferencing a pointer with a memory address 0xbff4331a will indirectly access a value of twoInt which is in this case a positive integer 36698.

    Posted on 9 September 2009 | 8:44 pm

    Grant Remote Access To DB

    Here is a small tutorial if you want to grant remote access to a DB on your server. First login trough SSH on your server and get access to you mysql $mysqladmin -u XXX password  XXX Note: that db_user and db_passwd are your database username and database password GRANT ALL PRIVILEGES ON db_base.* TO db_user @’%’ IDENTIFIED BY ‘db_passwd’; You [...]

    Posted on 9 June 2009 | 1:37 pm

    Linux Learning Zone subsidiary of APNIC Solutions Ltd. (c) 2008