<?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>Julius Beckmann</title>
	<atom:link href="http://juliusbeckmann.de/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://juliusbeckmann.de/blog</link>
	<description>Ich bin nicht verrückt, nur technisch begabt ...</description>
	<lastBuildDate>Tue, 16 Feb 2010 13:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP: Micro vs. Macro optimization, or &quot;Get the low hanging fruit first&quot;</title>
		<link>http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html</link>
		<comments>http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html#comments</comments>
		<pubDate>Tue, 16 Feb 2010 12:56:46 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[fruits]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[micro]]></category>
		<category><![CDATA[optimieren]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=549</guid>
		<description><![CDATA[After using and developing PHP for a few years now, i heard pretty much stuff about optimization, special technice's and other myths and fairy tales. But this article is not about tips or tricks, it is about if this the real key to better performance.

Nearly all of us have heard about hints like "static method [...]]]></description>
			<content:encoded><![CDATA[<p>After using and developing PHP for a few years now, i heard pretty much stuff about optimization, special technice's and other myths and fairy tales. But this article is not about tips or tricks, it is about if this the real key to better performance.<br />
<span id="more-549"></span><br />
Nearly all of us have heard about hints like "static method calls are faster" or "++$i is faster than $i++". First is wrong, second is true by the way, but more important is the question, does it really perform better in overall?</p>
<p>I would like to categorize the optimization possibility's into micro-optimization and macro-optimization.</p>
<h2>Micro-optimization:</h2>
<p>I already mentioned the ++$i tip. This would be a perfect example for a micro-optimization. Imagine you have a website, just a normal one with a few thousand hits a day. Simple fetching articles from database and formatting/outputting these. Of course you could use ++$i instead of $i++, but what will be the achievement? Lets guess there are about 1000 PHP operations done on a normal page request. About 50 of them could be optimized with ++$i which is guessed 10% faster. </p>
<div class="codesnip-container" >950 + 50 * (1-0.10) = 950 + 45 = 995 calls left.</div>
<p>You saved 5 simple operations, what are about 0,5%. </p>
<p>This might look noticeable at first, but this is only the number of operations, not the real spend time where these 5 calls will not be measurable any more. Every request the PHP parser has to read and parse the PHP file. On every SQL SELECT there is the database overhead which also depends on database server load. Our previous result combined with that knowledge might be ~0.1% at the end. Conclusion: This kind of optimization simply does not make the page significantly  faster.</p>
<h2>Macro-optimization:</h2>
<p>First, this is not about using macros like in C. No simple code substitution. It is the opposite of the micro-optimization. Once again a example with the simple imaginary PHP website. The main menu using JavaScript is generated by a complex SQL query on every request. This whole procedure takes about 10ms (unrealistic i know, but it is _just_ for the example calculation). 9ms for the SQL query and 1 ms PHP. For all of you who do not know why SQL is slower: Because there are sockets / TCP, database-daemon and harddisk access involved.</p>
<p>THIS is the point where we could use a macro-optimization.<br />
Either, we could invest much work and create a different menu system without javascript and faster SQL queries, or we could do it a much easier. </p>
<p>If we have APC for caching (other anything else), we could use the following strategy: </p>
<div class="codesnip-container" >1. Check for a cached result of our SQL query.<br />
2. If yes, skip to 5.<br />
3. We have no cached entry and perform the SQL query now.<br />
4. The result of the query will be saved in our cache for 1 hours.<br />
5. Use the result to generate the menu.</div>
<p>After this optimization that _just_ affect the SQL fetching part, we have a APC cache request that might take ~1 ms. So we reduced our 9ms SQL to 1ms APC. Of course the overall benefit will not be that big, but will be notice- and measurable. But what really makes the point here is, that we need to query only 24 times a day and not on _every_ request.</p>
<h2>Low hanging fruit</h2>
<p><img alt="" src="/blog/files/images/lowapples.png" class="alignright" width="224" height="261" /><br />
After reading about micro and macro optimization, you might understand the meaning of this much better.<br />
There are several ways to optimize, some of them are easy and fast. These are the "low hanging fruit" - easy to pick. This fruits should be always the first thought when it comes to optimizing. Some of them can be found easily with profiling.<br />
I want to give you a few hints for optimizing your PHP (Python, Ruby, ...) application.:</p>
<p>1. Keep an eye on the IO load. The harddisk of the server is mostly the slowest part and should be used only if necessary.</p>
<p>2. Try to avoid complex SQL querys. The database servers are often under heavy load, even if they have some integrated caching, there is still the SQL overhead.</p>
<p>3. Try to store results. If you need to analyse the browser of your clients, do not do this every request, save the needed values in their $_SESSION and check only if the UserAgent has been changed with a simple crc32 hash.</p>
<p>4. Try to cache. If you have parts in your code that are called nearly every request, have the same result and do not change often. Cache them! Some options are: APC, XCache, Memcache, eAccelerator, tmpFS.</p>
<p>5. Try to avoid unnecessary function calls. Try to store the result of that function and use it multiple times.</p>
<h2>High hanging fruit</h2>
<p><img alt="" src="/blog/files/images/tallapples.png" class="alignright" width="224" height="261" /><br />
I do not say you should not use ++$i or static methods. I want to clarify that there are more important parts worth optimizing.<br />
If you write new code, it should always be your aim writing the fastest code possible. Some of these tips floating on the internet might be helpful, but please check if they are true first!<br />
Some tips i tested myself:<br />
1. ++$i is faster than $i++<br />
2. Static methods are not always faster. (<a href="http://www.ingo-schramm.de/blog/archives/4-PHP-Myth-static-function-call-faster-than-instance-function-call.html">source</a>)<br />
3. Relative paths are slower to include than absolute.<br />
4. foreach is fastest for iterating over arrays. (<a href="/blog/php-foreach-vs-while-vs-for-the-loop-battle.html">benchmark</a>)<br />
5. floor and ceil can be replaced bei (int) casts. (<a href="/blog/php-floor-and-ceil-are-slow.html">benchmark</a>)<br />
6. Try to avoid preg_* function if possible. (<a href="/blog/php-do-not-rebuild-preg_-functions.html">benchmark</a>)</p>
<h2>Conclusion</h2>
<p>If you are hungry, profile the tree first, then pick some of the large low hanging fruits.<br />
While coding pick some of the tiny high hanging.<br />
I hope you had fun reading about my point of view.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html&amp;t=PHP%3A+Micro+vs.+Macro+optimization%2C+or+%22Get+the+low+hanging+fruit+first%22&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html&amp;title=PHP%3A+Micro+vs.+Macro+optimization%2C+or+%22Get+the+low+hanging+fruit+first%22&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html&amp;title=PHP%3A+Micro+vs.+Macro+optimization%2C+or+%22Get+the+low+hanging+fruit+first%22&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=PHP%3A+Micro+vs.+Macro+optimization%2C+or+%22Get+the+low+hanging+fruit+first%22;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-micro-vs-macro-optimization-or-get-the-low-hanging-fruit-first.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thunderbird: Newsgroup has unread messages error</title>
		<link>http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html</link>
		<comments>http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 08:04:20 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=545</guid>
		<description><![CDATA[I am using Mozilla Thunderbird for a while now and one error occurs every now and then. After updating and reading news from our University news-server, some of them are still marked as "unread", but when i click on the folder, the unread marked messages disappear.
I researched the error and found a simple fix ...

Locate [...]]]></description>
			<content:encoded><![CDATA[<p>I am using Mozilla Thunderbird for a while now and one error occurs every now and then. After updating and reading news from our University news-server, some of them are still marked as "unread", but when i click on the folder, the unread marked messages disappear.<br />
I researched the error and found a simple fix ...<br />
<span id="more-545"></span></p>
<h3>Locate profile folder</h3>
<p>First, we need to shut down Thunderbird and locate the Profile folder. On Ubuntu this is in you home directory in "~/.mozilla-thunderbird/". In your profile folder is another folder called "News". Therein are all the subscribed News-servers and topics. Now you need to open the .rc file. In my case is is: "news.fh-wedel.de.rc"</p>
<h3>Open .rc file</h3>
<p>The content should look similar to this:</p>
<div class="codesnip-container" >fhw.c: 1-8723<br />
fhw.db: 1-1708<br />
fhw.talk: 1-23184,23186-23218,23220-23223,23225-23234,23236-23266,23268-23611<br />
fhw.mathematik: 1-3697,3699-3707,3709-3730,3732-3760,3762-3769,3771-3809,3811-3838,3840-3875,3877-4019</div>
<p>The principle behind this file is simple. All the read messages are marked. For example ALL messages in "fhw.db" are read. But in fhw.talk the messages 23185, 23219, ... are unread.<br />
And exactly here is the problem. Some of these messages are marked as unread, but you already read them, so some of these number are wrong.</p>
<h3>Repair .rc file</h3>
<p>Simple solution is, clear them all!<br />
The content of the file with all messages marked as read should look like this:</p>
<div class="codesnip-container" >fhw.c: 1-8723<br />
fhw.db: 1-1708<br />
fhw.talk: 1-23611<br />
fhw.mathematik: 1-4019</div>
<p>Now save the file and reopen thunderbird and your messages should now be marked as read.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html&amp;t=Thunderbird%3A+Newsgroup+has+unread+messages+error&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html&amp;title=Thunderbird%3A+Newsgroup+has+unread+messages+error&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html&amp;title=Thunderbird%3A+Newsgroup+has+unread+messages+error&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Thunderbird%3A+Newsgroup+has+unread+messages+error;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/thunderbird-newsgroup-has-unread-messages-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Open Windows in Foreground</title>
		<link>http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html</link>
		<comments>http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:47:38 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Settings]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=542</guid>
		<description><![CDATA[If your windows do not open in Foreground like we are all used to it, it might be caused by a wrong compiz-setting.
In this article i will describe how to fix that problem.

The setting can be found in the Compiz Setting Manager. This manager can be found under "System" -> "Settings"
Under "General options/Focus &#038; Raise [...]]]></description>
			<content:encoded><![CDATA[<p>If your windows do not open in Foreground like we are all used to it, it might be caused by a wrong compiz-setting.<br />
In this article i will describe how to fix that problem.<br />
<span id="more-542"></span></p>
<p>The setting can be found in the Compiz Setting Manager. This manager can be found under "<em>System</em>" -> "<em>Settings</em>"<br />
Under "<em>General options/Focus &#038; Raise Behaviour/Focus Prevention Level</em>" is the checkbox.</p>
<p>On my system even without any visual effects, this setting was used.</p>
<p>If you <strong>cant find</strong> the Compiz Settings Manager, you need to install this package first. Simple command:</p>
<div class="codesnip-container" >sudo apt-get install compizconfig-settings-manager</div>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html&amp;t=Ubuntu%3A+Open+Windows+in+Foreground&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html&amp;title=Ubuntu%3A+Open+Windows+in+Foreground&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html&amp;title=Ubuntu%3A+Open+Windows+in+Foreground&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Ubuntu%3A+Open+Windows+in+Foreground;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/ubuntu-open-windows-in-foreground.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Adding Thunderbird to indicator-applet</title>
		<link>http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html</link>
		<comments>http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html#comments</comments>
		<pubDate>Fri, 05 Feb 2010 06:15:57 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Evolution]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[indicator-applet]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=537</guid>
		<description><![CDATA[Adding Thunderbird to the "indicator-applet" is possible and not that hard.
I wrote down the few commands and hints.

Applications shown by the "indicator-applet" are listed in this directory:
/usr/share/indicators/messages/applications/
By default the files "empathy" and "evolution" should be inside this directory.
Adding Thunderbird
Adding Thunderbird is just creating a new file with the path to the .desktop file.
Opening the "thunderbird" [...]]]></description>
			<content:encoded><![CDATA[<p>Adding Thunderbird to the "indicator-applet" is possible and not that hard.<br />
I wrote down the few commands and hints.<br />
<span id="more-537"></span><br />
Applications shown by the "indicator-applet" are listed in this directory:</p>
<div class="codesnip-container" >/usr/share/indicators/messages/applications/</div>
<p>By default the files "empathy" and "evolution" should be inside this directory.</p>
<h3>Adding Thunderbird</h3>
<p>Adding Thunderbird is just creating a new file with the path to the .desktop file.</p>
<p>Opening the "thunderbird" file:</p>
<div class="codesnip-container" >sudo gedit /usr/share/indicators/messages/applications/thunderbird</div>
<p>Now add this line and save:</p>
<div class="codesnip-container" >/usr/share/applications/thunderbird.desktop</div>
<p>Hint: Check if that file exist on your system!</p>
<p>Now you should be abled to see Thunderbird if you klick on the "indicator-applet".</p>
<h3>Removing Evolution</h3>
<p>Removing Evolution from the "indicator-applet", just execute this command:</p>
<div class="codesnip-container" >sudo rm /usr/share/indicators/messages/applications/evolution</div>
<h3>Credit</h3>
<p>Credit for this goes to "Lorenzo Francisco":<br />
https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/367175/comments/6</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html&amp;t=Ubuntu%3A+Adding+Thunderbird+to+indicator-applet&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html&amp;title=Ubuntu%3A+Adding+Thunderbird+to+indicator-applet&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html&amp;title=Ubuntu%3A+Adding+Thunderbird+to+indicator-applet&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Ubuntu%3A+Adding+Thunderbird+to+indicator-applet;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/ubuntu-adding-thunderbird-to-indicator-applet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Easy and secure password hashing class</title>
		<link>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html</link>
		<comments>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html#comments</comments>
		<pubDate>Fri, 29 Jan 2010 13:26:06 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Hash]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[SHA1]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=526</guid>
		<description><![CDATA[Everybody talks about security but most of the people still save md5(password) in their databases. This is not funny. Reversing a simple and even a average password is not that hard.
I once wrote this tiny class that generates secure enough password hashes.

I build in salt and variable interations.
License is GPL so everybody can use it [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody talks about security but most of the people still save md5(password) in their databases. This is not funny. Reversing a simple and even a average password is not that hard.<br />
I once wrote this tiny class that generates secure enough password hashes.<br />
<span id="more-526"></span><br />
I build in salt and variable interations.<br />
License is GPL so everybody can use it :D</p>
<h2>Download / Source</h2>
<p><a href="http://juliusbeckmann.de/code/class.password.phps">http://juliusbeckmann.de/code/class.password.phps</a><br />
<a href="http://juliusbeckmann.de/code/class.password.php.txt">http://juliusbeckmann.de/code/class.password.php.txt</a></p>
<h2>Usage / Example</h2>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$pass</span> <span class="sy0">=</span> <span class="st_h">'MyPassword'</span><span class="sy0">;</span><br />
<span class="kw1">echo</span> <span class="re0">$pass</span><span class="sy0">,</span> <span class="st_h">' =&gt; '</span><span class="sy0">,</span> password<span class="sy0">::</span><a href="http://www.php.net/hash"><span class="kw3">hash</span></a><span class="br0">&#40;</span><span class="re0">$pass</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<h2>Background</h2>
<p><strong>What is a "salt" good for?</strong><br />
A salt adds a pretty random string so passwords to make the hash more secure.<br />
The saltless password <strong>grandma becomes a5d19cdd5fd1a8f664c0ee2b5e293167</strong>.<br />
If you use the salt="!24sf+fs5SDG65-54" then <strong>grandma!24sf+fs5SDG65-54 becomes bab9015f430ad28f420581f069f5736f</strong><br />
And nobody would know that bab9015f430ad28f420581f069f5736f was "grandma"</p>
<p>Check it yourself:<br />
<a href="http://www.google.com/search?q=a5d19cdd5fd1a8f664c0ee2b5e293167">Google a5d19cdd5fd1a8f664c0ee2b5e293167 = "grandma"</a><br />
<a href="http://www.google.com/search?q=bab9015f430ad28f420581f069f5736f">Google bab9015f430ad28f420581f069f5736f = "grandma!24sf+fs5SDG65-54"</a><br />
You can clearly see yourself the salted password hash is not known by Google.</p>
<p><strong>What are iterations good for?</strong><br />
Iterations mean you make a hash from a hash.<br />
Again the "grandma" example:<br />
md5(grandma) = a5d19cdd5fd1a8f664c0ee2b5e293167<br />
md5(a5d19cdd5fd1a8f664c0ee2b5e293167) = ce807f095fa160ccce736e007fe74ff1<br />
md5(ce807f095fa160ccce736e007fe74ff1) = e720fe3e6cc002a0eaabf5300283bd56<br />
md5(e720fe3e6cc002a0eaabf5300283bd56) = ...<br />
But be carefull, plain rehashing is not more secure than single hashing.<br />
What makes rehashing more secure is using the salt again what makes the new hash dependent from the previous hash AND the salt.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html&amp;t=PHP%3A+Easy+and+secure+password+hashing+class&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html&amp;title=PHP%3A+Easy+and+secure+password+hashing+class&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html&amp;title=PHP%3A+Easy+and+secure+password+hashing+class&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=PHP%3A+Easy+and+secure+password+hashing+class;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-easy-and-secure-password-hashing-class.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP: FIFO queue with APC</title>
		<link>http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html</link>
		<comments>http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html#comments</comments>
		<pubDate>Fri, 29 Jan 2010 08:04:42 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[APC]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[FIFO]]></category>
		<category><![CDATA[Memcache]]></category>
		<category><![CDATA[Queue]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=520</guid>
		<description><![CDATA[A few days ago i needed a simple queue class that would also be persistent after the pagerequest. I first thought about putting this queue in SQL but did not want the whole SQL overhead and such and remembered a blog artice about memcache queues a once read. But i had no memcache for that [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago i needed a simple queue class that would also be persistent after the pagerequest. I first thought about putting this queue in SQL but did not want the whole SQL overhead and such and remembered a <a href="http://3.rdrail.net/blog/memcached-based-message-queues/">blog artice about memcache queues</a> a once read. But i had no memcache for that project and used <a href="http://pecl.php.net/package/APC">APC</a> instead.<br />
<span id="more-520"></span></p>
<h2>Basic idea</h2>
<p>The basic idea looks like this:<br />
<a href="http://juliusbeckmann.de/blog/static/memqueue.jpg"><img src="http://juliusbeckmann.de/blog/static/memqueue-600x397.jpg" alt="memqueue" title="memqueue" width="600" height="397" class="aligncenter size-medium wp-image-521" /></a><br />
There are 2 counters, one for the current head key, and the other for the current tail key.<br />
The main part of the code is from the mentioned blog artice, but i ported it to PHP and APC instead of Memcache.</p>
<h2>Documentation</h2>
<p>A generated documentation can be found here:<br />
<a href="http://juliusbeckmann.de/classes/li_apc_queue.html">http://juliusbeckmann.de/classes/li_apc_queue.html</a></p>
<h2>Source</h2>
<p>The source can be found here:<br />
<a href="http://juliusbeckmann.de/classes/src/apc_queue/class.apc_queue.phps">http://juliusbeckmann.de/classes/src/apc_queue/class.apc_queue.phps</a><br />
<a href="http://juliusbeckmann.de/classes/src/apc_queue/class.apc_queue.php.txt">http://juliusbeckmann.de/classes/src/apc_queue/class.apc_queue.php.txt</a></p>
<h2>Usage</h3>
<p>Here is a example how to use the queue:</p>
<div class="codesnip-container" >
<div class="php codesnip" style="font-family:monospace;"><span class="re0">$q</span> <span class="sy0">=</span> <span class="kw2">new</span> apc_queue<span class="br0">&#40;</span><span class="st_h">'test'</span><span class="sy0">,</span> <a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$_GET</span><span class="br0">&#91;</span><span class="st_h">'force'</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p><span class="kw1">echo</span> <span class="st0">&quot;STORE: &quot;</span><span class="sy0">;</span><br />
<span class="kw1">for</span><span class="br0">&#40;</span><span class="re0">$i</span><span class="sy0">=</span><span class="nu0">0</span><span class="sy0">;</span> <span class="re0">$i</span><span class="sy0">&lt;</span><span class="nu0">10</span><span class="sy0">;</span> <span class="sy0">++</span><span class="re0">$i</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="re0">$rand</span> <span class="sy0">=</span> <a href="http://www.php.net/rand"><span class="kw3">rand</span></a><span class="br0">&#40;</span>0<span class="sy0">,</span>9<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">echo</span> <span class="re0">$rand</span><span class="sy0">,</span><span class="st_h">','</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="re0">$q</span><span class="sy0">-&gt;</span><span class="me1">add</span><span class="br0">&#40;</span><span class="re0">$rand</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw1">echo</span> <span class="st0">&quot;<span class="es1">\n</span>FETCH: &quot;</span><span class="sy0">;</span><br />
<span class="kw1">while</span><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$g</span> <span class="sy0">=</span> <span class="re0">$q</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">!==</span> <span class="kw4">FALSE</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">echo</span> <span class="re0">$g</span><span class="sy0">,</span><span class="st_h">','</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw1">echo</span> <span class="st0">&quot;<span class="es1">\n</span>LENGTH: &quot;</span><span class="sy0">,</span> <span class="re0">$q</span><span class="sy0">-&gt;</span><span class="me1">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html&amp;t=PHP%3A+FIFO+queue+with+APC&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html&amp;title=PHP%3A+FIFO+queue+with+APC&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html&amp;title=PHP%3A+FIFO+queue+with+APC&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=PHP%3A+FIFO+queue+with+APC;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-fifo-queue-with-apc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lifehacks - My Collection</title>
		<link>http://juliusbeckmann.de/blog/lifehacks-my-collection.html</link>
		<comments>http://juliusbeckmann.de/blog/lifehacks-my-collection.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 19:15:01 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Reallife hacks]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=517</guid>
		<description><![CDATA[I like solving strange problems with my computer. But what i also like is finding cool tricks and hacks in real life.
This page will contain a collection of life hacks i know.

Lidl pay desk hack
This hack is a little bit older but might work also on other pay desk machines.
You can get the pay desk [...]]]></description>
			<content:encoded><![CDATA[<p>I like solving strange problems with my computer. But what i also like is finding cool tricks and hacks in real life.<br />
This page will contain a collection of life hacks i know.<br />
<span id="more-517"></span></p>
<h3>Lidl pay desk hack</h3>
<p>This hack is a little bit older but might work also on other pay desk machines.<br />
You can get the pay desk machine to crash if your receipt has a total of 0.00 Euro.<br />
This can be done with a few refund bottles and some queap stuff like joghurt or bubblegum.<br />
The result is a pay desk machine that does not work anymore and needs to be restarted by the chief.</p>
<h3>Elevator hack</h3>
<p>There is the rumor that you can "hack" a elevator.<br />
This can be done by pressing the "close door" and the "floor" button you want to go.<br />
Actual, this was intended to be used be engineers for testing purposes. Maybe it can become handy sometimes.</p>
<h3>More hacks?</h3>
<p>You know more real life hacks?<br />
Please tell me!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/lifehacks-my-collection.html&amp;t=Lifehacks+-+My+Collection&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/lifehacks-my-collection.html&amp;title=Lifehacks+-+My+Collection&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/lifehacks-my-collection.html&amp;title=Lifehacks+-+My+Collection&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Lifehacks+-+My+Collection;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/lifehacks-my-collection.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/lifehacks-my-collection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun: Knowlegde vs Time</title>
		<link>http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html</link>
		<comments>http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:03:09 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Interessant]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=513</guid>
		<description><![CDATA[I am currently writing my exams these weeks and found this graph on the internet. Somehow i did some marked similarities to my learning :D


     tweetmeme_url='http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; ]]></description>
			<content:encoded><![CDATA[<p>I am currently writing my exams these weeks and found this graph on the internet. Somehow i did some marked similarities to my learning :D</p>
<p><a href="http://juliusbeckmann.de/blog/static/funny-graphs-knowledge-time.jpg"><img src="http://juliusbeckmann.de/blog/static/funny-graphs-knowledge-time.jpg" alt="funny-graphs-knowledge-time" title="funny-graphs-knowledge-time" width="504" height="468" class="aligncenter size-full wp-image-514" /></a></p>
<p><br/></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html&amp;t=Fun%3A+Knowlegde+vs+Time&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html&amp;title=Fun%3A+Knowlegde+vs+Time&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html&amp;title=Fun%3A+Knowlegde+vs+Time&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=Fun%3A+Knowlegde+vs+Time;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/fun-knowlegde-vs-time.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP/MySQL: Warning: mysql_query(): Unable to save result set ...</title>
		<link>http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html</link>
		<comments>http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html#comments</comments>
		<pubDate>Mon, 18 Jan 2010 15:08:36 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=507</guid>
		<description><![CDATA[Today i found a error in a tiny script i was working on.
The error Message looked like this:
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /var/www/example.php on line 55
First i found a few hints about repairing or optimizing MySQL tables, but this did not work out.
After a few debugging outputs a realized that the [...]]]></description>
			<content:encoded><![CDATA[<p>Today i found a error in a tiny script i was working on.<br />
The error Message looked like this:</p>
<div class="codesnip-container" >Warning: mysql_query() [function.mysql-query]: Unable to save result set in /var/www/example.php on line 55</div>
<p>First i found a few hints about repairing or optimizing MySQL tables, but this did not work out.<br />
After a few debugging outputs a realized that the query was not properly written.<br />
<span id="more-507"></span><br />
The original query looked like this:</p>
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> id<br />
<span class="kw1">FROM</span> <span class="st0">`table`</span> <br />
<span class="kw1">WHERE</span> <span class="st0">`order`</span> <span class="sy0">&gt;</span><br />
<span class="br0">&#40;</span><br />
&nbsp; <span class="kw1">SELECT</span> <span class="st0">`order`</span> <br />
&nbsp; <span class="kw1">FROM</span> <span class="st0">`table`</span> <br />
&nbsp; <span class="kw1">WHERE</span> active <span class="sy0">=</span> 1<br />
<span class="br0">&#41;</span><br />
<span class="kw1">LIMIT</span> <span class="nu0">1</span>;</div>
</div>
<p>As you can see the query as a non correlated subquery. It worked fine nearly all the time, but only when the subquery returns only zero or one lines. If there are more lines MySQL generates the "Unable to save result set", because `order` cant be bigger then 2 resultvalues at the same time.<br />
The right query looks like this:</p>
<div class="codesnip-container" >
<div class="sql codesnip" style="font-family:monospace;"><span class="kw1">SELECT</span> id<br />
<span class="kw1">FROM</span> <span class="st0">`table`</span> <br />
<span class="kw1">WHERE</span> <span class="st0">`order`</span> <span class="sy0">&gt;</span><br />
<span class="br0">&#40;</span><br />
&nbsp; <span class="kw1">SELECT</span> <span class="st0">`order`</span> <br />
&nbsp; <span class="kw1">FROM</span> <span class="st0">`table`</span> <br />
&nbsp; <span class="kw1">WHERE</span> active <span class="sy0">=</span> 1<br />
&nbsp; <span class="kw1">LIMIT</span> 1<br />
<span class="br0">&#41;</span><br />
<span class="kw1">LIMIT</span> <span class="nu0">1</span>;</div>
</div>
<p>A extra LIMIT 1 makes the deal perfect, and saved a little bit of my day.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html&amp;t=PHP%2FMySQL%3A+Warning%3A+mysql_query%28%29%3A+Unable+to+save+result+set+...&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html&amp;title=PHP%2FMySQL%3A+Warning%3A+mysql_query%28%29%3A+Unable+to+save+result+set+...&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html&amp;title=PHP%2FMySQL%3A+Warning%3A+mysql_query%28%29%3A+Unable+to+save+result+set+...&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=PHP%2FMySQL%3A+Warning%3A+mysql_query%28%29%3A+Unable+to+save+result+set+...;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/php-mysql-warning-mysql_query-unable-to-save-result-set.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATI CCC changes CPU Throttle settings</title>
		<link>http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html</link>
		<comments>http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 20:35:25 +0000</pubDate>
		<dc:creator>Julius</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://juliusbeckmann.de/blog/?p=501</guid>
		<description><![CDATA[I had a wierd problem with my notebook and a fresh Windows 7 installation.
For saving battery power a changes the minimum CPU speed to 1%, but somehow this settings was "forgotten" and resettet with the default value 100%.
But i managed to find out what happened really.

This kind of "bug" can occur with the ATI CCC [...]]]></description>
			<content:encoded><![CDATA[<p>I had a wierd problem with my notebook and a fresh Windows 7 installation.<br />
For saving battery power a changes the minimum CPU speed to 1%, but somehow this settings was "forgotten" and resettet with the default value 100%.<br />
But i managed to find out what happened really.<br />
<span id="more-501"></span><br />
This kind of "bug" can occur with the ATI CCC (Catalyst Control Center). The CCC has the "feature" to change CPU throttle speed when watching videos and DirectX video stuff.<br />
But in my case my settings was repeatedly forgotten after a watched a video. In the background, the ATI driver somehow changed my energy settings to a value saved registry called "<strong>ExtEvent_VideoPlaybackCpuThrottle</strong>". This registry entry is by default 100%. I tried to change it to 1% but this had the disadvantage to change the CPU throttling setting in ALL energy profiles.<br />
So i simply deleted this registry entry wherever it occurred (3 times).<br />
Till now the problem is gone and my battery lasts longer.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html&amp;t=ATI+CCC+changes+CPU+Throttle+settings&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html&amp;title=ATI+CCC+changes+CPU+Throttle+settings&amp;t=1 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html&amp;title=ATI+CCC+changes+CPU+Throttle+settings&amp;t=2 ' height='18' width='120' scrolling='no' frameborder='0' ></iframe></td> <td><script type="text/javascript"><!--yahooBuzzArticleHeadline=ATI+CCC+changes+CPU+Throttle+settings;//--></script><script type="text/javascript" src="http://d.yimg.com/ds/badge2.js" badgetype=small-votes></script></td> <td><script type="text/javascript">tweetmeme_url='http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html'; tweetmeme_style = 'compact';tweetmeme_source = 'h4cc'; </script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" ></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://juliusbeckmann.de/blog/ati-ccc-changes-cpu-throttle-settings.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
