<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>This Might Be Useful</title>
	
	<link>http://tmbu.info</link>
	<description>TMBU is an ancient Aztec word, which means 'This Might Be Useful'</description>
	<pubDate>Thu, 30 Apr 2009 11:41:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ThisMightBeUseful" /><feedburner:info uri="thismightbeuseful" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>ThisMightBeUseful</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/ThisMightBeUseful" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://my.feedlounge.com/external/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://static.feedlounge.com/buttons/subscribe_0.gif">Subscribe with FeedLounge</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://www.addtoany.com/?linkname=This%20Might%20Be%20Useful&amp;linkurl=http%3A%2F%2Ffeeds.feedburner.com%2FThisMightBeUseful&amp;type=feed" src="http://www.addtoany.com/addfr-b.gif">Add to Any Feed Reader</feedburner:feedFlare><item>
		<title>iFolder downloading helper</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/ivRKM2s8yvg/</link>
		<comments>http://tmbu.info/ifolder-downloading-helper/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 11:41:59 +0000</pubDate>
		<dc:creator>Hairgel_Addict</dc:creator>
		
		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=263</guid>
		<description><![CDATA[
Маленький и весьма полезный такой скриптик для тех, кто регулярно качает что-то с iFolder. Автоматически переходит на страницу с таймером (открывая лишь сам фрэйм с таймером), а затем, когда таймер доходит до нуля, открывает страницу с капчей, хоть её и приходится вводить вручную, все равно очень удобный скриптик. 
When first download page is opened, it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.loleg.com/blog/wp-content/uploads/2009/04/ifolder_helper.gif" alt="iFolder downloading helper" width="145" height="70" /></p>
<p>Маленький и весьма полезный такой <a href="http://userscripts.org/scripts/show/30525" target="_blank">скриптик</a> для тех, кто регулярно качает что-то с <b>iFolder</b>. Автоматически переходит на страницу с таймером (открывая лишь сам фрэйм с таймером), а затем, когда таймер доходит до нуля, открывает страницу с капчей, хоть её и приходится вводить вручную, все равно очень удобный <a href="http://userscripts.org/scripts/show/30525" target="_blank">скриптик</a>. </p>
<blockquote><p>When first download page is opened, it navigates browser to first advertisement proposed. Then it does replace frameset by only timer frame, hiding advert and making it count time from the moment advert loading started (by refreshing it, nice feature).</p>
<p>After timer counts down to zero, automagically navigates (refreshes) to CAPTCHA. Unfortunately, it can&#8217;t type it for you. But it installs click-handler on the image, so you can easily change it by clicking on the picture. On final download page, it also emphasizes the download link.</p>
<p>May be especially useful when opening many downloads in tabs.</p></blockquote>
<p><a href="http://userscripts.org/scripts/show/30525" target="_blank"><strong>iFolder downloading helper</strong></a></p>
<p style="border-top: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee; padding: 5px 7px; display: block; font-size: 10px; margin-bottom: 12px; background-color: #fbfbfb; color: #a7a7a7">Crossposted from: <a href="http://www.loleg.com/blog/2009/04/30/11287/" style="color: #777777">LOLEG.com</a>. You can comment here or <a href="http://www.loleg.com/blog/2009/04/30/11287/#comments" style="color: #777777">there</a>.</p>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/ivRKM2s8yvg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/ifolder-downloading-helper/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/ifolder-downloading-helper/</feedburner:origLink></item>
		<item>
		<title>Запускаем Google Gears на 64-bit Linux</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/Xz0qVO77Kt8/</link>
		<comments>http://tmbu.info/zapuskaem-google-gears-na-64-bit-linux/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 13:14:37 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tweaking]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=251</guid>
		<description><![CDATA[Многие добавляют в своих сервисах поддержку Google Gears. В частности сейчас имеет место общий восторг по поводу добавления поддержки этой технологии в GMail, Google Reader и т.п. Кстати, Wordpress 2.7 тоже поддерживает работу с Google Gears.
И все было бы хорошо, но только вот Google не осилили создание версии для 64-bit Linux. В качестве решения они [...]]]></description>
			<content:encoded><![CDATA[<p>Многие добавляют в своих сервисах поддержку Google Gears. В частности сейчас имеет место общий восторг по поводу добавления поддержки этой технологии в GMail, Google Reader и т.п. Кстати, Wordpress 2.7 тоже поддерживает работу с Google Gears.<br />
И все было бы хорошо, но только вот Google не осилили создание версии для 64-bit Linux. В качестве решения они предлагают либо использовать <code>nspluginwrapper</code> (ненадежное, настабильное и глупое решение), либо применить <a href="http://groups.google.com/group/gears-users/browse_thread/thread/4584842dd14a4882/" target="_blank">неофициальный патч</a> (хороший выход, только применять лень; кстати, непонятно почему Google не сделала 64-bit сборку с использованием этого патча).<br />
Так вот, неизвестные добрые люди использовали упомянутый патч и выпустили исправленный плагин для Firefox. Забрать его можно <a href="http://www-personal.umich.edu/~swolchok/gears/" target="_blank">тут</a> или прямо на TMBU.info:</p>
<ul>
<li><a href="http://tmbu.info/uploads/2009/01/gears-linux-opt-0490.xpi" title="Google Gears 0.4.9.0 for 64-bit Linux">Google Gears 0.4.9.0 for 64-bit Linux</li>
<li><a href="http://tmbu.info/uploads/2009/01/gears-linux-opt-05110.xpi" title="Google Gears 0.5.11.0 for 64-bit Linux">Google Gears 0.5.11.0 for 64-bit Linux</a></li>
<li><a href="http://tmbu.info/uploads/2009/01/gears-linux-opt-0511r3162_firefox3_only.xpi" title="Google Gears 0.5.11.0+r3162 (Firefox3 only) for 64-bit Linux">Google Gears 0.5.11.0+r3162 (Firefox3 only) for 64-bit Linux</a></li>
</ul>
<p>Для установки нужно открыть этот файл Firefox&#8217;ом (<code>File -> Open File</code>), в открывшемся окне нажать <code>Install now</code> и перезапустить браузер. Вам будет показано сообщение об ошибке (несоответствие архитектур), но плагин будет работать.</p>
<p><small>Примечание:</p>
<blockquote><p>Google Gears — открытое программное обеспечение от Google (бета, лицензия BSD), позволяющее использование веб-приложений с помощью браузеров Mozilla Firefox,Google Chrome и Internet Explorer под GNU/Linux, Mac OS и Microsoft Windows в режиме оффлайн.</p>
<p>Специальный  заставляет браузер работать с локальным кешем страниц (на основе SQLite), периодически синхронизируя кеш с онлайн источником.</p>
<p>Google gears представляет собой AJAX-API и работает только с веб-сайтами, специально поддерживающими этот сервис.</p>
<p style="text-align: right;">Источник: Wikipedia</p>
</blockquote>
<p></small></p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> <a href='http://nedvizhimost.slando.com.ua/'>Недвижимость в Киеве</a> и <a href="http://netpeak.net/sozdanie_sayta/">создание сайтов в одессе</a> - это Вам не <a href="http://japaneseforum.ru/">Японский форум</a>.</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/Xz0qVO77Kt8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/zapuskaem-google-gears-na-64-bit-linux/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/zapuskaem-google-gears-na-64-bit-linux/</feedburner:origLink></item>
		<item>
		<title>Изменяем размеры картинки с сохранением прозрачности (PHP+GD)</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/oPbXAMuKb5s/</link>
		<comments>http://tmbu.info/izmenjaem-razmery-kartinki-s-sohraneniem-prozrachnosti-php-plus-gd/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 10:10:37 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=243</guid>
		<description><![CDATA[По умолчанию при изменении размеров полупрозраных (и прозрачных) картинок вместо прозрачного фона получается заливка цветом. Это негативно сказывается на внешнем виде изображения и нервах. Поэтому я расскажу, как сохранять прозрачность.
Итак, для этого нам понадобятся следующие функции:

imagecolorallocatealpha
int imagecolorallocatealpha ( resource $image, int $red, int $green, int $blue, int $alpha)
imagealphablending
bool imagealphablending  ( resource $image, bool $blendmode)
imagesavealpha
bool [...]]]></description>
			<content:encoded><![CDATA[<p>По умолчанию при изменении размеров полупрозраных (и прозрачных) картинок вместо прозрачного фона получается заливка цветом. Это негативно сказывается на внешнем виде изображения и нервах. Поэтому я расскажу, как сохранять прозрачность.<br />
Итак, для этого нам понадобятся следующие функции:</p>
<ul>
<li><code>imagecolorallocatealpha</code><br />
<small>int imagecolorallocatealpha ( resource <em>$image</em>, int <em>$red</em>, int <em>$green</em>, int <em>$blue</em>, int <em>$alpha</em>)</small></li>
<li><code>imagealphablending</code><br />
<small>bool imagealphablending  ( resource <em>$image</em>, bool <em>$blendmode</em>)</small></li>
<li><code>imagesavealpha</code><br />
<small>bool imagesavealpha  ( resource <em>$image</em>, bool <em>$saveflag</em>)</small></li>
</ul>
<p>Код в результате выглядит примерно так:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showCodeTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$imgInfo</span> = <a href="http://www.php.net/getimagesize"><span style="color:#000066;">getimagesize</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$img</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$im</span> = <a href="http://www.php.net/imagecreatefrompng"><span style="color:#000066;">imagecreatefrompng</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$img</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$newImg</span> = <a href="http://www.php.net/imagecreatetruecolor"><span style="color:#000066;">imagecreatetruecolor</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$nWidth</span>, <span style="color:#0000FF;">$nHeight</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagealphablending<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$newImg</span>, <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagesavealpha<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$newImg</span>,<span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$transparent</span> = imagecolorallocatealpha<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$newImg</span>, <span style="color:#CC66CC;color:#800000;">255</span>, <span style="color:#CC66CC;color:#800000;">255</span>, <span style="color:#CC66CC;color:#800000;">255</span>, <span style="color:#CC66CC;color:#800000;">127</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagefilledrectangle<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$newImg</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#0000FF;">$nWidth</span>, <span style="color:#0000FF;">$nHeight</span>, <span style="color:#0000FF;">$transparent</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/imagecopyresampled"><span style="color:#000066;">imagecopyresampled</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$newImg</span>, <span style="color:#0000FF;">$im</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#0000FF;">$nWidth</span>, <span style="color:#0000FF;">$nHeight</span>, <span style="color:#0000FF;">$imgInfo</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#0000FF;">$imgInfo</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Так что <a href="http://tmbu.info/create-proportionally-resized-picture-thumbnail/" target="_blank">мою старую функцию</a> можно доработать так, чтобы она сохраняла прозрачность картинок. Заодно и тип файла можно проверять не по расширению, а по тому, что вернет <code>getimagesize</code> (исходя из приведенного выше примера - это элемент <code>$imgInfo[2]</code>).</p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> Даже <a href="http://wwwomen.com.ua/tags/%F0%E5%E1%E5%ED%EE%EA">ребенок</a> знает, что <a href="http://inweb.od.ua/">сделать сайт</a> недостаточно, надо еще и найти <a href="http://rmhost.ru/">качественный хостинг</a>.</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/oPbXAMuKb5s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/izmenjaem-razmery-kartinki-s-sohraneniem-prozrachnosti-php-plus-gd/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/izmenjaem-razmery-kartinki-s-sohraneniem-prozrachnosti-php-plus-gd/</feedburner:origLink></item>
		<item>
		<title>Вставка видео с YouTube в высоком качестве. Плюс список видов видео.</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/arErHMtkwzc/</link>
		<comments>http://tmbu.info/vstavka-video-s-youtube-v-vysokom-kachestve-pljus-spisok-vidov-video/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 13:23:28 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=234</guid>
		<description><![CDATA[По умолчанию код для вставки видео, который предлагает YouTube, дает видео в низком (точнее, обычном) качестве.
Для того, чтобы вставить видео высокого качества нужно добавить в адрес записи "&#038;ap=%2526fmt%3D18" (без кавычек). Обратите внимание, что в коде вставки адрес встречается дважды.
Например:
PLAIN TEXT
HTML:




&#60;object width="480" height="295"&#62;


&#160; &#60;param name="movie" value="http://www.youtube.com/v/S1ZZreXEqSY&#38;hl=en&#38;fs=1&#38;ap=%2526fmt%3D18"&#62;&#60;/param&#62;


&#160; &#60;param name="allowFullScreen" value="true"&#62;&#60;/param&#62;


&#160; &#60;param name="allowscriptaccess" value="always"&#62;&#60;/param&#62;


&#160; &#60;embed src="http://www.youtube.com/v/S1ZZreXEqSY&#38;hl=en&#38;fs=1&#38;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowscriptaccess="always" [...]]]></description>
			<content:encoded><![CDATA[<p>По умолчанию код для вставки видео, который предлагает YouTube, дает видео в низком (точнее, обычном) качестве.<br />
Для того, чтобы вставить видео высокого качества нужно добавить в адрес записи "<code>&#038;ap=%2526fmt%3D18</code>" (без кавычек). Обратите внимание, что в коде вставки адрес встречается дважды.</p>
<p>Например:</p>
<div class="igBar"><span id="lhtml-4"><a href="#" onclick="javascript:showCodeTxt('html-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-4">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/object.html"><span style="color: #000000; font-weight: bold;">&lt;object</span></a> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"480"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"295"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/param.html"><span style="color: #000000; font-weight: bold;">&lt;param</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"movie"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"http://www.youtube.com/v/S1ZZreXEqSY&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/param.html"><span style="color: #000000; font-weight: bold;">&lt;param</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"allowFullScreen"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"true"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/param.html"><span style="color: #000000; font-weight: bold;">&lt;param</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"allowscriptaccess"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"always"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;">&lt;embed <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"http://www.youtube.com/v/S1ZZreXEqSY&amp;hl=en&amp;fs=1&amp;ap=%2526fmt%3D18"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"application/x-shockwave-flash"</span> allowscriptaccess=<span style="color: #ff0000;">"always"</span> allowfullscreen=<span style="color: #ff0000;">"true"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"480"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"295"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/embed&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/object&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Само собой, это доступно только для тех записей, у которых есть вариант в высоком качестве. Если такого нет, автоматически покажется обычный.</p>
<p>Вообще, помимо варианта по умолчанию, доступны следующие виды качества видео (т.е. значения параметра <code>fmt</code>):</p>
<ul>
<li>6 - HQ flv <small>(480 x 360, 30fps, 900KBps video Flash Sorenson, 44.1KHz 96 kbps Mono CBR audio MP3)</small></li>
<li>18 - mp4 <small>(480 x 360, 24fps, 512KBps video h.264, 44.1KHz 128 kbps Stereo audio AAC)</small></li>
<li>22 - HD <small>(1280 x 720, 30fps, 2000kbps video AVC, 232kbps audio AAC, 44.1khz stereo)</small></li>
</ul>
<p>Эти параметры можно использовать и в ссылках на видео. Например: <code>http://www.youtube.com/watch?v=S1ZZreXEqSY&#038;fmt=18</code></p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> Активная <a href="http://stoim.com.ua/sell_apt/">продажа квартир в одессе</a> дала кое-кому хороший <a href="http://www.netbee.ua/">дополнительный заработок</a>. Особенно в условиях, когда <a href="http://rabota.slando.od.ua/">работа в Одессе</a> не радует.</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/arErHMtkwzc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/vstavka-video-s-youtube-v-vysokom-kachestve-pljus-spisok-vidov-video/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/vstavka-video-s-youtube-v-vysokom-kachestve-pljus-spisok-vidov-video/</feedburner:origLink></item>
		<item>
		<title>Восстановление удаленных записей в mySQL из binlog</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/aOsy2dFez9A/</link>
		<comments>http://tmbu.info/vosstanovlenie-udalennyh-zapisej-v-mysql-iz-binlog/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 12:11:26 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=232</guid>
		<description><![CDATA[Вчера я случайно удалил почти все записи из таблицы статистики просмотра видеозаписей Движущихся Картинок. Событие более чем печальное. До этого я предполагал, что восстановить удаленные записи практически невозможно. Оказалось, что можно. Если включены бинарные логи (для их включения в настройках mySQL надо указать параметр log-bin).
В результате некоторых раздумий получилась команда:
/usr/bin/mysqlbinlog --database=нужная_база_данных --start-datetime="2008-01-01 00:00:00"  путь_ко_всем_binlog [...]]]></description>
			<content:encoded><![CDATA[<p>Вчера я случайно удалил почти все записи из таблицы статистики просмотра видеозаписей <a href="http://video.recovered.info" target="_blank">Движущихся Картинок</a>. Событие более чем печальное. До этого я предполагал, что восстановить удаленные записи практически невозможно. Оказалось, что можно. Если включены бинарные логи (для их включения в настройках mySQL надо указать параметр <code>log-bin</code>).<br />
В результате некоторых раздумий получилась команда:<br />
<code>/usr/bin/mysqlbinlog --database=<em>нужная_база_данных</em> --start-datetime="2008-01-01 00:00:00"  <em>путь_ко_всем_binlog</em> | tr "\t" " " | tr "\n" " " | tr ";""\n" | grep "INSERT INTO \`<em>побитая_таблица</em>\`" > p.sql</code></p>
<p>Параметр <em>start-datetime</em> содержит в себе дату, с которой вынимаем логи. Можно еще указать время остановки (в моем случае это было неактуально).<br />
Далее нужно указать не просто путь к логам, а все файлы логов (например, <code>/var/lib/mysql/lalala-bin.*</code>).<br />
Несколько <code>tr</code>'ов нужны потому, что запрос мой был многострочным, а надо было мне получать один запрос в одну строку.</p>
<p>В конечном счете в файле <code>p.sql</code> я получил нужные мне запросы. Единственное, что в конце строк не было точки с запятой. Это было исправное просто:<br />
<code>cat p.sql | sed "s/\"\)/\"\);/g" > p2.sq</code><br />
<small>Просто у меня каждый запрос оканчивался на ....")</small></p>
<p>Когда я попытался скормить запросы mySQL'у оказалось, что из-за того, что были удалены не все записи, начались проблемы с уникальностью некоторых полей. Чтобы не копаться в дампе руками, сделал так:<br />
<code>cat p2.sql | sed "s/INSERT INTO/INSERT IGNORE INTO/g" > p3.sql</code></p>
<p>И уже <code>p3.sql</code> успешно скормил mySQL'у.</p>
<p>Отсюда выводы: во первых, всегда делайте бекапы (как можно чаще), и во вторых всегда включайте логирование.</p>
<p>P.S. Конечно же из binlog'ов можно вытащить все, что делалось с базой. И Восстановить то состояние, которое нужно.</p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> <a href="http://www.vashsad.ua/rus/useful_clauses_new_year_1.html">В древнем Вавилоне новый год</a> был поводом подарить друзьям <a href="http://ionstream.com.ua">очистители воздуха</a> и <a href="http://www.lego4all.ru/page/page25.html">купить лего</a>.</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/aOsy2dFez9A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/vosstanovlenie-udalennyh-zapisej-v-mysql-iz-binlog/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/vosstanovlenie-udalennyh-zapisej-v-mysql-iz-binlog/</feedburner:origLink></item>
		<item>
		<title>Заключаем в таги выделенный в textarea текст</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/rOGNXC6x7Sg/</link>
		<comments>http://tmbu.info/zakljuchaem-v-tagi-vydelennyj-v-textarea-tekst/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 07:26:19 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=226</guid>
		<description><![CDATA[В продолжение вчерашних манипуляций с текстом понадобилось вставлять в textarea таги. Причем не просто вставлять, а "брать" в таги выделенный текст. Соответствующая функция приведена ниже.
PLAIN TEXT
JAVASCRIPT:




function insertTag&#40;elem, tagstart, tagend&#41; &#123;


&#160; // Mozilla и другие вменяемые браузеры


&#160; if &#40;elem.setSelectionRange&#41; &#123;


&#160; &#160; elem.value = elem.value.substring&#40;0, elem.selectionStart&#41; +


&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; tagstart +


&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>В продолжение вчерашних <a href="http://tmbu.info/vstavljaem-v-textarea-tekst-tuda-gde-nahoditsja-kursor/">манипуляций с текстом</a> понадобилось вставлять в textarea таги. Причем не просто вставлять, а "брать" в таги выделенный текст. Соответствующая функция приведена ниже.</p>
<div class="igBar"><span id="ljavascript-6"><a href="#" onclick="javascript:showCodeTxt('javascript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> insertTag<span style="color: #66cc66;">&#40;</span>elem, tagstart, tagend<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// Mozilla и другие вменяемые браузеры</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>elem.<span style="color: #006600;">setSelectionRange</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; elem.<span style="color: #006600;">value</span> = elem.<span style="color: #006600;">value</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">0</span>, elem.<span style="color: #006600;">selectionStart</span><span style="color: #66cc66;">&#41;</span> +</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tagstart +</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.<span style="color: #006600;">value</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>elem.<span style="color: #006600;">selectionStart</span>, elem.<span style="color: #006600;">selectionEnd</span><span style="color: #66cc66;">&#41;</span> +</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tagend +</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.<span style="color: #006600;">value</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>elem.<span style="color: #006600;">selectionEnd</span>, elem.<span style="color: #006600;">value</span>.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// MSIE</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> selectedText = document.<span style="color: #006600;">selection</span>.<span style="color: #006600;">createRange</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">text</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>selectedText != <span style="color: #3366CC;">""</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> newText = tagstart + selectedText + tagend;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; document.<span style="color: #006600;">selection</span>.<span style="color: #006600;">createRange</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">text</span> = newText;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #009900; font-style: italic;">// insertTag </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> Пройди <a href="http://apelmon.od.ua/ipb.html?autocom=iq_test">iq тест</a> узнай, на сколько ты умен! Если что - поможет <a href="http://alkogolya.net/">лечение алкоголизма</a> и <a href="http://polinar.com.ua/">частная наркологическая клиника одесса</a>.</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/rOGNXC6x7Sg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/zakljuchaem-v-tagi-vydelennyj-v-textarea-tekst/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/zakljuchaem-v-tagi-vydelennyj-v-textarea-tekst/</feedburner:origLink></item>
		<item>
		<title>Вставляем в textarea текст туда, где находится курсор</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/-iXIM6kWpAo/</link>
		<comments>http://tmbu.info/vstavljaem-v-textarea-tekst-tuda-gde-nahoditsja-kursor/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 17:06:47 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=218</guid>
		<description><![CDATA[Только что наткнулся на необходимость с помощью JavaScript вставлять текст в textarea в то место, где сейчас находится курсор. Получилась нижеприведенная функция. Параметров у нее два - поле, куда вставлять, и текст, который вставлять.
PLAIN TEXT
JAVASCRIPT:




function insertAtCursor&#40;myField, myValue&#41; &#123;


&#160; //&#160; Для MSIE


&#160; if &#40;document.selection&#41; &#123;


&#160; &#160; myField.focus&#40;&#41;;


&#160; &#160; sel = document.selection.createRange&#40;&#41;;


&#160; &#160; sel.text = myValue;


&#160; &#125;


&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Только что наткнулся на необходимость с помощью JavaScript вставлять текст в textarea в то место, где сейчас находится курсор. Получилась нижеприведенная функция. Параметров у нее два - поле, куда вставлять, и текст, который вставлять.</p>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showCodeTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> insertAtCursor<span style="color: #66cc66;">&#40;</span>myField, myValue<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">//&nbsp; Для MSIE</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">selection</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myField.<span style="color: #000066;">focus</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; sel = document.<span style="color: #006600;">selection</span>.<span style="color: #006600;">createRange</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; sel.<span style="color: #006600;">text</span> = myValue;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// Для нормальных браузеров</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>myField.<span style="color: #006600;">selectionStart</span> || myField.<span style="color: #006600;">selectionStart</span> == <span style="color: #3366CC;">'0'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> startPos = myField.<span style="color: #006600;">selectionStart</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> endPos = myField.<span style="color: #006600;">selectionEnd</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myField.<span style="color: #006600;">value</span> = myField.<span style="color: #006600;">value</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">0</span>, startPos<span style="color: #66cc66;">&#41;</span> + myValue + myField.<span style="color: #006600;">value</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>endPos, myField.<span style="color: #006600;">value</span>.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// Для остальных ;)</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; myField.<span style="color: #006600;">value</span> += myValue;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #009900; font-style: italic;">// insertAtCursor </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div style="padding: 10px; font-size: 10px; color: #555555;"><i>Постовой:</i> Правильная <a href="http://nodar.name/">seo</a> поисковая оптимизация - это залог процветания сайта. Кроме того, любому web-программисту рано или поздно понадобится <a href="http://cooper-design.com.ua/">web дизайн</a>. Ну и <a href="http://toptea.ru/">чай</a>, конечно ;).</div>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/-iXIM6kWpAo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/vstavljaem-v-textarea-tekst-tuda-gde-nahoditsja-kursor/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/vstavljaem-v-textarea-tekst-tuda-gde-nahoditsja-kursor/</feedburner:origLink></item>
		<item>
		<title>Убираем всплывающие jobs и notifications в KDE 4.2</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/NeAXFWEgy3s/</link>
		<comments>http://tmbu.info/ubiraem-vsplyvajushhie-jobs-i-notifications-v-kde-42/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 10:58:47 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tweaking]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=215</guid>
		<description><![CDATA[В KDE 4.2 (на данный момент - beta 2) все в общем хорошо, но сильно раздражают всплывающие около system tray окошки job notification (особенно - при старте KTorrent и активном использовании Krusader). Спрятать их навсегда нормальными средствами нельзя - такой опции в настроках системы нет, а ветка 4.2 находится в состояние feature freeze, так что [...]]]></description>
			<content:encoded><![CDATA[<p>В KDE 4.2 (на данный момент - beta 2) все в общем хорошо, но сильно раздражают всплывающие около system tray окошки <code>job notification</code> (особенно - при старте KTorrent и активном использовании Krusader). Спрятать их навсегда нормальными средствами нельзя - такой опции в настроках системы нет, а ветка 4.2 находится в состояние feature freeze, так что и не будет в ближайшее время. В принципе, программы сами должны иметь такую настройку (т.е. уметь использовать флаг <code>KIO:HideProgressInfo</code>). Но далеко не везде это реализовано.<br />
Так что пока что можно спрятать лишние сообщения вручную, тем самым вернувшись к привычным окошкам с progress bar'ом (появляются только когда надо и не раздражают совсем).<br />
Для этого надо в файл <code>~/.kde/share/config/plasma-appletrc</code> добавить следующие строки:</p>
<p><code>[AppletGlobals][plasma_applet_systemtray]<br />
ShowJobs=false</code></p>
<p>Чтобы спрятать notifications можно использовать флаг <code>ShowNotifications</code>. Но это, по-моему, уже лишнее.</p>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/NeAXFWEgy3s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/ubiraem-vsplyvajushhie-jobs-i-notifications-v-kde-42/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/ubiraem-vsplyvajushhie-jobs-i-notifications-v-kde-42/</feedburner:origLink></item>
		<item>
		<title>Включаем Wi-fi, потерянный в Ubuntu 8.10 (iwl3945: Radio disabled by HW RF Kill switch)</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/HxKmjcA1Z6c/</link>
		<comments>http://tmbu.info/vkljuchaem-wi-fi-poterjannyj-v-ubuntu-810-iwl3945-radio-disabled-by-hw-rf-kill-switch/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 10:16:49 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tweaking]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=210</guid>
		<description><![CDATA[После обновления Ubuntu до версии 8.10 столкнулся с тем, что перестал включаться и работать wifi-адаптер. dmesg показывал:
iwl3945: Radio disabled by HW RF Kill switch
Хардварная кнопка включения не помогала. Предложенный на launchpad'е wordaround (загрузка с включенным wifi) тоже не сработал.
После долгих поисков было найдено решение:
modprobe -r iwl3945
modprobe iwl3945 disable_hw_scan=1
Эти комманды, понятное дело, надо выполнять с привелегиями [...]]]></description>
			<content:encoded><![CDATA[<p>После обновления Ubuntu до версии 8.10 столкнулся с тем, что перестал включаться и работать wifi-адаптер. <code>dmesg</code> показывал:<br />
<code>iwl3945: Radio disabled by HW RF Kill switch</code><br />
Хардварная кнопка включения не помогала. Предложенный на launchpad'е wordaround (загрузка с включенным wifi) тоже не сработал.</p>
<p>После долгих поисков было найдено решение:<br />
<code>modprobe -r iwl3945<br />
modprobe iwl3945 disable_hw_scan=1</code></p>
<p>Эти комманды, понятное дело, надо выполнять с привелегиями root'а. Проще всего их прописать, скажем, в <code>/etc/rc.local</code></p>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/HxKmjcA1Z6c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/vkljuchaem-wi-fi-poterjannyj-v-ubuntu-810-iwl3945-radio-disabled-by-hw-rf-kill-switch/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/vkljuchaem-wi-fi-poterjannyj-v-ubuntu-810-iwl3945-radio-disabled-by-hw-rf-kill-switch/</feedburner:origLink></item>
		<item>
		<title>Отучаем Firefox автоматически свертывать панель закладок</title>
		<link>http://feedproxy.google.com/~r/ThisMightBeUseful/~3/rCFO4f5PejU/</link>
		<comments>http://tmbu.info/otuchaem-firefox-avtomaticheski-svertyvat-panel-zakladok/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 09:48:58 +0000</pubDate>
		<dc:creator>Filosoff</dc:creator>
		
		<category><![CDATA[Configuration]]></category>

		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://tmbu.info/?p=205</guid>
		<description><![CDATA[После того, как я (в целях максимизации полезного пространства) поставил в Firefox меню, закладки и location bar в одну строку, блок закладок начал периодически автоматически "схлопываться". Пришлось найти рецепт для отучения Firefox'а от этой неудобной привычки - необходимо добавить в userChrome.css (в папке chrome/ в профиле) следующие строки:
PLAIN TEXT
CSS:




#bookmarksBarContent .bookmark-item &#123;


&#160; visibility: visible !important;


&#125; 






]]></description>
			<content:encoded><![CDATA[<p>После того, как я (в целях максимизации полезного пространства) поставил в Firefox меню, закладки и location bar в одну строку, блок закладок начал периодически автоматически "схлопываться". Пришлось найти рецепт для отучения Firefox'а от этой неудобной привычки - необходимо добавить в <code>userChrome.css</code> (в папке <code>chrome/</code> в профиле) следующие строки:</p>
<div class="igBar"><span id="lcss-10"><a href="#" onclick="javascript:showCodeTxt('css-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CSS:</span>
<div id="css-10">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#bookmarksBarContent <span style="color: #6666ff;">.bookmark-item </span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">visibility</span>: <span style="color: #993333;">visible</span> !important;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<img src="http://feeds.feedburner.com/~r/ThisMightBeUseful/~4/rCFO4f5PejU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tmbu.info/otuchaem-firefox-avtomaticheski-svertyvat-panel-zakladok/feed/</wfw:commentRss>
		<feedburner:origLink>http://tmbu.info/otuchaem-firefox-avtomaticheski-svertyvat-panel-zakladok/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.298 seconds -->
