<?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>Dejan Levec</title>
	<atom:link href="http://www.dejanlevec.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dejanlevec.com</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 18:30:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>DS28EA00 and Arduino</title>
		<link>http://www.dejanlevec.com/2011/12/31/ds28ea00-and-arduino/</link>
		<comments>http://www.dejanlevec.com/2011/12/31/ds28ea00-and-arduino/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 18:20:28 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dejanlevec.com/?p=379</guid>
		<description><![CDATA[Recently I found two sample Maxim DS28EA00 temperature sensors that I requested for a project I haven&#8217;t finished. I&#8217;m currently working on a project requiring somewhat accurate temperature measuring and I will finally be able to use this sensor. Firstly &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2011/12/31/ds28ea00-and-arduino/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Recently I found two sample Maxim DS28EA00 temperature sensors that I requested for a project I haven&#8217;t finished. I&#8217;m currently working on a project requiring somewhat accurate temperature measuring and I will finally be able to use this sensor.</p>
<p>Firstly I needed a way to connect this sensor to Arduino and I made simple breakout board that allows to connect MSOP8 package sensor to breadboard. I wanted to expose three pins: ground, IO and Vcc. Unfortunately I didn&#8217;t remember that SMD parts aren&#8217;t through holes and therefore they need to be mirrored. Because of this mistake (that I noticed after etching) 3rd outer pin is connected to NC pin on chip and not on the Vcc. Thankfully, 1-wire protocols allows for parasite mode which means that voltage can be sourced from data line, so my breakout board is still useful.</p>
<p><strong>Hardware</strong></p>
<p>To connect this sensor to Arduino you need to:</p>
<ul>
<li>connect sensor GND to Arduino GND,</li>
<li>connect sensor IO to one of the digital pins (pin 10 in my case),</li>
<li>connect 4.7k ohm resistor from IO line at Arduino to 5V.</li>
</ul>
<p><a href="http://www.dejanlevec.com/wp-content/uploads/2011/12/IMG_20111231_175244.jpg"><img class="aligncenter size-medium wp-image-381" title="IMG_20111231_175244" src="http://www.dejanlevec.com/wp-content/uploads/2011/12/IMG_20111231_175244-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>In my case it works fine with 2.7k ohm resistor, but 4.7k is recommended. This pull-up resistor allows the use of parasite mode by providing 5V to IO pins of devices.</p>
<p>&nbsp;</p>
<p><strong>Software</strong></p>
<p>I haven&#8217;t found any examples of connecting this sensor to Arduino, so I had to read datasheet and understand what I need to send and what I get back from the sensor. After I finished my code, I found out that the communication is the same as for DS18*20 sensors which is very popular and you can find many examples. I actually started with example for that sensor and removed sensor specific code.</p>
<p>Anyway, here is the code:</p>
<pre>#include &lt;OneWire.h&gt;
OneWire ds(10);

void setup(void) {
  Serial.begin(9600);
}

void loop(void) {
  byte i;
  byte present = 0;
  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
     Serial.print("No more addresses.\n");
     delay(1000000);
     ds.reset_search();
      return;
  }

  Serial.print("R=");
  for( i = 0; i &lt; 8; i++) {
    Serial.print(addr[i], HEX);
    Serial.print(" ");
  }

  if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.print("CRC is not valid!\n");
      return;
  }

  if ( addr[0] == 0x42) {
      Serial.print("DS28EA00 detected\n");
  }else{
    return;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1); //convert temperature, parasite mode

  delay(1000); //wait at least 750ms for the conversion to finish

  present = ds.reset();
  ds.select(addr);
  ds.write(0xBE); //read scratchpad

  Serial.print("P=");
  Serial.print(present,HEX);
  Serial.print(" ");
  for ( i = 0; i &lt; 9; i++) {
    data[i] = ds.read();
    Serial.print(data[i], HEX);
    Serial.print(" ");
  }
  Serial.print(" CRC=");
  Serial.print( OneWire::crc8( data, 8), HEX);
  Serial.println();

  byte lsb = data[0];
  byte msb = data[1];
  int16_t temp = (((int16_t)msb) &lt;&lt; 8 ) | lsb;
  Serial.println((float)temp * 0.0625, DEC);//0.0625 for 12bit
}</pre>
<p>One thing missing with examples for DS18*20 sensors was the explanation of the code. I really like to understand what I&#8217;m using and I like to discover how things works.</p>
<p>ds.search searches for OneWire devices on that Arduino pin and continues with the code if it finds one.</p>
<pre>if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.print("CRC is not valid!\n");
      return;
  }</pre>
<p>crc8(byte array, count) calculates CRC code of first 7 bytes and compares it to precalculated CRC code in 8th item of array. If it matches, it means that we received right data, otherwise there is obviously problem with data transfer.</p>
<pre> if ( addr[0] == 0x42) {
      Serial.print("DS28EA00 detected\n");
  }else{
    return;
  }</pre>
<p>This checks if first byte matches 0&#215;42, because address of DS28EA00 family of temperature sensors starts with this byte. Otherwise we just return and the loop starts again.</p>
<pre>ds.reset();
 ds.select(addr);
 ds.write(0x44,1); //convert temperature, parasite mode

 delay(1000); //wait at least 750ms for the conversion to finish</pre>
<p><a href="http://www.dejanlevec.com/wp-content/uploads/2011/12/temp.png"><img class="alignnone size-full wp-image-383" title="temp" src="http://www.dejanlevec.com/wp-content/uploads/2011/12/temp.png" alt="" width="672" height="61" /></a></p>
<p>According to datasheet we need to send reset, select our device and then send the code for starting the conversion (in this case it&#8217;s 0&#215;44). Second parameter in write call is used to tell OneWire library that we use it in parasite mode and that the IC needs to source 5V from IO pin.</p>
<p>Datasheet specifies that the conversion will took at most 750ms. We don&#8217;t want to push the limits and we will survive to wait additional 250ms.</p>
<pre>present = ds.reset();
 ds.select(addr);
 ds.write(0xBE); //read scratchpad</pre>
<p><img class="alignnone size-full wp-image-385" title="scratch" src="http://www.dejanlevec.com/wp-content/uploads/2011/12/scratch.png" alt="" width="360" height="58" /><br />
Again, we reset OneWire, select the device and write code for reading the scratchpad (0xBE).</p>
<pre>for ( i = 0; i &lt; 9; i++) {
    data[i] = ds.read();
    Serial.print(data[i], HEX);
    Serial.print(" ");
  }</pre>
<p>We read first 9 bytes from the device and print it to serial port.<br />
<img class="alignnone size-full wp-image-387" title="table1" src="http://www.dejanlevec.com/wp-content/uploads/2011/12/table1.png" alt="" width="345" height="246" /></p>
<p>First and second bytes are temperature, third and fourth are for high and low temperature alarm, fifth is for setting precision, and others are reserved.</p>
<p>Ninth byte is CRC of first 8 bytes and we match it to see if there were any transmission errors.</p>
<pre>byte lsb = data[0];
 byte msb = data[1];</pre>
<p>We save LSB in MSB bytes so sepeperate variables.</p>
<pre>int16_t temp = (((int16_t)msb) &lt;&lt; 8 ) | lsb;</pre>
<p>Temperature is 16-bit number divided to least and most significat byte.</p>
<pre>Serial.println((float)temp * 0.0625, DEC);//0.0625 for 12bit</pre>
<p>We need to multimly calculated 16-bit integer with 0.0625 (in case of 12bit resolution) and convert it to float. Then we print it to serial port.</p>
<p>Output on serial port:</p>
<blockquote><p>R=42 F0 25 5 0 0 0 64 DS28EA00 detected<br />
P=1 5D 1 3 3 7F FF 3 10 63 CRC=63<br />
21.8125000000</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2011/12/31/ds28ea00-and-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display certain page content only to users who have liked our page on Facebook?</title>
		<link>http://www.dejanlevec.com/2011/05/11/how-to-display-certain-page-content-only-to-users-who-have-liked-our-page-on-facebook/</link>
		<comments>http://www.dejanlevec.com/2011/05/11/how-to-display-certain-page-content-only-to-users-who-have-liked-our-page-on-facebook/#comments</comments>
		<pubDate>Wed, 11 May 2011 15:51:03 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techfreak.me/?p=331</guid>
		<description><![CDATA[Sometimes it would be convenient if we could display portion of our web page only to people who have liked our page on Facebook. For example, we decide to giveaway five concert tickets to random participants. We can get more recognizable if &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2011/05/11/how-to-display-certain-page-content-only-to-users-who-have-liked-our-page-on-facebook/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Sometimes it would be convenient if we could display portion of our web page only to people who have liked our page on Facebook.</p>
<p>For example, we decide to giveaway five concert tickets to random participants. We can get more recognizable if participants have to liked our page and possible publish that on their profile page. So let&#8217;s create example web page that where people can participate after following this procedure:</p>
<p>1. person connects our web site with Facebook</p>
<p>2. person likes our Facebook page</p>
<p>3. person fill out form with his information to participate in giveaway</p>
<p>&nbsp;</p>
<p>Firstly we need to create Facebook page for our web site and get URL like this:</p>
<p>https://www.facebook.com/pages/Lemnin/145152362222716</p>
<p>Secondly, we need Facebook application which can be created in a few minutes on Facebook. We will get application id and secret key to use Facebook API.</p>
<p>Our giveaway page will look like this (step 1):</p>
<p><img class="aligncenter size-full wp-image-335" title="step1" src="http://techfreak.me/wp-content/uploads/2011/05/step1.png" alt="" width="312" height="258" /></p>
<p>After clicking on Login with Facebook button, we get a nice popup saying what information will this application be able to access:</p>
<p><a href="http://techfreak.me/wp-content/uploads/2011/05/step1_2.png"><img class="aligncenter size-medium wp-image-338" title="step1_2" src="http://techfreak.me/wp-content/uploads/2011/05/step1_2-300x214.png" alt="" width="300" height="214" /></a></p>
<p>After user successfully connects our web site (application) with his Facebook profile, we show step 2:</p>
<p><img class="aligncenter size-full wp-image-336" title="step2" src="http://techfreak.me/wp-content/uploads/2011/05/step2.png" alt="" width="249" height="220" /></p>
<p>In this step, user has to like our Facebook page, and after that we show him step 3 &#8211; final giveaway form:</p>
<p><img class="aligncenter size-full wp-image-337" title="step3" src="http://techfreak.me/wp-content/uploads/2011/05/step3.png" alt="" width="221" height="247" /></p>
<p>We automatically fill out name field with information we get through Facebook API. Mind you, step 3 loads via AJAX, because requests to Facebook servers can sometimes be slow and we want to load our page as quickly as possible.</p>
<p>&nbsp;</p>
<p><strong>How will we do it?</strong></p>
<p>We will use Facebook&#8217;s javascript API which allows us to connect our website with user&#8217;s Facebook account and allow them to like our page. As far as i know, we don&#8217;t even need server-side scripting to check Facebook Like status, however, user&#8217;s can bypass JS-only solution and therefore we will be using client-side javascript in connection with server-side PHP.</p>
<p>&nbsp;</p>
<p><strong>1. How to connect to Facebook API with PHP?</strong></p>
<p>Connecting to Facebook API is pretty simple and everything you need is to create new instance of Facebook class and pass it array with your appId and secret key.</p>
<blockquote><p>&lt;?php<br />
include (&#8220;facebook.php&#8221;);<br />
$facebook = new Facebook(array(  &#8216;appId&#8217;  =&gt; &#8217;172133412841299&#8242;,<br />
&#8216;secret&#8217; =&gt; &#8216;&lt;secret key&gt;&#8217;,<br />
&#8216;cookie&#8217; =&gt; true,));</p></blockquote>
<p>&nbsp;</p>
<p><strong>2. Is user logged in?</strong></p>
<p>Facebook JS API creates session cookie when user logged in to Facebook comes to our page, so that we can get user&#8217;s information with PHP.</p>
<blockquote><p>&lt;?php<br />
$session = $facebook-&gt;getSession();<br />
$fbme = null;<br />
if ($session) {<br />
try {<br />
$uid = $facebook-&gt;getUser();<br />
$fbme = $facebook-&gt;api(&#8216;/me&#8217;);<br />
} catch (FacebookApiException $e) {                }<br />
}<br />
?&gt;</p></blockquote>
<p>This code gets FB&#8217;s session, checks if user allowed us access to his information and fills variable $fbme with his data (username, first_name, last_name, etc.)</p>
<p>&nbsp;</p>
<p><strong>3. Has user liked our Facebook page?</strong></p>
<blockquote><p>&lt;?php<br />
$created_time = $facebook-&gt;api(<br />
array( &#8216;method&#8217; =&gt; &#8216;fql.query&#8217;,<br />
&#8216;query&#8217; =&gt;		&#8216;SELECT created_time FROM page_fan WHERE uid= &#8216;.intval($uid).&#8217; AND page_id = 145152362222716&#8242; )<br />
);<br />
?&gt;</p></blockquote>
<p>This uses FQL to check if user liked our page and returns date and time of when that happend. If user hasn&#8217;t liked our page, $created_time is empty.</p>
<p>&nbsp;</p>
<p>With a bit of javascript magic and PHP we can create web page, that checks if user liked our page and if he is logged in.</p>
<p>Here is the download link: <a href="http://techfreak.me/wp-content/uploads/2011/05/FB.zip">download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2011/05/11/how-to-display-certain-page-content-only-to-users-who-have-liked-our-page-on-facebook/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Weather map</title>
		<link>http://www.dejanlevec.com/2010/10/02/weather-map/</link>
		<comments>http://www.dejanlevec.com/2010/10/02/weather-map/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 07:16:29 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techfreak.me/?p=328</guid>
		<description><![CDATA[Weather map for Slovenia and Europe. - written in PHP - uses Google Maps API - weather data gathered from website of Environmental Agency of the Republic of Slovenia - supports caching of data in xml files Download: weather.zip]]></description>
			<content:encoded><![CDATA[<p>Weather map for Slovenia and Europe.</p>
<ul>
<li>- written in PHP</li>
<li>- uses Google Maps API</li>
<li>- weather data gathered from website of Environmental Agency of the Republic of Slovenia</li>
<li>- supports caching of data in xml files</li>
</ul>
<p>Download:</p>
<p><a href="http://techfreak.me/wp-content/uploads/2011/04/weather.zip">weather.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/10/02/weather-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Gem update system on Debian</title>
		<link>http://www.dejanlevec.com/2010/05/17/ruby-gem-update-system-on-debian/</link>
		<comments>http://www.dejanlevec.com/2010/05/17/ruby-gem-update-system-on-debian/#comments</comments>
		<pubDate>Mon, 17 May 2010 16:16:55 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/05/17/ruby-gem-update-system-on-debian/</guid>
		<description><![CDATA[When you try to update Ruby Gem &#8211;system on Debian systems (probably also on Ubuntu) you will get the following error: ERROR: While executing gem &#8230; (RuntimeError) gem update &#8211;system is disabled on Debian. RubyGems can be updated using the &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/05/17/ruby-gem-update-system-on-debian/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>When you try to update Ruby Gem &#8211;system on Debian systems (probably also on Ubuntu) you will get the following error:</p>
<p><em>ERROR:  While executing gem &#8230; (RuntimeError)</em><br />
<em> gem update &#8211;system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.</em></p>
<p>Gem installed through Debian&#8217;s aptitude is configured to only be upgraded through aptitude (apt-get) package manager. That would not be a problem if aptitude had newest packages. However, they are updated irregurally and in most cases (almost ever) you will get older version than the current one.</p>
<p>Thankfully there is a simple solution to this problem.</p>
<p>Type following commands (under root user):</p>
<blockquote><p>gem install rubygems-update<br />
cd /var/lib/gems/1.8/bin<br />
./update_rubygems</p></blockquote>
<p>After that gem system should be succesfully updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/05/17/ruby-gem-update-system-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not so random thoughts about random</title>
		<link>http://www.dejanlevec.com/2010/04/29/not-so-random-thoughts-about-random/</link>
		<comments>http://www.dejanlevec.com/2010/04/29/not-so-random-thoughts-about-random/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:54:24 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/04/29/not-so-random-thoughts-about-random/</guid>
		<description><![CDATA[For one of my websites, I needed solution for randomly displaying different rows from MySQL database. As probably everyone knows, the easiest solution is to use following SQL: select * from table order by rand() There are no problems with &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/04/29/not-so-random-thoughts-about-random/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>For one of my websites, I needed solution for randomly displaying different rows from MySQL database. As probably everyone knows, the easiest solution is to use following SQL:</p>
<p>select * from table order by rand()</p>
<p>There are no problems with using that, except one: It&#8217;s REALLY SLOW. This might not be a problem with table with only few rows, but with bigger tables it really decreases the performance.</p>
<p>After spending a few hours of Googling and testing different methods, I find one, that works really great.</p>
<p>Following query is a lot faster than order by rand() and works without a problem:</p>
<p>SELECT * FROM Table T JOIN (SELECT CEIL(MAX(ID)*RAND()) AS ID FROM Table) AS x ON T.ID &gt;= x.ID LIMIT 1;</p>
<p>I found this solution on Jay Paroline&#8217;s blog: http://wanderr.com/jay/order-by-slow/2008/01/30/</p>
<p>I wondered if there is an even faster approach to get random row and then it hit me. So simple solution and it works even faster.</p>
<p>Why use only MySQL if we&#8217;re building a website? Why wouldn&#8217;t we rather use MySQL in connection with PHP (or other language) to get random result?</p>
<p><strong>Solution</strong></p>
<p>$x = mysql_fetch_array(mysql_query(&#8220;SELECT COUNT(*) FROM table&#8221;));</p>
<p>$y = $x[0]-1;</p>
<p>$x = rand(0,$y);</p>
<p>$query = mysql_query(&#8220;SELECT * FROM table LIMIT &#8220;.$x.&#8221;, 1&#8243;);</p>
<p><strong>Explanation</strong><br />
Firstly, we get count of all rows in table (this value can be memcached if we want even better performance).</p>
<p>Then we subtract 1 from total count and a get random number between 0 and (n-1).</p>
<p>After that we simply use limit to select 1 row at position $x.</p>
<p>I implemented this on my site and everything was a bit faster, but this solution can only fetch one row at a time. In my case I have to display 10 &#8211; 40 random rows at once.</p>
<p>So I searched for SQL to randomly get multiple rows and I found following solution:</p>
<p>mysql_query(&#8220;SELECT * FROM (<br />
SELECT @cnt := COUNT( * ) +1, @lim :=10<br />
FROM table<br />
)vars<br />
STRAIGHT_JOIN (<br />
SELECT table . * , @lim := @lim -1<br />
FROM table<br />
WHERE (<br />
@cnt := @cnt -1<br />
)<br />
AND RAND( &#8220;.time(0).&#8221; ) &lt; @lim / @cnt<br />
)i&#8221;);</p>
<p>Again we need to use something else than MySQL to get random seed in this case current time in seconds is used.</p>
<p>This is a great solution, but still slow.</p>
<p>I thought of using PHP&#8217;s rand to randomly select rows but in that case I will have to have sequential IDs and because of that we won&#8217;t be able to delete rows somewhere in the middle.</p>
<p>So I ended up with following PHP code:</p>
<p><strong>Multiple rows solution</strong></p>
<p>$query = mysql_query(&#8220;select id from table&#8221;);</p>
<p>$ids = array();</p>
<p>while($id = mysql_fetch_query($query)) {<br />
$ids[] = $id[0];<br />
}</p>
<p>$temp = &#8221;;</p>
<p>for($i = 0; $i &lt; 40; $i++) {<br />
$temp .= $ids[rand(0, count($ids)-1)].&#8217;,';<br />
}</p>
<p>$temp = substr($t, 0, strlen($t)-1);</p>
<p>$query = mysql_query(&#8220;select * from table where id in (&#8220;.$t.&#8221;)&#8221;);</p>
<p><strong>Explanation</strong><br />
This code might seem a bit harder but it&#8217;s really easy.<br />
First of all we get all IDs from table and put it in array $ids.</p>
<p>Then we use for loop to select 40 random IDs from array and add it to $temp variable and add comma, to separate the.</p>
<p>After that we remove last comma and then select rows from table where id matches ones from $temp.</p>
<p><strong>Result</strong><br />
In my case I have about 50 000 rows and I needed to display 40 random rows. With previous solution with joins the page executed in about 0.7 to 0.8 seconds.<br />
With my solution I speed it up to about 0.1 &#8211; 0.15 seconds of execution time. This is about 85% performance improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/04/29/not-so-random-thoughts-about-random/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching to Bing</title>
		<link>http://www.dejanlevec.com/2010/03/31/switching-to-bing/</link>
		<comments>http://www.dejanlevec.com/2010/03/31/switching-to-bing/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 15:22:52 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/03/31/switching-to-bing/</guid>
		<description><![CDATA[I&#8217;ve been searching with Google from the first day of using the Internet. It&#8217;s great search engine, I find everything I want and it always works. Sometimes there are some problems with loading front page of Google, but apart from &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/03/31/switching-to-bing/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been searching with Google from the first day of using the Internet. It&#8217;s great search engine, I find everything I want and it always works. Sometimes there are some problems with loading front page of Google, but apart from that I haven&#8217;t encounter any problems with it so far.</p>
<p><img src="/media/someone16/uploads/bing-logo-300x220.png" /></p>
<p>However, recently I&#8217;m testing Bing and I decided to completely switch to it from Google. I&#8217;m also unhappy with Google&#8217;s policy on keeping my personal information. I&#8217;ll only be using Bing search engine and stay with Gmail because it has better UI and I don&#8217;t want to change my email address. Of course Google Analytics, Webmaster Tools and other tools have no Microsoft alternative and I&#8217;m happy with them, so there is no reason for me to switch.</p>
<p>It&#8217;s never bad to check alternatives, and see if they are better (I doubt, but Bing Maps really suprised me in a good way).</p>
<p>More about Google:<br />
<a title="http://www.youtube.com/watch?v=R7yfV6RzE30" href="http://www.youtube.com/watch?v=R7yfV6RzE30" target="_blank"> http://www.youtube.com/watch?v=R7yfV6RzE30</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/03/31/switching-to-bing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A bit of MS SQL</title>
		<link>http://www.dejanlevec.com/2010/03/31/a-bit-of-ms-sql/</link>
		<comments>http://www.dejanlevec.com/2010/03/31/a-bit-of-ms-sql/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 15:21:09 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/03/31/a-bit-of-ms-sql/</guid>
		<description><![CDATA[When playing around with Windows Server 2008 I discovered how good Linux is. Even that I have to use Terminal (which I like anyway), dealing with Linux configuration is easier than dealing with Windows. My primary area of interest is &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/03/31/a-bit-of-ms-sql/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>When playing around with Windows Server 2008 I discovered how good Linux is. Even that I have to use Terminal (which I like anyway), dealing with Linux configuration is easier than dealing with Windows.</p>
<p>My primary area of interest is the Internet and all about it (web sites, databases, programming, servers). I really like open source (from operating system to programming languages), but occasionally I also check on the alternatives (Microsoft’s world, to be precise).</p>
<p>And in the previous week I checked a bit of how stuff works in Windows (DNS, IIS, MS SQL, ASP.Net). On the first look, it seemed a lot easier to work with it because of the GUI, but it soon became clear that I was terribly wrong.</p>
<p>Internet Information Server … great thing, a lot of options and dialogs but there are still stuff that needs to be configured manually. After setting up a few test web sites, I ran into few problems. The biggest was about caching static content on visitor’s computers. I partially configured it by Googling about it.</p>
<p><strong>MS SQL</strong></p>
<p>Again, everything seemed very easy. Creating a database takes few clicks, creating a user takes another few clicks and we have everything we want. Tables can be migrated from MySQL by using ODBC and that’s it. Until…I wanted to access this data from a web application.</p>
<p>Only thing I can get from my web application (just a simple thing for testing some of the MS SQL features and comparing performance to MySQL) was a simple error, that selected user cannot access selected database.</p>
<p>I was confused at first, but then I opened another instance of MS SQL Management Studio, connected to the server using this user, and I was not allowed to access anything. I guessed MS SQL has a unique way of managing rights and so I googled for tutorials and help. As I found out, there is a lot less Internet literature on this topic (MS SQL) than on alternatives.</p>
<p>After reading 30 articles, 400 clicks on buttons, 100 closed dialogs and 2 hours of work, I finally found a solution for this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/03/31/a-bit-of-ms-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security Rulz</title>
		<link>http://www.dejanlevec.com/2010/03/31/security-rulz/</link>
		<comments>http://www.dejanlevec.com/2010/03/31/security-rulz/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 15:16:31 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/03/31/security-rulz/</guid>
		<description><![CDATA[I would like to inform you that our website has a 128 bit encryption. With this base, passwords that comprise only of letters and alphabets create an algorithm that is difficult to crack. We discourage the use of special characters &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/03/31/security-rulz/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="/media/someone16/uploads/amex.png"><img src="/media/someone16/uploads/amex2.png" /></a></p>
<p><i>I would like to inform you that our website has a 128 bit encryption. With this base, passwords that comprise only of letters and alphabets create an algorithm that is difficult to crack. We discourage the use of special characters because hacking softwares can recignize them very easily.</p>
<p> The length of the password is limited to 8 characters to reduce keyboard contact. Some softwares can decipher a password based on information of &#8220;most common keys pressed&#8221;.</p>
<p>Therefore, lesser keys punched in a given frame of time lessen the possibility of the password being cracked.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/03/31/security-rulz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad</title>
		<link>http://www.dejanlevec.com/2010/03/31/ipad/</link>
		<comments>http://www.dejanlevec.com/2010/03/31/ipad/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 15:14:18 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/03/31/ipad/</guid>
		<description><![CDATA[[center][img]/media/someone16/uploads/hero6_20100127-247&#215;300.png[/img][/center] iPad? What&#8217;s that? A bigger iPhone! So Apple announced their first Tablet PC, which is neither a tablet nor a PC. Speculations about what it will look like were all wrong. Apple didn&#8217;t make a usable tablet computer, but &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/03/31/ipad/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>[center][img]/media/someone16/uploads/hero6_20100127-247&#215;300.png[/img][/center]</p>
<p> iPad? What&#8217;s that? A bigger iPhone!</p>
<p> So Apple announced their first Tablet PC, which is neither a tablet nor a PC. Speculations about what it will look like were all wrong. Apple didn&#8217;t make a usable tablet computer, but a friggin&#8217; MP3 player with iBooks application and broken web browser.</p>
<p> Maybe my expectations were too high, but their product is really not something that could be called tablet. I expected something like normal PC tablets with very good battery and Mac OS X operating system with the possibility of using Windows via Boot Camp. However, the only thing they could have came up with was a bigger iPhone intended for reading eBooks and surfing the Internet with Safari (without Flash support!).</p>
<p> As usual, Apple will sell iPads without a problem and without a competition in this market.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/03/31/ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ext2 and ext3 on Windows</title>
		<link>http://www.dejanlevec.com/2010/03/11/ext2-and-ext3-on-windows/</link>
		<comments>http://www.dejanlevec.com/2010/03/11/ext2-and-ext3-on-windows/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 18:55:30 +0000</pubDate>
		<dc:creator>techfreak</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://techfreak.me/2010/03/11/ext2-and-ext3-on-windows/</guid>
		<description><![CDATA[If you are using dual boot with Windows and Linux you&#8217;ve probably faced with a problem of accessing ext3 partitions from Windows OS. Most of the Linux distributions come with NTFS-3G driver, which allow reading &#38; writing to NTFS partiton. &#8230;<p class="read-more"><a href="http://www.dejanlevec.com/2010/03/11/ext2-and-ext3-on-windows/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you are using dual boot with Windows and Linux you&#8217;ve probably faced with a problem of accessing ext3 partitions from Windows OS.</p>
<p> Most of the Linux distributions come with NTFS-3G driver, which allow reading &amp; writing to NTFS partiton. Sadly, Windows doesn&#8217;t offer such filesystem driver for file systems other than FAT16/32 and NTFS.</p>
<p> However, you can use the 3rd party driver such as Ext2 IFS, which allows OS Windows to access such partitions from any program including Windows Explorer.</p>
<p> [b]Ext2 IFS[/b]<br />
 Ext2 IFS is a freeware program that provides Windows NT4.0/2000/XP/2003/Vista/2008 with full access to ext2/ext3 partitions.</p>
<p> Info: [url]http://www.fs-driver.org/[/url]<br />
 Download: [url]http://www.fs-driver.org/download.html[/url]</p>
<p> I&#8217;ve no problems with accessing partitions with inode size of 128 bytes. However, this program does not support partitions with bigger inode size, which can be a problem in some cases.</p>
<p> [b]Ext2Fsd[/b]<br />
 If you have a partition with inode size of 256 bytes, you can use this file system driver, which supports Windows NT/2K/XP/VISTA, X86/AMD64.</p>
<p> Info: [url]http://www.ext2fsd.com/[/url]<br />
 Download: [url]http://sourceforge.net/projects/ext2fsd/files/[/url]</p>
<p> Just a word of caution: It is not a good idea to have multiple file system drivers (for the same file system) installed at the same time. Try one and if you have a problem with it, delete it, restart operating system and install another one.</p>
<p> Web sites of both drivers claim that they are not supported by Windows 7. In my case everything worked well on Windows 7 32 bit and 64 bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dejanlevec.com/2010/03/11/ext2-and-ext3-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

