<?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>ublo &#187; bogdanel</title>
	<atom:link href="http://ublo.ro/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://ublo.ro</link>
	<description>bogdanel&#039;s (micro)blog</description>
	<lastBuildDate>Mon, 09 Apr 2012 12:53:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>as pedepsi prin lege &#8230;</title>
		<link>http://ublo.ro/2012/04/as-pedepsi-prin-lege/</link>
		<comments>http://ublo.ro/2012/04/as-pedepsi-prin-lege/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 12:53:06 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[replik]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=816</guid>
		<description><![CDATA[... folosirea nejustificata a probabilitatilor, de catre oameni care nu le inteleg. Scurtă lecție referitoare la probabiltăți: Faptul că o monedă are probabilitatea de a cădea pe o față sau pe cealaltă de 50% presupune următorul lucru: Pentru orice numar oricat de mic e, există un număr de aruncări Ne (care depinde de e) astfel [...]]]></description>
			<content:encoded><![CDATA[<p>... folosirea nejustificata a probabilitatilor, de catre oameni care nu le inteleg. Scurtă lecție referitoare la probabiltăți:</p>
<p>Faptul că o monedă are probabilitatea de a cădea pe o față sau pe cealaltă de 50% presupune următorul lucru:</p>
<blockquote><p>Pentru orice numar oricat de mic <em>e</em>, există un număr de aruncări <em>N<sub>e</sub></em> (care depinde de e) astfel încât dacă vom arunca moneda de peste <em>N<sub>e</sub></em> ori, raportul dintre numărul de dăți când a căzut cap <em>CAP(N)</em> și numărul total de aruncări <em>N</em> va fi diferit de 0.5 cu cel mult <em>e</em>.</p></blockquote>
<p><div style="text-align: center;"><img src="https://chart.googleapis.com/chart?cht=tx&chf=bg,s,FFFFFF&chco=000000&chl=Pentru%5C%3A%5Cforall+e+%5Cin+%5Cmathbb%7BR%7D%2C%5C%3A%5Cexists+N_%7Be%7D+%5Cin+%5Cmathbb%7BN%7D+%5C%3Aa.%C3%AE.%5C%3A+%5Cforall+N%26gt%3BN_%7Be%7D%2C+%7C%5Cfrac%7BCAP%28N%29%7D%7BN%7D+-+0.5%7C+%26lt%3B+e&chs=" /></div></p>
<p>Dacă ne uităm bine în definiție, aruncând o monedă de 4 ori în sus nu vom obține de 2 ori cap, ci vom obține de <img src="https://chart.googleapis.com/chart?cht=tx&chf=bg,s,FFFFFF&chco=000000&chl=2+%5Cpm+e&chs=20" /> ori cap, unde <em>e</em> e o eroare ce depinde de numărul total de aruncări. Cu cât acest număr e mai mic, cu atât eroarea este mai mare!</p>
<p>Sondaje! Am auzit de nenumărate ori: rezultatele sonajului realizat pe un eșantion reprezentativ de 1067 de oameni ne arată că Victor Ponta este preferat de 55% dintre alegători cu o eroare de <em>+/- 3%</em>. Automat, expertul de duminică presupune că Victor Ponta este sigur președinte, pentru că nu-i așa, <em>55% +/- 3% &gt; 50%</em>.</p>
<p>Nimic mai greșit. Pentru început, de unde vine 1067? Pentru un model ideal de populație din care extragem perfect aleator un număr <em>N</em> de indivizi, eroarea marginală E<sub>M</sub> cu o încredere de 95% este aproximativ egală cu:</p>
<p><div style="text-align: center;"><img src="https://chart.googleapis.com/chart?cht=tx&chf=bg,s,FFFFFF&chco=000000&chl=E_%7BM%7D+%5Capprox+%5Cfrac%7B0.98%7D%7B%5Csqrt%7BN%7D%7D%2C%5C%3Asau%5C%3AN+%5Capprox+%5Cfrac%7B0.9604%7D%7BE_%7BM%7D%5E%7B2%7D%7D&chs=" /></div></p>
<p>0.9604 / (0.03 x 0.03) = 1067.11 . Ati observat problemele din definitie? În primul rând ”modelul ideal” de populație, urmată de ”extragerea perfect aleatoare” și cireașa de pe tort, ”eroarea marginală”. Traducerea în limbaj comun a frazei de mai sus este următoarea:</p>
<blockquote><p>În condiții ideale, efectuand aceeasi procedura de sondaj de un număr foarte mare de ori, probabilitatea (în sensul definit mai sus) ca votanții să îl prefere pe Victor Ponta între 52% și 58% dintre situații este de 95%.</p></blockquote>
<p>O generalizare greșită, însă mai aproape de adevăr a sondajului este că Victor Ponta se situează între 49.4% = (0 x 5% + 52% x 95%) si 60.1% = (58% x 95% + 100% x 5%) în preferințele respondenților. În același timp, atenție și la condițiile ideale!</p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/04/as-pedepsi-prin-lege/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>poker. business. românia</title>
		<link>http://ublo.ro/2012/03/poker-business-romania/</link>
		<comments>http://ublo.ro/2012/03/poker-business-romania/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 21:40:39 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[replied]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=777</guid>
		<description><![CDATA[marian vorbea la un moment dat despre jocuri ca modele pentru tot ceea ce se întâmplă în viața noastră, intuind, fără să vrea, unul dintre cele mai fierbinți subiecte din economie: teoria jocurilor. obiectul central al acestei discipline este studiul contextului și a modului în care joacă un participant pentru a câștiga. pe scurt, jucătorul [...]]]></description>
			<content:encoded><![CDATA[<p>marian vorbea la un moment dat despre <a title="Marian Rujoiu - Jocuri Perseverente" href="http://www.marian-rujoiu.ro/jocul-perseverente/" target="_blank">jocuri ca modele</a> pentru tot ceea ce se întâmplă în viața noastră, intuind, fără să vrea, unul dintre cele mai fierbinți subiecte din economie: teoria jocurilor. obiectul central al acestei discipline este studiul contextului și a modului în care joacă un participant pentru a câștiga. pe scurt, jucătorul care deține cantitatea cea mai mare de informație din jocul pe care îl joacă va avea «the upper hand». victoria mai depinde de un factor: modul în care îți joci șansele.</p>
<p>revenind la subiect. mi se pare ușor incredibil că în ultimii trei ani averile oamenilor puternici au scăzut: aproape 85% dintre bogatii româniei au pierdut (v. <a href="http://www.forbes.ro/Bogatii-si-mersul-economiei_0_2265.html" target="_blank">aici</a>), experții economici comentând aprig modul în care scăderea consumului și colapsul pieței imobiliare sunt cauzele de bază ale acestui declin. o atitudine similară este aceea a jucătorilor de poker amatori, care așteaptă ca singura pereche din mână să fie completată la un careu deși probabilitatea este infimă, iar în caz de eșec vina o are dealer-ul că nu le-a servit cărți bune.</p>
<p>business-ul din românia e asemănător unui jucător de poker începător, care și-a petrecut ultimii 20 de ani uitându-se la tunee TV de poker, care crede că tiparele observate în jocul profesioniștilor sunt aplicabile universal și care, autoproclamat expert, uită să analizeze informația din joc pentru a avea o șansă reală.</p>
<p>problema este clar de educație, însă nu MBA-ul este soluția; acesta fiind cel mult manualul jucătorului de poker. el nu te transformă automat în câștigător. pentru asta e nevoie fie de inspirație (altfel spus noroc chior, cum au avut cei 85% din topul forbes) sau viziune și oameni care știu să extragă informația din cele mai impietrite figuri de la masă (adevărații businessmen din românia). din păcate, factorii de decizie, deși sunt conștienți de problemă consideră complementară NBA-ului (sic!) «<a title="Bradut Florescu - Tablitele Managerului Român" href="http://bradut-florescu.blogspot.com/2012/02/tablitele-managerului-roman.html" target="_blank">școala vieții</a>».</p>
<p>aceeași școală a vieții care:</p>
<ul>
<li>te face să crezi că focus-grupurile pentru lansarea/analizarea unui produs se fac la o sedință cu top managementul;</li>
<li>îți spune că marja de eroare a sondajelor/audiențelor este de 3% (deși verificare teoriei nu a funcționat niciodată: să ne gândim la exit-poll-uri sau sondaje preliminare și rezultatele reale ale alegerilor);</li>
<li>te-a învățat că cel mai probabil număr obținut din însumarea a două zaruri aruncate este 6 sau 1 (cu toate că unu nu poți să obții niciodată).</li>
</ul>
<p>din păcate, secretul succesului multor averi de top din românia l-a constituit accesul la informații deținute de fosta securitate și organismele descendente din aceasta. din fericire, criza, tendința de independență a băieților cu ochi albaștri și lipsa de experiență în culegerea proprie a informațiilor îi va alege. păstrând metafora din poker, e din ce în ce mai greu să trișezi văzând toate mâinile deodată.</p>
<p><img class="aligncenter size-medium wp-image-778" title="Locked" src="http://ublo.ro/wp-content/uploads/2012/03/locked-300x200.jpg" alt="" width="300" height="200" /></p>
<p>sursa foto: sxc.hu</p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/03/poker-business-romania/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>curs de imunologie generală (draft)</title>
		<link>http://ublo.ro/2012/01/curs-de-imunologie-generala-draft/</link>
		<comments>http://ublo.ro/2012/01/curs-de-imunologie-generala-draft/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 10:50:54 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[education]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=739</guid>
		<description><![CDATA[căutam ceva pe harddisk-ul cu arhive și am dat de un document la care am lucrat acum un an și ceva, având la bază structura cursului conf. dr. Gabriel Gâjâilă de la USAMV însă cu conținutul compilat din mai multe cursuri open (dintre care menționez Cellular and Molecular Immunology din MIT OCW și Undergraduate Immunology [...]]]></description>
			<content:encoded><![CDATA[<p>căutam ceva pe harddisk-ul cu arhive și am dat de un document la care am lucrat acum un an și ceva, având la bază structura cursului conf. dr. Gabriel Gâjâilă de la USAMV însă cu conținutul compilat din mai multe cursuri open (dintre care menționez <a href="http://ocw.mit.edu/courses/health-sciences-and-technology/hst-176-cellular-and-molecular-immunology-fall-2005/lecture-notes/" title="Cellular and Molecular Immunology, MIT OCW" target="_blank">Cellular and Molecular Immunology din MIT OCW</a> și <a href="http://www.path.cam.ac.uk/~mrc7/lecturenotes/" target="_blank" title="Undergraduate Immunology, Mike Clark">Undergraduate Immunology al lui Mike Clark de la Universitatea din Cambridge)</a>.</p>
<p>cursul nu l-am terminat deoarece și-a atins scopul. în plus, pentru cei interesați de preluarea suportului și folosirea lui pentru educație (și aici mă refer la personalul didactic) pot pune la dispoziție în schimbul unei adrese de email, documentul în format editabil (Open Office Impress).</p>
<p><iframe class="scribd_iframe_embed" src="http://www.scribd.com/embeds/79664150/content?start_page=1&#038;view_mode=slideshow&#038;access_key=key-11a0m1dx6nkz1tx0znw5" data-auto-height="false" data-aspect-ratio="1.33333333333333" scrolling="no" id="doc_10254" width="600" height="510" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/01/curs-de-imunologie-generala-draft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a bunch of sensors</title>
		<link>http://ublo.ro/2012/01/a-bunch-of-sensors/</link>
		<comments>http://ublo.ro/2012/01/a-bunch-of-sensors/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 10:15:20 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hobby]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=735</guid>
		<description><![CDATA[i've got a bunch of sensors form my PhD. thesis. i won't bother you with the details =). unfortunately i wasn't very inspired in my choosing and i ended up with a bunch of accurate, but hard to access sensors. the ones i'm talking about are MPL115A1, SHT15 and TSL230R all from my favorite provider [...]]]></description>
			<content:encoded><![CDATA[<p>i've got a bunch of sensors form my PhD. thesis. i won't bother you with the details =). unfortunately i wasn't very inspired in my choosing and i ended up with a bunch of accurate, but hard to access sensors. the ones i'm talking about are <a href="http://www.watterott.com/de/Drucksensor-Breakout-Board-MPL115A1" target="_blank" title="pressure and temperature sensor, MPL115A1, 55 - 115kPa">MPL115A1</a>, <a href="http://www.watterott.com/de/Feuchtigkeits-und-Temperatur-Sensor-SHT15-Breakout" title="humidity and temperature sensor, SHT15" target="_blank">SHT15</a> and <a href="http://www.watterott.com/de/Licht/Frequenz-Wandler-TSL230R" target="_blank" title="light intensity to frequency converter, TSL230R">TSL230R</a> all from my favorite provider <a href="http://www.watterott.com" target="_blank" title="watterott">watterott</a>.</p>
<p>i've roamed the internet for a while to find myself some Arduino libraries to access the sensors but failed to find what i wanted. so here's what i came up with <a href="https://github.com/bdobrica/Wireless-Sensor-Network/tree/master/MPL115A1" title="MPL115A1 Arduino library" target="_blank">MPL115A1 Arduino library</a>, <a href="https://github.com/bdobrica/Wireless-Sensor-Network/tree/master/SHT15" title="SHT15 Arduino library" target="_blank">SHT15 Arduino library</a> and <a href="https://github.com/bdobrica/Wireless-Sensor-Network/tree/master/TSL230R" title="TSL230R Arduino library">TSL230R Arduino library</a>. the code is provided "as-is" and the work is based on <a href="http://roamingdrone.wordpress.com/2008/11/13/arduino-and-the-taos-tsl230r-light-sensor-getting-started/" target="_blank" title="roaming drone's TSL230R tutorial">roaming drone's TSL230R tutorial</a>, <a href="http://www.sparkfun.com/datasheets/BreakoutBoards/MPL115A1-ATmega328Code-8-9-10.zip" title="jim lindblom's sparkfun MPL115A1 example code" target="_blank">jim lindblom's sparkfun MPL115A1 example code</a> and <a href="http://www.sparkfun.com/datasheets/Sensors/SHT15-Testing-v11.zip" title="nathan seidle's sparkfun SHT15 example code" target="_blank">nathan seidle's sparkfun SHT15 example code</a>.</p>
<p>tomorrow i'll update this post with an example code and some wiring diagrams.</p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/01/a-bunch-of-sensors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zoso no more</title>
		<link>http://ublo.ro/2012/01/zoso-no-more/</link>
		<comments>http://ublo.ro/2012/01/zoso-no-more/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 08:35:42 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[replied]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=731</guid>
		<description><![CDATA[n-am fost niciodată vocal în legătură cu industria online din românia, deși am avut partea mea de experiențe în domeniu. știu mizeriile care se întâmplă, știu cum se fac banii, știu ce înseamnă rebate și cât de găunoasă e o regie. știu că dacă ți-ai ratat cariera una dintre cele mai ușoare soluții e să [...]]]></description>
			<content:encoded><![CDATA[<p>n-am fost niciodată vocal în legătură cu industria online din românia, deși am avut partea mea de experiențe în domeniu. știu mizeriile care se întâmplă, știu cum se fac banii, știu ce înseamnă rebate și cât de găunoasă e o regie. știu că dacă ți-ai ratat cariera una dintre cele mai ușoare soluții e să te transformi în consultant new media. am văzut pseudo-vedete venind și plecând.</p>
<p>ce mă enervează e că jegul a acoperit ultimul colțișor care spunea lucrurilor pe nume, <a href="http://www.zoso.ro/update" target="_blank" title="update | zoso blog">zoso.ro/update</a>. mie personal o să-mi lipsească. deja renunțasem la ziare online și site-uri de știri în favoarea lui. vali, sper să revi asupra deciziei și să ții minte comentariul meu. poate ar trebui să închizi blogul pentru gușteri și să-l păstrezi doar pentru cei care sunt dispuși să plătească.</p>
<p><p align="center"><object width="360" height="265" data="http://www.youtube-nocookie.com/v/jL3nFxSoApE&fs=1&rel=0" type="application/x-shockwave-flash"><param value="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="classid"/><param name="movie" value="http://www.youtube-nocookie.com/v/jL3nFxSoApE&fs=1&rel=0"/><param name="wmode" value="transparent"/><param name="swliveconnect" value="true"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="quality" value="high"/><param name="flashvars" value="fs=1&rel=0"></object></p></p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/01/zoso-no-more/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jack white &amp; black milk &#8211; royal mega</title>
		<link>http://ublo.ro/2012/01/jack-white-black-milk-royal-mega/</link>
		<comments>http://ublo.ro/2012/01/jack-white-black-milk-royal-mega/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 22:42:01 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=728</guid>
		<description><![CDATA[jack white &#38; black milk - royal mega]]></description>
			<content:encoded><![CDATA[<p>jack white &amp; black milk - royal mega</p>
<p><p align="center"><object width="360" height="265" data="http://www.youtube-nocookie.com/v/jTkV7Z9DIrE&fs=1&rel=0" type="application/x-shockwave-flash"><param value="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="classid"/><param name="movie" value="http://www.youtube-nocookie.com/v/jTkV7Z9DIrE&fs=1&rel=0"/><param name="wmode" value="transparent"/><param name="swliveconnect" value="true"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="quality" value="high"/><param name="flashvars" value="fs=1&rel=0"></object></p></p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/01/jack-white-black-milk-royal-mega/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2012, the leap year</title>
		<link>http://ublo.ro/2012/01/2012-the-leap-year/</link>
		<comments>http://ublo.ro/2012/01/2012-the-leap-year/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 21:20:33 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[sci-tech]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=721</guid>
		<description><![CDATA[Should we expect a new revolution in physics, this time with logic arguments and not for justifying huge funds with flipping coins and counting particles (link)? Here's a recent paper describing how gravity can be considered a consequence of the information, not as a fundamental force. In my humble opinion, this idea has the necessary [...]]]></description>
			<content:encoded><![CDATA[<p>Should we expect a new revolution in physics, this time with logic arguments and not for justifying huge funds with flipping coins and counting particles (<a title="Adevarul.ro - CERN, LHC" href="http://www.adevarul.ro/taguri/cern.html" target="_blank">link</a>)? Here's a recent paper describing how gravity can be considered a consequence of the information, not as a fundamental force. In my humble opinion, this idea has the necessary beauty to kick us beyond Einstein's general relativity.<br />
<a title="Erik P. Verlinde - On the Origin of Gravity and the Laws of Newton" href="http://arxiv.org/abs/1001.0785" target="_blank">Erik P. Verlinde - On the Origins of Gravity and the Laws of Newton</a><br />
<a href="http://ublo.ro/wp-content/uploads/2012/01/sig07-009_mac.jpg"><img class="aligncenter size-medium wp-image-724" title="Multiwavelength image of M81 Galaxy (courtesy of NASA Images)" src="http://ublo.ro/wp-content/uploads/2012/01/sig07-009_mac-300x231.jpg" alt="Multiwavelength image of M81 galaxy (courtesy of NASA Images)" width="300" height="231" /></a><br />
(image courtesy: <a title="NASA Images - MUltiwavelength M81" href="http://www.nasaimages.org/luna/servlet/detail/nasaNAS~12~12~64153~168545:Multiwavelength-M81?qvq=q:galaxy%2Bor%2Bconstellation%2Bor%2Bhubble%2Bor%2Bspitzer;lc:NVA2~25~25,NVA2~57~57,NVA2~31~31,NVA2~33~33,NVA2~26~26,NVA2~36~36,NVA2~56~56,NVA2~55~55,NVA2~54~54,NVA2~45~45,NVA2~35~35,NVA2~53~53,NVA2~29~29,NVA2~27~27,NVA2~17~17,NVA2~46~46,NVA2~30~30,NVA2~44~44,NVA2~16~16,NVA2~47~47,NVA2~48~48,NVA2~19~19,NVA2~52~52,NVA2~4~4,NVA2~1~1,nasaNAS~22~22,NVA2~20~20,nasaNAS~8~8,nasaNAS~10~10,NVA2~15~15,nasaNAS~13~13,nasaNAS~5~5,NVA2~18~18,NVA2~23~23,NVA2~8~8,nasaNAS~16~16,nasaNAS~2~2,NVA2~34~34,NVA2~14~14,nasaNAS~7~7,nasaNAS~6~6,NVA2~24~24,NVA2~13~13,nasaNAS~9~9,nasaNAS~4~4,NSVS~3~3,NVA2~9~9,nasaNAS~20~20,nasaNAS~12~12,NVA2~21~21,NVA2~22~22,NVA2~49~49,NVA2~50~50,NVA2~51~51,NVA2~28~28,NVA2~43~43,NVA2~38~38,NVA2~32~32,NVA2~37~37,NVA2~39~39,NVA2~41~41,NVA2~42~42&amp;mi=0&amp;trs=65#" target="_blank">nasaimages.org</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2012/01/2012-the-leap-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>simple windows COM port logger</title>
		<link>http://ublo.ro/2011/12/simple-windows-com-port-logger/</link>
		<comments>http://ublo.ro/2011/12/simple-windows-com-port-logger/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 13:30:56 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hobby]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=688</guid>
		<description><![CDATA[yesterday, i've posted my wrapper library for the windows COM port with the promise of posting the actual C program that uses it. to compile it you need mingw (see here my tutorial on how to get it up and running). the program is simple and writes in the text.txt file whatever it receives on [...]]]></description>
			<content:encoded><![CDATA[<p>yesterday, i've posted my wrapper library for the windows COM port with the promise of posting the actual C program that uses it. to compile it you need mingw (see <a title="ublo.ro - MinGW w/ Notepad++ tutorial - NppExec" href="http://ublo.ro/2011/12/using-mingw-with-notepad-and-nppexec/" target="_blank">here</a> my tutorial on how to get it up and running). the program is simple and writes in the text.txt file whatever it receives on the serial interface, but no more than MAXLINES lines (in this case, 10 lines). you need to save the <a title="ublo.ro - COM port windows wrapper - serial.h" href="http://ublo.ro/2011/12/simple-windows-com-port-wrapper-library/" target="_blank">previous code</a> as "serial.h" in the same directory as the code below. then, compile it and that's it! =)</p>
<p>ask whatever questions here, and i will answer.</p>
<pre class="sh_c">#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include "serial.h"
// the number of lines read from the serial interface.
// good for data acquisition for a specified amount of time.
#define MAXLINES 10

int main (int argc, int ** argv) {
    HANDLE comPort;
    FILE * f;
    char buffer[32];
    unsigned short int readbits = 0;
    unsigned long int lines = 0;
    unsigned short int c;

    // my COM port is COM15. be sure to change it accordingly
    if ((comPort = openSerialConsole("\\\\.\\COM15")) == (void *) NULL) {
        printf ("Error: COM Port!\n");
        return 1;
        }

    // open the file "text.txt". change it for a different file
    f = fopen ("test.txt", "w+");

    // read online MAXLINES lines
    while (lines &lt; MAXLINES) {
        // readbits is the number of bytes read from the COM port
        while ((readbits = readFromSerialConsole(comPort, buffer, 32)) != 0) {
            // a good thing to check that the readbits+1 character marks the end
            // of the string. saves you from "Segmentation fault!" errors
            buffer[readbits] = 0;

            // check buffer for ENDL character
            for (c = 0; c&lt;readbits; c++)
                if (buffer[c] == '\n') {
                    lines++;
                    if (lines == MAXLINES) buffer[c] = 0;
                    }

            // output to the standard IO, and
            printf("%s", buffer);
            // to the file
            fprintf(f, "%s", buffer);
            }
        }

    // close the file handle
    fclose (f);

    // close the COM port
    closeSerialConsole(comPort);

    return 0;
    }</pre>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2011/12/simple-windows-com-port-logger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dom&#8217; profesor, multumesc frumos pentru sampanie</title>
		<link>http://ublo.ro/2011/12/dom-profesor-multumesc-frumos-pentru-sampanie/</link>
		<comments>http://ublo.ro/2011/12/dom-profesor-multumesc-frumos-pentru-sampanie/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 17:14:34 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[replied]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=713</guid>
		<description><![CDATA[dom' profesor, multumesc frumos pentru sampanie =)]]></description>
			<content:encoded><![CDATA[<p><a title="Dan Voiculescu - Blog" href="http://www.danvoiculescu.net/blog/" target="_blank">dom' profesor</a>, multumesc frumos pentru sampanie =)</p>
<p><a href="http://ublo.ro/wp-content/uploads/2011/12/330574_10150636868883266_753983265_12182208_1264057727_o.jpg"><img class="aligncenter size-medium wp-image-714" title="Sampanie Verne Cliquet Ponsardin de la dl. prof. Dan Voiculescu" src="http://ublo.ro/wp-content/uploads/2011/12/330574_10150636868883266_753983265_12182208_1264057727_o-225x300.jpg" alt="" width="225" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2011/12/dom-profesor-multumesc-frumos-pentru-sampanie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>simple windows COM port wrapper library</title>
		<link>http://ublo.ro/2011/12/simple-windows-com-port-wrapper-library/</link>
		<comments>http://ublo.ro/2011/12/simple-windows-com-port-wrapper-library/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 16:00:46 +0000</pubDate>
		<dc:creator>bogdanel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hobby]]></category>

		<guid isPermaLink="false">http://ublo.ro/?p=693</guid>
		<description><![CDATA[searching for a way to read the serial port in windows using C (usually i do my programming under linux), i found a cute little wrapper for the serial port here. i don't like .NET that's why i've wanted a pure C implementation. here's the code (most of it from the source). read the comments [...]]]></description>
			<content:encoded><![CDATA[<p>searching for a way to read the serial port in windows using C (usually i do my programming under linux), i found a cute little wrapper for the serial port <a href="http://123a321.wordpress.com/2010/02/01/serial-port-with-mingw/" target="_blank" title="Serial Port Wrapper">here</a>. i don't like .NET that's why i've wanted a pure C implementation. here's the code (most of it from the source). read the comments as it saved me a lot of problems accessing higher COM ports. remember to escape the characters in the string!</p>
<pre class="sh_c">HANDLE openSerialConsole (LPCSTR p) {
// LPCSTR p is a string containing the name of the device
// in Windows namespace, the safest way to access the COM ports
// is to use the \\.\COMxx syntax. remember, p is a string
// and \ escapes characters so p should really be "\\\\.\\COMxx"
    HANDLE h;
    DCB params = {0};
    COMMTIMEOUTS timeouts = {0};

    h = CreateFile ( p,
        GENERIC_READ | GENERIC_WRITE, // the way we want to interact with the COM port
        0, // not the wisest way to open the device as it takes exclusive control over
        NULL, // no security attributes, meaning no child process access
        OPEN_EXISTING, // only if we have a COM port
        0, // some things i didn't understood completely
        NULL);
    if (h == INVALID_HANDLE_VALUE) {
        printf("Error: Could not create handle!\n");
        return (void *) NULL;
        }

    params.DCBlength = sizeof(params);
    if (!GetCommState(h, &amp;params)) {
        printf("Error: Setting COM State!\n");
        CloseHandle (h);
        return (void *) NULL;
        }

    // 9600 bauds, with a 8N1 format
    params.BaudRate=CBR_9600;
    params.ByteSize=8;
    params.Parity=NOPARITY;
    params.StopBits=ONESTOPBIT;
    if (!SetCommState(h, &amp;params)) {
        printf("Error: Setting BAUD!\n");
        CloseHandle (h);
        return (void *) NULL;
        }

    // timeouts, avoid hanging
    timeouts.ReadIntervalTimeout=50;
    timeouts.ReadTotalTimeoutConstant=50;
    timeouts.ReadTotalTimeoutMultiplier=10;
    timeouts.WriteTotalTimeoutConstant=50;
    timeouts.WriteTotalTimeoutMultiplier=10;
    if (!SetCommTimeouts(h, &amp;timeouts)) {
        printf("Error: Setting timeouts!\n");
        CloseHandle (h);
        return (void *) NULL;
        }

    return h;
    }

unsigned long int readFromSerialConsole ( HANDLE h, char * buffer, int size ) {
    unsigned long int bytes = 0;
    COMSTAT status;
    unsigned long int errors;

    ClearCommError (h, &amp;errors, &amp;status);

    if (status.cbInQue &gt; 0) {
        size = status.cbInQue &gt; size ? size : status.cbInQue;
        if (ReadFile(h, buffer, size, &amp;bytes, NULL) &amp;&amp; bytes != 0)
            return bytes;
        }
    return bytes;
    }

unsigned long int writeToSerialConsole(HANDLE h, char * buffer, int size) {
    unsigned long int bytes = 0;
    if (!WriteFile(h, buffer, size, &amp;bytes, NULL));
    return bytes;
    }

void closeSerialConsole (HANDLE h) {
    CloseHandle (h);
    }</pre>
]]></content:encoded>
			<wfw:commentRss>http://ublo.ro/2011/12/simple-windows-com-port-wrapper-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

