Tuesday, August 28, 2007


My IQ!!!

Just took a test.. 136.. not bad..

http://www.highiqsociety.org/iq_tests/
why??
Human mind..

Its really surprising how fast your mood can change.. just a couple of minutes ago, i was in a happy mood.. happy coz of a certain friend.. and thinking abt no one else but emma.. (yeah Emma Watson.. the Hermione of Harry Potter or should I rather say Hermione Weasley.. ) And just then she scraps me and am now all mad and angry at her.. thought its nothing much but it just shows how volatile the human nature / mood can be..?? Or is it just me..??!! Hey, but am also human rt..?? :O

Sunday, August 19, 2007

Memories n the future..

Got a mail from annie.. though it was just a notice/info mail sent to all her friends list but still it was a nice reminiscence from the back..

I have quit ,first as the president of RMI, the oncampus Robotics and machines Intelligence group, an affiliated group of IEEE, Institute of Electrical & Electronics Engineer and then left it in its entirety.. that is ceased to be its member either. That I did so a sto better manage my studies. But now I have taken up the managership of Pragyan 's CSG. Don't know how much of help and how much of hindrance its gonna be for my future. Hope am able to discharge my responsiblites well and to every one's satisfaction, including my parents, i.e, I get a decent enough GPA and a "good" enough job.

Talked to mimi after a very long period of time. I was having my reservations on that front as well, but with her I think I can let things go the way they are going.

Tuesday, August 14, 2007

Hari got placed with IBM today.. News like that brings smile to your face.. Hari has been the one person who has inspired me to learn the most.. and even though he might not even know that but hes one person whom am sure a hell lot of person take as an idol.. maybe including myself..
His soft spoken nature really inspires you .. and his modesty is one of its kind.. There are quite a lot of unspoken words within me, which, well.. err, will remain unspoken.. And knowing myself, it seems difficult that I ll be sharing quite of myself with anyone else..

Friday, August 10, 2007

Every time I see her, a sudden pulse races through me, or rather the right word would be , I miss a heartbeat. And the worst part is that its more as if I want to escape. I can call her up if I want but is it worth it? Maybe I am being a fool. But maybe being all by myself without really ever sharing myself is the best way I can do for myself.

Thursday, August 09, 2007

wikipedia installation is goiing on. Finally the things that worked for me is this..


importDump.php

MediaWiki 1.5 and above includes a command-line script 'importDump.php' which can be used to import an XML page dump into the database. This requires first configuring and installing MediaWiki. It's also VERY slow; to import a large Wikipedia data dump into a fresh database you may wish to use MWDumper, however, mwdumper has compatibility problems with some Linux Distributions and does not provide robust error reporting. Please see the installation notes concerning mwdumper for a list of known problems and systems affected by problems with mwdumper.

As an example invocation, when you have an XML file called temp.xml

 php maintenance\importDump.php < maintenance\temp.xml

As an example invocation, when you have an XML file called temp.xml with an output log and in the background:

 php maintenance\importDump.php <>& progress.log &

You can then display the log entries real time to the console screen by using the tail command. This command also allows you to break out of the program and reinvoke it periodically to check the status of your import:

 tail -f progress.log



For more on this topic visit the given link

Well one of my many "offline" blogs.. :)
I left my old blogs back at home in delhi.. but thats ok..

Wednesday, August 08, 2007

just read the blog on taggy's about the friendship day.. dont know why but had a lil moist eyes after I read it..
No....
even the way I said about installing directly through mwdumper didnt work.. :( seems like its back to first xml2sql and then into mysql...
Surprise, Surprise..
Suren's post is just a few days old.. but yet it comes as the first result on google when i search for Anshu Prateek. hmm.. time to switch to wordpress..?? Even though blogspot is now a google service, am a bit tempted to switch to wordpress especially after using their wordpress mu for the LAN.
busy yet ..
installing the fresh dump of wikipedia for the college LAN. After a few failures by using xml2sql,etc, Now am using mwdumper and directly putting the data into mysql. Here is one of the best pages that I found for installing wikipedia on a local computer. PS: Am working on Fedora 7. Windows user may find this useful. Other than this, there is also webaroo for windows. I have even tested this with windows Vista. The webaroo uses about 5.5 GB of disk space. Whereas the actual wikipedia dump for august is about 12 GB in xml format and 2.6 GB approx in bz2 format. The latest dumps can be downloaded from here. As to what you should download from there, read this.



Another important thing to be installed for wikipedia offline usage is mediawiki.


Here is an easy way of installing wikipedia for offline usage on a fedora based system..


Steps to get mwdumper to work on Redhat and Fedora Core Linux Distros with mysql 5.x

* 1. Destroy any existing database: i.e. mysqladmin drop -p (enter root db password)
* 2. Recreate the database: i.e. mysqladmin create -p (enter root db password)
* 3. DO NOT install MediaWiki until the database in uploaded. If MediaWiki is installed, mwdumper may not work.
* 3. Run the tables.sql function supplied with MediaWiki from the MediaWiki root directory: i.e. mysql -u root -p < maintenance/tables.sql
* 4. Start mwdumper: i.e. java -jar mwdumper.jar --format=sql:1.5 | mysql -u root -p
* 5. You will have to manually enter admin status for WikiSysop accounts and run the upgrade.php script on the MediaWiki database in order to obtain WikiSysop access or install over the previous MediaWiki installation and import the databases in order to activiate the WikiSysop account. Add the following MediaWiki PHP file to your /maintenance directory by cutting and pasting the text, and name the file createBcrat.php, then recreate the WikiSysop account by executing the example scripts provided. The attached PHP file is for the MediaWiki 1.9.3 release.

file createBcrat.php


/**
* Maintenance script to create an account and grant it administrator and bureaucrat group membership
*
* @package MediaWiki
* @subpackage Maintenance
* @author Rob Church
* @author Jeff Merkey
*/

require_once( 'commandLine.inc' );

if( !count( $args ) == 2 ) {
echo( "Please provide a username and password for the new account.\n" );
die( 1 );
}

$username = $args[0];
$password = $args[1];

echo( wfWikiID() . ": Creating and promoting User:{$username}..." );

# Validate username and check it doesn't exist
$user = User::newFromName( $username );
if( !is_object( $user ) ) {
echo( "invalid username.\n" );
die( 1 );
} elseif( 0 != $user->idForName() ) {
echo( "account exists.\n" );
$user->addGroup( 'sysop' );
$user->addGroup( 'bureaucrat' );
$ssu->doUpdate();
echo( "done.\n" );
die( 1 );
}

# Insert the account into the database
$user->addToDatabase();
$user->setPassword( $password );
$user->setToken();

# Promote user
$user->addGroup( 'sysop' );
$user->addGroup( 'bureaucrat' );

# Increment site_stats.ss_users
$ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 );
$ssu->doUpdate();

echo( "done.\n" );

?>

Steps to recreate WikiSysop and add the account to groups "sysop" and "bureaucrat"

from your MediaWiki root directory, enter the following commands:

php maintenance/createBcrat WikiSysop
php maintenance/changePassword --user=WikiSysop --password=

You may have to enter "password" twice in order for the account to work properly, which is why there is a call to "changePassword" after the account has been recreated and assigned sysop and bureacrat status.


mwdumper is not the correct tool if you want to maintain an existing wiki as it may not always work correctly if the MediaWiki databases have already been installed on the Fedora Core releases and may not provide useful output as to any errors occurring. Most of these problems are related to record and insertion rejection of SQL requests by the underlying MySQL database version you may be running. You may wish to test mwdumper with your particular OS distribution with a trial run to see if you encounter any of these problems. There are several fixes for some of these issues.

Known Problems

* mwdumper will fail with: ERROR 1153 (08S01) at line 2187: Got a packet bigger than 'max_allowed_packet' bytes if your dumps contain large sections of unicode characters with Cherokee Unicode and other unicode texts and in most cases does not work at all with these dumps, even with the defaults in mysql set to utf8. One solution to this problem is to increase the max packet (request) size which can be input into mysql via INSERT commands. Try changing set-variable = max_allowed_packet=20M in your /etc/my.conf file and restart the mysqld program.
* mwdumper does not report errors when uploading to a system with a database that is not freshly created.
* mwdumper may not always complete the dump, even though it is reporting that it is and even if you have followed all the procedures listed here. Due to the lack of proper error handling in the program, it may be better to just run importDump.php if you encounter problems with this tool.
* if you run into problems using mwdumper to input directly into mysql on a particular Linux Distribution or version of the mysql database, consider setting up mwdumper to convert the XML dumps into an intermediate .sql file then import the output file directly into mysql rather then allowing mwdumper to do so.
* try passing the '-f' switch (force) with mysql to force record insertions into your MySQL database if mysql starts rejecting updates from the mwdumper program or reports duplicate key errors.

Monday, August 06, 2007

A nice day..

Went to Madurai yesterday for organizing a quiz on behalf of IIM. Left hostel at 5.30 in the morning, IIM officials picked us up at 6. My friend Suman had come along. THere were in all four of us, the two of us and two IIM officials. Both of them work with BHEL. The second as a R&D person. Well the bus travel was a bit clumsy but thereafter it was all nice. The first thing that I noticed on getting off at the Madurai bus stand was that it was ISO certified. Wow..!! And here we are still thinking about getting the same for Pragyan. Anyways.. then we went off to the school where we were supposed to organize the quiz.. And then as there was still time left for the quiz to commence, we went off to the grandeur that Meenakshi Temple is. Its really huge. It was just the beginning of what was going to turn out to be as a real nice day. Saw quite a number of nice people.:) Anyways it was a nice day but the only thing that I didnt do and I am happy about is that we didnt exchange numbers.. Well that gives you n idea what the whole nice day was all about. Anyways, I had this feeling that maybe she wanted to exchange the numbers, and maybe aI would have had done so myself but eventually it never happened. And in the end am not so sad about it. Its better to have such small "happenings" to pep up your life rather than hoping for things that never turm up or happen the way you want them to. Or worse, cause you distress. It was a nice day. And at the end of it, I am a happy man!!

Saturday, August 04, 2007

Ok, just read one of my own posts again and that is so...^^*&^*..
Anyways I have quit as the president of RMI even before I actually had the job. Kinda funny, but thats true. I walked out of it coz I dont think I could handle the responsibility. Anyways, I have been feeling much lighter after that decision. Maybe am feeling lighter coz of the fact that I dont really need to work for that any more. Maybe am relaxed coz .. so many things happen...
Anyways..
And people around you arent always actually the way they are... Whatever that means.

Thursday, August 02, 2007

coming back to myself..
I am scared because of my GPA or rather the absense of it..
And aint I suppose to work for it..
Sitting out here in octa and slogging my ass out here . is it gonna help ?
Lets see..
Only me...
He he..
Just googled for my screenname "anshprat".. got two results only and both were actually mine only.. seems like am really one of a kind..!!

One was about my zorpia account and the other one was about my blog..

Wednesday, August 01, 2007

Hey, the senior just walked in, I told him about the wiki quote of google disk space.. and he said.. "LOLZ"
ok.. about the amount of petabytes that google has..
I didnt do much research befor I posted that blog.. I posted just because I felt so..
anyways on wikipedia, they say google uses just 2Petabytes as of 2006.. hmm..
My blog is becoming more like a scratch notepad for me.. i just put anything and everything that I find interesing.. and maybe thats what a blog is for...!!!

By the way, I just asked a senior of mine who did his internship with google, (he worked on orkut) about the estimated percentage of space/memory google has in all wrt to the internet thats open to public..
My guess was it would be something b/w 40% to 60% since google caches almost any and everything + its various services...
But the answer I got was baffling..
He said it would be number times over than the overall space in public domain on internet..
He wont give me the details as he couldnt coz the privacy/copyright or whatever issues.. but as far as I made a guess and as per what he said was partly right is that google never deletes anything that goes into their servers.. that means any draft you made on gmail whether you sent it or not, discarded it or not or emptied your trash or not is always there on the google servers.. its only that you dont have an access to it once you supposedly "delete" it.
Well I wont say or comment much on it.. but just guess what the privacy-rights people can make out of it in any piece of it was true. Any picture you ever uploaded, any status you ever put in you gtalk or gmail or orkut or anything you ever put through a google networked service or on any other service and if it was crawled by google, then atleast one copy of it is saved on the google servers for god knows how long. even if you supposedly remove it from the public domain, its always there somewhere hidden in the deeper realms of the google guys. What they do or can do with it is anybody's guess..

By the way from the same senior, google crawlers crawl about a few petabytes of data every WEEK..
Btw, 1 Petabyte == 10^6 GB.
So its anybodys guess how much is their disk storage considering google started in sep 1998...
Do you know?

First 4 alphabets ( 'a', 'b', 'c' & 'd') which are quite commonly used; do not appear anywhere in the spellings of 1 to 99 !

(Letter 'd' comes for the first time in Hundred)

Letters 'a', 'b' & 'c' do not appear anywhere in the spellings of 1 to 999 !
(Letter 'a' comes for the first time in thousand)

Letters 'b' & 'c' do not appear anywhere in the spellings of 1 to 999,999,999 !
(Letter 'b' comes for the first time in Billion)

And Letter 'c' does not appear anywhere in the spellings of entire English Counting
Harry Potter..
I was surprised that all the harry potter books are easily available for download for free.. now thats sure shot piracy.. though I paid for the last book, I have also been reading only pirated books mostly so far.. But its time to change now..
Though I use linux a lot now a days I mostly use it as a user w/o knowing much of the intricacies involved. And mostly when I run into troubles, usually its either google or Hari who s there to give a helping hand. Here is something that he helped me with and which I gracefully flicked from his blog gee.. thanks Hari..


If you have set a root password, but forgot what it was, you can set a new password with the following procedure:

1. Take down the mysqld server by sending a kill (not kill -9) to the mysqld server. The pid is stored in a `.pid' file, which is normally in the MySQL database directory:

shell> kill `cat /mysql-data-directory/hostname.pid`

You must be either the Unix root user or the same user mysqld runs as to do this.
2. Restart mysqld with the --skip-grant-tables option.
3. Set a new password with the mysqladmin password command:

shell> mysqladmin -u root password 'mynewpassword'

4. Now you can either stop mysqld and restart it normally, or just load the privilege tables with:

shell> mysqladmin -h hostname flush-privileges

5. After this, you should be able to connect using the new password.

Alternatively, you can set the new password using the mysql client:

1. Take down and restart mysqld with the --skip-grant-tables option as described above.
2. Connect to the mysqld server with:

shell> mysql -u root mysql

3. Issue the following commands in the mysql client:

mysql> UPDATE user SET Password=PASSWORD('mynewpassword')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

4. After this, you should be able to connect using the new password.
5. You can now stop mysqld and restart it normally.
Nothing fixes a thing so intensely in the memory as the wish to forget it.
- Michel de Montaigne