Goal: feature specific ie version detection I’ve found somewhere a tricky solution for this problem. Here is a little bit modified version of that: The isIE variable will be the version number if we have an internet explorer in other cases this variable will be . The original method not working above ie9, that’s why […]
Archive for June, 2014
detect the ie version on the client side
14:17 |
web trick
|
1064 views
mshtml InvalidCastException issue
10:57 |
.net
|
970 views
Goal: to solve mshtml issue When I use a webBrowser control in my .net application and I try to work with the control, sometimes I’ve got the following error. System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to mshtml. … May be the message will be different but the reason is the same. The […]
Goal: to solve mshtml issue When I use a webBrowser control in my .net application and I try to work with the control, sometimes I’ve got the following error. System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to mshtml. … May be the message will be different but the reason is the same. The […]
simple geo location
11:09 |
html5
|
1241 views
Goal: how can I use the geo location This is a simple code copy from: click to visit I’ve modified the code to put a marker to the center: … and you will see a blue marker at the ecenter of the map… Show my location
Goal: how can I use the geo location This is a simple code copy from: click to visit I’ve modified the code to put a marker to the center: … and you will see a blue marker at the ecenter of the map… Show my location
php multiline strings in the code
10:24 |
php
|
1085 views
Goal: use multiline strings in the code I have a simple select statement. I want to store it in a variable but I want to forget the concatenation. We can use the heredoc syntax. $query =
Goal: use multiline strings in the code I have a simple select statement. I want to store it in a variable but I want to forget the concatenation. We can use the heredoc syntax. $query =
Get the client country based on ip address
18:05 |
php
, web trick |
1901 views
Goal: find the client on the map I was supprised when I examined my server’s stat. There were many client from unknown country. This is not too good. I remember an old solution depends on ip2c database. This is nice and easy, but to keep the database updated not too confortable. 1. database solution I […]
Goal: find the client on the map I was supprised when I examined my server’s stat. There were many client from unknown country. This is not too good. I remember an old solution depends on ip2c database. This is nice and easy, but to keep the database updated not too confortable. 1. database solution I […]
simple browser detection on server side with php
19:20 |
php
|
1005 views
Goal: extract basic information from user agent string To follow the user agent strings is like tilting at windmills. My suggestion is a simple way. just implement the minimum and forget the details. Let’s focus on the main browsers and the main operating systems. The first step will be this. Later we will see what […]
Goal: extract basic information from user agent string To follow the user agent strings is like tilting at windmills. My suggestion is a simple way. just implement the minimum and forget the details. Let’s focus on the main browsers and the main operating systems. The first step will be this. Later we will see what […]
switch on php debug mode
12:18 |
php
|
1094 views
Goal: get all error message from the server Just put the following 2 lines to the start of your code.
Goal: get all error message from the server Just put the following 2 lines to the start of your code.
no more cache – force the reload based on the file date
8:17 |
php
, web trick |
1111 views
Goal: avoid cache in case of changed files The cache is our friend in case of old files. With this code I can use the cache based on my file date. the result is In a little bit friendly shape: Shorter, smarter… Call the no_cache class like
Goal: avoid cache in case of changed files The cache is our friend in case of old files. With this code I can use the cache based on my file date. the result is In a little bit friendly shape: Shorter, smarter… Call the no_cache class like
stylesheet easy swap method
11:07 |
css
, tricky |
1049 views
Goal: tricky way of stylesheet change on a page I’ve read many blogs about this theme, but I’m not satisfied. Here is my way. Short and effective. My blog has a cloudy design, but I have an other image in my head with a golf ball. I don’t want to drop the first one and […]
Goal: tricky way of stylesheet change on a page I’ve read many blogs about this theme, but I’m not satisfied. Here is my way. Short and effective. My blog has a cloudy design, but I have an other image in my head with a golf ball. I don’t want to drop the first one and […]
simple cookie manager class
0:18 |
javascript
|
881 views
Goal: to create a simple js class for manage cookies I’ve written a simple class to manage cookies. var cookies = new function(){ return { get: function(name){ var r = document.cookie.split(‘; ‘); if(name){ for(var i = 0, l = r.length; i < l; i++){ if(r[i].indexOf(name + '=') == 0){ return r[i].split('=')[1]; } } } else{ […]
Goal: to create a simple js class for manage cookies I’ve written a simple class to manage cookies. var cookies = new function(){ return { get: function(name){ var r = document.cookie.split(‘; ‘); if(name){ for(var i = 0, l = r.length; i < l; i++){ if(r[i].indexOf(name + '=') == 0){ return r[i].split('=')[1]; } } } else{ […]