Tuesday, 21 September 2021
Monday, 20 September 2021
Cheat Sheets / (Computer & Hand Writing) - Alg and Analytic Geometry
These pages contains examples of my works on various compilations in academic works. During mathematical teachings I develop these simple cheat-sheets for students with handwriting:-
Saturday, 18 September 2021
CheatVid: Git Commands (CLI Commands With Short Description)
- git config --global user.name “[firstname lastname]”
- git config --global user.email “[valid-email]”
- git config --global color.ui auto
- git init
- git clone [url]
- git status
- git add [file]
- git reset [file]
- git diff
- git diff --staged
- git commit -m “[descriptive message]”
- git branch
- git branch [branch-name]
- git checkout
- git merge [branch]
- git log
- git log
- git log branchB..branchA
- git log --follow [file]
- git diff branchB...branch
- git show [SHA]
- git rm [file]
- git mv [existing-path] [new-path]
- git log --stat -M
Thursday, 9 September 2021
Regional Vintage Music
Modern music is highly instrumental. Few days earlier I gone through vintage regional music and found the following songs best in terms described in comments:-
(1)
[shree-420][1955][Ramaya vasta vaya]
[https://www.youtube.com/watch?v=Vpq7YrgKNVs]
Comments:- beats are awesome. The dancing lady <shiela vaz> is fabolously expressive. The serious face of the silent man is generating storyteller-look.
(2)
[Pakeeza][1972]Chalo Dildar Chalo
[https://www.youtube.com/watch?v=OtM1WVwEO44]
Comments:-The simple music, good poetic imagination, vocal sweetness and night-mode videography almost put a lonely person into a trance. [Singer: Muhammad Rafi (late) and Lata Mangeshkar [now 90 years old]. This song is manytimes remixed. A version played by express-news chanell is here: https://www.youtube.com/watch?v=s__F7XNOG18
(3)
[Mela][1948][Ye zindagi ke mele]
[https://youtu.be/mCCPwTj4vLk?list=RDiZY2U7j8OAQ]
Comments:- Just thinking how each word is proved true as beneath the colorful lights, the fairgrounds of this world are still populated - while the singer may not be here to see them. Note:- Dlip Kumar is alive in 97th year. [Singer: Muhammad Rafi died in 1980]
(4)
[Dulari][1949][Ai dil tujhe qasam hey]
[https://www.youtube.com/watch?v=TBMOyJa-hV8]
Comments:- One reason for me to like this song is that my dad has liking for it as I heard him several times singing in soliloquy.
[Continue..]
Salam Esapzay
salamk.blogspot.com
The Amphibians of Karachi
Phylum Amphibia is a biological term which describes a group of vertebrates that are able to survive in water as well as on land. Species in this group includes the frogs, toads, turtles, salamanders and karachiites. The last specie in previous examples is recently discovered in a South-Asian country Pakistan's largest city known as Karachi. This recent addition to the Amphibians has successfully satisfied all conditions required to be included in the category. They have "a backbone" which places them in category of vertebrates and over the years they have consistently shown the ability to survive both in water and over the land even without gills and special skin enough to qualify it in Amphibian category. Fortunately I am also an amphibian and the test I have passed last day confirmed my confidence in this regard.
I left my office located at Main Shara-e-Faisel near PAF museum at 4 PM for home (North Nazimabad Town) where I finally reached at 8 PM. The trip was important for me in the sense that being amphibian I have never found opportunity to test my abilities and this day I have successfully proved that I am in-fact an honorable member of this phylum because nearly half the way I confidently swam in all sort of waters.

![]() | ||||
In this picture one can see an amphibian going through water without any hesitation. The cute little baby amphibian can be seen sitting on strange machine that is also capable to run in water and land alike.
|
Wednesday, 8 September 2021
Data-Extraction from website
Extraction of daily market data refreshed after a time-interval of 5 minutes. I developed the program given below as part of a large financial software. I try to demonstrate it in a meaningful way.
There is a website http://www.psx.com.pk which is portal of a stock exchange. The stock exchange has a page which display OHLC data and company information formatted in html table. The java program use jsoup api to (a) connect to page (b) read the page (c) fetch the OHLC data values and exchange current status in the following format:-
Symbol | Open | High | Low | Close | Volume
The exchange does not provide "symbol-code". Symbol values are determined through query from data table containing company-names and company-codes. The following is screenshot of the web-page:-
1 /* 2 * To change this license header, choose License Headers in Project Properties. 3 * To change this template file, choose Tools | Templates 4 * and open the template in the editor. 5 */ 6 package cmnew.downloader; 7 8 import java.util.ArrayList; 9 import java.util.Iterator; 10 import java.util.Vector; 11 import net.coolmarch.cmnew.common.DailyData; 12 import net.coolmarch.cmnew.common.GeneralDB; 13 import org.jsoup.Jsoup; 14 import org.jsoup.nodes.Document; 15 import org.jsoup.nodes.Element; 16 import org.jsoup.select.Elements; 17 18 /** 19 * 20 * @author salam 21 */ 22 public class CurrentMarketState { 23 24 ArrayList<DailyData> ddlist = new ArrayList<>(); 25 26 public CurrentMarketState() { 27 28 } 29 30 public CurrentMarketState(String status) { 31 System.out.println("......thisfile..."); 32 String line = ""; 33 GeneralDB gdb = new GeneralDB(); 34 String query = "delete from current_data"; 35 String msg = gdb.execute(query); 36 System.out.println(msg); 37 38 try { 39 Document doc = Jsoup.connect("https://www.psx.com.pk/market-summary/").get(); 40 String title = doc.title(); 41 42 Elements tabs = doc.select("table"); 43 for (Element table : tabs) { 44 if (table == tabs.first()) { 45 ;//do nothing 46 } else { 47 Elements rows = table.select("tr"); 48 int c = 0; 49 for (int i = 1; i < rows.size(); i++) { //first row is the col names so skip it. 50 String l = ""; 51 Element row = rows.get(i); 52 Elements cols = row.select("td"); 53 String s_name = cols.get(0).wholeText(); 54 if (s_name.startsWith("SCRIP") || s_name.contains("DEFAULTER") 55 || s_name.contains("Indus") || s_name.contains("Millat")) { 56 } else { 57 String s_ldcp = cols.get(1).wholeText(); 58 String s_open = cols.get(2).wholeText(); 59 String s_high = cols.get(3).wholeText(); 60 String s_low = cols.get(4).wholeText(); 61 String s_close = cols.get(5).wholeText(); 62 String s_change = cols.get(6).wholeText(); 63 String s_volume = cols.get(7).wholeText(); 64 65 s_name = s_name.replaceAll(",", ""); 66 s_open = s_open.replaceAll(",", ""); 67 s_high = s_high.replaceAll(",", ""); 68 s_low = s_low.replaceAll(",", ""); 69 s_close = s_close.replaceAll(",", ""); 70 // s_change = s_change.replaceAll(",", ""); 71 s_volume = s_volume.replaceAll(",", ""); 72 73 //because the names in the table have slight difference but 74 //usually the first and second word of the company are same. 75 String sq = ""; 76 String[] st = s_name.split(" "); 77 if (st.length > 2) { 78 sq = st[0] + " " + st[1]; 79 } else { 80 sq = s_name; 81 } 82 83 84 85 String q = "select cm_symbol from cm_companies " 86 + "where cm_name like '" + sq + "%'"; 87 String symbol = new GeneralDB().getSingleColumnData(q); 88 if (symbol == null || symbol.compareTo("") == 0) { 89 symbol = s_name; 90 } 91 92 query = "insert into current_data(scrip, pr_open, pr_high," 93 + "pr_low, pr_close, pr_volume) values(" 94 + "'" + symbol + "'," 95 + "" + s_open + "," 96 + "" + s_high + "," 97 + "" + s_low + "," 98 + "" + s_close + "," 99 + "" + s_volume + "" 100 + ")"; 101 System.out.println(query); 102 System.out.println(gdb.execute(query)); 103 // 104 105 } 106 } 107 108 } 109 110 } 111 112 } catch (Exception e) { 113 System.out.println(e.getMessage()); 114 } 115 } 116 117 public ArrayList<DailyData> getDailySavedData() { 118 ArrayList<DailyData> dlist = new ArrayList<>(); 119 String query = "select scrip, pr_open, pr_high, pr_low, pr_close, " 120 + "pr_volume, (pr_volume*pr_close) as pr_mcap, " 121 + "(pr_close-pr_open) as ch from current_data"; 122 ArrayList al = new GeneralDB().searchRecord(query); 123 Iterator i = al.iterator(); 124 while (i.hasNext()) { 125 Vector v = (Vector) i.next(); 126 String symbol = (String) v.get(0); 127 String str_open = (String) v.get(1); 128 String str_high = (String) v.get(2); 129 String str_low = (String) v.get(3); 130 String str_close = (String) v.get(4); 131 String str_volume = (String) v.get(5); 132 String str_mcap = (String) v.get(6); 133 String str_ch = (String) v.get(7); 134 135 136 137 DailyData dd = new DailyData(); 138 dd.setSymbol(symbol); 139 dd.setOpen(Double.parseDouble(str_open)); 140 dd.setHigh(Double.parseDouble(str_high)); 141 dd.setLow(Double.parseDouble(str_low)); 142 dd.setClose(Double.parseDouble(str_close)); 143 dd.setVolume(Double.parseDouble(str_volume)); 144 dd.setChange(Double.parseDouble(str_ch)); 145 dd.setMcap(Double.parseDouble(str_mcap)); 146 dlist.add(dd); 147 148 System.out.println(symbol+" "+str_close+" "+str_ch); 149 } 150 151 return dlist; 152 } 153 154 public ArrayList<DailyData> getDailyData() { 155 return ddlist; 156 } 157 158 public static void main(String[] args) { 159 new CurrentMarketState(""); 160 } 161 162 } 163
Banned Outfits
Son of Asif Ali Zardari and Chairman PPP Mr. Bilawal Bhutto Zardari has blamed the government of giving support and even patronage to banned organizations. This fresh narrative arrived at a time when top leadership including Bilawal himself is under serious corruption inquiries in Fake Accounts Scandal and Money Laundering Scams in Pakistan. It looks very strange as to why out of sudden Mr. Bilawal arose the issue of Banned Organizations and government linkage therewith? Apparently it is to give an impression to Pakistani people and international community that the cases they are facing are outcome of PPP narrative against BO(s). Secondly to pressurize the government by means of defamation which otherwise has a very well-established perception of being standing on a liberal and anti-sectarian humanitarian stance.
While scoring political points against opponents leader of a political party should be serious enough to differentiate between government and state. It is an unwritten but well understood principle that matters having significant long-term value to the integrity and security of state itself should not be sacrificed for short-term political gains. This is up to apex courts to decide the involvement of PPP leadership in the cases under observation. Neither the references are filed by nor Chairman NAB is appointed by current government. As for BO(s) people of Pakistan know very well that the worst time they faced in terms of terrorism and growth of terrorist organization in Pakistan were the times when PPP ruled the country under the presidency of Mr. Asif Ali Zardari.
Bilawal or his good father may not be involved in anything. Nothing can be said as the case is yet to be decided and fair trial means a trial on court floor not in the media rooms. However the question right at the desk is not the issue of BO(s). People of Pakistan desperately wait to hear something from you in support of your innocence rather than your unnatural and untimely response to the issue of BO s by citing out prehistoric references from statements of one or two cabinet members without reference to the context. There won’t be any political gains achievable by this narrative nor it can do any help to lessen the burden brought by ongoing corruption inquiries.
Do it yourself
During the last few years feminist views, specially Woman March on designated days, got wide attention on social media probably due to indecorous messages conveyed by some of the participants on their play-cards. I shall discuss the symbolic meanings of the messages sometimes later and focus only on the move itself.
Things You Should Know Before You Visit Fishery
Karachi Fishery is not only a prime commercial market for wholesale fish supply across Pakistan but also a good place for Karachiites to buy varieties of fresh seafood at comparatively low rates. Read this article if you have plans to visit this place the next time.
The moment I felt stench of rotten fish I realized we must have reached about the destination. The stench was normal and after a while it did not felt at all perhaps because our nostrils have adapted well to the new environment. Paying RS-20/ parking fee at the gate the security guard loosen the rope to let me enter into the parking area. I found the parking area large enough to park my car anywhere the place without any hurdle. Located at separate pace Fishery is not a place for general public and probably due to this, there is little to no concern for incidents like theft from cars here as the place has no attraction to things-lifters. Making necessary precautions as locking your car appropriately you should feel safe while shopping here.
As soon as I grounded myself out of car I encountered a group of teenagers asking my requirements. At first I ignored them as I felt they are getting advantage of me for being a newcomer. The young guys were, however, neither offensive nor over-active and unlike market-guys I found them humble, shy and to some degree helpful. Probing later it opened that the guys are actually doing fish skinning and the benefit for this engagement is to let the purchased fish be skinned through them. One of the guys guided us to the main market area where the buyers were found negotiating with sellers over price, quality and quantity and it is there that I handover the charge to Mr. Adnan and silently observing and processing the data I received through my senses.
The area I found myself in was divided into five main divisions (1) the boarding area where fisherman moor their launches (2) The controlling area where the Authority keep their offices (3) the market where local buyers and sellers engage (4) Utility companies such as ice thrashing and packing facilities (5) The surrounding which includes parking, mosque, hotel, banks and skinning area. Allocated space for Karachi fishery is large enough to contain all these sections.
5 Wrong Assumptions on Polio Vaccination
A baseless propaganda against polio vaccination is observed on social media for some days by individuals of certain mindset urging others not to vaccine their children on basis of groundless assumptions.
- That the vaccine is invention of the Jews and Christians
- That the vaccine itself contain polio virus
- That there is no laboratory to test vaccine safety
- That why do they (WHO and West) worry so much about our health?
- That why our government use Police force to impose vaccines?