Monday, January 30, 2017

Happy 50 posts on my this Blog


Happy
50
Posts
on my
this
blog
  
Few days ago
I made 50th post on this blog.
This is 51st post.
So
Happy 50 posts on my this blog.

Saturday, January 28, 2017

Hello, World! in C

Hello, World! in C
.
      Need to make this post arises because I was for some time planing to put some computer programing code written by me here on this blog. And before doing that I wanted to practice how it can be done and how it will look like.
      So I searched for and shortlisted some programs in my computer's hard-disks to start with. But as those programs were written in C programming languages and right now I do not have any C compiler so I searched for online C compiler and reached on tutorialspoint. There I found an old, basic and famous C program, also written by many other programmers in different computer programing languages all around the world, already written in site's editor. And this tiny program reminds me the days when I started learning C programing language via Turbo C. In tutorialspoint output area was showing 'sh-4.2$ gcc -o main *.c' from which I got idea that compiler they are using is 'gcc' and OS is may be 'linux'.
      Following is the modified version of the program I found in online C compiler. I transformed it a little so that it looks almost same like C programs of the days when I started learning C language. I am using monospace font for both Code view area and Output view area to create look of that time. I am also using white foreground and blue background color of Turbo C IDE of that time for showing code. For showing output I am using color of black and white DOS screen of that time.
      I like C language very much and our teacher of C language was also very good. I still remember him. He was a good teacher, had a very pleasant smiling face and always answered questions from students in detail.
.
C code:
.
Compiler and Execution Output:
.
      To me some how white over blue and white over black looks and feels better then black over white.


Tuesday, January 24, 2017

My Mobile's Archives


My Mobile's Archives
.
Introduction

      Specially when my mobile (Nokia c1-01) was new I used to play with it's different features. And during that playing I found a feature called 'notes'. 'Notes' was like a tiny text editor with ability to make 20 different entries. So I wrote different things on different times in 'notes' as if it was a diary.
      Following are some old samples from entries in 'notes' of my mobile.
.
.
My 1st Mobile - [20110822Mon]

My first mobile phone
gifted by Naveed, my younger brother,
on my birthday, '21st August'.
Mobile was given to me on 20th August 2011.
...
I am writing this text on 20110822Mon.
.
.
Fatima Park - [20110901Thu]

PST 09:11 AM baj rahe hain
and
I am in Fatima park
Enjoying pursukoon mahool as no one else is here.
Sanata hae per achha hae.
Kuchh dair main wapis chala jaoon ga.
...
Wapis ja raha hoon aur PST 09:45 AM baj rahe hain.
.
.
CBM Park - [20110910Sun]

      PST 09:00 AM baj rahe hain aur main Fatima park se CBM park aa geya hoon. Halki, halki hawa chal rahi hae. Aasman pae safaid aur halke seyah color ke badal khraman, khraman mashriq se maghrib ki taraf mahoo e perwaz ' ja rahe' hain. Eka duka garyon, motercycle etc ke main road pae chalne ki awaz aa rahi hae. Mali machine se ghans kat raha hae. Machine ki kher, kher park ke khamosh mahol main kanon ko kafi bhali lag rahi hae. Aik 2 aur log bhi park enjoy ker rahe hain. Likhte, likhte 09:44 am ho gae haen aur main bhi wapis ja raha hoon.
.
.
Water Motor - [20111012Wed]

I changed pin in valve of under-water pipe
connected to small water motor of under-ground water tank.
Work started on 11:09 AM and ended on 01:09 PM.
I do not know why pin breaks again and again.
.
.
Gul e Mohor

[20111016Sun]
---
      Aaj subha taqriban 07:60 am baje CBM park ja ker maen ne 2 pode lagae. Un maen se aik Gul e Mohor tha. Donon podon main pani bhi dala 4, 4 ltr jo maen gher se saath le gea tha. Aur wapis chala aaya.
[Date/Time not written]
---
      Gul e Mohor ab tak laga howa hae, baqi pode sar gae.
[20160407Thu - PST 01;17 PM]
---
      Gul e Mohor bhi naheen raha. Nam o nishan tak ghaib hae. Garha bhi naheen hae.
.
.
Fall in Mosque - [20111108Tue]

      Bari eid ke doosre din taqreeban 07:30 am Masjid main gayoon ki qurbani dekhte howe main seerhyon se gir gea aur donon peron main chot aaee. Dain pair ke ghuthne main khrash aaee aur bain pair ki pindli main chhoti si chot aaee. Donon choton se khoon nikla lekin baha naheen. Donon peron ke anghoothoon main bhi chot aeen. Kafi derd bhi tha lekin ab theek hae. Aage dekhte hain. ALLAH khair kare ga.
      Masjid main gai main bhai ne hissa lya howa tha. Tou ussi silsile main wahan khara tha. Lekin kyon ke platform ooncha neecha tha tou is wajah se mera pair phisal gea.
      Main gira, chot lagi aur khoon bhi nikla lekin kapron ko kuchh naheen howa. Yaqinan Masjid, Eid aur Qurbani ki barket ki wajah se .
.
.
My 1st SIM - [20130326Tue]

      Aaj mobile ke lye SIM lee apne naam pae. Pehle online number book kerwaya, phir SIM company ki qaribi frenchise ja ker SIM le lee, Rs125 ki.
Number 0CCCWDDMMYY hae. Jis maen:
0CCC: SIM company number
W: Day of Week index
DD: Date of Month
MM: Month Index
YY: Year without century
hae.
------------
Yani number main meri date of birth hae.
.
.
1000000 digit number - [20151006Thu]

      Today I multiplied two 500000 digit numbers, containing random numbers of base 4294967296 (2^32) at each digit position, together resulting in 1 million digit number of base 4294967296 (2^32).
.
Written and compiled in: gcc.
On Computer: Pentium 3.
Ran on: i5.
Time consumed in multiplication: 00:30:05.000
.
.

[Update - 2017Jan28Sat]
      Today I started working on this post with a plan to see how I can devide it to many smaller posts and add details where required but ended up making it colorful and adding animation feature to it.


Friday, January 20, 2017

Happy 3000 PageViews - (2017 Jan 20 Fri)

CONGRATULATIONS
Today
On 2017 January 20 Fri
my this Blog reached 3000 page views mark
A lot of THANKS to visitors
Please keep visiting this blog
and
tell others about it
Congratulations to me also

Monday, January 16, 2017

Online Status sharing protocol - Part 1

Online Status sharing protocol
(Part # 1)
.
      Although I was thinking about it for some time now but few days ago while I was connecting my 'facebook' and 'twitter' account together, so that tweets made by me on twitter also show on my facebook timeline and public posts made by me on my facebook profile's timeline also show on twitter, I noticed something which urged me to make this post.
      So what I noticed during that experiment cum adventure on two social networking sites namely 'twitter' and 'facebook'?
      Very simple. After connecting my 'twitter' and 'facebook' accounts together I made some posts and tweets there also. So that I can see how it works and how my tweets on 'twitter' look on 'facebook' and how my posts on 'facebook' look on 'twitter'.
      Then First I noticed that on facebook there is no differene between post made on facebook and post made via twitter's tweet. I do not know how to share public facebook post here so far.
      And Second (a) I noticed that on twitter one can not distinguish between native tweet from tweet comming from facebook as long as text size is within max limit at twitter. As one can see here 'tweet source is twiter' and here 'tweet source is facebook'.
      And Second (b) I noticed that if post comming from 'facebook' is larger then max limit of tweet at 'twitter' then a facebook link get added to end of comming post on 'twitter' giving some idea of tweets origin. As one can see here tweet source is facebook.
      This confusion of not knowing origin of tweets/posts etc made me to think for it's solution. And I strangly very quickly arrived at it's solution which is as follows.
      First posts/tweets which are not native but are actually received from some other site will be called 'echo posts' or 'echo tweets' etc or simply 'echo'. And will be distinguished from native posts/tweets etc by logo 'favicon' of the site from where posts/tweets are comming added before posts/tweets etc.
      Second if comming post/tweet is native at site from where it is comming then favicon appended before it will have single line border otherwise it will have double line border.
      Third if site from where post/tweet etc is comming does not have favicon or it's favicon is not currently available then default image with a questin mark in it will be used as favicon replacement.
      Fourth on moving mouse over fecicon user will be able to view full name of site from where post/tweet etc is comming.
      Fifth on moving mouse over favicon user will be able to also view number of times post/tweet etc got echoed in direct path from first time it got posted to this location.
      Sixth on moving mouse over favicon user will be able to also view total number of times post/tweet etc got echoed in all paths/branches from first time it got posted to current time.
.
      I think this is a simple solution for a not so obvious problem and is easy to implement on any site also.
.