Confused about declarations in C involving pointers ?

We know that in “C”, variable declaration involving functions and pointers at times gets quite confusing.
If you disagree please have a go at

declare x as const pointer to array 10 of pointer to function (int) returning const pointer to char

or

char *(*(**foo[][8])())[]; // decipher quickly please : )

It is certainly quite obtuse unless you are well versed with “right-left” rule.
Linux has this nice program cdecl which helps in figuring out where to put parentheses and where to put “const” and “volatile” modifiers in declarations. There is an online version of cdecl and like Detexfy I find it very useful and simple and hence sharing it here. If you are still itching your head with above examples, go an try your self on http://cdecl.org/

Advertisements
Posted in Programming | Tagged , , , | Leave a comment

Draw your Latex symbols

Do you often find yourself googling for latex commands for symbols and then wondering what package is needed to be loaded in order to use that symbol? I have stumbled upon this beautiful online app Detexify and its so cool that I could not resist sharing it. It lets you freely draw with the mouse the symbol you are looking for and then it lists the closest matches. Below is the result for my attempt on Psi and the result is quite good.

Posted in latex, Maths Writing, Research | Tagged , , , | 1 Comment

Drifting–Kit McCallum

Its another beautiful poem by Mccallum, I am sure every one at certain stage in life feels the same.

I sometimes find I’m drifting
Through this life without effect;
I often wonder if I’m truly
Worth what I’ve been blessed.

I search through days that have been hard,
To try to understand,
The many trials that I have known,
The life that I have had.

You see me in my daily grind,
So confident and strong;
Yet when I am alone, I question
Just where I belong.

I often try too hard I find,
To analyze and guess,
To scrutinize, investigate
My life I will confess.

For somewhere deeper, there must be
Some meaning to this life,
Some way to make a difference,
Give a reason for this strife.

Is there some hidden meaning?
Some agenda to be found?
A greater purpose waiting
If I care to hang around?

It teases and it taunts me,
Always slightly out of sight;
A hazy vision out of reach,
Where darkness hides the light.

I struggle to bring clarity
To what awaits me there,
And yet this weak illusion
Always fades before my stare.

It seems the harder that I try,
To focus through the haze,
Just serves to add more questions,
Through my endless, tired gaze.

Perhaps I’m trying just too hard,
To understand it all,
For can we ever truly know
Just what we have in store?

Each incident, each moment passed,
Just adds upon the next,
But in the end, will I find truth …
Or will I be perplexed?

Perhaps I make it harder
Than it has to be sometimes,
But will my searching bring to me
My meaning over time?

Or will it leave me broken,
And confused as I feel now,
While questions bring no solitude,
To this, my wrinkled brow

Posted in life, poetry | Tagged , | Leave a comment

The Road Not Taken–Robert Frost (1874–1963)

This is a beautiful poem and has an open message. We can take an inspirational message or a message with a bit of regret.

A bit of  explanation on wiki

 

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,

And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.

I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.

Posted in life, poetry | Tagged , | 3 Comments

The Road Less Traveled — Kit McCallum

I was searching for “The Road Not Taken by Robert Frost ” and I came across this one and I really liked this too. I made bold, the bits I liked most..enjoy.

 

 

How often we must bear the challenges of life;
The endless roller coaster between happiness and sorrow;
The constant ups and downs of daily strife.
And always the question remains …. why?

Life is not an easy road for most;
It twists and turns with many forks in the road,
Although always, and inevitably, we are given a choice …

Do we turn to the right … or the left?
Do we take the high road … or the low road?
Do we take the easy path … or the difficult one?

Decisions are not easy for those struggling for direction …
And sometimes the many choices and signs become overwhelming.

While standing at a crossroads in life,
The urge is to take the most comfortable path;
The road with least resistance …
The shortest or most traveled route.

And yet, if we’ve been down that comfortable road before;
Have gleaned its lessons in life, and learned from our experiences;

Do we yet again follow the known?
Or does our destiny lie in another direction?

The fear of the road less traveled is tangible and all too real;
It manifests itself in many ways,
And tends to cloud the issues that might otherwise be clear.

It is in these times of confusion,
That we must seek peace and solitude;

Time to contemplate on our life,
Our experiences and our choices past;
Time to look back, and reflect on what we have learned
Without fear or confusion.

For only each of us knows our own personal thoughts;
Our unique past and personal history;
The experiences that brought us to the crossroads we now face.

We can always learn a small degree from others experiences,
And yet … no one person can walk in our shoes,
Others know not, the trials and tribulations faced in private …

For each is individual … unique … and personal.

And that is why … while standing at a crossroads,
Only “we” can formulate the decision for ourselves;
The true direction that lies within;
The choices we must deliberate on with clarity and wisdom.

For it is only through personal reflection,
That we can now choose our destiny;
… Our next adventure;
… And the future we will embrace.

Posted in life, poetry | Tagged , | Leave a comment

Pakistani obsolete currency notes–part 3

Some more obsolete currency pictures contributed by a friend Sajid Siraj:

1 Ruppe Note from 1948-1949

1 Ruppe Note from 1948-1949

1 Ruppe Note 1975

1 Ruppe Note 1975

5 Ruppes Note in 1947

5 Ruppes Note in 1947

5 Ruppes in 1948

5 Ruppes in 1948

5 Rupees 1972 - 1978

5 Rupees 1972 - 1978

5 Rupees 1997

5 Rupees 1997

10 Rupees 1953

10 Rupees 1953

10 Rupees 1957

10 Rupees 1957

10 Rupees 1972 - 1975

10 Rupees 1972 - 1975

10 Rupees 1972

10 Rupees 1972

50 Rupees 1957

50 Rupees 1957

50 Rupees 1972 - 1978

50 Rupees 1972 - 1978

Some Coins Head

Some Coins Head

Coins tails

Coins tails

Posted in Currency Notes, inflation, Pakistan | Tagged , , | 39 Comments

LHC Explained–two different ways

Manchester University Professor Brian Cox gives a nice overview of Particle Physics dealt in LHC project.

While accuracy in both science and reporting is serious business, the science itself should be fun,says Kate McAlpine’s and this is how she describes CERN Project

Posted in Uncategorized | Tagged , , , | 1 Comment