19 Mar 2021

print or save to pdf div content

16:01 | tricky | 15 views

Sometimes we need only a part of a web page to print or to save to pdf. Here is a simple solution: add these lines to the page stylesheet where the #content is the id of the target DIV.

7 Feb 2021

get the jQuery version number

18:48 | jquery | 67 views

Simple way to get the jQuery version number put this into the console window

20 Mar 2020

update semi-incremental column

15:16 | mssql | 209 views

To add incremental numbers into a column (not an auto increment column) is easy with a stored procedure but we can use a simple update also. done.

2 Jan 2020

isset short way

18:45 | php | 125 views

How we can check if variable is defined or if not than get a default value? The general answer is isset and ternary operator let’s simplify this! or after PHP 7.0.1 you can use this shorter way

26 Dec 2019

mssql – custom start value for identity column

20:55 | mssql | 158 views

You can give an initial value for the identity column when you are creating the new table. If you want an identity column which one is starts from zero If the table already created you can override the identity column startValue with the following command: where the tableName is the target table name startValue is […]

16 Feb 2019

Excel – insert current date – [ ctrl+; ] not working

20:14 | excel, tricky | 231 views

Goal: sometimes the current date insert not working. Find a way to solve this I don’t know why and how but sometimes the ctrl + ; stopping to work. I tried to find solution. Many of forums suggest to reinstall the whole office package… Nope… or delete the normal.dot template… nope… or just start the […]

1 Feb 2019

javascript – Convert NodeList to Array

0:57 | javascript | 287 views

Goal: work with nodeList as an array The nodeList is great but sometime we need to convert it to an array for the easy processing. old method old method – short form ES6 way – shorter form ES6 way – the shortest form enjoy… One more thing is a little bit strange. Check the speed […]

12 Jan 2019

mysql date range creation

11:36 | database, mysql | 257 views

Goal: create a date range Simple question to create a date range from a start date to an end date. 1. date dimension table – previously created range Simple, let’s create a date dimension table filled up with the days from a specified day to the future(?). This is a very dangerous if we forget […]

13 Dec 2018

WordPress add functions – safe method

16:40 | tricky, wordpress | 324 views

Goal: add own functions to the wordpress site Forget the functions.php! Frankly this is working only until the next update :(. My way is to create a totally separated file with the added functions: 1. Let’s create a new file functions_added.php Never put php close tag ?> to the end of the file! 2. Put […]

5 Jul 2018

Google Pixel Android P – Couldn’t download

11:17 | android, pixel, tricky | 295 views

Goal: avoid the system update issue – android 9 I have enrolled to try the new android system before the final release. Everything was fine until a disturbing issue. I tried to refresh the system and the following happened. How we can avoid this? if you can see on the top right corner I used […]

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }