Friday, November 11, 2016

How to troubleshoot dynamically generated html (Tooltip/Popover) issues in Javascript libraries and frameworks

Context: AngularJS 1.5 front end having UI-Bootstrap library for some of the controls like popover and tooltip.

Issue: In record listing page the tooltips were displaying only the arrow (triangle) with no content.  Therefore we needed to figure out where the other part of the tooltip was within the html page. Since this tooltip mark up is generated on the fly by bootstrap when we hover on a target element, we had to freeze the application UI at the hover state. I was not able to retain the popover and investigate things on devtools. After trying all possible things with web dev tools (opens when F12 is pressed on google chrome) we found something in Stack Overflow that gave a hidden gem technique. Though I do not have the exact URL now, I grabbed a screen shot of the method to follow. I am recording  this here because I know it will be beneficial for me in future as well as to somebody who would stumble upon such a scenario.



Monday, December 29, 2014

Advanced Level 2014 ICT Results - Amazed

Friend of mine ( Fuzuly) was called by an English medium advanced level accounts teacher asking if he knows an ICT teacher. I was sitting next to my friend and suddenly he asked if I have any idea of teaching ICT.  Let me think about it I told. After some thinking, I told my friend 'ok I will do this' and asked him to give my words to accounts teacher.

This is how my ICT teaching started back in early June 2014 for 4 girls from Good Shepherd Convent - Colombo 13. There were only 3 months left for the examination.

The students were very afraid of some lessons like python, database management system, karnough maps to name a few and they had no teacher to turn to. As a computer science graduate from the University of Colombo, I agreed to make these things comfortable for them. Finally they became competent on the subjects I touched. They were a very obedient and smart set of students and also my first batch of students.

They sat for the exams and got results on 27th of December 2014.
This 3 months effort plus their commitment gave in one "B" for one of the students. The rest got "C" grade each. Even surprising they got the Best grade for ICT, out of the 3 main subjects each person took.

Remember this is only 3 months effort. I wish this could be 4 "A"s for the 4 students for ICT subject provided that they learnt from me the whole ICT Syllabus for Advanced Level.

However I am very happy about the results and so do my students. I have high hopes in them and wish them all the success in their future endeavors.

I have started Teaching ICT in Hambantota for students of Zahira National School in my leisure time. I'm Thankful for my partners Fuzuly and Naseeh for providing full support for this effort although I am not in the office at Dehiwala, working remotely most of the time from Hambantota.

"Geniuz Institute of Technology" my educational initiative rolling out on 1st January 2015 in Hambantota.


- Shiham Samsudeen,




Sunday, November 16, 2014

How to find disk space used by the SQL Server Database



  • Find out database size as a whole and also the data file and log file space usage
EXEC sp_helpdb @dbname= 'StairWay3'

  • Find space used by each table

SELECT 
    t.NAME AS TableName,
    s.Name AS SchemaName,
    p.rows AS RowCounts,
    SUM(a.total_pages) * 8 AS TotalSpaceKB, 
    SUM(a.used_pages) * 8 AS UsedSpaceKB, 
    (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM 
    sys.tables t
INNER JOIN      
    sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN 
    sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN 
    sys.allocation_units a ON p.partition_id = a.container_id
LEFT OUTER JOIN 
    sys.schemas s ON t.schema_id = s.schema_id
WHERE 
    t.NAME NOT LIKE 'dt%' 
    AND t.is_ms_shipped = 0
    AND i.OBJECT_ID > 255 
GROUP BY 
    t.Name, s.Name, p.Rows
ORDER BY 
    t.Name