Saturday, October 23, 2010
Tuesday, August 18, 2009
Show MySQL databases size
Counting all databases size in MySQL - original posted here.
select table_schema "Database",
sum( data_length + index_length ) / 1024 / 1024 "Size (MB)",
sum( data_free )/ 1024 / 1024 "Free (MB)"
from information_schema.tables
group by table_schema;
Sunday, August 9, 2009
Cross-browser printing iframe content
I found problem with printing iframe content in Opera. So here is my simple solution:
function print_iframe(s) {
var iframe = window.frames[s];
if(navigator.userAgent.indexOf("Opera") == -1) {
iframe.focus();
iframe.print();
} else {
var opera = window.open(iframe.location);
opera.opener.focus();
opera.print();
opera.close();
opera = null;
}
}
Tuesday, March 10, 2009
Light Bot
I have been playing a Light Bot game. This game is very good for thinking and very funny. The solution which I founded for all twelve levels is here. Used actions are Move, Jump, Light, Turn Right, Turn Left and F1 for function macro number one, and F2 for function macro number 2. All methods are divided into three groups, as in game - main, function 1 and function 2.
Light Bot Level 1
Main: M, M, L
Light Bot Level 2
Main: TR, M, TL, M, M, M, M, TL, M, L
Light Bot Level 3
Main: M, J, J, M, TL, L, M, L, M, L
Light Bot Level 4
Main: M, J, J, M, TR, M, M, M, M, M, L
Light Bot Level 5
Main: J, F1, F1, J, J, J, L
F1: M, M, M, TL
Light Bot Level 6
Main: F1, TR, F1, J, TR, F2, TR, TR, F2
F1: M, J, J, L
F2: M, M, M, M, M, M, L
Light Bot Level 7
Main: F1, TR, M, TR, F1
F1: L, M, L, M, L, M, L, F2
F2: M, L, M, L, M, L, M, L
Light Bot Level 8
Main: J, F1, F1, F1, F2
F1: M, L, M, M, L, TR, M
F2: M, L, TR, M, M, L
Light Bot Level 9
Main: J, TL, J, F1, F1, F1, F1
F1: J, L, M, L, J, L, TR
Light Bot Level 10
Main: F1, F2, Ligth, TL, J, TL, F1, TR, J, J, M, L
F1: M, M, M, J, TL, J, J
F2: TL, J, TL, M, TR, J, M, M
Light Bot Level 11
Main: F1, F1, F2, F1, F1, F2, F1, F1, F2
F1: L, M, L, M, L, M, L, M
F2: TL, J, TL, F1, F1, TR, J, TR
Light Bot Level 12
Main: M, J, F1, F1, F1, F1, TL, F1, F1, F1, L
F1: J, L, J, L, J, L, TR
Light Bot Level 1
Main: M, M, L
Light Bot Level 2
Main: TR, M, TL, M, M, M, M, TL, M, L
Light Bot Level 3
Main: M, J, J, M, TL, L, M, L, M, L
Light Bot Level 4
Main: M, J, J, M, TR, M, M, M, M, M, L
Light Bot Level 5
Main: J, F1, F1, J, J, J, L
F1: M, M, M, TL
Light Bot Level 6
Main: F1, TR, F1, J, TR, F2, TR, TR, F2
F1: M, J, J, L
F2: M, M, M, M, M, M, L
Light Bot Level 7
Main: F1, TR, M, TR, F1
F1: L, M, L, M, L, M, L, F2
F2: M, L, M, L, M, L, M, L
Light Bot Level 8
Main: J, F1, F1, F1, F2
F1: M, L, M, M, L, TR, M
F2: M, L, TR, M, M, L
Light Bot Level 9
Main: J, TL, J, F1, F1, F1, F1
F1: J, L, M, L, J, L, TR
Light Bot Level 10
Main: F1, F2, Ligth, TL, J, TL, F1, TR, J, J, M, L
F1: M, M, M, J, TL, J, J
F2: TL, J, TL, M, TR, J, M, M
Light Bot Level 11
Main: F1, F1, F2, F1, F1, F2, F1, F1, F2
F1: L, M, L, M, L, M, L, M
F2: TL, J, TL, F1, F1, TR, J, TR
Light Bot Level 12
Main: M, J, F1, F1, F1, F1, TL, F1, F1, F1, L
F1: J, L, J, L, J, L, TR
Thursday, March 5, 2009
BBC Learning English Support Material
In my opinion, the best Learning English site is BBC. But unfortunately for some reason the link to support material is not available on the BBC Learning English home page, now. So, link for this materials (Study guides and Worksheets) is here. Enjoy it, and improve your English, to be better and better.
Subscribe to:
Comments (Atom)
