Archive for the 'tricky' Category

16 Feb 2019

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

20:14 | excel, tricky | 35 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 […]


13 Dec 2018

WordPress add functions – safe method

16:40 | tricky, wordpress | 60 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 | 100 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 […]


16 Dec 2017

PDO bind value list for IN statement

4:14 | mysql, tricky | 369 views

Goal: pass value list to IN statement The PDO variable binding is easy until you want to use an IN statement like with PDO after the binding this statement is not working because in the background the select statement will be like this: Luckily the mysql knows the following tricky form and the bindable form […]


27 Oct 2017

swap two numbers

12:49 | javascript, tricky | 213 views

Goal: to enjoy he beauty of out of box thinking Everyday task to swap two numbers. Nothing easier like this, but do it in one line. The trickiest solution I have ever seen: ok, swap them this is it, simple beautiful


22 Oct 2017

get function name in strict mode

13:25 | javascript, tricky | 184 views

Goal: show the name of the called function in strict mode If I want to see the function name I can put it like this but I like the globalized solutions and don’t forget the strict mode, where the possibilities are restricted. There is nothing else to do just throw an exception and read from […]


13 Oct 2017

disable title/tooltip with css

19:04 | css, tricky | 200 views

Goal: find simple way to hide the tooltip The problem is very simple and there are many ways to solve. I have a button or link or just a simple div with a tooltip on it. I want to create a disabled state for this control. the object like this and the style for the […]


25 Mar 2017

javascript easy templates

13:51 | javascript, tricky | 201 views

Goal: build a quick template method So we have an item template and some values to replace. Do like this way. // 1. define the parser function template(strings, …keys) { return (function(…values) { var dict = values[values.length – 1] || {}; var result = [strings[0]]; keys.forEach(function(key, i) { var value = Number.isInteger(key) ? values[key] : […]


25 Mar 2017

javascript multiline strings in the code

13:40 | javascript, tricky | 230 views

Goal: use multiline strings in the code I have a simple string template. I want to store it in a variable but I want to forget the concatenation. We can use the following trick. var itemTemplate = `<li> <div class=”direction-r”> <div class=”flag-wrapper”> <span class =”flag”>${0}</span> <span class =”time-wrapper”>${1}</span> </div> <div class =”desc”>${2}</div> </div> </li>`; console.log(itemTemplate); […]


28 Jan 2017

define image source in css

11:38 | css, tricky | 225 views

Goal: change the image content by css definition like this:


#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; }