Monday, February 13, 2017

Home Sweet Home - 1

Home Sweet Home - 1
(Plan of one of my proposed home)
.
      Once upon a time up-to around a decade or so ago I was fan of walking and wandering a lot. During those times I often used to  go for long walk in morning near my home mostly in parks and some times in nearby DHA. During walk watching good looking big homes in DHA and admiring them was one of my time pass. After some years of walking and admiring an idea, in fact a wish, visited my mind to  make a good looking home in some DHA phase or some where else myself. And I even short listed a plot of around 700 sqr yds from a street of similar sized plots. I chose 700 sqr yrd plot because they were more rectangular in shape. And I think it is easy to make more rooms in longer, rectangular plots as compared to square or near square plots.
      Since childhood I was watching my father planing for a home and analyzing different housing schemes at different times in different locations of Pakistan. May be because that was in my mind that I also started making many plans of home on paper and at last settled at a modified version of our own home's design. I liked and chose it mostly because it is our home, we are living in it for a long time now and a lot of our happy and sad moments are attached with it.
      One day I was sitting in front of my computer and looking at the desktop and at the same time thinking about DHA ... it's big plots and good looking big homes all around well decorated with  colorful flowers and plants and calm and peaceful atmosphere. Autocad icon was right in front of me when suddenly an idea visited my mind and I said to my self why not I try to make some home plans in my computer in autocad also.
      Since then I tried many ideas on my computer and at last settled at a modified version of our home's design which I had also made on graph paper some time back. This plan is full of bedrooms, a long car porch, two lawns one in front and one in back etc. Since I made it I am really liking it and still it is my favorite.
      Following is the image of the plan I described above
.

.
.

.
      And now while I am writing this blog post I am also thinking why not I add an under-ground floor and a top floor to this plan.
.

.
[NOTE: 2017 Feb 14 Tue-PST 12:22 PM]
      Some thing strange happened on the PC I used for writing this blog post. A few days ago I wrote and completed this blog post on PC but because phone was not working during that time and so net was also not working I was not able to publish it online. But now when phone and net is working and I opened this blog post for a final reading before publishing I was surprised to see that the file has back tracked. It's text and image both were no longer a finished product. So I made it a finished product again.
      I mostly use 'Microsoft Visual Studio 2010' for writing posts for my this blog and then I 'Copy' it from 'Microsoft Visual Studio 2010' and then I 'Post' it on my this blog.
      I published this post during frequent network connections and disconnections.
.


Friday, February 10, 2017

Stopwatch emulator Ver 2 - C Sharp

Stopwatch emulator Ver 2
(My mobile's Stopwatch emulator written by me in c#)
.
      While I was going through different options in my mobile for setting alarm so that I can get reminded when to start water motor, I reached on option called 'Stopwatch'. In Stopwatch there were two more options 'Split timing' and 'Lap timing'. Both options were looking attractive and interesting. So I said to myself why not make something like it on my PC in c#.
      Therefore I made it and then described it in one of my previous post of this blog which you can see HERE.
      After making and posting that version of 'Stopwatch' I made another version which is doing same thing but this time looking a little different  as you can see in following images.
      It's UI(User Interface) is also simple and easy to understand. Instead of using tab control in this version I displayed both type of 'Stopwatch' side by side in two columns. There is a button on top displaying a line of text describing application. On clicking it you can see application description. Then two side by side columns namely 'Split timing' and 'Lap timing. In each column there is a  textbox on top for showing current value of 'Stopwatch'. One richtextbox for showing time slices when made. Four buttons for performing different actions. One status control with one textbox for showing applications current activity and one progressbar which animates when Stopwatch runs. I used 'lucida console' font for textbox and richtextbox because monospace font is good for aligning  characters in all fields of a column.
      Stopwatches of both columns can be used at the same time.
.

      Following are the screen shots of Stopwatch application with explanation.
.
Application looks like this when it is loaded and/or when it is 'Reset' by clicking on 'Reset' button.
.

.
Application looks like this when 1st it is loaded or Reset by clicking 'Reset' button and 2nd it's stopwatch is started by clicking on 'Start'. On start 'text of start button changes to 'Restart'.
.

.
Application looks like this when 1st it is loaded and  2nd it's stopwatch is started by clicking on 'Start' button and 3rd some time slices are made by clicking 'Split' or 'Lap' buttons.
.

.
Application looks like this when 1st it is loaded and 2nd it's stopwatch is started by clicking on 'Start' button and 3rd it is paused by clicking 'Pause' button.
.

.
Application looks like this when (1st) it is loaded and (2nd) first button on it's top is clicked. This shows some 'Help' information about this application.
.

.
      And on clicking on 'Reset' button application goes to initial stage. To click on 'Reset' button while application is running first click on 'Pause' button.
.

      I will soon upload this Stopwatch application's entire project to some site and put project's download link from there here. And may be before that I will post important parts of Stopwatch application's  source code here.

      Until then enjoy DEMO of application written and compiled in visual studio 2010 Ultimate by me.
.

UPDATE
[2017Feb14Tue]      Today I updated and corrected this post because one photo was wrong and second all links on photos were wrong.
.
[2017Feb25Sat]      Today I updated and changed last photo and link for 'Demo'. I made these changes because first I added more information about this application in 'help' window and second I made some improvements to this application because previously it's stopwatches were getting paused whenever 'help' window was made visible.
.

.
[Update 2017 May 23 Tue]
      Enjoy Complete Source code of application written and compiled in visual studio 2010 Ultimate by me. Download it. Extract it. Read 'ReadMeFirst.txt' file and do as is explained in it.
.


Wednesday, February 8, 2017

Stopwatch emulator # 1 - C Sharp

Stopwatch emulator # 1
(My mobile's Stopwatch emulator written by me in c#)
.
      While I was going through different options in my mobile for setting alarm so that I can get reminded when to start water motor, I reached on option called 'Stopwatch'. In Stopwatch there were two more options 'Split timing' and 'Lap timing'. Both options were looking attractive and interesting. So I said to myself why not make something like it on my PC in c#.
      Therefore I made it and as you can see in following images it's UI(User Interface) is simple and easy to understand. There is a label on top containing a line of text describing application. A tab control with two tab pages namely 'Split timing' and 'Lap timing. On each tab page there is a  textbox on top for showing current value of Stopwatch. One richtextbox for showing time slices when made. four buttons on each tab page for performing different actions. One status control with one textbox for showing applications current activity and one progressbar which animates when Stopwatch runs. I used 'lucida console' font for label, textbox and richtextbox because monospace font is good for aligning  characters in a field of column with above/below rows of same column.
.

      Following are the screen shots of Stopwatch application with explanation when 'Split timing' tab page is selected.
.
.In this image application is loaded and title on top is clicked because of which 'Help' information is displaying.
. .
.In this image application is loaded and 'Split timing' tab page is selected by default or by clicking on it but stopwatch is not started yet..
. .
.In this image application is loaded and 'Split timing' tab page is selected by default or by clicking on it and stopwatch is started by clicking 'Start' button whose text is now changed to 'Restart'..
. .
.In this image application is loaded and 'Split timing' tab page is selected by default or by clicking on it and  stopwatch is started by clicking on 'Start' button and some time slices are made by clicking 'Split' button.
. .
.In this image application is loaded and 'Split timing' tab page is selected by default or by clicking on it and stopwatch is started by clicking on 'Start' button and then paused by clicking 'Pause' button.
. .
      And on clicking on 'Reset' button application goes to initial stage on selected tab page. To click on 'Reset' button while application is running first click on 'Pause' button.
.

.
      Following are the screen shots of Stopwatch application with explanation when 'Lap timing' tab page is selected.
. .
.In this image application is loaded and 'Lap timing' tab page is selected by clicking on it  but stopwatch is not started yet..
. .
.In this image application is loaded and 'Lap timing' tab page is selected by clicking on it  and stopwatch is started by clicking 'Start' button whose text is now changed to 'Restart'.
. .
.In this image application is loaded and 'Lap timing' tab page is selected by clicking on it and stopwatch is started by clicking on 'Start' button and some time slices are made by clicking 'Lap' button.
. .
In this image application is loaded and 'Lap timing' tab page is selected by default or by clicking on it and stopwatch is started by clicking on 'Start' button and then paused by clicking 'Pause' button.
. .
      And on clicking on 'Reset' button application goes to initial stage on selected tab page. To click on 'Reset' button while application is running first click on 'Pause' button.
.

      I will soon upload this Stopwatch application's entire project to some site and put project's download link from there here. And may be before that I will post important parts of Stopwatch application's  source code here.

      Until then enjoy DEMO of application written and compiled in visual studio 2010 Ultimate by me.

[2017Feb14Tue]      Today I updated and corrected this post because all links on photos were wrong.
[2017Feb20Mon]      Today I updated this post and added an image  and it's description showing 'Help' feature of application.
.

.
[Update 2017 May 25 Tue]
      Enjoy Complete Source code of application written and compiled in visual studio 2010 Ultimate by me. Download it. Extract it. Read 'ReadMeFirst.txt' file and do as is explained in it.
.


Saturday, February 4, 2017

GW-Basic assignment # 2

GW Basic assignment # 2
.
      First computer programming language I liked and one of the first I learned was GW-Basic from microsoft. It was easy and simple to learn and yet it was powerful. Both text and graphic mode programing was available in it. There were very small number of keywords, commands and functions in it. Making it a good Computer programing language as a first to learn.
      While I was searching for old programs a program written in GW-Basic came into my mind. This was almost first ever program written by me as an assignment. In fact it was second assignment of GW-Basic. And  somehow it's print out is still save in where I keep my old things related to Computers.
      This program reminds me of that time when I was learning computer programing. GW-BASIC, it's teachers (there were 2 teachers and one of them was very good), time spent in that institute, friends etc every thing becomes fresh on reading this program.
      I wrote this program on PC/AT 286 in computer lab of that institute. Then I was two finger typist. Then I was also afraid of sitting so close to monitor thinking sitting so close will destroy my eye site. And because of that fear I used to dim monitor display as low as possible.
      Because I then printed that program's source code and output both on computer paper so now although I searched for GW-Basic interpreter but did not actually felt very much need of any GW-Basic interpreter online or offline. The only hard-work I did now is that I typed that GW-Basic program and it's output in notepad and saved them in a text file and then reproduced them here as you can see below.
.
GW BASIC code:
.
Execution Output:
(Display screen after some output and input)
.
      Something else is also special about this program written in GW-Basic which I am not going to write here, at least now, and I do not know in future I will write or not. And if there are any typing mistakes then I will surely remove them when ever found.


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.