<?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>Deyan Vitanov portfolio</title>
	<atom:link href="http://bgdevs.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://bgdevs.com</link>
	<description>Deyan Vitanov portfolio, CV and blog</description>
	<lastBuildDate>Fri, 06 Jun 2025 13:11:34 +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>Disabling &#8216;Back&#8217; button for flex mobile View</title>
		<link>http://bgdevs.com/?p=123</link>
		<comments>http://bgdevs.com/?p=123#comments</comments>
		<pubDate>Sun, 14 Apr 2013 10:36:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bgdevs.com/?p=123</guid>
		<description><![CDATA[Despite many articles over the network &#8211; it is very easy to disable the Back button for any mobile View. You don&#8217;t have to override anything..all you have to do is to define backKeyPressed event in your View declaration and call event.preventDefault() method. Here is an example: &#60;s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="My View" backKeyPressed="onBackPRessed(event)" &#62; And [...]]]></description>
			<content:encoded><![CDATA[<p>Despite many articles over the network &#8211; it is very easy to disable the Back button for any mobile View.<br />
You don&#8217;t have to override anything..all you have to do is to define <strong>backKeyPressed</strong> event in your View declaration and call <strong>event.preventDefault()</strong> method. Here is an example:</p>
<div style="background-color: #fff; border: 1px solid #cccccc; color: #000;"><code><br />
<span style="color: #0000ff;">&lt;s:View</span><br />
xmlns:fx="<span style="color: #ff6600;">http://ns.adobe.com/mxml/2009</span>"<br />
xmlns:s="<span style="color: #ff6600;">library://ns.adobe.com/flex/spark</span>"<br />
title="<span style="color: #ff6600;">My View</span>" <strong><span style="color: #ff0000;">backKeyPressed="onBackPRessed(event)"</span></strong> &gt;<br />
</code></div>
<p>And here is the method implementation:</p>
<div style="background-color: #fff; border: 1px solid #cccccc; color: #000;"><strong><span style="color: #0000ff;">protected</span> <span style="color: #339966;">function</span></strong> onBackPRessed(event:FlexEvent):<strong><span style="color: #0000ff;">void</span></strong> {<br />
event.preventDefault();<br />
}</div>
<p>&nbsp;</p>
<p>This is very useful when you want to disable back button for some view(s). Example you have loged in view which is after the register view..you don&#8217;t want your app users to go to register again after they press the back button.. (which is the automaticly popped view)</p>
]]></content:encoded>
			<wfw:commentRss>http://bgdevs.com/?feed=rss2&#038;p=123</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 4.6 + Alternativa3D 8 spark problem</title>
		<link>http://bgdevs.com/?p=113</link>
		<comments>http://bgdevs.com/?p=113#comments</comments>
		<pubDate>Wed, 25 Jul 2012 22:36:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://bgdevs.com/?p=113</guid>
		<description><![CDATA[Recently I&#8217;ve been playing around with alternativa3D and I could not figure out why when I set up flex nativeproject using SDK 4.6 and Alternativaplatform 8 &#8211; notthing is displayed on the stage.. After A while I figured out what is going on. It turned out that the flex background is drew above the 3D [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been playing around with alternativa3D and I could not figure out why when I set up flex nativeproject using SDK 4.6 and Alternativaplatform 8 &#8211; notthing is displayed on the stage..</p>
<p>After A while I figured out what is going on. It turned out that the flex background is drew above the 3D stages. My fix is simple &#8211; just setting backgroundAlpha style to be 0 and the 3D appears.</p>
<p>Here you can see my test code:</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;s:Application xmlns:fx=&#8221;http://ns.adobe.com/mxml/2009&#8243;<br />
xmlns:s=&#8221;library://ns.adobe.com/flex/spark&#8221;<span style="color: #ff0000;"><strong> backgroundAlpha=&#8221;0&#8243;</strong></span><br />
xmlns:mx=&#8221;library://ns.adobe.com/flex/mx&#8221; xmlns:alternativaplatform=&#8221;http://alternativaplatform.com&#8221;<br />
applicationComplete=&#8221;initApplication(event)&#8221; backgroundColor=&#8221;black&#8221;<br />
minWidth=&#8221;950&#8243; minHeight=&#8221;550&#8243; xmlns:controller=&#8221;bg.lan.chess.controller.*&#8221; xmlns:local=&#8221;*&#8221;&gt;</p>
<p>&lt;fx:Declarations&gt;<br />
&lt;controller:Controller id=&#8221;control&#8221; /&gt;<br />
&lt;/fx:Declarations&gt;</p>
<p>&lt;fx:Style source=&#8221;css/styles.css&#8221; /&gt;</p>
<p>&lt;fx:Script&gt;<br />
&lt;![CDATA[<br />
import alternativa.engine3d.controllers.SimpleObjectController;<br />
import alternativa.engine3d.core.Camera3D;<br />
import alternativa.engine3d.core.Object3D;<br />
import alternativa.engine3d.core.Resource;<br />
import alternativa.engine3d.core.View;<br />
import alternativa.engine3d.materials.FillMaterial;<br />
import alternativa.engine3d.primitives.Box;</p>
<p>import bg.lan.chess.events.InitApplicationEvent;<br />
import bg.lan.chess.init.ResourceLoader;<br />
import bg.lan.chess.view.MainView;</p>
<p>import flash.display3D.Context3D;<br />
import flash.display3D.Context3DRenderMode;</p>
<p>import mx.events.FlexEvent;</p>
<p>public var mainView:MainView;<br />
protected var rootContainer:Object3D = new Object3D();<br />
protected var camera:Camera3D;<br />
protected var box:Box;<br />
private var stage3D:Stage3D;</p>
<p>private function initApplication(e:Event):void {<br />
initEngine();<br />
initScene();</p>
<p>}</p>
<p>protected function initEngine():void<br />
{<br />
camera = new Camera3D(0.1, 50000);<br />
camera.view = new View(800, 500);<br />
alternativa3DSprite.addChild(camera.view);<br />
alternativa3DSprite.addChild(camera.diagram);</p>
<p>camera.z = -1000;</p>
<p>rootContainer.addChild(camera);</p>
<p>alternativa3DSprite.addEventListener(Event.ENTER_FRAME, onEnterFrame);<br />
}</p>
<p>protected function initScene():void<br />
{<br />
stage3D = alternativa3DSprite.stage.stage3Ds[0];<br />
stage3D.addEventListener(Event.CONTEXT3D_CREATE, onContextCreate);<br />
stage3D.requestContext3D();<br />
box = new Box(500, 500, 500, 5, 5, 5);<br />
var material:FillMaterial = new FillMaterial(0xFF7700, 1);<br />
box.setMaterialToAllSurfaces(material);<br />
rootContainer.addChild(box);</p>
<p>}</p>
<p>private function onContextCreate(e:Event):void {<br />
stage3D.removeEventListener(Event.CONTEXT3D_CREATE, onContextCreate);<br />
for each (var resource:Resource in rootContainer.getResources(true)){ // all resources are loaded in context3D<br />
resource.upload(stage3D.context3D);<br />
}<br />
}</p>
<p>protected function onEnterFrame(e:Event):void<br />
{<br />
camera.view.width = stage.stageWidth;<br />
camera.view.height = stage.stageHeight;<br />
camera.render(stage3D);<br />
}</p>
<p>]]&gt;<br />
&lt;/fx:Script&gt;</p>
<p>&lt;s:SpriteVisualElement id=&#8221;alternativa3DSprite&#8221; width=&#8221;100%&#8221; height=&#8221;100%&#8221; /&gt;<br />
&lt;s:Label text=&#8221;Test Label above the 3D. Note that the box is visible. It is because of the backgroundAlpha=&#8217;0&#8242; style&#8221; color=&#8221;white&#8221; horizontalCenter=&#8221;0&#8243; verticalCenter=&#8221;0&#8243; /&gt;<br />
&lt;/s:Application&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bgdevs.com/?feed=rss2&#038;p=113</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex UncaughtErrorEvent in non-debug flashplayer</title>
		<link>http://bgdevs.com/?p=108</link>
		<comments>http://bgdevs.com/?p=108#comments</comments>
		<pubDate>Fri, 27 Apr 2012 11:51:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bgdevs.com/?p=108</guid>
		<description><![CDATA[Flashplayer 10.1 and AIR 2.0 come with very nice feature enabled &#8211; global error handling. Here is the official Adobe announce about this: Update 2010-01-12: Global error handling is now supported in Flash 10.1 and AIR 2.0 (both in beta), and is achieved by subscribing the UNCAUGHT_ERROR event of LoaderInfo.uncaughtErrorEvents. Anyway, this is very useful [...]]]></description>
			<content:encoded><![CDATA[<p>Flashplayer 10.1 and AIR 2.0 come with very nice feature enabled &#8211; global error handling.<br />
Here is the official Adobe announce about this:</p>
<blockquote><p>Update 2010-01-12: Global error handling is now supported in Flash 10.1 and AIR 2.0 (both in beta), and is achieved by subscribing the UNCAUGHT_ERROR event of LoaderInfo.uncaughtErrorEvents.</p></blockquote>
<p>Anyway, this is very useful especially when you run debug version of flash player.</p>
<p>But what is happening if you are using the regular non-debug flash player ?</p>
<p>Then simply the stack trace does not appear. Here Is example of demo code which globally handles errors in flex application:</p>
<p>In Application.mxml applicationComplete event handler:</p>
<blockquote><p>loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);</p></blockquote>
<p>And here is the handle method:</p>
<blockquote><p>private function uncaughtErrorHandler(event:UncaughtErrorEvent):void {<br />
var error:* = event.error;<br />
if (error is Error) {</p>
<p>var errorObj:Error = error as Error;<br />
LOG.error(&#8220;{0}. {1}\n {2}&#8221;, errorObj.errorID, errorObj.message, errorObj.getStackTrace());</p>
<p>} else if (error is ErrorEvent) {</p>
<p>var errorObj2:ErrorEvent = error as ErrorEvent;<br />
LOG.error(&#8220;{0}&#8221;, errorObj2.text);</p>
<p>}<br />
}</p></blockquote>
<p>If you check out the result of this code ran in non-debug flashplayer version, you will notice that only &#8220;Error #1009&#8243; is printed.<br />
It would be nice if adobe store at least the target class in the ErrorEvent object, so we can see when regular users are having runtime errors and then can send the error to our support engineers.</p>
]]></content:encoded>
			<wfw:commentRss>http://bgdevs.com/?feed=rss2&#038;p=108</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RFID Destroyer</title>
		<link>http://bgdevs.com/?p=93</link>
		<comments>http://bgdevs.com/?p=93#comments</comments>
		<pubDate>Fri, 20 Apr 2012 20:46:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bgdevs.com/?p=93</guid>
		<description><![CDATA[This is simple project that based on board of old camera. The flash is removed and instead of it, there is a coil connected to the board, so the high voltage (~300V) is used to destroy the RFID chip, which is made to support low voltage. The schematics look something like this: And here is [...]]]></description>
			<content:encoded><![CDATA[<p>This is simple project that based on board of old camera.</p>
<p>The flash is removed and instead of it, there is a coil connected to the board, so the high voltage (~300V) is used to destroy the RFID chip, which is made to support low voltage. The schematics look something like this:</p>
<p><a href="wp-content/uploads/2012/04/RFID_zapper1.gif" rel="lightbox"><br />
<img src="wp-content/uploads/2012/04/RFID_zapper1.gif" alt="" width="320" height="200" /></a></p>
<p>And here is the final result. Inside:</p>
<p><a href="wp-content/uploads/2012/04/IMAG0843.jpg" rel="lightbox"><img src="wp-content/uploads/2012/04/IMAG0843.jpg" alt="" width="320" height="200" /></a></p>
<p>Outside:</p>
<p><a href="wp-content/uploads/2012/04/IMAG0842.jpg" rel="lightbox"><img src="wp-content/uploads/2012/04/IMAG0842.jpg" alt="" width="320" height="200" /></a></p>
<p>The usage is very simple. The RFID card must be placed directly under the soap-box and then the button must be pressed.</p>
<p>Then the card is completely destroyed <img src='http://bgdevs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bgdevs.com/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RFID EM4100 Emulator</title>
		<link>http://bgdevs.com/?p=76</link>
		<comments>http://bgdevs.com/?p=76#comments</comments>
		<pubDate>Fri, 20 Apr 2012 20:07:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://bgdevs.com/?p=76</guid>
		<description><![CDATA[This is simple hobby project that will show you easy, simple and fast way of emulating the popular RFID access cards EM4100. My implementation uses manchester encoding for thansmitting the emulated card ID. The MCU I&#8217;m using is PIC18F2550. The Antenna design: Diameter D 43mm NUmber of turns N 48 Wire Diameter W 0.18mm Turn [...]]]></description>
			<content:encoded><![CDATA[<p>This is simple hobby project that will show you easy, simple and fast way of emulating the popular RFID access cards EM4100.<br />
My implementation uses manchester encoding for thansmitting the emulated card ID. The MCU I&#8217;m using is PIC18F2550.</p>
<p>The Antenna design:<br />
Diameter D 43mm<br />
NUmber of turns N 48<br />
Wire Diameter W 0.18mm<br />
Turn spacing S 0mm</p>
<p><a href="wp-content/uploads/2012/04/465245_10150987307184148_749339147_12916229_995115047_o.jpg" rel="lightbox"><br />
<img src="wp-content/uploads/2012/04/465245_10150987307184148_749339147_12916229_995115047_o.jpg" alt="" width="320" height="200" /></a></p>
<p>So the target inductance is 160uH. This is the schematics:</p>
<p><a href="wp-content/uploads/2012/04/535559_10150987317724148_749339147_12916270_844247795_n.jpg" rel="lightbox"><br />
<img src="wp-content/uploads/2012/04/535559_10150987317724148_749339147_12916270_844247795_n.jpg" alt="" width="320" height="200" /></a></p>
<p>You can download the code from <a title="RFID EM4100 Emulator" href="http://bgdevs.com/portfolio/?p=76">here</a>.  The final prototype is having 8 buttons which are used to switch between the currently emulated card.</p>
<p>The device supports 8 cards so far, which are programmed into the chip memory using standard Pic Kit 2 programmer.</p>
<p>This is how it looks:</p>
<p><a href="wp-content/uploads/2012/04/578377_10150987341134148_749339147_12916356_942068612_n.jpg" rel="lightbox"><img src="wp-content/uploads/2012/04/578377_10150987341134148_749339147_12916356_942068612_n.jpg" alt="" width="320" height="200" /></a></p>
<p>The problem I&#8217;m having so far is that some readers are unable to read the card because they are expecing PSK coding.<br />
Any help on modifying the code to support PSK coding will be aprischiated.</p>
]]></content:encoded>
			<wfw:commentRss>http://bgdevs.com/?feed=rss2&#038;p=76</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
