пятница, 29 апреля 2011 г.

воскресенье, 3 апреля 2011 г.

Simon Sinek: How great leaders inspire action | Video on TED.com

Simon Sinek: How great leaders inspire action | Video on TED.com
Замечательная лекция с не менее замечательными примерами, в которой показано, что нужно все начинать с вопроса Зачем?, а уже потом подходить к вопросам Как? и Что?

пятница, 1 апреля 2011 г.

How to show/hide the Android Soft Keyboard

If You need to show or to hide a virtual (soft) keyboard in Android app:
To hide:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
This will force the keyboard to be hidden in all situations. In some cases you will want to pass in InputMethodManager.HIDE_IMPLICIT_ONLY as the second parameter to ensure you only hide the keyboard when the user didn't explicitly force it to appear (by holding down menu).

To show:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(myEditText, 0);

понедельник, 7 марта 2011 г.

Android Gingerbread Easter Egg

For the Android device owners out there who have upgraded to Gingerbread, have you found the Gingerbread Easter Egg?
Just go to the ‘About Phone’ menu under Settings, and tap multiple times on the Android version field and you should get the ‘Zombie Art’ featured in the thumbnail.
If you found this yourself with no help, well done and if you find anymore, make sure to post where you found it in the comments below!

Watch Android Take Over the World

The official Android Developers channel on YouTube has posted a beautiful vizualization of Android activations around the world starting in October, 2008, and progressing through January 2011. Quite impressive to watch -- especially the huge jump in activity when the Droid launched.
The video has no sound, so don't bother checking to see if you have mute on like I did. I'd recommend cuing up some dramatic musicbefore you hit play to enhance the experience.
Today finds us learning of another video which puts the more than 350,000 current daily activations into perspective.  Check out the video below for a clever infographic-like take on how Android is quickly becoming the preferred mobile OS around the world.  

суббота, 1 января 2011 г.

Новый 2011 год и магические свойства числа 2011...

Немного суеверные, но тем не менее весьма занимательные свойства числ 2011:
  1. 2011 - простое число
  2. 2011 - это сумма 11 последовательных простых чисел: 
    2011 = 157 +163 +167 +173 +179 +181 +191 +193 +197 +199 +211
  3. 2011 умноженное на симметричное 1102 есть число-палиндром:
    2011 х 1102 = 2216122
  4. 2011 умноженное на 2 и минус 1 также является простым числом:
    2011 х 2 - 1 = 
    4021
  5. Сумма цифр образует идеальный квадрат, аналогично сумма цифр квадрата 2011 также образует идеальный квадрат :
    2 + 0 + 1 + 1 = 4 = 2 
    ²
    2011 
    ² = 4044121 ==> 4 + 0 + 4 + 4 + 1 + 2 + 1 = 16 = 4 ²
  6. Ещё одно интересное свойство:
    13/05/2011  - пятница, 13-ое. Но это не самое исключительное.
    Интересным есть то, что сумма цифр 13052011 также есть 13 - это уже "двойная пятница 13"

понедельник, 20 декабря 2010 г.

Границы странички на CSS

Интересная и простая реализация границ страниц реализованная на чистом CSS. Суть в применении серии элементов<b> с фиксированными позициями, что создает иллюзию фиксированной границы.
Пример тут: http://jsfiddle.net/hrwFn/
/*------------------------------------*\
 BORDERS
\*------------------------------------*/

/* Create a series of empty pseudo-elements... */
html:before,html:after,body:before,body:after{
 content:"";
 background:#dad8bb;
 position:fixed;
 display:block;
 z-index:5;
}

/* ...and position them! */
html:before{
 height:10px;
 left:0;
 right:0;
 top:0;
}
html:after{
 width:10px;
 top:0;
 right:0;
 bottom:0;
}
body:before{
 height:10px;
 right:0;
 bottom:0;
 left:0;
}
body:after{
 width:10px;
 top:0;
 bottom:0;
 left:0;
}