<?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>Marcus Nyberg</title>
	<atom:link href="http://www.marcusnyberg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcusnyberg.com</link>
	<description>Digital and dangerous</description>
	<lastBuildDate>Thu, 26 Apr 2012 10:43:52 +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>Shortcode conflicts in WordPress plugins</title>
		<link>http://www.marcusnyberg.com/2012/04/26/shortcode-conflicts-in-wordpress-plugins/</link>
		<comments>http://www.marcusnyberg.com/2012/04/26/shortcode-conflicts-in-wordpress-plugins/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 10:41:37 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1068</guid>
		<description><![CDATA[I ran into a very strange problem in one of my WordPress sites. Some shortcode tags (Shortcode API) for a plugin did not work properly. In my case it was the &#8221;NextGEN Gallery Version 1.9.3&#8243; plugin that couldn&#8217;t show a photo album, no photos where shown. Then I did some serious troubleshooting by looking into [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a very strange problem in one of my WordPress sites. Some shortcode tags (<a href="http://codex.wordpress.org/Shortcode_API">Shortcode API</a>) for a plugin did not work properly. In my case it was the <strong>&#8221;NextGEN Gallery Version 1.9.3&#8243;</strong> plugin that couldn&#8217;t show a photo album, no photos where shown. Then I did some serious troubleshooting by looking into the source code of that plugin. I found out that the shortcode &#8221;album&#8221; was misbehaving. It generated its output correctly but it were not shown on the webpage.</p>
<p>Then I began to realize that it was a case of shortcode conflict between my installed plugins. Two of my activated plugins used the same shortcode &#8221;album&#8221;. After enabling and disabling my other plugins I found out that the &#8221;<strong>Simple Facebook Connect Version 1.3</strong> &#8221; plugin caused the problem. Luckily I did not use that plugin any longer so I disabled and deleted it. If I really would have needed that plugin I would have to rewrite the source code of one of the plugins to change the shortcodes that conflicted.</p>
<p>This is something that WordPress users should be aware of, my guess is that there are a lot of conflicts between plugins that causes very random errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/04/26/shortcode-conflicts-in-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updates on an knockout.js observableArray not showing in GUI</title>
		<link>http://www.marcusnyberg.com/2012/04/18/updates-on-an-knockout-js-observablearray-not-showing-in-gui/</link>
		<comments>http://www.marcusnyberg.com/2012/04/18/updates-on-an-knockout-js-observablearray-not-showing-in-gui/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 10:24:27 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1062</guid>
		<description><![CDATA[This was a really simple problem but is was pretty annoying for a while. I was working with an observableArray in knockout.js and wanted to update a field in one of the items like this: var ExperienceViewModel = { items: ko.observableArray([]) // adding items to array... } function updateViewModel(data) { for (var i = 0; [...]]]></description>
			<content:encoded><![CDATA[<p>This was a really simple problem but is was pretty annoying for a while. I was working with an observableArray in knockout.js and wanted to update a field in one of the items like this:</p>
<pre name="code" class="javascript">

var ExperienceViewModel = {
  items: ko.observableArray([])
  // adding items to array...
}

function updateViewModel(data)
{
  for (var i = 0; i < viewModel.items().length; i++) {
    if (viewModel.items()[i].Id == data.Id) {
      viewModel.items()[i].Description = data.Description;
    }
  }
}
</pre>
<p>By doing changes to the viewModel items this way the user interface (webpage) wasn't updated. Strange!? To get it working I had to remove the item from the array and then add it again like this:</p>
<pre name="code" class="javascript">

function updateViewModel(data)
{
  for (var i = 0; i < viewModel.items().length; i++) {
    if (viewModel.items()[i].Id == data.Id) {
      viewModel.items.splice(i, 1);
      viewModel.items.push(data);
    }
  }
}
</pre>
<p>I am not a master of knockout.js, however this solution solved my problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/04/18/updates-on-an-knockout-js-observablearray-not-showing-in-gui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Min första Windows phone 7 app</title>
		<link>http://www.marcusnyberg.com/2012/04/04/min-forsta-windows-phone-7-app/</link>
		<comments>http://www.marcusnyberg.com/2012/04/04/min-forsta-windows-phone-7-app/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 07:52:45 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1060</guid>
		<description><![CDATA[Igår var jag på appslöjd med Microsoft och gjord min första Windows Phone 7 app. Det gick förvånansvärt bra och enkelt var det. Appen är klar, men tyvärr kan jag inte publicera den på marketplace då jag inte tycker att det är värt att betala 99$ årligen för utvecklar-licensen. Då min app ska vara en [...]]]></description>
			<content:encoded><![CDATA[<p>Igår var jag på appslöjd med Microsoft och gjord min första Windows Phone 7 app. Det gick förvånansvärt bra och enkelt var det. Appen är klar, men tyvärr kan jag inte publicera den på marketplace då jag inte tycker att det är värt att betala 99$ årligen för utvecklar-licensen. </p>
<p>Då min app ska vara en gratisapp som max ett hundratal personer skulle använda så är det inte ekonomiskt motiverat att lägga upp den. Så tyvärr Microsoft, eran prismodell för WP7 passar inte för hobbyutvecklare av småskaliga appar. Det känns nästan som att man motarbetar sådana. </p>
<p>Androids prismodell med en engångsavgift på 25$ dollar känns här betydligt mer rimlig. Det priset är satt för att få bort de värsta HelloWorld-apparna men utan att skrämma bort hobbyutvecklarna. Det finns väl inget syfte med att motverka utvecklare till den egna plattformen kan man tycka som i WP7 fallet. Apple Ios-utvecklare får tydligen också betala samma summa.</p>
<p>Inkomsterna som dessa bolag får av utvecklarna borde vara försumbar i det stora hela. Den enda anledningen till denna barriär, som jag kan se det, är att genom att ha en relativt hög avgift så får man upp kvaliteten på apparna som publiceras. Det genom att de som satsar på att utveckla till en plattform verkligen ser till att jobba med sina appar med motiveringen att om man betalar en relativt hög avgift så vill man utnyttja det till fullo. Något som en hobbyutvecklare kanske inte har råd/tid med på samma sätt.</p>
<p>Så lite besviken är jag ändå på Microsoft att min app inte kan publiceras på marketplace under rådande omständigheter. Om Windows Phone får en större spridning så skulle jag omvärdera mitt beslut att inte publicera, men i dagsläget så är det inte värt det.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/04/04/min-forsta-windows-phone-7-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LazyInitializationException: could not initialize proxy &#8211; no Session</title>
		<link>http://www.marcusnyberg.com/2012/02/27/org-hibernate-lazyinitializationexception-could-not-initialize-proxy-no-session/</link>
		<comments>http://www.marcusnyberg.com/2012/02/27/org-hibernate-lazyinitializationexception-could-not-initialize-proxy-no-session/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 15:46:49 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1050</guid>
		<description><![CDATA[The error &#8221;org.hibernate.LazyInitializationException: could not initialize proxy &#8211; no Session&#8221; has been giving me a headache for the last couple of days. So many people on the Internet have different answers and solutions to this error. The web-app that I am working on is made with Java + Resin + Spring + Hibernate + JSP [...]]]></description>
			<content:encoded><![CDATA[<p>The error &#8221;org.hibernate.LazyInitializationException: could not initialize proxy &#8211; no Session&#8221; has been giving me a headache for the last couple of days. So many people on the Internet have different answers and solutions to this error. The web-app that I am working on is made with Java + Resin + Spring + Hibernate + JSP + Stripes. This error occurs when the session is no longer active.</p>
<p><strong>Add this to your web.xml file</strong> and sessions should be open during the entire request. </p>
<p><code><br />
&lt;filter&gt;<br />
	&lt;filter-name&gt;OpenSessionInViewFilter&lt;/filter-name&gt;<br />
  	&lt;filter-class&gt;org.springframework.orm.hibernate3.support.OpenSessionInViewFilter&lt;/filter-class&gt;<br />
	&lt;/filter&gt;</p>
<p>	&lt;filter-mapping&gt;<br />
		&lt;filter-name&gt;OpenSessionInViewFilter&lt;/filter-name&gt;<br />
		&lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br />
	&lt;/filter-mapping&gt;<br />
</code></p>
<p>Works for me! Read more about <a href="http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html" title="org.springframework.orm.hibernate3.support.OpenSessionInViewFilter" target="_blank">OpenSessionInViewFilter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/02/27/org-hibernate-lazyinitializationexception-could-not-initialize-proxy-no-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ny webbsida &#8211; nolbybacken.nu</title>
		<link>http://www.marcusnyberg.com/2012/02/13/ny-webbsida-nolbybacken-nu/</link>
		<comments>http://www.marcusnyberg.com/2012/02/13/ny-webbsida-nolbybacken-nu/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:33:27 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1042</guid>
		<description><![CDATA[Ibland får man väldigt roliga uppdrag på jobbet. Denna gång så var det Nolbybacken, en skidanläggning i Sundsvall, som behövde uppdatera sin hemsida nolbybacken.nu. Den befintliga hemsidan var en fossil som uppdaterades med klassiska lokala ändringar med efterföljande ftp-överföring. Då jag i princip är uppvuxen i Sundsvalls slalombacke så kändes det väldigt roligt att få [...]]]></description>
			<content:encoded><![CDATA[<p>Ibland får man väldigt roliga uppdrag på jobbet. Denna gång så var det Nolbybacken, en skidanläggning i Sundsvall, som behövde uppdatera sin hemsida <a href="http://www.nolbybacken.nu" target="_blank">nolbybacken.nu</a>. Den befintliga hemsidan var en fossil som uppdaterades med klassiska lokala ändringar med efterföljande ftp-överföring. </p>
<p>Då jag i princip är uppvuxen i Sundsvalls slalombacke så kändes det väldigt roligt att få göra en lokalkonkurrents hemsida. Nolby Alpina räknade vi ju dock aldrig som någon konkurrent utan mer som en brödraförening. Nåväl, hemsidan då? Eftersom jag fick bestämma så blev det givetvis en WordPress-sajt av det hela. Se resultatet nedan eller på <a href="http://www.nolbybacken.nu" target="_blank">nolbybacken.nu</a>.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2012/02/nolbybacken_nu.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2012/02/nolbybacken_nu-1024x737.jpg" alt="" title="nolbybacken_nu" width="100%" class="alignnone size-large wp-image-1043" /></a></p>
<p><strong>Specifikationer</strong><br />
CMS: WordPress (senaste)<br />
Tema: Nolbybacken (subtema av<a href="http://wordpress.org/extend/themes/delicate" target="_blank">Delicate</a>)<br />
Tillägg/plugins: Akismet, All in One SEO Pack, Dynamic Headers by Nicasio Design, Simple Facebook Connect, King of the slope</p>
<p><strong>Plugin: King of the slope</strong><br />
Det roligaste på hela uppdraget var att göra ett WordPress-plugin/widget för <a href="http://kingoftheslope.vattenfall.com/" target="_blank">King of the slope</a>. Med det aktiverat så får man upp resultatlistan för backen enligt bild nedan.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2012/02/kots.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2012/02/kots-300x204.jpg" alt="" title="kots" width="100%" class="alignnone size-medium wp-image-1044" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/02/13/ny-webbsida-nolbybacken-nu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using remove_action in a WordPress child theme</title>
		<link>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/</link>
		<comments>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 08:41:00 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1035</guid>
		<description><![CDATA[When you make a WordPress child theme and want to override functions declared in the parent theme there aren&#8217;t any good documentation available from WordPress. In the reference manual you&#8217;ll find the the remove_action remove_action( $tag, $function_to_remove, $priority, $accepted_args) The first location that you probably try to apply this is in the &#8221;functions.php&#8221; file by [...]]]></description>
			<content:encoded><![CDATA[<p>When you make a WordPress child theme and want to override functions declared in the parent theme there aren&#8217;t any good documentation available from WordPress. In the reference manual you&#8217;ll find the the <a href="http://codex.wordpress.org/Function_Reference/remove_action">remove_action</a> <em>remove_action( $tag, $function_to_remove, $priority, $accepted_args</em>)</p>
<p>The first location that you probably try to apply this is in the &#8221;functions.php&#8221; file by adding something like this:</p>
<p><code><br />
remove_action('wp_head','oldFunction');<br />
function newFunction() { echo "use me instead"; }<br />
add_action('wp_head','newFunction');<br />
</code></p>
<p>However, this is not going to work. The oldFunction is still going to be executed and the new one as well. The child themes &#8221;functions.php&#8221; is executed before the parent themes &#8221;functions.php&#8221; and the remove_action command doesn&#8217;t know about the function it is trying to remove. We somehow need to remove the old function after it has been declared. The wordpress hook <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme" target="_blank">after_setup_theme</a> seems to be a good candidate for a solution because it runs AFTER the parent and childs functions are loaded.</p>
<p>Use it like this:<br />
<code><br />
function removeOldFunction() {<br />
    remove_action('wp_head','oldFunction');<br />
    add_action('wp_head','newFunction');<br />
}<br />
function newFunction() { echo "use me instead"; }<br />
add_action('after_setup_theme','removeOldFunction');<br />
</code></p>
<p><strong>Good reading</strong><br />
<a href="http://justintadlock.com/archives/2010/12/30/wordpress-theme-function-files" target="_blank">WordPress theme function files</a><br />
<a href="http://venutip.com/content/right-way-override-theme-functions" target="_blank">The Right Way to Override Theme Functions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/02/03/using-remove_action-in-a-wordpress-child-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The best Android apps when visiting Thailand</title>
		<link>http://www.marcusnyberg.com/2012/01/13/the-best-android-apps-when-visiting-thailand/</link>
		<comments>http://www.marcusnyberg.com/2012/01/13/the-best-android-apps-when-visiting-thailand/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 10:02:08 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Allmänt]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1021</guid>
		<description><![CDATA[I visited Thailand the last two weeks before christmas and travelled around Bangkok, Phuket, Koh Phi Phi and Krabi. I didn&#8217;t want to bring a laptop, instead I choose to bring my ZTE Light (running CyanogenMod) with me to great success. When I was preparing the device before the trip I assumed that I needed [...]]]></description>
			<content:encoded><![CDATA[<p>I visited Thailand the last two weeks before christmas and travelled around Bangkok, Phuket, Koh Phi Phi and Krabi. I didn&#8217;t want to bring a laptop, instead I choose to bring my <a href="http://www.gsmarena.com/zte_v9-3903.php" target="_blank">ZTE Light</a> (running CyanogenMod) with me to great success. When I was preparing the device before the trip I assumed that I needed as much offline content as possible because WIFI access could not be guaranteed when travelling around and I wasn&#8217;t going to have any Thai SIM-card for mobile broadband access.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2012/01/thaiflag.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2012/01/thaiflag-300x202.jpg" alt="" title="thaiflag" width="100%" /></a></p>
<p>The first stuff that I downloaded was <a href="https://www.google.com/search?hl=en&#038;client=firefox-a&#038;hs=50e&#038;rls=org.mozilla:sv-SE:official&#038;q=bangkok+map&#038;gs_sm=e&#038;gs_upl=3767l3767l0l3986l1l1l0l0l0l0l84l84l1l1l0&#038;bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&#038;biw=1143&#038;bih=901&#038;um=1&#038;ie=UTF-8&#038;tbm=isch&#038;source=og&#038;sa=N&#038;tab=wi&#038;ei=zAAQT-viI6OE4gT-2_zHAw" target="_blank">Thailand maps from Google Images</a>. You can&#8217;t have enough of them. High resolution maps of all the places I would visit. For Bangkok you should probably download the transportation map as well.</p>
<p><img src="http://www.orangesmile.com/destinations/img/bangkok-map-metro-big.gif" alt="" width="100%"/></p>
<p>I am a great fan of <a href="http://wikitravel.org" target="_blank">Wikitravel</a> and uses it a lot. However there is no simple way to only download the pages you are interested in, in my case all of the Thailand pages. Then I found the <a href="http://code.google.com/p/oxygenguide/" target="_blank">Oxygenguide</a> which is an offline copy of the wikitravel website. I downloaded this to my device and used it a lot on the trip. On the wishlist could be that the oxygenguide team updates the files more often.</p>
<p><a href="https://market.android.com/details?id=com.triposo.droidguide.bangkok&#038;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS50cmlwb3NvLmRyb2lkZ3VpZGUuYmFuZ2tvayJd" target="_blank">Bangkok Travel Guide Triposo</a><br />
An offline travel app with maps and information about all the places. This one is great because it requires no internet connection and has aggregated site data from many sources including wikitravel.</p>
<p><a href="https://market.android.com/details?id=com.triposo.droidguide.thailand&#038;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS50cmlwb3NvLmRyb2lkZ3VpZGUudGhhaWxhbmQiXQ.." target="_blank">Thailand travel guide</a><br />
An offline travel app for the rest of Thailand from the same makers as the Bangkok Travel Guide. Not as good as the Bangkok guide because many less visited/poular places are missing. But it does its job.</p>
<p><a href="https://market.android.com/details?id=com.mttnow.m2planehybrid&#038;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5tdHRub3cubTJwbGFuZWh5YnJpZCJd" target="_blank">AirAsia</a><br />
Check your bookings and flight info from Air Asia. Good to have when you are flying domestic with them.</p>
<p><a href="https://market.android.com/details?id=de.stohelit.folderplayer&#038;feature=search_result#?t=W251bGwsMSwxLDEsImRlLnN0b2hlbGl0LmZvbGRlcnBsYXllciJd" target="_blank">Mortplayer</a><br />
Excellent folder based music player for offline usage. Winamp sucks!</p>
<p><a href="https://market.android.com/details?id=com.farproc.wifi.analyzer&#038;feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5mYXJwcm9jLndpZmkuYW5hbHl6ZXIiXQ.." target="_blank">Wifi analyzer</a><br />
This app helped me to get better reception a lot of times when wifi access was bad at hotels. Sometimes it helped to move 1m on the bed as indicated by this app. It also helped me to find free wifi spots ;)</p>
<p>BTW! Don&#8217;t forget to have a good filemanager.</p>
<p>Other things to have with you on your Android phone when travelling:<br />
* Copy of your passport<br />
* Travel guides in pdf format, there are plenty of them online<br />
* Copy of your hotel bookings etc.<br />
* Music<br />
* Books<br />
* Saved webpages for offline reading</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/01/13/the-best-android-apps-when-visiting-thailand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frontwalker Sundsvall</title>
		<link>http://www.marcusnyberg.com/2012/01/13/frontwalker-sundsvall/</link>
		<comments>http://www.marcusnyberg.com/2012/01/13/frontwalker-sundsvall/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 09:16:52 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Allmänt]]></category>
		<category><![CDATA[arbete]]></category>
		<category><![CDATA[frontwalker]]></category>
		<category><![CDATA[it-konsult]]></category>
		<category><![CDATA[sundsvall]]></category>
		<category><![CDATA[systemutveckling]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1014</guid>
		<description><![CDATA[Jag har glömt att berätta om att jag bytt jobb för jag arbetar numera för Frontwalker Sundsvall. Företagets namn var tidigare det mer välkända. Jag ska försöka att blogga lite mer nu då jag jobbar med riktigt rolig ny teknik på jobbet. Jobbar för tillfället med det senaste inom webb, Java och .NET. Får man [...]]]></description>
			<content:encoded><![CDATA[<p>Jag har glömt att berätta om att jag bytt jobb för jag arbetar numera för <a href="http://www.framgångarna.se" title="Frontwalker Sundsvall" target="_blank">Frontwalker Sundsvall</a>.</p>
<p><a href="http://www.framgångarna.se" title="Frontwalker Sundsvall" target="_blank"><img src="http://www.marcusnyberg.com/wp-content/uploads/2011/11/frontwalker-300x33.png" alt="" title="frontwalker" width="300" height="33" class="alignnone size-medium wp-image-1017" /></a></p>
<p>Företagets namn var tidigare det mer välkända.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2011/11/it-arkitekterna.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2011/11/it-arkitekterna.jpg" alt="" title="it-arkitekterna" width="204" height="35" class="alignnone size-full wp-image-1016" /></a></p>
<p>Jag ska försöka att blogga lite mer nu då jag jobbar med riktigt rolig ny teknik på jobbet. Jobbar för tillfället med det senaste inom webb, Java och .NET. Får man ha så roligt på jobbet? Ja det får man om man har en bra arbetsgivare! Så håll utkik efter nya inlägg.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2012/01/13/frontwalker-sundsvall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL server has gone away</title>
		<link>http://www.marcusnyberg.com/2011/11/10/mysql-server-has-gone-away/</link>
		<comments>http://www.marcusnyberg.com/2011/11/10/mysql-server-has-gone-away/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 17:14:44 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=1008</guid>
		<description><![CDATA[One day I suddenly got the &#8221;MySQL server has gone away&#8221; error message in my web-application. No queries were running. The webpage (cron update) that generates the error is a heavy one with approx. 10 000 queries. I had never seen this error message before and the solutions to fix it seems to be different [...]]]></description>
			<content:encoded><![CDATA[<p>One day I suddenly got the &#8221;<a href="http://dev.mysql.com/doc/refman/5.1/en/gone-away.html" target="_blank">MySQL server has gone away</a>&#8221; error message in my web-application. No queries were running. The webpage (cron update) that generates the error is a heavy one with approx. 10 000 queries. I had never seen this error message before and the solutions to fix it seems to be different in each case. The way I solved the error was the following.</p>
<p>1) I ran &#8221;mysqlcheck&#8221; in repair mode and it fixed problems with clients that were using or hadn&#8217;t closed tables properly.</p>
<p>2) I found <a href="http://robsnotebook.com/wordpress-mysql-gone-away" target="_blank">this workaround</a>.</p>
<p>3) Then I checked the mysql servers system variable <strong><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank">wait_timeout</a></strong> with:<br />
mysqladmin -u username -p variables</p>
<p>The value was 10 which were pretty low considering the default value which is 28800.</p>
<p><em>wait_timeout is the number of seconds the server waits for activity on a noninteractive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made using named pipes, or shared memory. </em></p>
<p>4) I searched and found the &#8221;wait_timeout&#8221; value in the mysql config file /etc/my.cnf. I had set this value to 10 when I did some mysql performance optimization in the past. Then I raised this value to a higher number.</p>
<p>5) Restarted mysql and ran the webpage. Everything worked fine.</p>
<p>I still don&#8217;t know why this error occured that day. The server configuration worked good before the accident and I haven&#8217;t made any changes lately. Very strange!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2011/11/10/mysql-server-has-gone-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CyanogenMod 7 på HTC Desire Z</title>
		<link>http://www.marcusnyberg.com/2011/10/19/cyanogenmod-7-pa-htc-desire-z/</link>
		<comments>http://www.marcusnyberg.com/2011/10/19/cyanogenmod-7-pa-htc-desire-z/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 18:39:43 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://www.marcusnyberg.com/?p=999</guid>
		<description><![CDATA[Det stora kruxet med att roota sin Android-smartphone är det ofta går att göra på tusen olika sätt och att det måste stämma med ett stort antal parametrar så som versioner av mjukvara, vilken firmware man har, vad man installerat innan etc. Då man kör igång är det oftast en enda stor djungel och man [...]]]></description>
			<content:encoded><![CDATA[<p>Det stora kruxet med att roota sin Android-smartphone är det ofta går att göra på tusen olika sätt och att det måste stämma med ett stort antal parametrar så som versioner av mjukvara, vilken firmware man har, vad man installerat innan etc. Då man kör igång är det oftast en enda stor djungel och man far fram och tillbaka mellan olika forum och läser på, laddar hem filer och mixtrar. Man får nästan räkna med att det inte ska gå smärtfritt, men det är väl det man får leva med då hela förfarandet är ganska osupportat/på egen risk.</p>
<p><a href="http://www.marcusnyberg.com/wp-content/uploads/2011/10/HTC-Desire-Z.jpg"><img src="http://www.marcusnyberg.com/wp-content/uploads/2011/10/HTC-Desire-Z-300x271.jpg" alt="" title="HTC-Desire-Z" width="300" height="271" class="alignnone size-medium wp-image-1001" /></a></p>
<p>Nåväl, idag rootade jag min HTC Desire Z och installerade <a href="http://www.cyanogenmod.com/" target="_blank">Cyanogenmod 7</a>. Det tog lite tid mycket på grund av problem med det jag nämnt ovan. Eftersom jag hade den senaste officiella uppdateringen så var jag tvungen att först nedgradera mobilen till en tidigare version och detta framgick inte så bra i olika guider. Om du vill göra samma sak som mig så behöver du bara följa dessa guider i turordning. Skit i resten, de gör dig bara förvirrad.</p>
<p>1. <a href="http://wiki.cyanogenmod.com/wiki/ADB" target="_blank">Installera ADB (Android Debug Bridge) på din pc</a></p>
<p>2. <a href="http://www.swedroid.se/forum/45069-guide-nedgradera-desire-z-root.html" target="_blank">Nedgradera firmware</a>. (på svenska)</p>
<p>3. <a href="http://wiki.cyanogenmod.com/wiki/HTC_Desire_Z:_Rooting" target="_blank">Fortsätt på officiella wikin med rootningen</a></p>
<p>4. <a href="http://wiki.cyanogenmod.com/wiki/HTC_Vision:_CyanogenMod" target="_blank">Flasha Cyanogenmod</a></p>
<p>Efter detta är du klar. Med lite flyt så borde det inte ta längre tid än 1h och om man är erfaren/snabb så kan man nog göra det på en halvtimme. Kom ihåg att göra backup ;-)</p>
<p><strong>Notering</strong><br />
Efter några veckors användning så kan jag konstatera att den största positiva skillnaden mot fabriks-ROM&#8217;en är batteritiden. Nu räcker en laddning minst två dagar medan jag tidigare behövde ladda telefonen dagligen. Övrigt noterbart är att telefonen känns mycket rappare.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcusnyberg.com/2011/10/19/cyanogenmod-7-pa-htc-desire-z/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

