<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>noBigWords</title>
	<atom:link href="http://nobigwords.ntxt.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://nobigwords.ntxt.net</link>
	<description>not big words not only about web</description>
	<lastBuildDate>Sun, 12 Feb 2012 23:19:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Vino de Jerez</title>
		<link>http://nobigwords.ntxt.net/2012/02/13/vino-de-jerez/</link>
		<comments>http://nobigwords.ntxt.net/2012/02/13/vino-de-jerez/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 23:19:19 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[życie]]></category>
		<category><![CDATA[ceny]]></category>
		<category><![CDATA[Jerez]]></category>
		<category><![CDATA[sherry]]></category>
		<category><![CDATA[wino]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=584</guid>
		<description><![CDATA[Dobre acz słodkie. Fajne do wysączenia. Np. takie Canasta Cream, co &#8211; ciekawostka &#8211; tu w Mercadonie kosztuje euro 6, a w polskim]]></description>
			<content:encoded><![CDATA[<p>Dobre acz słodkie. Fajne do wysączenia. Np. takie Canasta Cream, co &#8211; ciekawostka &#8211; tu w Mercadonie kosztuje euro 6, a w polskim <a href=""http://www.slonecznawinnica.pl/Sherry_Canasta_Cream_Jerez_DO-1801.html">sklepie winodajnym</a> złotych 57. Kurs złotego taki raczej korzystny, przynajmniej patrząc z Andaluzji. Wygląda tak: <a href="http://www.shop.ocp1.com/es/vino-espanol/334-canasta-cream-jerez-sherry-william-humbert.html"><img alt="Jerez Canasta Cream " src="http://www.shop.ocp1.com/334-393-large/canasta-cream-jerez-sherry-william-humbert.jpg" title="Jerez Canasta Cream " class="alignnone" width="300" height="300" /></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2012/02/13/vino-de-jerez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Przymiarki. Warto mieć?</title>
		<link>http://nobigwords.ntxt.net/2012/02/12/przymiarki-warto-miec/</link>
		<comments>http://nobigwords.ntxt.net/2012/02/12/przymiarki-warto-miec/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 16:19:23 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[rynek]]></category>
		<category><![CDATA[życie]]></category>
		<category><![CDATA[rozmiar]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[zakupy]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=582</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0665.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0664.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0663.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0662.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0661.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0660.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0659.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0658.jpg" /></p>
<p><img title="" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-IMAG0657.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2012/02/12/przymiarki-warto-miec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Idzie luty.</title>
		<link>http://nobigwords.ntxt.net/2012/02/12/idzie-luty/</link>
		<comments>http://nobigwords.ntxt.net/2012/02/12/idzie-luty/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 15:36:57 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[życie]]></category>
		<category><![CDATA[gibraltar]]></category>
		<category><![CDATA[La Linea]]></category>
		<category><![CDATA[spacer]]></category>
		<category><![CDATA[zima]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=571</guid>
		<description><![CDATA[Czternaście stopni. Tosiek ciut kaszle, ale dzielnie zwiedza murki, pokazuje kamyki, łapki i kupy. Spacerujemy do znudzenia, to właściwie niezawodny sposób na drzemkę.  ]]></description>
			<content:encoded><![CDATA[<p><img title="1329056548027.jpg" class="alignnone" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2012/02/wpid-1329056548027.jpg" /></p>
<p>Czternaście stopni. Tosiek ciut kaszle, ale dzielnie zwiedza murki, pokazuje kamyki, łapki i kupy. Spacerujemy do znudzenia, to właściwie niezawodny sposób na drzemkę.</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2012/02/12/idzie-luty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La Linea de la Concepcion</title>
		<link>http://nobigwords.ntxt.net/2011/12/09/la-linea-de-la-concepcion/</link>
		<comments>http://nobigwords.ntxt.net/2011/12/09/la-linea-de-la-concepcion/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 23:35:48 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[życie]]></category>
		<category><![CDATA[drunk]]></category>
		<category><![CDATA[gibraltar]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[myriad]]></category>
		<category><![CDATA[night]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/2011/12/09/la-linea-de-la-concepcion/</guid>
		<description><![CDATA[No, it is not my dream place to live. I still like it here, right now, a little late to come home, a little lost at the seaside. Not really physically lost, maybe a just a bit stray mentally. And drunk. Definitely had fun. So cheers for that.]]></description>
			<content:encoded><![CDATA[<p><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2011/12/wpid-1323387071536.jpg" /></p>
<p>No, it is not my dream place to live. I still like it here, right now, a little late to come home, a little lost at the seaside. Not really physically lost, maybe a just a bit stray mentally. And drunk. Definitely had fun. So cheers for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2011/12/09/la-linea-de-la-concepcion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>B&#8217;twin logo</title>
		<link>http://nobigwords.ntxt.net/2011/11/15/btwin-logo/</link>
		<comments>http://nobigwords.ntxt.net/2011/11/15/btwin-logo/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 18:25:16 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[media]]></category>
		<category><![CDATA[reklama]]></category>
		<category><![CDATA[rynek]]></category>
		<category><![CDATA[sztuka]]></category>
		<category><![CDATA[życie]]></category>
		<category><![CDATA[bicycle]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[brand]]></category>
		<category><![CDATA[btwin]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[decathlon]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[identity]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[PR]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/2011/11/15/btwin-logo/</guid>
		<description><![CDATA[My everyday bike is proudly carrying this one. A perfect example of how to make a brand look cheap. Even though the product range is quite broad, not necessarily low end only. &#8220;Just look, it has a guy on a bike as a &#8216;t&#8217;, this is the perfect metaphore of our brand&#8221; &#8211; said the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://nobigwords.ntxt.net/wp-content/uploads/2011/11/wpid-IMAG0590.jpg" /></p>
<p>My everyday bike is proudly carrying this one. A perfect example of how to make a brand look cheap. Even though the product range is quite broad, not necessarily low end only. &#8220;Just look, it has a guy on a bike as a &#8216;t&#8217;, this is the perfect metaphore of our brand&#8221; &#8211; said the marketing manager. Me, I&#8217;d stick to the Decathlon brand.</p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2011/11/15/btwin-logo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>graphics design theft</title>
		<link>http://nobigwords.ntxt.net/2011/08/17/graphics-design-theft/</link>
		<comments>http://nobigwords.ntxt.net/2011/08/17/graphics-design-theft/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 20:36:48 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[bezpieczeństwo]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[ntxt.net]]></category>
		<category><![CDATA[reklama]]></category>
		<category><![CDATA[rynek]]></category>
		<category><![CDATA[www]]></category>
		<category><![CDATA[życie]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[advertisement]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[copy and paste]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[digital work]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[investigate]]></category>
		<category><![CDATA[K-Prim Design]]></category>
		<category><![CDATA[original]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[theft]]></category>
		<category><![CDATA[thieves]]></category>
		<category><![CDATA[unauthorised]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=562</guid>
		<description><![CDATA[All of you happening to publish your images here and there know that it is all too easy to copy them and sign with other name. Oh no, you do not even have the signatures anymore! But there comes the digital investigation bureau: images.google.com. Long time in beta, long time not really available, it has [...]]]></description>
			<content:encoded><![CDATA[<p>All of you happening to publish your images here and there know that it is all too easy to copy them and sign with other name. Oh no, you do not even have the signatures anymore! But there comes the digital investigation bureau: <a href="http://images.google.com/">images.google.com</a>. Long time in beta, long time not really available, it has now the functionality I was looking for. There, you just drag your fancy JPG over the input box and mighty google says where it has been seen lately. If you see more links than expected, sue them ;) Mine appeared on a <a href="http://www.k-prim.biz/Print/katalozi.html">Bulgarian theft design studio site</a>. Just compare to the <a href="http://ntxt.net/?id=portfolio/rd_bud">4<sup>th</sup> paragraph in my old NTXT portfolio</a>. There&#8217;s a decent company of robbed designers: <a href="http://www.uc4.co.uk/dfp-catalogue.htm">UC4</a>, <a href="http://alpipi.deviantart.com/art/UBA-Company-Profile-Catalogue-74809149">alpipi</a> and more.</p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2011/08/17/graphics-design-theft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Levenshtein and Distance Between Strings in 3D</title>
		<link>http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/</link>
		<comments>http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 00:50:47 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bezpieczeństwo]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[tekst]]></category>
		<category><![CDATA[levenshtein]]></category>
		<category><![CDATA[like]]></category>
		<category><![CDATA[likehood]]></category>
		<category><![CDATA[match strings]]></category>
		<category><![CDATA[similar strings]]></category>
		<category><![CDATA[similarity]]></category>
		<category><![CDATA[strings]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[text metrics]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=312</guid>
		<description><![CDATA[To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br />To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br />To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br />Working on the strings distances, or text metrics, I found out the Levenshtein method insufficient. For less-than-similar strings it doesn&#8217;t help at all, giving numbers close to max possible, and for similar strings it does not consider the quality of different letters. Generally speaking, I find Janet1 closer to Janet2 than to Janet9. Or ABC [...]]]></description>
			<content:encoded><![CDATA[To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br />To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br />To view the flash content, please go to <a href="http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/">Levenshtein and Distance Between Strings in 3D</a><br /><br /><p>Working on the strings distances, or text metrics, I found out the Levenshtein method insufficient. For less-than-similar strings it doesn&#8217;t help at all, giving numbers close to max possible, and for similar strings it does not consider the quality of different letters. Generally speaking, I find <em>Janet1 </em>closer to <em>Janet2 </em>than to <em>Janet9</em>. Or <em>ABC </em>closer to <em>BBC </em>than to <em>NBC</em>. The notion of number of operations in Lev method didn&#8217;t quite suit me either. Thinking of operations needed to create one string of the other, I&#8217;d rather take the count of smartest possible copy&amp;paste moves. In other words, how many times I have to cut one string to make the other of the slices. That would be distance in first dimension. The other &#8211; distance between letters replacing each other: when abc becomes bbc, it&#8217;s a-b replacement, and distance from a to b is 1. The distance depends on the alphabet used. For some cases it&#8217;s more useful to use a keyboard-layout order of characters instead of usual alphabetic, in order to emphasise similarities based on easy typed sequences, like <em>asdf </em>or <em>qwerty</em>. Here&#8217;s some Flash demo, calculator and benchmark to compare performance of Levenshtein and my method.</p>
<h3>3d position of the words</h3>
<p>it depends on their similarity to the word you input</p>
<p>
<hr />
<h3>Similarity calculator</h3>
<p>gives the original Levenshtein and the distance3d figures</p>
<hr />
<h3>Benchmarking</h3>
<p>Levenshtein is rather quadratic, while distance3d seems more like linear, though the<br />
difference shows up for words longer than 15 characters.</p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2011/06/05/levenshtein-and-distance-between-strings-in-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Therm-ic ski boots warmer and USB</title>
		<link>http://nobigwords.ntxt.net/2010/12/27/therm-ic-ski-boots-warmer-and-usb/</link>
		<comments>http://nobigwords.ntxt.net/2010/12/27/therm-ic-ski-boots-warmer-and-usb/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 21:17:58 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[życie]]></category>
		<category><![CDATA[atomic]]></category>
		<category><![CDATA[charger]]></category>
		<category><![CDATA[ski]]></category>
		<category><![CDATA[ski boots]]></category>
		<category><![CDATA[therm-ic]]></category>
		<category><![CDATA[thermic]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[warmer]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/2010/12/27/therm-ic-ski-boots-warmer-and-usb/</guid>
		<description><![CDATA[This is a short note: I have Atomic ski bots with a warmer built-in, but never actualy have tried to use the feature. Until today. My toes got so cold this time, so they inspired me to do some research and tests. Long story short &#8211; a USB charger hardwired to pins 1 and 4 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short note: I have Atomic ski bots with a warmer built-in, but never actualy have tried to use the feature. Until today. My toes got so cold this time, so they inspired me to do some research and tests. Long story short &#8211; a USB charger hardwired to pins 1 and 4 make my boots warm right at the toetips. The voltage suggested ranges from 1.2V to 4.8V, while the USB gives about 5V. This at least lets me make the boots cosy when driving, with a car lighter USB charger. Nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2010/12/27/therm-ic-ski-boots-warmer-and-usb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wyszukiwanie wektorowe [cz. 1]</title>
		<link>http://nobigwords.ntxt.net/2010/10/03/wyszukiwanie-wektorowe-cz-1/</link>
		<comments>http://nobigwords.ntxt.net/2010/10/03/wyszukiwanie-wektorowe-cz-1/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 16:13:37 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[www]]></category>
		<category><![CDATA[algorytmy wyszukiwania]]></category>
		<category><![CDATA[architektura informacji]]></category>
		<category><![CDATA[bazy danych]]></category>
		<category><![CDATA[dopasowanie]]></category>
		<category><![CDATA[dopasowanie wyników]]></category>
		<category><![CDATA[optymalizacja wyszukiwania]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[portal mieszkaniowy]]></category>
		<category><![CDATA[portal moto]]></category>
		<category><![CDATA[portal nieruchomości]]></category>
		<category><![CDATA[portal samochodowy]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[wyszukiwanie]]></category>
		<category><![CDATA[wyszukiwarki]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=301</guid>
		<description><![CDATA[Pod mądrą nazwą wyszukiwania wektorowego kryje się odpowiedź na proste pytanie: Jak najlepiej dopasować wyniki wyszukania do zapytania, w sytuacji gdy nie mamy elementów pasujących idealnie? W życiu pytanie to pojawia się na wszelkich stronach z wyszukiwarką produktów, czy to mieszkań, czy aut, czy komputerów. Gdy produkty te są opisane wyłącznie za pomocą liczb, sprawa [...]]]></description>
			<content:encoded><![CDATA[<p>Pod mądrą nazwą wyszukiwania wektorowego kryje się odpowiedź na proste pytanie: </p>
<blockquote><p>Jak najlepiej dopasować wyniki wyszukania do zapytania,<br />
w sytuacji gdy nie mamy elementów pasujących idealnie?</p></blockquote>
<p>W życiu pytanie to pojawia się na wszelkich stronach z wyszukiwarką produktów, czy to mieszkań, czy aut, czy komputerów. Gdy produkty te są opisane wyłącznie za pomocą liczb, sprawa jest prosta. Np.: auto o przebiegu 200 000 km, rok produkcji &ndash; 2006, średnie spalanie 8 l/100 km. Wiadomo, że auta o mniejszym przebiegu są lepsze, niż te spalające więcej, że im dawniej wyprodukowano auto, tym gorzej, że lepiej żeby paliło mniej niż więcej. Czy dzięki temu wiemy, jakie auta będą na pewno lepsze, a jakie gorsze od tego z przykładu? Prawie tak. Prawie, ponieważ nie wiemy, jak przeliczyć jeden rok wieku auta na kilometry przebiegu i litry paliwa.</p>
<p>Zacznijmy więc od sprawy najprostszej, czyli od bazy aut o tylko jednej cesze, czyli opisane rokiem produkcji. Powiedzmy, że w bazie znajdą się dwa auta:</p>
<ol>
<li>A, rok prod. 2001</li>
<li>B, rok prod 2009</li>
</ol>
<p>
Gdy dla szukającego auta do zaakceptowania jest pojazd maksymalnie z 2004 roku, sprawa jest jasna nawet intuicyjnie: wybieramy to z 2009, czyli B.</p>
<p>Jednak jeśli szukający postawi sprawę nieco inaczej, czyli zamiast &laquo;chcę auto maksymalnie z 2004 roku&raquo; powie: &laquo;chcę auto wyprodukowane mniej-więcej w 2004 roku&raquo;, to najbliżej jego ideału jest samochód A, z 2001.</p>
<p>Można mieć wątpliwości, czy wyszukiwarka powinna pokazać auto <i>bliższe</i> zadanym kryteriom, czy też o <i>korzystniejszych parametrach.</i> Rok produkcji to cecha, której wartość wprost przekłada się na jakość auta, zmieńmy ją na taką, która jest neutralna, np. długość pojazdu. Nasza baza zmienia się na taką:
</p>
<ol>
<li>A, długość 390 cm</li>
<li>B, długość 450 cm</li>
</ol>
<p>
Jeśli teraz poszukiwane auto ma mieć 400 cm długości, bardzo blisko tej wartości znajdzie się długość pojazdu A. Gdyby ułożyć samochody z bazy wg dopasowania do zadanych parametrów, A byłoby przed B. To właśnie najprostszy przykład wektorowego opisu wyniku wyszukiwania. Wektor dopasowania to odległość między punktem zadanym przez zapytanie (Z:400 cm) a punktami opisującymi rekordy bazy (A:390 cm i B:450 cm). Wektory dopasowania dla obu aut mają odpowiednio:
</p>
<ol>
<li>Z &#8211; A: abs(390 &#8211; 400) = 10 cm</li>
<li>Z &#8211; B: abs(450 &#8211; 400)  = 50 cm</li>
</ol>
<p><small>funkcja abs(x), czyli wartość bezwzględna ;-)</small></p>
<p>
Dla A długość wektora dopasowania jest 5-krotnie mniejsza niż dla B, więc A jest dużo lepiej dopasowany do zadanych parametrów od B. Kiedy do długości dodamy szerokość, sprawa skomplikuje się o drugi wymiar. Wektor dopasowania będziemy wtedy obliczać jako złożenie składowych, 1-wymiarowych wektorów długości i szerokości. To znana zależność, kojarzona z Pitagorasem. ;) Długość wektora dopasowania to pierwiastek kwadratowy z sumy kwadratów obu wektorów składowych.</p>
<h2>Przekład na SQL</h2>
<p>Przekładając problem na SQL, zaczynamy od takiego pytania:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> samochody
<span style="color: #993333; font-weight: bold;">WHERE</span> dlugosc <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">400</span>;</pre></div></div>

<p>W naszej bazie nie daje ono oczywiście żadnych elementów, czyli zwraca zbiór pusty. Dla naszego poszukiwacza aut to dość frustrująca odpowiedź.<br />
Możemy to nieco poprawić, dodając tolerancję:
</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> samochody
<span style="color: #993333; font-weight: bold;">WHERE</span> dlugosc <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">400</span> <span style="color: #66cc66;">-</span> tolerancja <span style="color: #993333; font-weight: bold;">AND</span>
dlugosc <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">400</span> <span style="color: #66cc66;">+</span> tolerancja;</pre></div></div>

<p>To zwiększa szanse na dobry wynik, ale tylko czasem. Tolerancja może być za mała albo za duża, a zawsze jest kolejnym utrudnieniem dla użytkownika.<br />
Moim zdaniem lepiej będzie tak:
</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> samochody
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> abs<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">400</span> <span style="color: #66cc66;">-</span> dlugosc<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ASC</span>;</pre></div></div>

<p>Wydajnościowo to nienajlepsze rozwiązanie, ale pokazuję tu tylko zasadę. Nienajlepsze, bo spowoduje posortowanie <i>całej</i> bazy aut, w dodatku wg obliczanego, a nie przechowywanego, parametru. W realnych zastosowaniach można uniknąć sortowania wprowdzając nieco więcej logiki przed wykonaniem zapytania.
</p>
<p><small>w roli pojazdu A udział wziął <a href="http://www.ritzsite.demon.nl/Citroen68/Dyane_L.htm">Citroen 1968 Dyane Luxe</a>, w roli pojazdu B - <a href="http://www.samarins.com/reviews/cr-v02.html">Honda CR-V</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2010/10/03/wyszukiwanie-wektorowe-cz-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accelerometer, AIR on Android and Tosia</title>
		<link>http://nobigwords.ntxt.net/2010/09/28/accelerometer-air-on-android-and-tosia/</link>
		<comments>http://nobigwords.ntxt.net/2010/09/28/accelerometer-air-on-android-and-tosia/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 21:53:11 +0000</pubDate>
		<dc:creator>Piotr Tomaszewski</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Adobe AIR for Android]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[życie]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[baby game]]></category>
		<category><![CDATA[dziecko]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[handset]]></category>
		<category><![CDATA[HTC Desire]]></category>
		<category><![CDATA[tilt]]></category>

		<guid isPermaLink="false">http://nobigwords.ntxt.net/?p=299</guid>
		<description><![CDATA[Now it is fun. I did not realize that my handset has the accelerometer sensor until I saw the video. I didn&#8217;t even know that AIR for Android supports the thing. So I tried, and it worked! I modified the code from previous posts, removing multitouch events and adding simple AccelerometerEvent. This seems quite straightforward, [...]]]></description>
			<content:encoded><![CDATA[<p>Now it is fun. I did not realize that my handset has the accelerometer sensor until I saw <a href="http://vimeo.com/12198156">the video.</a> I didn&#8217;t even know that AIR for Android supports the thing. So I tried, and it worked! I modified the code from previous posts, removing multitouch events and adding simple AccelerometerEvent. This seems quite straightforward, and the only thing I still do not get is why it is called accelerometer while it aparently measures axis tilt, not acceleration.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/mOdeh4wDuQI?hl=pl&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mOdeh4wDuQI?hl=pl&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<h4>Runtime check if the hardware supports us:</h4>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>Accelerometer.<span style="color: #006600;">isSupported</span><span style="color: #66cc66;">&#41;</span> 
			<span style="color: #66cc66;">&#123;</span> 
				accl = <span style="color: #000000; font-weight: bold;">new</span> Accelerometer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
				accl.<span style="color: #006600;">setRequestedUpdateInterval</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span>; 
				accl.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>AccelerometerEvent.<span style="color: #006600;">UPDATE</span>, handleAccelerometer<span style="color: #66cc66;">&#41;</span>; 
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
				tf.<span style="color: #006600;">appendText</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>accelerometer NOT supported'</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h4>And the actual handler:</h4>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleAccelerometer<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:AccelerometerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> n:<span style="color: #0066CC;">int</span> = sprites.<span style="color: #0066CC;">length</span>;
			<span style="color: #000000; font-weight: bold;">var</span> s:Handle;
&nbsp;
			<span style="color: #808080; font-style: italic;">// loop through all alive sprites to update their speed</span>
			<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> n ;  i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				s = sprites<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
				s.<span style="color: #006600;">speedX</span> -= <span style="color: #0066CC;">e</span>.<span style="color: #006600;">accelerationX</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">10</span>;
				s.<span style="color: #006600;">speedY</span> += <span style="color: #0066CC;">e</span>.<span style="color: #006600;">accelerationY</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">10</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// this exits the app on any key (event volume up/down!)</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleKey<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:KeyboardEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			NativeApplication.<span style="color: #006600;">nativeApplication</span>.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span></pre></div></div>

</pre>
]]></content:encoded>
			<wfw:commentRss>http://nobigwords.ntxt.net/2010/09/28/accelerometer-air-on-android-and-tosia/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

