22 Oct 2017

get function name in strict mode

13:25 | javascript, tricky | 206 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 | 221 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 […]


12 Oct 2017

Table column names comma delimited list

21:12 | mysql | 237 views

Goal: quick method to get the column names comma delimited list Simple mysql or mariadb database. How to get a detailed select command if I don’t have a good sql gui tool. So, here is an easy way: where TABLE_SCHEMA is your schema, and TABLE_NAME is the table in the question. The result will be […]


15 Sep 2017

contenteditable – select all on double click

15:35 | javascript, jquery | 238 views

Goal: don’t be fool, do it easy A have a DIV with contenteditable=”true” attribute. Like a textbox but not really. I want to select all the content with a double click on it. With jQuery like this: … so do you know better than this solution? … I have read many scientific solution for this […]


27 Aug 2017

extend an array – js way

8:05 | javascript | 212 views

Goal: find the cleanest way to extend an array Everyday happening to extend an array in javascript. There are many ways to do but here is the simplest one 🙂 No more code, no more pain in the neck just an extended array. What we need more for today?


6 Jun 2017

mysql comma delimited result

2:32 | mysql | 192 views

Goal: select a quick comma delimited value for a column The method is easy. In this example the result is a long string contains comma delimited list of the language names. the result something like this: But the working buffer size is a weak point in this story. The correct way something like this: So […]


7 Apr 2017

use the camera

14:15 | html5, web trick | 205 views

Goal: simple way to use the camera I’ve read some articles about this, but there was no a simple one. So, here is: check it: here Two thing to know. 1. the browser will say insecure connection. Just say do it anymore 2. Take a Photo will take a photo after 3 sec


25 Mar 2017

javascript easy templates

13:51 | javascript, tricky | 218 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 | 258 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); […]


13 Mar 2017

chrome t-rex fun

1:48 | fun | 221 views

Goal: there is no at this time 🙂 open in chrome the following chrome://network-error/-106 and press space bar or arrow up enjoy…


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