Hey guys, I reanimated my website with funny reviews on different movies CINEMA
Although, most of you could not get any use of it, because it's in Russian.
Thursday, 10 January 2008
Monday, 30 July 2007
JQuery - cool JavaScript library
Here is very useful and lightweight JavaScript library that you could use to add proper web 2.0 feel to your page. If you need to. There is also huge, huge amount of plugins that you absolutely must take-a-look.
Here is the url: http://www.jquery.com
Here is the url: http://www.jquery.com
Monday, 23 April 2007
Applying LEFT to UTF-8 string in MySQL 3
While applying LEFT function (MySQL built-in or Parser's) to the data encoded in UTF-8 in MySQL 3 database, you could get an charset dismatch error.
One chap at TeleType studio had written a quick workaround. This function chops the string by the first preceding space:
One chap at TeleType studio had written a quick workaround. This function chops the string by the first preceding space:
@subString[content;length]
$length(^length.int(0))
^while(^content.mid($length;1) ne ' ' && $i<^content.length[]){
^length.dec(1)
}
$result[^content.left($length)]
#/subString
Friday, 20 April 2007
Preloading images in JavaScript
Old trick to preload images so that they could change smoothly in rollovers.
Act like this in <head> section:
<script language="JavaScript">
camera1 = new Image();
camera1.src = "/p/common/camera1.jpg";
camera2 = new Image();
camera2.src = "/p/common/camera2.jpg";
camera3 = new Image();
camera3.src = "/p/common/camera3.jpg";
</script>
This is used on www.lean-m.ru/?intro=no
Act like this in <head> section:
<script language="JavaScript">
camera1 = new Image();
camera1.src = "/p/common/camera1.jpg";
camera2 = new Image();
camera2.src = "/p/common/camera2.jpg";
camera3 = new Image();
camera3.src = "/p/common/camera3.jpg";
</script>
This is used on www.lean-m.ru/?intro=no
Friday, 13 April 2007
Virtual file structure with mod_rewrite
It is cool to use virtual directory structure. You could keep all your code in several files and all the content in the DB.
Here is trick with mod_rewrite that you can put into .htaccess file on the root of your site. The urls, that are not physically exist on the server will be passed into index.html and you could parse them yourself.
Here is trick with mod_rewrite that you can put into .htaccess file on the root of your site. The urls, that are not physically exist on the server will be passed into index.html and you could parse them yourself.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html?uri=/$1 [QSA,L]
Wednesday, 11 April 2007
Cursor types in CSS
Here is quick reference on cursor types in CSS
self-explaining:
style="cursor:auto;"
style="cursor:crosshair;"
style="cursor:default;"
style="cursor:hand;"
style="cursor:text;"
style="cursor:wait;"
style="cursor:help;"
style="cursor:move;"
arrow cursors "n", "w", etc. indicates "north", "west", and so on:
style="cursor:n-resize;"
style="cursor:ne-resize;"
style="cursor:nw-resize;"
style="cursor:s-resize;"
style="cursor:se-resize;"
style="cursor:sw-resize;"
style="cursor:e-resize;"
style="cursor:w-resize;"
self-explaining:
style="cursor:auto;"
style="cursor:crosshair;"
style="cursor:default;"
style="cursor:hand;"
style="cursor:text;"
style="cursor:wait;"
style="cursor:help;"
style="cursor:move;"
arrow cursors "n", "w", etc. indicates "north", "west", and so on:
style="cursor:n-resize;"
style="cursor:ne-resize;"
style="cursor:nw-resize;"
style="cursor:s-resize;"
style="cursor:se-resize;"
style="cursor:sw-resize;"
style="cursor:e-resize;"
style="cursor:w-resize;"
Monday, 9 April 2007
Actual and requested server name
There are differences between requested server name and actual server name. Because of aliases this may vary, but you could get both by apache environment variables. In Parser 3 it is as easy as an apple.
Assume you have a website at at www.hoogabooga.com and a bunch of aliases pointing to it:
$env:SERVER_NAME will get you an www.hoogabooga.com (actually it's an value of ServerName apache directive).
$env:HTTP_HOST gets whatever.hoogabooga.com that was input into the address box of the browser.
Subscribe to:
Posts (Atom)