<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7065531327424009791</id><updated>2012-01-14T08:59:58.956+04:00</updated><category term='unix-to-nt'/><category term='jscript'/><category term='photo'/><category term='people'/><category term='feel-sorry-for-throw-out'/><category term='javascript'/><category term='php'/><category term='perl'/><category term='windows'/><category term='windows-scripting-host'/><category term='benchmark'/><category term='vbscript'/><category term='algorithms'/><category term='date'/><category term='cmd-bat'/><category term='hello-world'/><category term='misc'/><category term='foobar2000'/><category term='time'/><title type='text'>with (love) { .from("Siberia"); }</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1182830884415989324</id><published>2012-01-05T00:36:00.001+04:00</published><updated>2012-01-05T00:37:06.256+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='foobar2000'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Artist/Album Info in Foobar2000</title><summary type='text'>foobar2000 is perfect mediaplayer for Windows platforms. It is kind of those applications whose functionality is extendable simply adding plugins. One of these finest plugins is Run services that allows to run external applications and scrpts from within foobar2000. 




I use Run services to view/edit information about albums or artists stored in plain text files. Let's consider how it is </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1182830884415989324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2012/01/artistalbum-info-in-foobar2000.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1182830884415989324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1182830884415989324'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2012/01/artistalbum-info-in-foobar2000.html' title='Artist/Album Info in Foobar2000'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-6933276052620972689</id><published>2011-10-10T14:20:00.001+04:00</published><updated>2011-10-10T14:24:21.156+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Версии Internet Explorer</title><summary type='text'>Нечасто, но иногда на странице требуется программно определить какой же браузер и какой версии используется. Для этого существует несколько способов определения. 






Путем разбора строки, возвращаемой из свойства window.navigator.userAgent, определяется большинство известных браузеров. Метод недостаточно надежен, так как некоторые браузеры (например, Opera) может выдавать себя за другой </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/6933276052620972689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/10/internet-explorer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6933276052620972689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6933276052620972689'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/10/internet-explorer.html' title='Версии Internet Explorer'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3568102894247645398</id><published>2011-07-12T23:14:00.007+04:00</published><updated>2011-07-24T01:21:45.760+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>parseDate</title><summary type='text'>Функция преобразует дату, заданную строкой, в количество миллисекунд относительно базового времени, и возвращает его. Строка должна содержать дату и время в определенном формате. Функция аналогична стандартному методу Date.parse. Отличие заключается в том, что корректно обрабатывает строки, содержащие миллисекунды. 




function parseDate(v, matcher)
{
    var m = (matcher || </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3568102894247645398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/07/parsedate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3568102894247645398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3568102894247645398'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/07/parsedate.html' title='parseDate'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-66019032925239391</id><published>2011-05-01T15:56:00.007+04:00</published><updated>2011-05-02T09:07:11.471+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='windows-scripting-host'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Обмен данными и объектами между скриптами</title><summary type='text'>Однажды на Сером форуме шло обсуждение как можно осуществить обмен данными между скриптами. Идея основана на создании нового экземпляра, наследуемого от интерфейса IWebBrowser2 (ссылка: IWebBrowser2 Interface). Объект хранит в себе данные даже после завершения всех скриптов, практически как буфер обмена, и может служить как средство обмена данными и объектами между скриптами. 




Примечательно, </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/66019032925239391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/05/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/66019032925239391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/66019032925239391'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/05/blog-post.html' title='Обмен данными и объектами между скриптами'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-8588732365804109870</id><published>2011-03-18T10:34:00.004+03:00</published><updated>2011-07-12T23:22:52.831+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Функция вывода разницы во времени</title><summary type='text'>Часто на форумах встречается вопрос о реализации вывода разницы во времени в формате "количество дней, часов, минут и секунд". 






При анализе логов возникает необходимость вычислить разность времени между двумя событиями. Данная функция существенно сокращает получение требуемого результата. Функция реализована на Perl (однако весьма просто расширить ее функциональность и портировать на другие</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/8588732365804109870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/03/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8588732365804109870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8588732365804109870'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2011/03/blog-post.html' title='Функция вывода разницы во времени'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-6634281548543306900</id><published>2010-12-26T22:16:00.017+03:00</published><updated>2011-01-13T09:33:10.187+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>JavaScript html entities</title><summary type='text'>Несколько дней назад мой коллега попросил меня помочь реализовать код вставки специальных символов, выраженных их сущностями [1]: 



var original = 'string with guillemets (standard quotation marks in Russia) « and »';

// do something to convert the original string to applicable characters
var entities = ...;

// insert the resulting string to the DOM
var textNode = document.createTextNode(</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/6634281548543306900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/12/javascript-html-entities.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6634281548543306900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6634281548543306900'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/12/javascript-html-entities.html' title='JavaScript html entities'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3796113631063730875</id><published>2010-08-06T22:42:00.003+04:00</published><updated>2010-10-10T22:35:38.757+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><title type='text'>О веб-технологических котлетах</title><summary type='text'>

Давайте сразу разложим все котлеты по своим тарелкам - рыбные, мясные, прочие. 



В нашем веб-общепите есть стабильный набор очень популярных ингредиентов из которых готовят веб-котлеты. Меню стандартизировано, хотя есть незначительные различия, но, в целом, у всех одинаковый ассортимент. 



MySQL, PHP - серверные приложения, они готовят котлеты, ТОЛЬКО серверные котлеты (для приготовления </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3796113631063730875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/08/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3796113631063730875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3796113631063730875'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/08/blog-post.html' title='О веб-технологических котлетах'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-170763038468811119</id><published>2010-04-27T15:57:00.010+04:00</published><updated>2011-07-12T23:22:52.831+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>The number of days in a month</title><summary type='text'>

Bombastic and verbose but fast

Date.prototype.isLeapYear = function()
{
    var y = this.getFullYear();
    return y % 4 == 0 &amp;&amp; y % 100 != 0 || y % 400 == 0;
};

Date.prototype.getDaysInMonth = function()
{
    return arguments.callee[this.isLeapYear() ? 'L' : 'R'][this.getMonth()];
};

// durations of months for the regular year
Date.prototype.getDaysInMonth.R = [31, 28, 31, 30, 31, 30, 31, </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/170763038468811119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/04/number-of-days-in-month.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/170763038468811119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/170763038468811119'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/04/number-of-days-in-month.html' title='The number of days in a month'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2148280013126004491</id><published>2010-03-29T04:00:00.029+04:00</published><updated>2010-05-06T09:45:26.807+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='windows-scripting-host'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><title type='text'>Windows Scripting Command Interpreter</title><summary type='text'>Консольный интерпретатор JS/VBS-скриптов в автоматическом и интерактивном режимах. 





Известно, что JScript и VBScript не имеют встроенных возможностей подключения внешних файлов (внешних скриптов, библиотек). Однако Windows Scripting технология позволяет сделать это с помощью специальных средств - XML-подобный файл, WSF, имеет возможность добавить внешние источники программного кода. Причем, </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2148280013126004491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/03/windows-scripting-command-interpreter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2148280013126004491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2148280013126004491'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/03/windows-scripting-command-interpreter.html' title='Windows Scripting Command Interpreter'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-9095909371723193018</id><published>2010-03-17T16:44:00.006+03:00</published><updated>2010-03-21T14:28:16.443+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Y-combinators</title><summary type='text'>

Y-combinators are strange and very crazy things. Below is little collection. 

Perl



sub Y {
    my ( $curried_rec ) = @_;
    sub {
        my ( $f1 ) = @_;
        $curried_rec-&gt;( sub { $f1-&gt;( $f1 )-&gt;( @_ ) } )
    }-&gt;( sub {
        my ( $f2 ) = @_;
        $curried_rec-&gt;( sub { $f2-&gt;( $f2 )-&gt;( @_ ) } )
    } )
}

print Y( sub {
    my ( $rec ) = @_;
    sub {
        my ( $n ) = @_;
</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/9095909371723193018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/03/y-combinators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/9095909371723193018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/9095909371723193018'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/03/y-combinators.html' title='Y-combinators'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-4205145872047987231</id><published>2010-02-16T04:31:00.003+03:00</published><updated>2010-03-31T23:50:36.658+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hello-world'/><title type='text'>Hello, World!</title><summary type='text'>
with (love) {
    .from("Siberia")
    .say("Happy Birthday!");
}
</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/4205145872047987231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/02/hello-world_16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4205145872047987231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4205145872047987231'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/02/hello-world_16.html' title='Hello, World!'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-689576186779371185</id><published>2010-02-12T16:23:00.017+03:00</published><updated>2010-08-01T23:48:06.945+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>CMD/BAT A few useful routines</title><summary type='text'>Analogues of pwd, basename and dirname. 



pwd

:: Print the working directory
call :pwd

:: Populate the the variable var1 with the working directory
call :pwd var1


basename

:: Print a basename of an argument
call :basename "%~1"

:: Populate the variable var1 with a basename
call :basename "%~1" var1


dirname

:: Print a dirname of an argument
call :dirname "%~1"

:: Populate the variable </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/689576186779371185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/02/cmdbat-few-useful-routines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/689576186779371185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/689576186779371185'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/02/cmdbat-few-useful-routines.html' title='CMD/BAT A few useful routines'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-5578219940846085849</id><published>2010-01-28T01:17:00.017+03:00</published><updated>2011-05-25T10:18:17.755+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>CMD/BAT: Repeat a string multiple times</title><summary type='text'>If you want to get a string repeated multiple times -- you can use this routine. I have realised this as an attempt to implement this optimal algorithm using CMD/BAT only. It accepts three arguments: the name of a variable to store the resulting string, the multiplier (number of time the input string should be repeated), and the input string. 





From the point of view of the computational </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/5578219940846085849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/01/cmdbat-repeat-string-multiple-times.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/5578219940846085849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/5578219940846085849'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2010/01/cmdbat-repeat-string-multiple-times.html' title='CMD/BAT: Repeat a string multiple times'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1990001795015862095</id><published>2009-12-14T19:32:00.020+03:00</published><updated>2010-02-20T21:57:06.088+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows-scripting-host'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='vbscript'/><title type='text'>MsgBox / InputBox in JScript</title><summary type='text'>Unfortunately JScript does not have several useful features available in VBScript. The most famous things are MsgBox and InputBox. The following code makes them available in JScript too. 





To be the more compatible with VBScript it adds so-called "syntax sugar" -- several vb.XXX constants corresponding to vbXXX constants in VBScript. The full original code is available by the following link </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1990001795015862095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/12/msgbox-inputbox-in-jscript.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1990001795015862095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1990001795015862095'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/12/msgbox-inputbox-in-jscript.html' title='MsgBox / InputBox in JScript'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1776277801579351603</id><published>2009-11-11T20:35:00.044+03:00</published><updated>2010-03-22T14:13:34.543+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>IEEE754 converter</title><summary type='text'>

Wait until loading...



Decimal





Binary (HEX)





Bitwise (BIN): 
Sign
Exponent
Mantissa





Precision
64-bit, double precision
32-bit, single precision






div.demoForm {
    background-color: #eee;
    border: 1px groove #ccc;
    font-family: Verdana, Tahoma, 'Courier New';
    font-size: 12px;
    padding: 5px;
    width: 600px;
}

fieldset {
    margin-bottom: 10px;
    padding: </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1776277801579351603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/11/ieee754-converter.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1776277801579351603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1776277801579351603'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/11/ieee754-converter.html' title='IEEE754 converter'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-7391406178279068644</id><published>2009-11-03T00:11:00.007+03:00</published><updated>2011-07-12T23:22:52.832+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Cross-platform date/time definition</title><summary type='text'>Earlier here (in Russian) i have investigated ways how to obtain date and time parts using the CMD.EXE  features. After that here (in Russian too) i have simplified this way until two lines of a code. But both ways are platform-dependent - the order of date parts depends on the locale settings. 



Recently i found the excelent link (in Russian too) with the description how to obtain the subject </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/7391406178279068644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/11/cross-platform-datetime-definition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7391406178279068644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7391406178279068644'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/11/cross-platform-datetime-definition.html' title='Cross-platform date/time definition'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1111564067270802746</id><published>2009-10-29T21:39:00.019+03:00</published><updated>2010-02-11T13:50:41.753+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>CMD/BAT Librarian</title><summary type='text'>Introduction
Unfortunately CMD.EXE, the command line interpreter in Windows, does not allows to collect favorite scripts under appropriate folders and use them multiple times in the future. So we have to use the "copy-and-paste" technology to migrate some needed functionalities from one script to another. 



The script below allows to store debugged scripts under the determined folder, use them </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1111564067270802746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/cmdbat-librarian.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1111564067270802746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1111564067270802746'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/cmdbat-librarian.html' title='CMD/BAT Librarian'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3537331857843045850</id><published>2009-10-29T21:30:00.008+03:00</published><updated>2010-02-11T14:10:46.975+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Logfile rotation by CMD/BAT</title><summary type='text'>The script below allows to rotate file (e.g.: logfiles). By default, the length of rotation is 5. It means that this script rotates some file no more than for 5 times. 



Let's consider the permanently growing file of some application named as something.log and we'd like to keep records in this file for the long time as much as possible. But for some reason this file is cleaning up periodically </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3537331857843045850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/logfile-rotation-by-cmdbat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3537331857843045850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3537331857843045850'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/logfile-rotation-by-cmdbat.html' title='Logfile rotation by CMD/BAT'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-4876714187377484662</id><published>2009-10-04T21:38:00.037+04:00</published><updated>2010-03-04T12:53:38.546+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='unix-to-nt'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>WHICH: UNIX-to-NT ported</title><summary type='text'>WHICH is unix-world command, implemented using CMD/BAT feature only.




@echo off


if "%~1" == "" goto help


rem No wildcards, no drives, no paths
echo.%~1 | "%SystemRoot%\system32\findstr.exe" /v ": \ * ? , ; /" | "%SystemRoot%\system32\findstr.exe" "%~1" &gt;nul
if errorlevel 1 goto help


rem Looking up DOSKEY macros
for /f "tokens=1* delims==" %%a in ( '"%SystemRoot%\system32\doskey.exe" /</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/4876714187377484662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/which-unix-to-nt-ported.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4876714187377484662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4876714187377484662'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/which-unix-to-nt-ported.html' title='WHICH: UNIX-to-NT ported'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2983287442355422</id><published>2009-10-02T23:05:00.021+04:00</published><updated>2010-02-11T14:12:30.216+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Simple Batch Progress Bar</title><summary type='text'>Example 1. Print the bar within the window with '#' as the default filling character

call :progressbar 50


Example 2. The same as above but with an another filling character

call :progressbar 50 *


Example 3. Print the bar in the window title

set progressbar_t=1
call :progressbar 50




SOURCE

rem Prints the simple progress bar within the DOS window or in the window title
rem
rem @usage   </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2983287442355422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/simple-batch-progress-bar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2983287442355422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2983287442355422'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/10/simple-batch-progress-bar.html' title='Simple Batch Progress Bar'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2197030038930789266</id><published>2009-09-08T18:04:00.038+04:00</published><updated>2010-02-11T14:09:49.995+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>CMD/BAT: GetOptions</title><summary type='text'>This is flexible and useful library to manipulate with arguments in CMD/BAT scripts.



SYNOPSIS

1. Minimal example

@echo off

:: Process command line options
call :getoptions %*

:: Show resulting variables and exit
set opts
goto :EOF

:: Put here the source code of the module from the end of the article
...


2. Extended example including the complete features of the module

:: Store in </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2197030038930789266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/09/cmdbat-getoptions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2197030038930789266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2197030038930789266'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/09/cmdbat-getoptions.html' title='CMD/BAT: GetOptions'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-7230440364963019862</id><published>2009-08-19T06:43:00.007+04:00</published><updated>2010-02-11T14:07:43.319+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Substring extraction by CMD</title><summary type='text'>Once i needed to solve the next task. I have a batch script with name corresponding to the following conditions:

the script filename has to be matched the pattern (see below).
this script has to be located within directory tree of free nestion but one of directories of the tree has to be macthed the same pattern.




Let's consider the pattern is ABCxxx, where ABC is fixed portion, and xxx is </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/7230440364963019862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/08/substring-extraction-by-cmd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7230440364963019862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7230440364963019862'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/08/substring-extraction-by-cmd.html' title='Substring extraction by CMD'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-7628564641193743300</id><published>2009-08-05T23:38:00.062+04:00</published><updated>2011-07-12T23:22:52.832+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Programmer's Day - 256th day of year</title><summary type='text'>





If you want to see the timer countdown click this button 




(function()
{

    if ( ! Date.prototype.getDayOfYear || ! String.prototype.sprintf ) {
        document.getElementById('programmer-day-hint').innerHTML = 'We have encountered the downloading problem of needed scripts. We apologise for this. Try to visit this page later.';
        return;
    }

var p_day = 256;
var p_str = '</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/7628564641193743300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/08/programmers-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7628564641193743300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/7628564641193743300'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/08/programmers-day.html' title='Programmer&apos;s Day - 256th day of year'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-8624560136039003593</id><published>2009-07-27T03:13:00.018+04:00</published><updated>2010-02-11T14:05:47.677+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>URL parsing in Javascript</title><summary type='text'>There is very simple way to parse URL in Javascript. Just define new method in the prototype of the String. Of course, it has own shortcomings but in the most cases it covers the wide range of URLs and protocols (http(s), ftp, mailto, etc; the mandatory part of URL, host is considered as domain names, IPs, and localhost separately), and moreover it considers the more complex URLs like jdbc:oracle</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/8624560136039003593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/url-parsing-in-javascript.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8624560136039003593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8624560136039003593'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/url-parsing-in-javascript.html' title='URL parsing in Javascript'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-6953746345968395182</id><published>2009-07-09T02:01:00.019+04:00</published><updated>2010-04-22T02:30:19.505+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>JS2BAT converter 2</title><summary type='text'>Earlier to embed javascript codes into batch files the JS2BAT tool has ben implemented with batch features only. In this topic the same tool has been implemented in pure javascript. As opposed to the previous version the present one is the more functional and has optional parmeters.
Previously the js2bat.js script has been implemented in javascript. After that it has been converted to the </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/6953746345968395182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/js2bat-converter-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6953746345968395182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6953746345968395182'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/js2bat-converter-2.html' title='JS2BAT converter 2'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3893612635916884073</id><published>2009-07-07T18:47:00.017+04:00</published><updated>2010-02-11T13:53:39.854+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>JS2BAT converter</title><summary type='text'>This script allows you to embed Javascript codes into the batch-script immediately. So you can stop to worry about creating of an additional batch-wrapper or lost of some specific parameters. Perl distribution has the same functional script pl2bat but for wrapping of perl-scripts with batch-scripts. I am not author of this idea, i just implemented this feature as the standalone tool. 
The main </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3893612635916884073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/js2bat-converter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3893612635916884073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3893612635916884073'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/js2bat-converter.html' title='JS2BAT converter'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-8844351229773613444</id><published>2009-07-03T21:14:00.014+04:00</published><updated>2010-02-11T13:54:22.226+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><title type='text'>Finest code syntax highlighter</title><summary type='text'>Quotation from the Code Syntax Highlighter, the homepage of the project, allowing to embed colorizing of text and fully written on Javascript.
SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. 
It is really true! It is very useful, very flexible and easy to customize. The main idea is to use so-named brushes to colorize codes within &lt;pre /&gt; </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/8844351229773613444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/finest-code-syntax-highlighter.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8844351229773613444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8844351229773613444'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/finest-code-syntax-highlighter.html' title='Finest code syntax highlighter'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3090674470401049870</id><published>2009-07-03T16:37:00.018+04:00</published><updated>2010-02-11T14:06:50.635+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>HOWTO turn a character case via CMD/BAT</title><summary type='text'>IntroductionThis example is amazing that fact that it can be extended by non-Latins with no pain. Just add your owned translation table at the end of script in the format UPPER lower. For example, the translation table for Cyrillic characters is following:

А а
Б б
...
Ю ю
Я я

Just remember that the capitals have to be the first with following lowercase letters. 

Examples of usage
Capitalize </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3090674470401049870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/howto-turn-character-case-via-cmdbat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3090674470401049870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3090674470401049870'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/07/howto-turn-character-case-via-cmdbat.html' title='HOWTO turn a character case via CMD/BAT'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-5176991654802398773</id><published>2009-06-28T00:20:00.011+04:00</published><updated>2010-07-21T18:03:02.130+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><category scheme='http://www.blogger.com/atom/ns#' term='people'/><title type='text'>Хороша!</title><summary type='text'></summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/5176991654802398773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/blog-post_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/5176991654802398773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/5176991654802398773'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/blog-post_28.html' title='Хороша!'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_VcePdNAm1vc/SlJ82TQzz-I/AAAAAAAACws/gnUKlTxq0go/s72-c/IMG_0074_2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-170245427664106922</id><published>2009-06-22T22:02:00.010+04:00</published><updated>2010-07-21T18:00:46.817+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><category scheme='http://www.blogger.com/atom/ns#' term='people'/><title type='text'>Честно!</title><summary type='text'></summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/170245427664106922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/170245427664106922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/170245427664106922'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/blog-post.html' title='Честно!'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_VcePdNAm1vc/Sj-0ySiUM9I/AAAAAAAACws/FM2WQMkQ7PQ/s72-c/IMG_0052.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1914368331246043501</id><published>2009-06-15T02:21:00.014+04:00</published><updated>2010-02-11T13:55:19.112+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='unix-to-nt'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>WC: Emulation of the unix command</title><summary type='text'>This is curious, joke. It is attempt to emulate the unix-commad wc. Do not consider this as fully featured application. It has essential shortcomings - slower than analogs and it gives great mistakes when counting the number of words. This is related with features of processing of special characters when passing them as arguments. 




@echo off


setlocal enabledelayedexpansion
setlocal </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1914368331246043501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/wc-emulation-of-unix-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1914368331246043501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1914368331246043501'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/wc-emulation-of-unix-command.html' title='WC: Emulation of the unix command'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-8199049171980759310</id><published>2009-06-15T02:09:00.007+04:00</published><updated>2009-11-12T18:50:20.062+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='cmd-bat'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Validate number arguments within CMD/BAT</title><summary type='text'>
@echo off

if "%~1" == "" (
    echo EMPTY
    goto :EOF
)

if "%~1" == "0" (
    echo ZERO
    goto :EOF
)

set /a number_var=%~1 2&gt;nul

if errorlevel 2 (
    echo ILLEGAL
    goto :EOF
)

if %~1 neq %number_var% (
    echo ERROR
    goto :EOF
)

set number_var
goto :EOF
</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/8199049171980759310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/validate-number-arguments-within-cmdbat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8199049171980759310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8199049171980759310'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/validate-number-arguments-within-cmdbat.html' title='Validate number arguments within CMD/BAT'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2781179056475717435</id><published>2009-06-13T12:45:00.030+04:00</published><updated>2010-09-23T09:12:48.518+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><title type='text'>Complex numbers with Javascript</title><summary type='text'>Однажды решили попрактиковаться в реализации комплексных чисел средствами Javascript. Вот что из этого получилось. Особенностью модуля является вычисление всех частей (вещественной, мнимой, модуля и аргумента) комплексного числа на момент его создания. Это ни прибавляет, ни отнимает скорости вычислений, но оптимизирует некоторые вычисления (например, при вычислениях в алгебраической или полярной </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2781179056475717435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/complex-numbers-with-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2781179056475717435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2781179056475717435'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/06/complex-numbers-with-javascript.html' title='Complex numbers with Javascript'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-8160700786138946455</id><published>2009-05-26T00:09:00.013+04:00</published><updated>2010-02-11T13:56:56.500+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><title type='text'>О влиянии волосяного покрова из спагетти на вкусовые качества сарделек</title><summary type='text'>Профессор кулинарии Некстлессон сообщил о необычном кулинарном эксперименте по разведению волосатых сосисок. Нами был повторен данный эксперимент. 



В качестве исследуемых ингредиентов были использованы следующие продукты: сардельки телячьи ГОСТ Р 52196-2003 и спагетти прямоугольные Linguine от компании 3 Glocken (Германия). В ходе эксперимента две сардельки были утыканы примерно 40 </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/8160700786138946455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/05/blog-post_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8160700786138946455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/8160700786138946455'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/05/blog-post_26.html' title='О влиянии волосяного покрова из спагетти на вкусовые качества сарделек'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_VcePdNAm1vc/Shr78NoPykI/AAAAAAAABpM/4kAfcMRGxRo/s72-c/IMG_3479.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-3265123619343872084</id><published>2009-05-23T15:14:00.014+04:00</published><updated>2010-02-11T13:58:58.893+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='photo'/><title type='text'>Сам себе книгоиздатель</title><summary type='text'>Краткая инструкция с иллюстрациями о домашнем книгоиздании. 



Желание
Вначале было желание. И желание это было – читать книгу с листа, а не с экрана компьютера. Хорошо если книга издана и есть в магазине. Что делать, если книги нет, или она недоступна, или она существует только в электронном варианте? Распечатать! 


Интерфейс книги располагает к долгому и вдумчивому чтению. Книга позволяет </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/3265123619343872084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/05/blog-post.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3265123619343872084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/3265123619343872084'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/05/blog-post.html' title='Сам себе книгоиздатель'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_VcePdNAm1vc/ShbqqFDWjyI/AAAAAAAABmw/qKhWTAY-sGM/s72-c/IMG_3451.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-4216812361459482189</id><published>2009-04-08T15:52:00.038+04:00</published><updated>2010-02-11T13:59:43.637+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>How to secure your PC from autostart/autorun viruses on flash</title><summary type='text'>Introduction
This article has been inspired after reading of the another article devoted to mounted disks within Windows XP. To know details follow the link. Here i will briefly explain essentials from that article and will demonstrate how this feature can be applied for the subject. Of course, do not need to accept these instructions with high seriousness. 




Mounted disk is disk that is </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/4216812361459482189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/how-to-secure-your-pc-from-autostart.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4216812361459482189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4216812361459482189'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/how-to-secure-your-pc-from-autostart.html' title='How to secure your PC from autostart/autorun viruses on flash'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-90423511937005929</id><published>2009-04-05T14:41:00.008+04:00</published><updated>2010-02-11T14:00:18.095+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Prepare a request from an assoc.array</title><summary type='text'>I am continuing (with sorry about this) to free from unused codes in my box. Meet next code - it allows to convert an assoc.array to an URL request and backward.




class PrepareRequest
{

    /**
     * string PrepareRequest::join(array $array)
     *
     * Converting of arrays to the strings. Resulting string contains keys and values
     * correctly for HTTP requests such as key1=value1&amp;key2</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/90423511937005929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/prepare-request-from-assocarray.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/90423511937005929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/90423511937005929'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/prepare-request-from-assocarray.html' title='Prepare a request from an assoc.array'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1041707981799962441</id><published>2009-04-05T11:58:00.007+04:00</published><updated>2010-02-11T14:01:38.119+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Highlight of selected words in html texts</title><summary type='text'>


/**
 * Useful routine for text highlighting wihin search scripts
 * Searchs the selected words in the texts and highlight them
 *
 * @param   array   $texts       Array of found texts and fragments. These
 *                               may be result data recieved from any 
 *                               database or files.
 * @param   array   $words       Array of lookup words. You can pass</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1041707981799962441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/highlight-of-selected-words-in-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1041707981799962441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1041707981799962441'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/highlight-of-selected-words-in-html.html' title='Highlight of selected words in html texts'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2174273378408113340</id><published>2009-04-05T11:36:00.012+04:00</published><updated>2010-02-11T14:01:52.332+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Create hex-dump of string</title><summary type='text'>Однажды я упражнялся в алгоритмизации простой задачи на PHP. Вот результат (с небольшими доработками перед отправкой сюда).




/**
 * Creates hex-dump of string variable
 *
 * @param  string
 * @param  array
 * @return string
 */
function strhex($string, $options=array())
{
    static $defOptions = array(
        'width' =&gt; 16,
        'alt' =&gt; '.',
        'skipHeader' =&gt; false,
    );
    $</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2174273378408113340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/create-hex-dump-of-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2174273378408113340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2174273378408113340'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/create-hex-dump-of-string.html' title='Create hex-dump of string'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2598262844915414742</id><published>2009-04-05T00:11:00.009+04:00</published><updated>2010-02-11T14:02:16.337+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Bit collection from integer value</title><summary type='text'>The next example of code that was appeared once without any historical bounds of it's appearance. Look. It collects all bits from an integer value into an array.




function array_bits($integer, $bit_keys=false)
{
    static $bits = array();

    $result = array();

    if ( empty($bits) ) {
        $i = 1;
        while ( $i ) {
            if ( $i &amp; $integer ) {
                $result[] = $i;</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2598262844915414742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/bit-collection-from-integer-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2598262844915414742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2598262844915414742'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/bit-collection-from-integer-value.html' title='Bit collection from integer value'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-6736055055420420282</id><published>2009-04-04T23:43:00.011+04:00</published><updated>2010-02-11T14:02:48.314+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Extended floor and ceil functions</title><summary type='text'>I do not remember why i done this. Maybe this was used somewhere. Maybe i had practised in algorithms simply. Do not remember. 
There are two functions allowing round fractions down/up accordingly divider.




/**
 * Returns the lowest integer below $value divisible by divider
 *
 * @param  numeric $value Numeric value
 * @param  integer $div   Optional, divisor
 * @return numeric
 */
function </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/6736055055420420282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/extended-floor-and-ceil-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6736055055420420282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/6736055055420420282'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/04/extended-floor-and-ceil-functions.html' title='Extended floor and ceil functions'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2903790597708471842</id><published>2009-03-27T11:29:00.013+03:00</published><updated>2010-11-27T19:29:30.075+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='windows-scripting-host'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>JavaScript / JScript Benchmark (en)</title><summary type='text'>Beginning
I will not lie - I do not like to estimate a performance of javascript code. This procedure provides for the main project a lot of "unnecessary" and "senseless" code: 

var n = 1000; 
var start = (new Date()).getTime();/
for (var i = 0 ; i &lt; n; i++) {
    // bla-bla-bla ...
}
var stop = (new Date()).getTime();
var duration = stop - start;
var average = duration / n; 
document.writeln(</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2903790597708471842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/javascript-jscript-benchmark-en.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2903790597708471842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2903790597708471842'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/javascript-jscript-benchmark-en.html' title='JavaScript / JScript Benchmark (en)'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-1515925091089306452</id><published>2009-03-23T01:03:00.019+03:00</published><updated>2010-02-11T14:03:47.702+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='feel-sorry-for-throw-out'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Looking over texts within specified tags</title><summary type='text'>Сегодня копался в завалах своего и чужого кода с целью почистить и удалить все, чего я не касался долгое время. Нашел на мой взгляд неплохой код собственного производства. Большой нужды в нем нет - писался одноразово, но хорошо документировано и жалко выкидывать. 

Смысл функции достаточно прост - найти и вытащить текст, окруженный заданным тегом. 




#
# htmlLookOver()
# There is extended </summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/1515925091089306452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/looking-over-texts-within-specified.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1515925091089306452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/1515925091089306452'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/looking-over-texts-within-specified.html' title='Looking over texts within specified tags'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-4524843896002460194</id><published>2009-03-21T02:13:00.064+03:00</published><updated>2011-08-02T11:57:57.487+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='windows-scripting-host'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='jscript'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>JavaScript / JScript Benchmark</title><summary type='text'>&lt;!--

http://ir2.ru/benchmark.aspx
http://javascript.ru/forum/85036-post27.html

--&gt;
Начало
Не буду лгать - я не люблю оценивать производительность javascript кода. Эта процедура содержит для основного проекта массу "ненужного" и "бессмысленного" кода: 

var n = 1000; 
var start = (new Date()).getTime();/
for (var i = 0 ; i &lt; n; i++) {
    // bla-bla-bla ...
}
var stop = (new Date()).getTime();
</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/4524843896002460194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/javascript-jscript-benchmark.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4524843896002460194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/4524843896002460194'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/03/javascript-jscript-benchmark.html' title='JavaScript / JScript Benchmark'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-2733657796450171810</id><published>2009-02-23T13:32:00.010+03:00</published><updated>2009-11-12T16:48:35.185+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hello-world'/><title type='text'>Для чего это нужно?</title><summary type='text'>Важный вопрос.

Возможно, когда-нибудь я смогу ответить на него.</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/2733657796450171810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/02/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2733657796450171810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/2733657796450171810'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/02/blog-post.html' title='Для чего это нужно?'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7065531327424009791.post-362540736272614515</id><published>2009-02-16T04:31:00.014+03:00</published><updated>2009-11-12T16:48:35.185+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hello-world'/><title type='text'>Hello, World!</title><summary type='text'>Trying to create the first message in this blog.

&lt;message&gt;
&lt;title&gt;Hello, World!&lt;/title&gt;
&lt;say&gt;&lt;[!CDATA[
Hello, World!
]]&gt;&lt;/say&gt;
&lt;/message&gt;
</summary><link rel='replies' type='application/atom+xml' href='http://with-love-from-siberia.blogspot.com/feeds/362540736272614515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/02/hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/362540736272614515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7065531327424009791/posts/default/362540736272614515'/><link rel='alternate' type='text/html' href='http://with-love-from-siberia.blogspot.com/2009/02/hello-world.html' title='Hello, World!'/><author><name>Ildar Shaimordanov</name><uri>http://www.blogger.com/profile/17634634725724665389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
