6 Jun 2017

mysql comma delimited result

2:32 | mysql | 34 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 | 45 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 | 53 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 | 51 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 | 69 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…

8 Mar 2017

Detect AD Blocker

2:09 | javascript | 58 views

Goal: do we have AD blocker or not? something like this: enjoy…

28 Jan 2017

define image source in css

11:38 | css, tricky | 93 views

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

25 Jan 2017

Set the ProgressBar foreColor

12:52 | android | 91 views

Goal: find an easy way to set the default magenta color of progressbar to an other one just put into the xml file:

30 Aug 2016

xampp disable web acces to others

13:05 | xampp | 139 views

Goal: disable xampp web access to everybody else Filter by IP address like this in the file httpdxampp.conf to disable the dashboard directory:

1 Aug 2016

change the status bar color

0:07 | android | 135 views

Goal: fit the full screen coloring to our application Sometimes we need to change the status bar color to create a harmony on the whole screen. Put this into the main activity: Simple… and no more blue top on the screen…

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