Thursday, March 05, 2015

R: Appending rows to create new data (appending columns)

If you have a requirement of appending rows from different sources to create a new data row (for eg. Professor and Department he works in, to create an information snippet) here is the simplest trick, use cbind:

> profSharma<-professors(professors$Pid==3,)
> phyDepartment<-department(department$Did==19,)
> cbind(profSharma,phyDepartment)
Happy Programming!

Friday, February 27, 2015

R: Removing columns from a Dataset

If you need to remove certain columns from your dataset, you can do it the following way:

> iris[1:5,]
  Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1          5.1         3.5          1.4         0.2  setosa
2          4.9         3.0          1.4         0.2  setosa
3          4.7         3.2          1.3         0.2  setosa
4          4.6         3.1          1.5         0.2  setosa
5          5.0         3.6          1.4         0.2  setosa
> iris[,-5][1:5,]
  Sepal.Length Sepal.Width Petal.Length Petal.Width
1          5.1         3.5          1.4         0.2
2          4.9         3.0          1.4         0.2
3          4.7         3.2          1.3         0.2
4          4.6         3.1          1.5         0.2
5          5.0         3.6          1.4         0.2
> 

Monday, February 16, 2015

R : Using grepl

Sometimes the need is for selecting and displaying all columns of a dataset except for 1 or 2 columns.
Identifying the columns by index no may not always be possible. If the data is correctly labelled and column names are aptly named, then using index number hinders the code readability. To overcome such scenario use the following code:

 > studentData <- data.frame(ID=paste0("Student",1:50),
+                           Math=sample(100,50),
+                           Science=sample(100,50),
+                           History=sample(100,50),
+                           Final=sample(100,50))
> studentData
          ID Math Science History Final
1   Student1   15      78      41    93
2   Student2   85      46      52    75
3   Student3   10      12      17    99.....

> studentData[,!grepl("ID",colnames(studentData))]
   Math Science History Final
1    15      78      41    93
2    85      46      52    75
3    10      12      17    99...
Happy programming!!

Wednesday, February 11, 2015

R: Initializing an empty list

If you are new to R, there is a thick chance that you may want to grow your dataset (dataframe) dynamically. As we all in know that dynamic memory allocation is a tricky business and in R it is more so.

In R, dynamically allocated memory in loops and function affects the performance of the system(program). A vector object’s growth in each iteration of a loop takes its own time for the loop to complete, which decreases the program speed.
The best solution to get rid of such speed issues is to predefined size of vector and fill it up with the values inside for loop, whenever possible.

For example:
>emptyData <- rep(NA, 100000)
>emptyData <- rep(1:100)
>emptyData <- rep(1:10, times=3)
Happy programming!

Tuesday, February 10, 2015

R : Reading data from CSV file

To read data from a csv file, you can use the use the read.table function in R:

> myData <- read.table("C:/Downloads/R_Tutorial/18MarchStudentInfo.csv", header=TRUE, sep=",")
The above command assumes your csv file has a header field at the begining of the file describing the column names. If your CSV does not contain a row describing the column names you can use it as :

> mydata <- read.table("C:/Downloads/R_Tutorial/18MarchStudentInfo.csv", header=FALSE, sep=",")
Change sep field appropriately depending on your column delimiter in your CSV

Wednesday, January 21, 2015

R : Beginners Guide

If you are starting with the R language and want to know the basics, here is good link which I came across.  Here you can start with understanding the basic types, assignments, functions:

http://www.johndcook.com/blog/r_language_for_programmers/

Happy Programming!!

Thursday, January 15, 2015

Zipping file and folders in Linux CentOS Fedora

To zip a file (or multiple files) in a zip (compressed format for distribution, saving disk space or emailing as attachment), you can use the zip utility present in allmost all the linux distros.

To check if you have zip installed on your machine type
# zip -h

if it is not present, it can be installed via yum Hence the task
# yum install zip
# yum install unzip
Or if you prefer apt over yum then run the following commands:
# apt-get install zip
# apt-get install unzip
Next you can zip files by running the following command. No need to add .zip file extension as it will be added by the zip utility:
$ zip myZip_FileName *
To compress a directory (and all sub-directories within it) run:
$  zip -r myZipped_FolderName *
To decompress (or deflate or unzip) the zip simply run the following command from your command prompt:

$ unzip  zippedFile.zip
To simply view the contents of a zip and not actually unzip it run:

$ unzip -tq zippedFile.zip
To unzip the contents of a zip in a new directory (for avoiding clutter and confusion) run:
$ unzip zippedFile.zip  -d /Folder_to_Unpack_into




Thursday, December 18, 2014

Google introduces Hindi ad Support

Google recently announced that AdWords now supports Hindi ads across the Google Display Network. From now on you can expect to see more ads in India's most spoken language.

What does this mean?

AdWords advertisers can now build campaigns reaching Hindi language sites on the Google Display Network using text, image, rich media, and video display ad formats.

Read more here.

Sunday, November 30, 2014

Debugging with GDB: Examining Call Stack and Call Stack Frames


If you are debugging a programming with gdb and want to see the call stack, and the call stack is really big (spanning the whole page), it makes sense to see only the top (innermost) 5-6 stack frames rather than the entire stack.


(gdb) backtrace
#0  0x00007ffff7bc2620 in thirdPartyFFTransform () from ./liblzo2.so
#1  0x00007ffff7108e43 in useMD5Checksum (karlCoef=0x7ffff2cd0ff0, ffCoef=0x7ffff2cd10c0) at ThirdParty/HardFFTrf.c:99
#2  0x00007ffff71091d5 in FastCheckSum (gamma=3426, delta=0x7ffff730e4c8 <acc_no> "x^2+5y  ", capillaryRise=0x7ffff2cd1120, 
    pCheckSumList=0x7ffff2cd10c0) at ThirdParty/HardFFTrf.c:152
#3  0x00007ffff7107349 in compute_fourier (gamma=40127, delta=0x7ffff2cd1120, CoefA=0x7ffff2cd123a) at ThirdPartyFF.c:1125
#4  0x0000000000491c6e in example::MathCalculator::FastFourierHelper::getCoefficient(FastFourier::Coefficient const*) ()
#5  0x0000000000492a44 in example::MathCalculator::FastFourierHelper::createFFDescriptor(std::vector<example::MathCalculator::ComputeIterationN*, std::allocator<example::MathCalculator::ComputeIterationN*> > const&, int) ()
#6  0x0000000000478767 in example::MathCalculator::FTransform::FTransform(example::MathCalculator::MessageQueue<example::MathCalculator::QMessg, 1024ul>*, example::MathCalculator::MessageQueue<example::MathCalculator::QueueMessage, 1024ul>*, std::vector<example::MathCalculator::ComputeIterationN*, std::allocator<example::MathCalculator::ComputeIterationN*> >&, example::MathCalculator::Accumulator*) ()
#7  0x0000000000474f23 in example::MathCalculator::MathEngine::createJobFactory(FastFourier::EquationDescription*) ()
#8  0x0000000000476856 in example::MathCalculator::MathEngine::processQueue() ()
#9  0x00000000004770b1 in example::MathCalculator::MathEngine::checkAssignments() ()
#10 0x00000000004a7d2e in example::MathCalculator::MathComputeEngine::Calculate() ()
#11 0x000000000046072c in example::MathCalculator::MMain::runMathLibThread(int) ()
#12 0x00007ffff7787b53 in thread_proxy () from ./libboost_thread.so.1.48.0
#13 0x00007ffff5ecadc5 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff63de73d in clone () from /lib64/libc.so.6
(gdb) 
(gdb) 
(gdb) bt 4
#0  0x00007ffff7bc2620 in thirdPartyFFTransform () from ./liblzo2.so
#1  0x00007ffff7108e43 in useMD5Checksum (karlCoef=0x7ffff2cd0ff0, ffCoef=0x7ffff2cd10c0) at ThirdParty/HardFFTrf.c:99
#2  0x00007ffff71091d5 in FastCheckSum (gamma=3426, delta=0x7ffff730e4c8 <acc_no> "x^2+5y  ", capillaryRise=0x7ffff2cd1120, 
    pCheckSumList=0x7ffff2cd10c0) at ThirdParty/HardFFTrf.c:152
#3  0x00007ffff7107349 in compute_fourier (gamma=40127, delta=0x7ffff2cd1120, CoefA=0x7ffff2cd123a) at ThirdPartyFF.c:1125
#4  0x0000000000491c6e in example::MathCalculator::FastFourierHelper::getCoefficient(FastFourier::Coefficient const*) ()
(gdb) 
(gdb) 
(gdb) bt -4
#11 0x000000000046072c in example::MathCalculator::MMain::runMathLibThread(int) ()
#12 0x00007ffff7787b53 in thread_proxy () from ./libboost_thread.so.1.48.0
#13 0x00007ffff5ecadc5 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff63de73d in clone () from /lib64/libc.so.6

Stack frames

Consider the following stack dump


(gdb) backtrace
#0  0x0000000000401449 in autoPtrExample (rm=3) at MultiUseHeader.hpp:81
#1  0x0000000000401254 in registerQuickExitHandlers (k=3, comment="called from main") at MultiUseHeader.hpp:66
#2  0x00000000004015aa in registeringExitHandlers () at samAutoPtr.cpp:22
#3  0x0000000000401610 in main () at samAutoPtr.cpp:30
(gdb) backtrace -2
#2  0x00000000004015aa in registeringExitHandlers () at samAutoPtr.cpp:22
#3  0x0000000000401610 in main () at samAutoPtr.cpp:30
(gdb) bt 2
#0  0x0000000000401449 in autoPtrExample (rm=3) at MultiUseHeader.hpp:81
#1  0x0000000000401254 in registerQuickExitHandlers (k=3, comment="called from main") at MultiUseHeader.hpp:66
(More stack frames follow...)

You can select your frame of interest using the frame command.


(gdb) frame 0
#0  0x0000000000401449 in autoPtrExample (rm=3) at MultiUseHeader.hpp:81
81  cout << "Printing Rollno: p " << m->roll << " q " << n->roll << "\n"; // <- Seg fault
(gdb) frame 1
#1  0x0000000000401254 in registerQuickExitHandlers (k=3, comment="called from main") at MultiUseHeader.hpp:66
66  autoPtrExample(3);
(gdb) 

Similarly to traverse one frame in either direction one at a time use the up/down command


(gdb) up
#2  0x00000000004015aa in registeringExitHandlers () at samAutoPtr.cpp:22
22  registerQuickExitHandlers(3, "called from main");
(gdb) up
#3  0x0000000000401610 in main () at samAutoPtr.cpp:30
30  registeringExitHandlers();
(gdb) up
Initial frame selected; you cannot go up.
(gdb) down
#2  0x00000000004015aa in registeringExitHandlers () at samAutoPtr.cpp:22
22  registerQuickExitHandlers(3, "called from main");
(gdb) down
#1  0x0000000000401254 in registerQuickExitHandlers (k=3, comment="called from main") at MultiUseHeader.hpp:66
66  autoPtrExample(3);
(gdb) down
#0  0x0000000000401449 in autoPtrExample (rm=3) at MultiUseHeader.hpp:81
81  cout << "Printing Rollno: p " << m->roll << " q " << n->roll << "\n"; // <- Seg fault
(gdb) down
Bottom (innermost) frame selected; you cannot go down.

To see the arguments passed in a particular frame use the info args command once the frame of interest is selected

(gdb) frame
#0  0x0000000000401449 in autoPtrExample (rm=3) at MultiUseHeader.hpp:81
81  cout << "Printing Rollno: p " << m->roll << " q " << n->roll << "\n"; // <- Seg fault
(gdb) up
#1  0x0000000000401254 in registerQuickExitHandlers (k=3, comment="called from main") at MultiUseHeader.hpp:66
66  autoPtrExample(3);
(gdb) info args
k = 3
comment = "called from main"
(gdb) 

To see the local arguments of the selected frame use the info locals command to print the variables:


(gdb) info locals
filename = "./StateWisePopulationRecord.csv"
(gdb) 

Sunday, October 26, 2014

Copying non null-terminated char array to String

Sometimes while listening to data on a network, the packet structure defined contains data members of type char[]. In most of the cases, the data in these char[] data members  will not be null terminated.

i.e.


structObj.charArray[8] = { 'p', 'a', 'r', 'a', 'g', ' ', ' ', ' ' };  
//see all 8 chars occupied, with no null termination at the end. 

 How do you read the object in your program. There are various ways, here's one:

#include <iostream>
#include <string>
#include <cassert>

#define ARRAY_SIZE(a) sizeof(a)/sizeof(a[0])
#define MAX_INPUT_ARR_SIZE 5
int main()
{
    char input[MAX_INPUT_ARR_SIZE] = { 'p', 'a', 'r', 'a', 'g' };
    
    const std::string output( input, ARRAY_SIZE(input) );
    std::cout << output << std::endl;
    //To check on the size 
    assert(output.length() == MAX_INPUT_ARR_SIZE);
    return 0;

}

Sunday, October 05, 2014

Clean untracked files in GIT repo

Sometimes you add some files/directory to your (local cloned) git repo directory. May be because you need them for testing or they are additional files required for reference
and it does not makes sense to add a particular directory/path in your .gitignore file. But then you want to clean those files.

git reset --hard HEAD ./<folder>
[parag@machine: Workdir] git reset --hard HEAD ./<foler>

does not work, as it does not clean with specific paths. You can do it via:


[parag@machine: Workdir] git clean -d -f

Wednesday, September 17, 2014

Performance Improvements in AWS SDK for .NET

Amazon recently released a new version of the AWS SDK for .NET which fixes some issues causing additional intermittent latency.  SDK versions 2.3.x.x and onwards contain the fix for this issue.

Sunday, September 14, 2014

Setting up Microsoft DPM for Backing Azure IAAS workload

Microsoft Data Protection Manager now supports backup of Microsoft Azure workloads on Azure platform. Here are some interesting things to note about the supported deployments:

  • DPM is supported on any Azure IaaS virtual machine that is size A2 or higher.
  • DPM can protect workloads that run across multiple Azure cloud services that have the same Azure virtual network and Azure subscription.
  • The number of disks that can be used for the target storage (DPM storage pool) is limited by the size of the virtual machine (maximum of 16). For more information about size limits, see Azure Virtual Machines.

Sunday, August 31, 2014

[Explained] pthread_mutex_destroy failed


If you ever run into the following error while running a multithreaded application in C++ application which makes use of mutex's for synchronization



networkDataShareSyncApp: /usr/local/include/boost/thread/pthread/mutex.hpp:47: 
boost::mutex::~mutex(): Assertion `!pthread_mutex_destroy(&m)' failed.
Aborted (core dumped)


gdb detailed stack trace for the same problem:

(gdb) bt
#0  0x00000034594328a5 in raise () from /lib64/libc.so.6
#1  0x0000003459434085 in abort () from /lib64/libc.so.6
#2  0x000000345942ba1e in __assert_fail_base () from /lib64/libc.so.6
#3  0x000000345942bae0 in __assert_fail () from /lib64/libc.so.6
#4  0x0000000000404391 in boost::mutex::~mutex (this=0x608e80, 
__in_chrg=<value optimized out>) at 
/usr/local/include/boost/thread/pthread/mutex.hpp:47
#5  0x0000003459435da2 in exit () from /lib64/libc.so.6
#6  0x000000345941ece4 in __libc_start_main () from /lib64/libc.so.6
#7  0x00000000004036a9 in _start ()
(gdb) 


Then the problem might be:
a) Either your main() thread/program is exiting without joining the threads, and one of the threads is still using/referencing to the mutex variable
b) You are trying to destroy/delete the mutex explicitly from one of your thread, while it is still being referenced/used from another thread. Attempting to destroy a locked mutex results in undefined behavior.

Source : https://linux.die.net/man/3/pthread_mutex_destroy.
Read more about an interesting discussion here.


Sunday, May 11, 2014

Quick and easy bash script to update config file values

We have a service which connects to a database and does its job. As part of company policy we update/change the password for the database every 90 days. Here is a quick and easy script to update the password in all the config files connecting to the database. 

#!/bin/sh

NEW_PASSWORD="P@ssw0rd!!"
SERVICE_HOME_DIR="/opt/services/LogService"
cd $SERVICE_HOME_DIR 

#Password in the config file in the form: Password=OldP@sswd!
current_password=`cat service.config |grep ^Password | awk {'print $1'} `

#echo "Current Password::" $current_password
#echo "New Password::" $NEW_PASSWORD

# sed used to replace the current password by new password in config file
sed -i 's/^Password=.*/Password='${NEW_PASSWORD}'/' service.config

echo "Password successfully changed !!"


Hope this helps. 

Sunday, June 17, 2012

[Resolved] Boost :: undefined reference to `boost::system::system_category()'

Ran into to a small compilation error today.
while compiling a program with the  boost::asio namespace, i got the following error:

/tmp/ccYz5ppN.o: In function `__static_initialization_and_destruction_0(int, int)':
CancelTimer.cpp:(.text+0x21a): undefined reference to `boost::system::generic_category()'
CancelTimer.cpp:(.text+0x226): undefined reference to `boost::system::generic_category()'
CancelTimer.cpp:(.text+0x232): undefined reference to `boost::system::system_category()'
/tmp/ccYz5ppN.o: In function `boost::system::error_code::error_code()':
CancelTimer.cpp:(.text._ZN5boost6system10error_codeC2Ev[_ZN5boost6system10error_codeC5Ev]+0x17): undefined reference to `boost::system::system_category()'

Well it turns out the boost::system::error_code::error_code() depends on the boost_system library.

So compiling with the -lboost_system linker flag to locate the symbols in library libboost_system.so solved the problem for me.
 

Sunday, December 03, 2006

Vi/Vim go to End/Beginning of line

If you want to go to the end of a large text file in your favourite vi/vim editor, you do this by pressing either (in Esc mode)

 G
or

:$
Similarly if you want to move to move to the beginning of the file, press :

gg
If you want to go to the 20-th line press :

20gg

Monday, June 12, 2006

What Ho .. OLD EGG??

IMPORTANT NOTE: THIS POST HAS BEEN WRITTEN IN THE P G WODEHOUSE'IAN STYLE. I HAVE PUT THE BEST OF MY ABILITIES TO MARK IT UP WITH THE GENIOUS OF THE CENTURY. A MUSICAL COMEDY AS THE WORD GOES AMONG THE FANS OF WODEHOUSE. DO READ IT AND PLZ POST UR COMMENTS AS TO HOW U FELT.

one wonders where this man all on the face of earth wanders when there are things bright and beautiful and of importance doing round the globe.

Paggi,as you know him is a man, who makes round here and there, with no special purpose on mind. There had been bright providential proceeding in the life lately. Though its a little late to bring notice to the fact that he has been appointed at M$ for his excellent academic and technical skills, We will drop on this matter of attention in later posts.

So what has brought this chap meandering to blogosphere. Well today has been one of those heteromorphic moments which one feels like sharing with the old pals ( internet surfies ).

This bright and bewitching morning when i was marching down the corrider of a pal of mine Hariveer bunged into me

"morning Paggi "
"morning Hariveer"
"coming for checking DWDM copies?"

DWDM (DATA WAREHOUSING AND DATA MINING) as some of you are aware, was taught in our 5 sem. The subject brings one down to the lane of memories where you catch glimpse of Paggi sitting at the end of the class 305, profoundly occupied in the work of the great P G WODEHOUSE. well leaving those distant memories far-flung lets jump back to the present.

Checking copies or lets say validating the scrutinizing work of the faculty, shudders me to the deep. One says what is the use of digging into the past mistakes and blunders, merely a waste of time. But one will agree, there are times when the old educator adds 5 and 5 to 8. So one should be at safe stand and prevent such follies which ulimately leads to retrenching of grade and SG and CG.

So i say " wait for me a min and i will join u"

Heading for the main building, and finally to the doors of the experienced guide. I dash to the end of the room where the answer scripts are placed in neat piles. Three seperate piles for the three assessments viz mid-sem1, mid-sem-2 and end sem. Having secured up to the mark in the mid sems, I had apparently done some mis-judging of the
end-sem Q paper. I mean a instructor should not go to the extend of asking practical implications of Data-warehousing and mining in real life. such devilish things ought to keept strictly to the academia. But no.

And then there are Qs asking for making minuscule transmutation of age-old algorithm and methods to solve a puzzle as to how to cluster web-pages in yahoo like hierarchy. Sinister, the whole prospect of this Q paper appeared to me.

One of my batchmate sumeet-jee as we call him with pure affection
"Paggi, you ass.. what brings u here? Tera Ekka to pakka hai naa saale"
"One can not be certain of such things unless the preacher of the subject gives you his words in writin on the stamp paper. Ones own future is in ones own hand...", a wise thought I imparted.

I return to matter of rechecking my marking. In one of the 10 mark Question I had been devoid of even a single number. I mean a curate like me who has gone to the extend of filling one and a half page on random forest, should be awarded atleast 4-5 marks. But a big red O (zero) is what you notice with your bare eyes. I made a swift dash to the professor sitting in his chair brooding into the answer script of my batchmate.

"Sir, I have not been given a single mark in this particular question"
"Haan ? is it not checked ?"
"No sir, this being not the circumstance.. no question has been left under the impeccable eyes of yours. But I have not been given a single mark in this particular question", I repeated myself.

"Ah.. Is it? ...Is it so ? .. well lemme have a look"

"Rubbish.. all this elucidation. The whole recollection of answer is all vague and does not conclude nowhere", he remarked.

Someone needs to delineate to these people of high positions to not say such words to a meritious and scholarly student. It hearts one deep to the soul. I say, you cannot plainly dismiss the work of a student. It needs certain effort to cook up answers in the exam hall on the verge of limited time, topics which are of sparse interest to the person of the student community.

But i stood up and argued that the facts presented are true and correct to my understanding. That random forests are indeed whats been written in my notebook.

"We neednot squabble over the matter.. in fact u should be considerate that i wasted my time reading this odds and ends of yours" and with this he went on to the point of explaining random forests.

but i was taken aback at the soulless nature of the words. I was fuming inside as to how callous can the old blood be of such rank.

I spurted out of the room and sat flared up in my den. his words echoing in ma head, i could not even enjoi my after meal snap. then in the evening while checking my students mail and marking "D" all over the purposeless mails send, i fall across the mail of our DWDM instructor. The subject said "DWDM grades". And my heart starting pumping with 4 times the ordinary thumping rate. and when I click open the mail, and scroll down the page to locate my name i was taken aback.

A "A" it read. And a "A" it was after i confirmed it one of my batchmate.

Hip-ho-HURRAY ...

Monday, August 01, 2005

A terror tale...

The unexpected do happens ... u get what u have long desired for....U hold what u dreamt of.... it comes when u lest expect it.....

Yippyyyyyyyyyy.. Hurray................... I am happy with the fortuitous turn of events, Dr. Jawahar has offered me TAship in C programming (:)). Suddenly u feel like on top of the world...Teachin was my fantasy when i was in my 5th grade.. I liked the commanding nature the job demands.. the sudden altoughter BIG feeling u get in teaching (i used to clear maths doubts of my classmates ) .... the respect u get from ur (ah...ahem) 'students' .When u r not strict, give them space to make noise while teaching, and clears the concept of whats being taught ... atlest this is how i portray my "IDEAL TEACHER".

The first two classes went extraordinarily well if u look it in the light that it was my first official class (lab in this case). I came back from library at 11:02 AM check mail and see that i am supposed to take the lab of group A2 and A4 at 10:45 PM along with one other tutor.I was like "HUH?? come again". i went through the mail twice... double check the TO and CC headers, the addressee. All shocked, thrilled and electrified at the same time.

I rush(ran) to the lab.(late on the very first day of my TAship..no beforehad preparation for Lab.. no idea from where will i start...tut-tut). Dr. Jawahar has already given them the problem ( find whether the given no is prime or not )and left.. i lurch in the class, the other tutor hadnt turned up yet,people are burried deep in their terminals , thinkin deep thoughts to make the program.well then i walk up to the stage and start


"PLZ Pay attention here (people raise their heads and gave the look 'now WHATTT !!!' as if i had disturbed the deep silence and intervened in their thoughts' ) Has any body got any probs with the problem given here.... i mean everybody knows what a prime no is ??"

"YES" , came the reply with some explanations what it was .

" ok then , clear with the syntax of the language, the loops , conditional expressions?"

" " <-- a long silence. and thus started the tutorial, and it went well. I took the tutorial till 12:45 noon. i was all thirsty and thwarted. scurring from one pc to another.

Similar stuff on the second day, i was accompanied by Nidhi and not late like the prev day .... well this TA thing has added livliness to my daily routine. I am all happy and excited.well i wish this continues for ever, I am loving it .My father and mother were all blithe and delighted, sister thrilled with the news.She said "Jaane is desh ka kya hoga? :P, tujhe yeh teachin ka job mila kaise, kisi ko bhi de dete hain kya?? bechaare baache :(" ) .

I hope my TA classmates, also had the same joyous and merry experience on their first tutorial. Rest all is going fine in my life and it seems that GOD is in HIS heaven and its all right with the world :).

Friday, July 22, 2005

Two years Flown by....

Hmmm.... they r here ..... and we are havin a blast :) .......
This couldnt have been better ..... the faculty declarin it official.....
Only the time limit sucks .... only till 10:30 ..... Whole two weeks to delight ourselves......

The college commenced on monday, 9 classes per week. we have classes even on weekends x-(
Well, two years have passed by like a melting black-current icecream, i think i couldnt have enjoyed it more.I feel a sense of becomin senior, big grown up.It has to up in everyones life one day or the other(:D) I hope everybody is feeling the same.
Compilers, is being taught to us this sem by our Beloved "Prof Govindarajulu" .On the very first day people didnt disappointed him, 6 proxys ( if i remember it clearly) :) and i missed the second class,one sluggish mammal i am.

Well i shifted to OBH, all my classmates are here.Its more lively here compared to NBH.This week i had nothin worth to watch on "My Room Theater" ;) , save War of the Words .Karthik says the H.G. Wells novel hadnt been justified in this crap. A divorced Tom Cruise saves his children from the marshians and returns them to their mother .... a happy (sadistic) endin...
one slow melodrama.

I think i will stick to my readin, Been reading "the Lord of the Rings: The Fellowship of the Ring",more addictive then HP. JRR Tolkien is one great writer, all the Middle earth concept,
Goblins, dwarfs, wizards, men and Hobbits. How i wish he was the one who had written Ramayana alike , i m not exaggeratin but he does it so beautifully, u feel carried out by the flow of the words.
And HP reminds me of the new Book "The Half Blood Prince"I want to read it earnestly, the suspense seems killin to me, someones going to get killed, Ahh i need a copy, anyone out there has a copy.

I m all weared out and feelin sleepy .Good night.

[C#] Mutliple Concurrent Producers and Consumers pattern for a Task Queue

If you are in need of a basic concurrent Producers consumers pattern to be used in your application, here is a sample C# program to refer to...