/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `qs_Post` ( `id` int(11) NOT NULL AUTO_INCREMENT, `date` datetime NOT NULL, `title` varchar(255) NOT NULL, `alias` varchar(255) DEFAULT NULL, `content` mediumtext NOT NULL, `rawContent` mediumtext NOT NULL, `excerpt` text NOT NULL, `authorType` enum('admin','user') DEFAULT NULL, `authorId` int(11) DEFAULT NULL, `author` varchar(255) DEFAULT NULL, `idCategory` int(11) NOT NULL DEFAULT '0', `featured` enum('y','n') NOT NULL DEFAULT 'n', `password` varchar(255) DEFAULT NULL, `allowComment` enum('y','n') NOT NULL DEFAULT 'y', `metaKeywords` text, `metaDescription` text, `added` datetime NOT NULL, `changed` datetime NOT NULL, PRIMARY KEY (`id`), KEY `date` (`date`) ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `qs_Post` (`id`, `date`, `title`, `alias`, `content`, `rawContent`, `excerpt`, `authorType`, `authorId`, `author`, `idCategory`, `featured`, `password`, `allowComment`, `metaKeywords`, `metaDescription`, `added`, `changed`) VALUES (13,'2011-11-08 00:00:00','Trying Out dtrace, by Wim Coekaerts ','Trying-Out-dtrace-by-Wim-Coekaerts','
One of the things we talked about at Oracle Openworld, last week, was Dtrace for Oracle Linux. There\'s not been much information on it yet so I wanted to write up what you need to do to give it a go.
\r\nWe released a preview of Dtrace and we will provide updates as we include new features on an ongoing basis. The biggest project to implement is userspace tracing and many side projects to include and enhance various Dtrace providers in kernel. So it\'s not all there yet but it is going to continuously be enhanced with new updates.
\r\nDtrace is made available to Oracle Linux support subscribers and currently requires you to do the following...
\r\nRead more at Wim\'s Oracle blog
','One of the things we talked about at Oracle Openworld, last week, was Dtrace for Oracle Linux. There\'s not been much information on it yet so I wanted to write up what you need to do to give it a go.\r\nWe released a preview of Dtrace and we will provide updates as we include new features on an ongoing basis. The biggest project to implement is userspace tracing and many side projects to include and enhance various Dtrace providers in kernel. So it\'s not all there yet but it is going to continuously be enhanced with new updates.\r\nDtrace is made available to Oracle Linux support subscribers and currently requires you to do the following...\r\nRead more at Wim\'s Oracle blog','','user',21,'Vitalii Ternopilskyi',1,'y','','y','','','2011-11-10 09:51:20','2011-11-10 09:51:20'),(11,'2011-11-10 00:00:00','Eric Schmidt: Microsoft Pushes Patent Deals Out Of Fear Of Android ','Eric-Schmidt-Microsoft-Pushes-Patent-Deals-Out-Of-Fear-Of-Android','Microsoft may be preparing for a big Mango push here in the States, but the Wall Street Journal reports that Google CEO Eric Schmidt recently took them to task at a press conference for claiming that Android devices infringe Microsoft-owned patents.
\r\n
The new release of the Live Linux distribution updates its underlying OS and includes an new version of the GNOME Partition Editor; this adds support for resizing partitions that use the Btrfs file system
\r\nIn the first part of this series, we studied how to implement and use a server-side proxy to contact a remote service, and how to use the Google Web Toolkit (GWT) to process the XML results from the Google Geocoding API.
','In the first part of this series, we studied how to implement and use a server-side proxy to contact a remote service, and how to use the Google Web Toolkit (GWT) to process the XML results from the Google Geocoding API.','','user',21,'Vitalii Ternopilskyi',1,'y','','y','','','2011-11-10 09:48:17','2011-11-10 09:50:46'),(9,'2011-10-30 00:00:00','How to generate random password like WordPress using PHP?','How-to-generate-random-password-like-WordPress-using-PHP','WordPress Blogging Engine is a champion in a lot of way. One of the unique thing which you might have noticed is the random password generated by the wordpress, in case you try to generate a new password. Here are a few examples:
\r\nj0LH(WM9b_-q
\r\nwr^sqct1cmff
\r\n)P4-e531#-aL
\r\n
\r\nLets have a look at the code which can generate such random passwords for us. Later on we will dig deep into the code to understand each and every bit of it:
\r\n
<?php
\r\n
\r\n class utility {
\r\n
\r\n static $random = \'\';
\r\n
\r\n // generates a random password
\r\n // By default of length 12 having special characters
\r\n static function generate_password($length = 12, $special_chars=true) {
\r\n $chars = \'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\';
\r\n if($special_chars) $chars .= \'!@#$%^&*_-()\';
\r\n
\r\n $password = \'\';
\r\n for($i=0; $i<$length; $i++)
\r\n $password .= substr($chars, self::generate_random_number(0, strlen($chars)-1), 1);
\r\n return $password;
\r\n }
\r\n
\r\n // generates a random number between $min and $max
\r\n static function generate_random_number($min=0, $max=0) {
\r\n // generate seed. TO-DO: Look for a better seed value everytime
\r\n $seed = mt_rand();
\r\n
\r\n // generate $random
\r\n // special thing about random is that it is 32(md5) + 40(sha1) + 40(sha1) = 112 long
\r\n // hence if we cut the 1st 8 characters everytime, we can get upto 14 random numbers
\r\n // each time the length of $random decreases and when it is less than 8, new 112 long $random is generated
\r\n if(strlen(self::$random) < 8 ) {
\r\n self::$random = md5(uniqid(microtime().mt_rand(), true).$seed);
\r\n self::$random .= sha1(self::$random);
\r\n self::$random .= sha1(self::$random.$seed);
\r\n }
\r\n
\r\n // take first 8 characters
\r\n $value = substr(self::$random, 0, 8);
\r\n
\r\n // strip first 8 character, leaving remainder for next call
\r\n self::$random = substr(self::$random, 8);
\r\n
\r\n $value = abs(hexdec($value));
\r\n // Reduce the value to be within the min - max range. 4294967295 = 0xffffffff = max random number
\r\n if($max != 0) $value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
\r\n return abs(intval($value));
\r\n }
\r\n
\r\n }
\r\n
\r\n // print new random password
\r\n echo utility::generate_password();
\r\n
\r\n?>
\r\n
Lets dig into the code
\r\nstatic function generate_password($length=12, $special_chars=true) is a static method of our utility class. It accepts two parameters. $length who’s default value is 12 and $special_chars who’s default value is true. By turning on $special_chars, our random generated password will include characters like !@#$%^&*_-()
\r\n
\r\nstatic function generate_random_number($min=0, $max=0) is yet another static function of the utility class. It generates random number between $min and $max, the two parameters which can be passed. Default value for both is 0. However internally, generate_random_number() do a lot of trick to get us some really random numbers.
\r\n
\r\nAlgorithm
\r\ngenerate_random_number() works with following variables:
\r\n$seed: which is equal to mt_rand()
\r\nself::$random is a static variable. To start with this variable equals to ” (nothing). generate_random_number() checks for the length of self::$random. If its length is < 8, it generates a new 112 character long random value (see the code above) and assign it to self::$random. From here on, every time a random number is requested, it uses a chunks of 8 characters from the starting of self::$random, which is then used to generate a random number (see the code above). After each iteration length of self::$random decreases by 8. Because self::$random is 112 characters long, we can use it 14 times to get a random number (14x8 = 112).
\r\n$value is the actual 8 digit character extracted from the starting of self::$random, which is later on processed to generate a random number between $min and $max values.
1 Preliminary Note
\r\n
\r\nTo fully replace a Windows desktop, I want the Kubuntu desktop to have the following software installed:
\r\nGraphics:
\r\nThe GIMP - free software replacement for Adobe Photoshop
\r\nShotwell Photo Manager - full-featured personal photo management application
\r\nGoogle Picasa - application for organizing and editing digital photos
\r\nInternet:
\r\nFirefox
\r\nOpera
\r\nChromium - Google\'s open-source browser
\r\nFlash Player 10
\r\nFileZilla - multithreaded FTP client
\r\nThunderbird - email and news client
\r\nEvolution - combines e-mail, calendar, address book, and task list management functions
\r\naMule - P2P file sharing application
\r\nKTorrent - Bittorrent client
\r\nVuze - Java Bittorrent client
\r\nKopete - multi-platform instant messaging client
\r\nSkype
\r\nGoogle Earth
\r\nQuassel IRC - IRC client
\r\nGwibber Social Client - open-source microblogging client (Twitter, Facebook, etc.)
\r\nOffice:
\r\nLibreOffice Writer - replacement for Microsoft Word
\r\nLibreOffice Calc - replacement for Microsoft Excel
\r\nAdobe Reader
\r\nGnuCash - double-entry book-keeping personal finance system, similar to Quicken
\r\nScribus - open source desktop publishing (DTP) application
\r\nSound & Video:
\r\nAmarok - audio player
\r\nAudacity - free, open source, cross platform digital audio editor
\r\nBanshee - audio player, can encode/decode various formats and synchronize music with Apple iPods
\r\nMPlayer - media player (video/audio), supports WMA
\r\nRhythmbox Music Player - audio player, similar to Apple\'s iTunes, with support for iPods
\r\ngtkPod - software similar to Apple\'s iTunes, supports iPod, iPod nano, iPod shuffle, iPod photo, and iPod mini
\r\nXMMS - audio player similar to Winamp
\r\ndvd::rip - full featured DVD copy program
\r\nKino - free digital video editor
\r\nSound Juicer CD Extractor - CD ripping tool, supports various audio codecs
\r\nVLC Media Player - media player (video/audio)
\r\nRealPlayer - media player (available for i386 systems only)
\r\nTotem - media player (video/audio)
\r\nXine - media player, supports various formats; can play DVDs
\r\nBrasero - CD/DVD burning program
\r\nK3B - CD/DVD burning program
\r\nMultimedia Codecs
\r\nProgramming:
\r\nKompoZer - WYSIWYG HTML editor, similar to Macromedia Dreamweaver, but not as feature-rich (yet)
\r\nBluefish - text editor, suitable for many programming and markup languages
\r\nEclipse - Extensible Tool Platform and Java IDE
\r\nOther:
\r\nVirtualBox OSE - lets you run your old Windows desktop as a virtual machine under your Linux desktop, so you don\'t have to entirely abandon Windows
\r\nTrueType fonts
\r\nJava
\r\nRead-/Write support for NTFS partitions
\r\ngDebi - package installer taking care of dependencies
\r\n
\r\nLots of our desired applications are available in the Ubuntu repositories, and some of these applications have been contributed by the Ubuntu community.
\r\n
\r\nAs you might have noticed, a few applications are redundant, for example there are two CD/DVD burning applications in my list (Brasero, K3B). If you know which one you like best, you obviously don\'t need to install the other applications, however if you like choice, then of course you can install both. The same goes for music players like Amarok, Banshee, Rhythmbox, XMMS or browsers (Firefox, Opera, Chromium).
\r\n
\r\nI will use the username howtoforge in this tutorial. Please replace it with your own username.
Lorem ipsum dolor sit amet, et eros diceret eam. Ex dico agam mea, salutandi splendide usu te, has harum saperet id. Pro velit alienum ex, cu mei omnium nostrud delenit. Ex quidam quodsi sed. Qui cu congue tation.
\r\n
\r\nIus an modus latine alienum, te alterum accumsan mei, prompta dolorem assentior ad mea. Odio affert expetendis has et, malis feugait cu quo. Ad graeco repudiare quo, latine oportere contentiones sea ne, mazim delenit debitis nam ea. Natum illum cotidieque ex duo. Simul singulis gubergren mei et, an justo paulo vix.
\r\n tan prep pali e, kin olin kute interj ma. ken e nasin nanpa. ale jo lipu conj pini, jaki insa sinpin kin tu. len kama mama e, kin o seme mute sinpin. o olin sona ale, li pana sama akesi ali. ken walo lawa sinpin en. ni kute ante ali, oth e kala kepeken, ijo n pimeja sinpin.
\r\n
\r\n poka awen monsi jan ko. ali seme pilin ko, sewi mani li mun. mod open nasa loje ko, oth suno toki suli n, noka pakala ijo e. ma taso nimi len. mama sona sewi len vt, pi uta pipi taso mute, ijo e unpa anpa insa.
\r\n
\r\n\r\n
\r\n','\r\n tan prep pali e, kin olin kute interj ma. ken e nasin nanpa. ale jo lipu conj pini, jaki insa sinpin kin tu. len kama mama e, kin o seme mute sinpin. o olin sona ale, li pana sama akesi ali. ken walo lawa sinpin en. ni kute ante ali, oth e kala kepeken, ijo n pimeja sinpin.\r\n \r\n poka awen monsi jan ko. ali seme pilin ko, sewi mani li mun. mod open nasa loje ko, oth suno toki suli n, noka pakala ijo e. ma taso nimi len. mama sona sewi len vt, pi uta pipi taso mute, ijo e unpa anpa insa.\r\n\r\n \r\n\r\n \r\n','tan prep pali e, kin olin kute interj ma. ken e nasin nanpa. ale jo lipu conj pini, jaki insa sinpin kin tu. len kama mama e, kin o seme mute sinpin. ','admin',42,'tester Sha',6,'n','','y','insurance','this is a test post about insurance','2011-11-24 10:10:53','2012-03-23 16:17:57');