Thursday, 3 September 2020

Attention ALL PROGRAMMERS

Read this article if your application deals with usernames: 

https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/


Read this article if your application deals with time on computer:

https://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time

Now read this if its a JAVA Application:

https://yawk.at/java.time/


Tuesday, 23 June 2020

Microsoft SQL quick help


--Describe table in MS SQL
exec sp_columns My_Table;

--Check for indexes on given table
Select 
    SysIndex.object_id As ObjectId, 
    SysIndex.index_id As IndexId, 
    SysIndex.name As IndexName, 
    type As IndexType, 
    type_desc As IndexTypeDesc, 
    is_unique As IndexIsUnique, 
    is_primary_key As IndexIsPrimarykey, 
    fill_factor As IndexFillFactor, 
    SysIndexCol.column_id, 
    SysCols.name 
From 
    sys.indexes As SysIndex
    Inner Join sys.index_columns As SysIndexCol On SysIndex.object_id = SysIndexCol.object_id And SysIndex.index_id = SysIndexCol.index_id 
    Inner Join sys.columns As SysCols On SysIndexCol.column_id = SysCols.column_id And SysIndexCol.object_id = SysCols.object_id 
Where 
    type <> 0 
    And SysIndex.object_id in (Select systbl.object_id from sys.tables as systbl Where systbl.name = 'My_Table');