tag:blogger.com,1999:blog-26355301413968112552024-03-09T08:15:47.994+08:00Life as a coder...Insights on the world from a Tropical Creek-side Coder.creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-2635530141396811255.post-7050209536066892992023-12-30T15:52:00.002+08:002023-12-30T15:52:50.410+08:00Free GDB IDE : The Visual GNU Project Debugger<p>Yes. It is FREE!</p><p>And, yes, it is Open Source!</p><p>A tool to help you visualize the code you are debugging. Watch all those local variables -- global variables. Those Call Stack? Visualize all of them while you Step Through, Step In, and Step Out of each line on your code.</p><p>Last time I had this experience was back in college using the Universities copy of Visual Basic as I debug my VB school projects.</p><p></p><p>Thanks this Open Source tool, I can do it again on my <a href="https://kage.sourceforge.io/" target="_blank">Open Source C++ project</a>. Yes, debugging a C++ code with a visual tool! How great is that?</p><p>So, which is this that lets you visually debug your C++ code? None other than <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a>. Yep. That open source Visual Studio from Microsoft.</p><p>Wait. Don't close this tab! Hear me out.<br /></p><p>You can use it to compile your C++ project. Yes, even if your code is <a href="https://code.visualstudio.com/docs/cpp/config-mingw" target="_blank">using GNU GCC</a>. You can even use it to <a href="https://earthly.dev/blog/vscode-make/" target="_blank">compile with makefile</a>.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://code.visualstudio.com/assets/docs/cpp/playbutton/select-gcc-compiler.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="407" data-original-width="800" height="326" src="https://code.visualstudio.com/assets/docs/cpp/playbutton/select-gcc-compiler.png" width="640" /></a></div><br />But what I'm really excited is visual <a href="https://code.visualstudio.com/docs/cpp/cpp-debug" target="_blank">debugging of C++ code</a>.<p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://code.visualstudio.com/assets/docs/cpp/cpp/condbreak.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="175" data-original-width="720" height="156" src="https://code.visualstudio.com/assets/docs/cpp/cpp/condbreak.png" width="640" /></a></div><br /><p></p><p>The articles been out since May 2020 and it's only now that I've learned about this as my Open Source C++ project is starting to be more complicated and been <a href="https://sourceforge.net/p/kage/tickets/" target="_blank">harder and harder to debug</a> with every new feature being added.</p><p>Who would have thought that one day you can use GNU GCC and GNU GDB with Visual Studio? -- well Visual Studio Code. Not me.</p><p>I'd like to think that it's all thanks to people who have pushed Free and Open Source Software, especially <a href="https://stallman.org/" target="_blank">rms</a>.</p><p>Happy hacking!</p><p><i>~creek23</i><br /></p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-17709224508473351292023-05-28T00:46:00.007+08:002023-05-28T01:52:31.255+08:00Kage Studio: 2D Animation Software<h3 style="text-align: left;">Kage Studio is a 2D vector animation software that lets you create vector and even hand drawn cartoons and animations. It is free to use and open source as well.</h3><h2 style="text-align: left;">Overview</h2><p style="text-align: left;"><a href="https://kage.sourceforge.io/" target="_blank">Kage Studio</a> is a 2D animation software. It is an open-source software developed by a lone developer, me. Kage Studio aims to provide a simple and user-friendly platform for creating 2D animations. It includes features such as onion skinning, keyframes, layer management, and the ability to import PNG files. Kage Studio supports <a href="https://sourceforge.net/projects/kage/files/latest/download" target="_blank">Windows, Mac, and Linux</a> operating systems. As an open-source software, <a href="https://sourceforge.net/p/kage/code/HEAD/tree/studio/" target="_blank">its source code</a> is freely available for users to access, modify, and distribute.</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLAIfTEZWr4UpRDs6xFBDhMNodrCZqXzO-uON27Lzwf3YulBd8wJxJ8NIYq59SxW4JvsW3dwu7PPXveFB0qxYJudnCFoWiYCePKyD0sWK4aW3i94PnUf2c-FxdXzeXsnrcngaCR7kbW-EgQ5Hr_Iwl5XKjhKz7Lv1EbLEKlUC4EyU9brfYioAOlgoY_w/s2620/kage_on_mac_app%5B1%5D.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1710" data-original-width="2620" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLAIfTEZWr4UpRDs6xFBDhMNodrCZqXzO-uON27Lzwf3YulBd8wJxJ8NIYq59SxW4JvsW3dwu7PPXveFB0qxYJudnCFoWiYCePKyD0sWK4aW3i94PnUf2c-FxdXzeXsnrcngaCR7kbW-EgQ5Hr_Iwl5XKjhKz7Lv1EbLEKlUC4EyU9brfYioAOlgoY_w/w400-h261/kage_on_mac_app%5B1%5D.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Kage Studio v0.7.221227</td></tr></tbody></table><h2 style="text-align: left;">System Requirements</h2><h3 style="text-align: left;">Memory</h3><p style="text-align: left;">If your Operating System can comfortably and smoothly run Windows 10 or 11, Mac OS 12 Monterey, or Ubuntu 20.04 Focal Fosa, you should be fine. Kage Studio has a memory footprint of 50MB.</p><h3 style="text-align: left;">Disk Space</h3><div>Kage Studio itself is just a little over 2MB, but together with Gtkmm library and FFMPEG, Kage Studio would require about 120MB of disk space,</div><h3 style="text-align: left;">Admin Access</h3><p style="text-align: left;">Admin privilege is not required on Mac, and is optional for Windows and Linux. Read more on Installation.</p><h2 style="text-align: left;">Installation</h2><div><div><h3>Windows</h3><p>On Windows, you can down the ZIP file and simply extract the content on a folder access Kage Studio from that directory each time you need to use it. The Installer would require admin privilege to install shortcut to Start Menu and associate KSF file to open with Kage Studio.</p><h3>Mac</h3><p>On Mac, the APP file can be ran without admin access.</p><h3>Linux</h3><p>On GNU/Linux, you don't need admin privilege to compile the source code and use Kage Studio, but the DEB package for Debian and Ubuntu distro would to run</p><p><b>sudo dpkg -i kagestudio_{version}_amd64.deb</b></p></div></div><h2 style="text-align: left;">Features</h2><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://kage.sourceforge.io/images/tutorial/kage_ui/timeline.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="409" data-original-width="640" height="256" src="https://kage.sourceforge.io/images/tutorial/kage_ui/timeline.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Kage Studio's Timeline Pane</td></tr></tbody></table><h3 style="text-align: left;">Keyframe</h3><p>Keyframes are specific frames within an animation where a change in an object's property or attribute occurs. They mark important points in the animation timeline that define the start and end of a transition or movement.</p><p>In animation, instead of drawing every single frame, animators create keyframes to represent significant moments in an object's movement or transformation. These keyframes serve as reference points from which the Kage Studio interpolates and generates the intermediate frames to create smooth animation between the keyframes.</p><p>Keyframes can be used to control various attributes of an object, such as position, scale, opacity, and color. By placing keyframes at specific intervals, animators can define complex movements, transformations, and effects within an animation.</p><h3 style="text-align: left;">Tweening</h3><div>Tween, short for "in-between", is a technique used in animation to create smooth transitions between keyframes. It involves generating intermediate frames automatically based on the keyframes set by the animator.</div><p>When animating, animators typically define keyframes that represent the most important positions or poses in an animation sequence. Tweening fills in the gaps between these keyframes by automatically generating the frames needed to create a smooth transition from one keyframe to another.</p><p>There are different types of tweening methods used in animation:</p><h3 style="text-align: left;">Positional Tween</h3><p>This type of tweening interpolates the position of an object between keyframes, smoothly transitioning it from one point to another. It calculates the in-between positions based on the distance and timing specified by the animator.</p><p>Tweening saves animators from having to manually draw every frame in an animation sequence, significantly reducing the workload. It helps create seamless and fluid motion, making animations appear more natural and polished.</p><p>Kage Studio includes built-in tweening capabilities that automate the generation of intermediate frames. Animators can specify the duration and easing functions for the transitions to control the timing and style of the tweens.</p><h3 style="text-align: left;">Shape Tween</h3><p>Shape tweening is used for morphing between different shapes or forms. It allows animators to transform one shape into another gradually, creating fluid morphing effects.</p><h3 style="text-align: left;">Color Tweening</h3><p>Color tweening is used to create gradual color transitions or fades between different colors. It enables animators to smoothly change the color properties of objects over time.</p><h3 style="text-align: left;">Alpha Tweening</h3><p>Alpha tweening, or opacity tweening, allows animators to smoothly adjust the transparency or opacity of an object, creating gradual fade-in or fade-out effects.</p><h3 style="text-align: left;">Onion Skinning</h3><div><div>Onion skinning is a technique used in animation that allows artists to see multiple frames or keyframes simultaneously. It is called "onion skinning" because the frames are overlaid on top of each other like layers of an onion.</div><div><br /></div><div>With onion skinning, artists can see the previous and/or subsequent frames as a reference while working on the current frame. This visual aid helps in maintaining consistency in movements, timing, and spacing during the animation process.</div><div><br /></div><div>Typically, onion skinning shows the previous and next frames as translucent outlines or silhouettes, with the current frame being the one actively worked on. This allows animators to compare the current frame with adjacent frames, making it easier to create smooth transitions and maintain the desired motion.</div><div><br /></div><div>By enabling animators to see multiple frames at once, onion skinning helps in achieving fluid and natural-looking animations. It is a valuable feature in animation software for ensuring accurate movement and motion flow.</div></div><h2 style="text-align: left;">Layer Management</h2><p>Layer management allows users to organize and control the stacking order of visual elements within Kage Studio. It provides a way to manage and arrange different elements of the animation on separate layers, similar to how transparent sheets are stacked in traditional hand-drawn animation.</p><p>In animation, each layer represents a separate level or plane where specific elements or assets are placed. For example, you may have a layer for the background, a layer for characters, a layer for special effects, and so on. By separating elements onto different layers, animators can manipulate and animate them independently while maintaining their relative positions.</p><p>Layer management offers several advantages in the animation process:</p><h3 style="text-align: left;">Organization</h3><p>It helps keep the animation project structured and well-organized. Each layer can contain related elements, making it easier to locate and work with specific parts of the animation.</p><h3 style="text-align: left;">Control</h3><p>Layers provide control over the visibility, opacity, and blending of elements. Users can adjust the order of layers to determine how elements interact with each other visually.</p><h3 style="text-align: left;">Efficiency</h3><p>Working with layers allows animators to make changes or adjustments to specific elements without affecting the rest of the animation. This saves time and effort by isolating modifications to specific layers.</p><h3 style="text-align: left;">Flexibility</h3><p>Layers enable animators to create complex scenes by combining and separating elements as needed. Elements on separate layers can be independently animated, providing flexibility in the animation process.</p><h2 style="text-align: left;">Export to HTML5</h2><p style="text-align: left;">Once you are done with your animation, or even just a single frame drawing, you can export your artwork to HTML5 and have it rendered on your webpage and make it alive with your animation.</p><p style="text-align: left;">Your drawing will be converted into JavaScript to render on HTML5 Canvas. And most browser already supports HTML5, no need for third-party plugin like back in the day where you have to install <a href="https://en.wikipedia.org/wiki/Adobe_Flash_Player" target="_blank">Flash Player</a> and such.</p><p style="text-align: left;">This means, your animation will be viewable on both Desktop and Mobile (smartphones, of course).</p><h2 style="text-align: left;">Export Video</h2><p style="text-align: left;">Thanks to <a href="https://ffmpeg.org/" target="_blank">FFMPEG</a>, Kage Studio can export to just about any video format. Although, as of <a href="https://sourceforge.net/p/kage/news/2022/12/kage-v07-released/" target="_blank">v0.7.22</a>, Kage Studio exports to AVI video format. But if you <a href="https://sourceforge.net/p/kage/code/HEAD/tree/studio/" target="_blank">compile the source code</a> now, you will be able to export to MP4, Matroska MKV, Quicktime MOV, and OGG.</p><h2 style="text-align: left;">Export PNG</h2><p style="text-align: left;">You can also use Kage Studio to export your drawings to PNG and maybe use it on 2D Game -- here's a tutorial on how to use Kage Studio to <a href="http://creekcodes.blogspot.com/2022/09/new-spritesheet-tool-in-town.html" target="_blank">create your game spritesheet</a>.</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteB.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="794" data-original-width="730" height="400" src="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteB.png" width="368" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Exporting to Spritesheet</td></tr></tbody></table><h2 style="text-align: left;">Export SVG</h2><p style="text-align: left;">Just as exporting to HTML5, you can export to SVG and use the SVG on your webpage.</p><h2>Export KonsolScript</h2><p>Yes, you can use Kage Studio to create your game cutscenes and export to KonsolScript. After all Kage Studio started as a tool for use with <a href="https://konsolscript.sourceforge.net/web/2015/10/07/installing-konsolscript/" target="_blank">Quixie</a> and KonsolScript.</p><div><p><span style="font-size: 24px; font-weight: 700;">Summary</span></p><p></p><ul style="text-align: left;"><li>Kage Studio is multiplatform and runs on Windows, Mac, & GNU/Linux.</li><li>Kage Studio is completely free and open source. Free as in free beer, and free as in freedom.</li><li>Lightweight with just 50MB of memory footprint </li><li>Kage Studio supports tweening which is a vital technique in animation that enables the creation of smooth and appealing motion between keyframes, enhancing the overall quality and efficiency of the animation process.</li><li>Kage Studio supports Layer management that enhances the workflow and provides control over the visual composition of an animation. It enables animators to create intricate and visually appealing animations with ease.</li><li>With Kage Studio you can create drawings, 2D animations, and 2D game sprites.</li><li>It is a beginner friendly 2D animation tool perfect for aspiring animators, with easy PNG import and multiple export capabilities.</li></ul><p></p></div>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-44615495852895478062023-02-06T17:56:00.000+08:002023-02-06T17:56:08.992+08:00How to package your Gtk App for Mac<h2 style="text-align: left;">Preface</h2><p>Couldn't get the <a href="https://wiki.gnome.org/Projects/GTK/OSX/Bundling" target="_blank">gtk-mac-bundler</a> to work so I had to package my Gtk app on my own. searching the internet for information.</p><p>So how do you package Gtk app for Mac distribution? Luckily, a <a href="https://stackoverflow.com/users/7751385/danivdwerf" target="_blank">guy on Stackoverflow</a> asked <a href="https://stackoverflow.com/questions/46874460/macos-app-bundle-with-gtk-no-xcode">the same question</a>. With no one having the answer, he answered his own question. He created a blog on a website that's long gone. Thanks to Wayback Machine, the <a href="https://web.archive.org/web/20190514120648/https://extra.freetimedev.com/index.php?category=tutorials&subject=app-bundle" target="_blank">information is preserved</a>. Somewhat.</p><p>Thanks to danivdwerf, I was able to package Kage Studio for Mac!</p><p>One learning from this activity is the copying of Gtk library to the App. And having to modify the copied libraries to actually access the same libraries already copied inside the App.</p><p>danivdwerf indicated on his blogpost that he had to create a shell script so he doesn't have to do the same manually in the future. My concern was, Gtk library is always updating, and I will have to modify the shell script each time.</p><p>So, I decided to create <a href="https://github.com/creek23/gtk-app-builder" target="_blank">a python script</a> to generate the shell script itself.</p><h2 style="text-align: left;">How to package your Gtk App for Mac</h2><p>Automatically creating the App file is a work in progress but currently, simply run this line on Terminal</p><p><span style="font-family: courier;">python3 copylib.py yourapp</span></p><p>You should have a shell script called, <span style="font-family: courier;">copylib_yourapp.sh</span>, which you can use to copy all the Gtk libraries and modifying them for your App.</p><h2 style="text-align: left;">Final Words</h2><p>Get a copy of <span style="font-family: courier;">copylib.py</span> on <a href="https://github.com/creek23/gtk-app-builder" target="_blank">Gtk-App-Builder</a>.</p><p>Happy hacking!</p><p><i>~creek23</i></p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-88210135197905716052023-02-05T04:31:00.000+08:002023-02-05T04:31:03.644+08:00Create ICNS (icons for Mac) on GIMP<p>It's official! <a href="https://www.gimp.org" target="_blank">Gimp</a> supports ICNS! </p><p>Well, it's not yet officially "official". But <a href="https://www.gimp.org/downloads/devel/" target="_blank">beta build of Gimp</a> already supports ICNS file format.</p><p>Yes, the file format for icons that Mac OS uses.</p><p>Open, Create, Edit ICNS with <a href="https://download.gimp.org/gimp/v2.99/macos/" target="_blank">Gimp 2.99.14</a> (the beta build I tested it on). As of posting, official <a href="https://www.gimp.org/downloads/" target="_blank">Gimp is at 2.10-32</a>.</p><p>It will also tell you if your icon size is supported or not! Sweet! No need to check the internet if a size is supported.</p><p>So, I created ICNS for Kage Studio with Gimp 2.99. I tested 16x16, 18x18, 24x24, 32x32, 36x36, 48x48, 64x64, 128x128, 256x256, and 512x512.</p><p>It was unreal using <a href="https://kage.sourceforge.io" target="_blank">Kage Studio</a> to create the icon for Kage Studio. Then exporting the Kage Studio icon from Kage Studio to PNG which Gimp obviously supports. Then use Gimp to downscale from high resolution to all the dimensions that ICNS supports.</p><p>Not sure who to credit for supporting the file format, maybe everyone on the <a href="https://gitlab.gnome.org/GNOME/gimp/-/issues/6112" target="_blank">ticket that was raised 2 years ago</a> by <a href="https://gitlab.gnome.org/cardcraft" target="_blank">cardcraft</a>, that was finally closed just 3mos ago.</p><p>I so love Free and Open Source Software. What a time to be alive.</p><p>~creek23</p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-63665220619182662862023-01-08T15:47:00.001+08:002023-01-09T05:26:50.765+08:00Where to snowboard on Whistler for free?<p>It's weird that this information isn't actually available on the Internet. Rather, the information on the Internet are outdated. Maybe a locals only information? 🤔</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8MPPFcYQvYuWg_KA_o5XJQc_FDdCNljSJA4XDXGBEEjxjBZfcU8ZxVv3dGe91-ivV4wGrc2PTdUml7S0LuTfCcr6vFl3NkN4FxKKAe0SXqYbjLjAFgZtUH_oQXmNSrC0ycZ9af3mPdQAwj9QoHH7c9jXBXym6OMcHYloqM3jzxf6fiCKymh3g8tRJg/s368/whistler_blackcomb_free_ride.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="318" data-original-width="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij8MPPFcYQvYuWg_KA_o5XJQc_FDdCNljSJA4XDXGBEEjxjBZfcU8ZxVv3dGe91-ivV4wGrc2PTdUml7S0LuTfCcr6vFl3NkN4FxKKAe0SXqYbjLjAFgZtUH_oQXmNSrC0ycZ9af3mPdQAwj9QoHH7c9jXBXym6OMcHYloqM3jzxf6fiCKymh3g8tRJg/s16000/whistler_blackcomb_free_ride.png" /></a></div><br /><p></p><h3 style="text-align: left;">Where can you snowboard on Whistler for free?</h3><p>That depends on your skill level. And this post is for the beginners and somewhat intermediate who just want to snowboard all day without having to pay day pass which costs around 87~219 CAD.</p><p>The answer, Whistler Blackcomb, of course.</p><p>Not sure if the crew manning the <a href="https://www.google.com/maps/place/Whistler+Blackcomb/@50.1155859,-122.9478666,16.91z/data=!4m5!3m4!1s0x5487234d067bf9cd:0x5ce9daf022b0baa!8m2!3d50.1149639!4d-122.9486474" target="_blank">Whistler Blackcomb</a> ski resort are just letting non-pass holders to go snowboarding for free but it is! It is FREE to snowboard the beginner and intermediate are of Whistler Blackcomb.</p><h3 style="text-align: left;">Free Spot?</h3><p>Right at the base of Whistler Blackcomb, just around the <a href="https://www.google.com/maps/place/Blackcomb+Mountain+Gondola/@50.1152586,-122.9459921,17.69z/data=!4m5!3m4!1s0x548723f2412504ef:0xe17bd47a4a60080d!8m2!3d50.1154652!4d-122.9475414" target="_blank">Blackcomb gondola</a>. One side for beginners, the other side for somewhat intermediate. Both spot, for FREE!</p><h3 style="text-align: left;">Free Lift?</h3><p>Their gondola still requires pass, but the Magic Chair lift is FREE. But it's only going to bring you up to Excalibur gondola. But then again, it will let you snowboard for free on the <a href="https://www.skisolutions.com/blog/best-snowboarding-resorts-in-the-world" target="_blank">currently considered number one spots to ski</a> and <a href="https://www.planetware.com/world/top-rated-ski-resorts-in-the-world-us-co-88.htm">snowboard</a>.</p><h3 style="text-align: left;">Free Parking?</h3><p><a href="https://www.google.com/maps/place/Parking+Lot+6/@50.11127,-122.9406593,17.17z/data=!4m5!3m4!1s0x5487234e6996122f:0x9a011b78b491fbff!8m2!3d50.1118876!4d-122.9437659" target="_blank">Parking lot 6</a> is the closest parking to the free area and it's also FREE. That is why it's also the first to get filled up.</p><p>Next closest parking are <a href="https://www.google.com/maps/place/Parking+Lot+%231/@50.1153382,-122.9515074,18.21z/data=!4m5!3m4!1s0x54872338db83bd03:0x298a117ebf98855f!8m2!3d50.1146167!4d-122.9521535" target="_blank">lot 1</a>, <a href="https://www.google.com/maps/place/Day+Lot+2/@50.1166832,-122.9522941,18.21z/data=!4m5!3m4!1s0x0:0x5992a64ae7434936!8m2!3d50.1158894!4d-122.9527114" target="_blank">lot 2</a> and <a href="https://www.google.com/maps/place/Day+Lot+3/@50.1166832,-122.9522941,18.21z/data=!4m5!3m4!1s0x0:0xdb93743c4dec4d69!8m2!3d50.1171309!4d-122.952766" target="_blank">lot 3</a> but requires payment until 5pm which becomes free afterwards.</p><p>Still cannot find parking space? Head over to parking <a href="https://www.google.com/maps/place/Day+Lot+4/@50.1194181,-122.9522643,18.21z/data=!4m5!3m4!1s0x0:0x44d30033c08aa753!8m2!3d50.1195!4d-122.9529504" target="_blank">lot 4</a> and <a href="https://www.google.com/maps/place/Parking+Lot+5+(Evergreen+Trees)/@50.1194181,-122.9522643,18.21z/data=!4m5!3m4!1s0x0:0x7db50073a353a32b!8m2!3d50.1193002!4d-122.9507342" target="_blank">lot 5</a>. These parking lots are not easily spotted unlike 1, 2 and 3, even though signs are there, which makes it easy to miss.</p><p>Parking <a href="https://www.google.com/maps/place/Parking+Lot+7+-+Glacier+Lane/@50.1093111,-122.9444554,18.21z/data=!4m5!3m4!1s0x0:0xd432177e18f5f0cc!8m2!3d50.1092241!4d-122.94504" target="_blank">lot 7</a> and <a href="https://www.google.com/maps/place/Parking+Lot+8/@50.1093111,-122.9444554,18.21z/data=!4m5!3m4!1s0x0:0x39749e63895ea97e!8m2!3d50.1085616!4d-122.9427515" target="_blank">lot 8</a> are also free but is far from the free beginner, intermediate area. You don't wanna walk in ski/snowboard boots with that distance.</p><p>For paid parking, here's a quick tip, pay online via <a href="https://www.whistler.ca/services/transportation/parking/pay-phone" target="_blank">their app</a> to avoid the line.</p><h3 style="clear: both; text-align: left;">Free Food?</h3>You're pushing it. If you parked by lot 6, be sure to bring your own food and drinks. Park lot 6 is so accessible, you can sneak a quick snack by the parking and get back to the intermediate spot.<br /><p><br /></p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-4358664747884033712022-09-22T04:54:00.001+08:002022-10-03T13:22:31.290+08:00NEW Spritesheet Tool in town!<p>Ever heard of the 2D animation tool called, <a href="https://kage.sourceforge.io">Kage Studio</a>? It has the Macromedia Flash feel to it. Yes, Macromedia Flash -- not Adobe Animate.</p><p>Kage Studio is a free vector art animation tool which handles vector editing pretty much like Inkscape. You draw the shapes and modify them with Select Tool and/or Node Tool.</p><p>I'll write a different article on how to use this free animation tool, but for now, let's focus on how we can make game art out of this tool.</p><p>Kage Studio is free and open source, currently hosted on <a href="https://sourceforge.net/projects/kage/">SourceForge</a> so, nothing to worry. Now, download and install Kage Studio then open the demo file included with it, called <b>demo.ksf</b><br /></p><p>Adjust the Width and Height to fit the current artwork. <i>Make note of the Width and Height you set -- </i>you might need it on your code to specify the width and height of each frame on your spritesheet. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteA.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="794" data-original-width="730" height="400" src="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteA.png" width="368" /></a></div><p>Now. you are ready to export it as Spritesheet. Click on <b>File -> Export -> PNG... Spritesheet PNG</b>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteB.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="794" data-original-width="730" height="400" src="https://kage.sourceforge.io/images/tutorial/spritesheet/spriteB.png" width="368" /></a></div><p>Set the filename then check the Spritesheet for your self.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://kage.sourceforge.io/images/tutorial/spritesheet/sprite.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="539" data-original-width="800" height="270" src="https://kage.sourceforge.io/images/tutorial/spritesheet/sprite.png" width="400" /></a></div><p>Load that to your game engine and see it get animated.</p><p>I've made a <a href="https://kage.sourceforge.io/images/tutorial/spritesheet/sprite.html">quick test with Phaser</a>. It should be doable with any other game engines.</p><p>With Kage Studio, you can have your sprite animation previewed inside the tool before loading inside your game. Even reuse your sprites to create your cut scenes or cinematic and vice versa.<br /></p><p></p><p><br /><i>~creek23</i><br /></p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-31340602352018050482021-03-20T05:48:00.000+08:002021-03-20T05:48:33.842+08:00[SOLUTION] Cannot Create Foreign Key<p>Been a long while since I last needed to have Foreign Key in my Database.</p><p>Much of my applications are not so complex that I don't bother employ a Foreign Key.</p><p>Now that I have to, it took me about three whole hours figuring out the problem.</p><p>I cannot create Foreign Key with HeidiSQL!</p><p>I've been using HeidiSQL for over ten years now. It's only now that I faced problem with this MySQL GUI.</p><p>My latest Wamp Server uses MariaDB.</p><p>Thinking it could be MariaDB having a problem and not HeidiSQL, I tried using MySQL instead.</p><p>Still, with MySQL, I could not successfully create Foreign Key! And I've been pulling my hairs off!</p><p>Somehow, this problem has been <a href="https://www.heidisql.com/forum.php?t=35803" target="_blank">discussed over at HeidiSQL forums</a> a year ago. Even the author of HeidiSQL couldn't figure out why because the problem isn't happening on his side.<br /></p><p>Luckily, a user named, Patsy, <a href="https://www.heidisql.com/forum.php?t=35803#p35991" target="_blank">figured out why</a>.</p><p>For some reason, my Wamp Server used MyISAM as default Table Engine instead of the more common, InnoDB.</p><p>So, in the end, it wasn't a bug in HeidiSQL. Neither a bug in MariaDB nor MySQL.</p><p>It was a compatibility problem with <a href="https://stackoverflow.com/questions/12971246/why-doesnt-mysqls-myisam-engine-support-foreign-keys#:~:text=MyIsam%20has%20no%20foreign%20keys,Use%20it%20you%20have%20innodb." target="_blank">MyISAM not being able to support Foreign Key</a></p><p>Hope this blog post will save you hours of hair pulling.</p><p>Happy hacking!</p><p>~creek23</p>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-52830882110079069162020-04-03T23:00:00.000+08:002020-04-03T23:00:55.317+08:00Tatsulok Lyrics by Buklod<div dir="ltr" style="text-align: left;" trbidi="on">
Been searching for this for a while. Sadly, most Lyric websites either have the wrong lyrics, or are using Bamboo's version.<br />
<br />
To give justice to the song, I listened to the <a href="https://www.youtube.com/watch?v=1flUp08PZkA" target="_blank">original which can be heard on Youtube</a>, thanks to the uploader, <a href="https://www.youtube.com/channel/UCExtD7aWgZOHKEx6BTtFIBA" target="_blank">Rvmer Rivera</a>. Here's the original lyrics released in 1989.<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">Totoy bilisan mo, bilisan mo ang takbo<br />Ilagan ang mga bombang nakatutok sa ulo mo<br />Totoy tumalon ka, dumapa kung kailangan<br />At baka tamaan pa ng mga balang ligaw<br /><br />Totoy makinig ka, wag nang magpa-gabi<br />Baka pagkamalan pa't humandusay dyan sa tabi<br />Totoy alam mo ba kung ano ang puno't dulo<br />Ng di matapos-tapos na kaguluhang ito<br /><br />Hindi pula't dilaw tunay na magkalaban<br />Ang kulay at tatak ay di syang dahilan<br />Hangga't mas marami ang lugmok sa kahirapan<br />At ang hustisya ay para lang sa mayaman<br /><br />Habang may tatsulok at sila ang nasa tuktok<br />Hindi matatapos itong gulo<br /><br />Hindi ligtas ang hininga ng kay raming mga tao<br />At ang dating munting bukid, ngayo'y sementeryo<br />Totoy kumilos ka, baliktarin ang tatsulok<br />Katulad mong mga dukha ang ilagay mo sa tuktok<br /><br />Hindi pula't dilaw tunay na magkalaban<br />Ang kulay at tatak ay di syang dahilan<br />Hangga't mas marami ang lugmok sa kahirapan<br />At ang hustisya ay para lang sa mayaman<br /><br />Habang may tatsulok at sila ang nasa tuktok<br />Hindi matatapos itong gulo<br />Habang may tatsulok at sila ang nasa tuktok<br />Hindi matatapos itong gulo</span><br />
<br />
Happy Singing!</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-86840743290091568402019-07-29T14:50:00.000+08:002019-07-29T14:56:47.075+08:00Fake Arduino UNO cannot be detected by Windows<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="border-image: none;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA40jG7173QPe7tDiP3SeSalk3Dz-fu4tb96nVkQ1LR9kRhE-BsI6A5kTiyDTEmMe8Aq91utKT9uVSHYKQDPqkCkm7jFsfbfJOxrwaQhXjZxaxLIkWrCKR63RqnHrazevRZrYHUZVYKQBY/s1600/android_usb_driver-150x150.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="150" data-original-width="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA40jG7173QPe7tDiP3SeSalk3Dz-fu4tb96nVkQ1LR9kRhE-BsI6A5kTiyDTEmMe8Aq91utKT9uVSHYKQDPqkCkm7jFsfbfJOxrwaQhXjZxaxLIkWrCKR63RqnHrazevRZrYHUZVYKQBY/s1600/android_usb_driver-150x150.jpg" /></a>First of, there's nothing wrong with a fake Arduino -- we all know that Arduino is open source and everyone can create their own copy with the blueprint from Arduino website.<br />
<br /></div>
<div style="border-image: none;">
Okay, now onto your problem.<br />
<br /></div>
<div style="border-image: none;">
I too bought a fake Arduino because I'm cheap.</div>
<div style="border-image: none;">
<a href="https://s.lazada.com.ph/s.vGGf" target="_blank">I got mine from Lazada</a>. And the item cannot be detected by Windows 7.<br />
<br /></div>
<div style="border-image: none;">
I was able to find the USB Driver from <a href="https://www.hobbyist.co.nz/?q=uno_driver_installation" target="_blank">another website</a> (<a href="https://www.hobbyist.co.nz/">Hobbyists.co.nz</a>) but it took thorough searching on the internet. So, I hope this blog post will help boost that article up in the search results.<br />
<br /></div>
<div style="border-image: none;">
In any case that the website will be gone, hopefully not, I'm copying the <a href="http://www.arduined.eu/files/CH341SER.zip" target="_blank">link to the USB Driver here</a> -- which is hosted by <a href="https://www.arduined.eu/">Arduined.eu</a>. Simply install then off you go.<br />
<br /></div>
Happy hacking!<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-678943505648203422018-05-17T18:35:00.000+08:002018-05-17T20:44:16.950+08:00Game Boy Advance Development 101: Compiling Tank Advance<div dir="ltr" style="text-align: left;" trbidi="on">
If you've happen to <a href="http://www.loirak.com/gameboy/tank.php" target="_blank">download Tank Advance</a> source code from <a href="http://www.loirak.com/" target="_blank">Loirak Development</a>, chances are you're having a problem compiling a working GBA file with <a href="https://devkitpro.org/" target="_blank">devkitPro</a>.<br />
<br />
<br />
That's because of the compiler.<br />
<br />
<br />
The pre-compiled GBA file inside the <a href="http://www.loirak.com/gameboy/tankgba.zip" target="_blank">Tank Advance ZIP file</a> was compiled 2002 -- that's more than a decade and a half. Last 2002, GCC was just version 3. As of this writing, devkitPro is using GCC version 7.<br />
<br />
<br />
Without much further ado, use the following lines in MSYS2:<br />
<span style="font-family: "courier new" , "courier" , monospace;">arm-none-eabi-gcc -c gfx.c -mthumb-interwork -mthumb -O2 -o gfx.o<br />arm-none-eabi-gcc -c main.c -mthumb-interwork -mthumb -O2 -o main.o<br />arm-none-eabi-gcc main.o gfx.o -mthumb-interwork -mthumb -specs=gba.specs -o tank.elf<br />arm-none-eabi-objcopy -v -O binary tank.elf tank.gba</span><br />
<br />
<br />
If successful, you should have a freshly compiled Tank Advance and you can start changing the code to understand how it works so you can start writing your own Game Boy Advance game. :)<br />
<br />
<br />
Happy GBA deving!<br />
<br />
<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-30713513253835551662018-05-04T16:28:00.000+08:002018-05-04T16:28:42.193+08:00Game Boy Advance Retro Gaming with Supercard<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Why Retro Gaming?</h3>
On my early 30s now, and such a nostalgia seeing game boy games being played with Smart Phone. But the little boy inside me still wants to play these games in a real Game Boy device.<br />
<br /><br />
<h3 style="text-align: left;">
How to do Retro Gaming?</h3>
Option 1, buy Chinese knock-off game device that natively runs emulators which then runs your ROM (the game file of your favorite Game Boy game). Amazon and Ebay lists Game Boy Console but I'm not sure on their authenticity -- so, buy at your own risk!<br />
<div>
</div>
Option 2, buy used Game Boy and used games -- a little harder approach but I was able to find one used Game Boy Advance SP and a used game which isn't my kind of game.<br />
<div>
</div>
So, I had to resort to a Supercard, a cartridge that used SD Card (to which you save your ROM and plays on your Game Boy) -- this Supercard was a hit some 15 years ago when ROMs plagued the Internet. I learned about this when I was learning how to write a game for Game Boy Advance using free Game Boy SDK -- thanks to <a href="https://www.amazon.com/Programming-Nintendo-Game-Boy-Advance/dp/1931841780" target="_blank">Jonathan Harbour's Unofficial Guide</a>!<br />
<div>
</div>
This Supercard only costs about $18 USD which is available online -- the card is also supported by NDS.<br />
<br /><br />
<h3 style="text-align: left;">
Common Problems and Solutions</h3>
<strong>Where to find ROM</strong> -- Internet is still plagued with ROMs, and you are not going to get those links from me.<br />
<br /><br />
<strong>"not find SD"</strong> -- there could be lots of reasons and these are possible solutions:<br />
<ul style="text-align: left;">
<li>check that your SD card <strong>IS NOT SDHC</strong> card; if it is, buy a new one -- the SD one!</li>
<li>check that your SD card is formatted with FAT and <strong>NOT FAT32</strong>; it it is, reformat it to FAT!</li>
<li>check that your SD card is 2GB and <strong>NOT MORE THAN 2G</strong>; if it is, buy a new 2GB one.</li>
</ul>
<div>
<strong>Cannot read ROM</strong> -- you need to convert the ROM to be compatible with Supercard; I found version 2.71 dated 2010.03.25</div>
<div>
<br /></div>
<div>
<strong>Cannot SAVE game</strong> -- make sure to <strong>Run <em>Supercard converter</em> as Administrator</strong> to enable SAVE in your ROM</div>
<div>
<br /></div>
<h3 style="text-align: left;">
Conclusion</h3>
<div>
That's pretty much it! Comment down for questions and if you happen to have additional information, kindly share them in comments :) Happy Retro Gaming! </div>
<div>
<br /></div>
~creek23<br />
<div>
</div>
<strong>DISCLAIMER:</strong> Yes, my approach is technically "Piracy" and I'm not trying to justify -- it's just that these games are not being sold anymore. So, NO, I'm not promoting piracy. Read more on <a href="https://www.nintendo.com/corp/legal.jsp#roms" target="_blank">Nintendo's stand on ROMs</a>.<br />
<br /><br />
<strong>SIDE NOTE:</strong> Nintendo might be able to make money if it had a ROM store much like Apple's App Store or Google's Play Store since it <a href="https://www.nintendo.com/nes-classic/" target="_blank">already re-released NES</a>, and <a href="https://www.nintendo.com/super-nes-classic/" target="_blank">SNES</a> -- might as well re-release a WIFI-enabled Game Boy! :)<br />
<div>
</div>
</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-69436828849112946912016-04-16T03:22:00.000+08:002016-04-26T18:34:43.675+08:00Lenovo VIBE K4 Note, ANTVR PhoneGlass, and Google Cardboard<div dir="ltr" style="text-align: left;" trbidi="on">
So, <a href="https://www.facebook.com/lenovophilippines/" target="_blank">Lenovo Philippines</a> decided to sell their <a href="http://www.gsmarena.com/lenovo_vibe_k4_note-7802.php" target="_blank">Lenovo VIBE K4 Note</a> with free <a href="http://www.lazada.com.ph/lenovo-vibe-k4-note-16gb-tuxedo-black-with-free-vr-headset-4318954.html" target="_blank">VR glass</a>. Yes, you read that right -- a FREE Virtual Reality glass for every new Lenovo VIBE K4 Note.<br />
<br />
To tell you the truth, I didn't bother with the phone's specs. I just wanted to have my own VR glass! So, yeah, this is not a post about a phone review. Though, I'm generally okay with the phone given the price of US$220~ (some store sells it for US$230) that it already comes with VR glass. So, there's that.<br />
<br />
Now onto the VR glass.<br />
<br />
Nothing fancy, really. It's just a plastic version of Google Cardboard with head strap. Which, for someone like me who really needs to experience this VR thing that's been trending for quite awhile now, it's my kind of poor man's Occulus Rift. I say, hell yeah! I finally have an Occulus Rift! -- a cheap one of course but to hell with CEOs saying VR for the mass market will take a longer while.<br />
<br />
So how does it work?<br />
<br />
Like Google Cardboard, you will have to put the phone in front of the glass, clipped into place -- which is kind of a lousy engineering if you ask me. Placing the phone into place by having it clipped comes the risk of the phone falling off if not properly clipped -- I mean, it took me awhile to actually safely clip the phone. I was thinking, it would have been better if you just slide it on the side of the VR glass and have some locking mechanism to lock it into place -- maybe, slide it on then clip for locking. I hope Lenovo would be reading this and tap <a href="http://antvr.com/" target="_blank">ANTVR</a> to revise the glass with my inputs.<br />
<br />
Demo, anyone?<br />
<br />
Sadly, the phone does not have videos or apps ready for demo purposes. So I had to search Google Playstore only to find apps that are compatible only to Google Cardboard.<br />
<br />
Good thing though that VR Roller Coaster app has the same configuration that fits Lenovo's ANTVR.<br />
<br />
So, these are the steps that configured Lenovo's ANTVR for VR apps that were designed for Google Cardboard:<br />
1. Install Google Cardboard<br />
2. Install VR Roller Coaster<br />
3. Run VR Roller Coaster, select any of the 2 sample rides, then click configure.<br />
4. Then focus the phone to the image below, which I got from the internet by simply googling: 'qr code "vr roller coaster"'<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOBWzHHrqCkshSD9yoR_ZujDWv7F5VQSaPXkk7zvmttQ59Wx6c8WxWR-EdHgeql1Ui36rvu13dyboGALwDYjUlE6nFP6D9x0E2Gs56Tj1IVBeJf4K5FUj2nZNyLJa7jKU2IJVZS6rB-K42/s1600/vrrollercoaster.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOBWzHHrqCkshSD9yoR_ZujDWv7F5VQSaPXkk7zvmttQ59Wx6c8WxWR-EdHgeql1Ui36rvu13dyboGALwDYjUlE6nFP6D9x0E2Gs56Tj1IVBeJf4K5FUj2nZNyLJa7jKU2IJVZS6rB-K42/s1600/vrrollercoaster.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">VR Roller Coaster configuration</td></tr>
</tbody></table>
I know it's rather small but VIBE K4 Note can actually scan it and configure VR Roller Coaster's view that will fit Lenovo's ANTVR glass.<br />
<br />
(This post was written at 3AM, just after a few hours of tinkering with ANTVR; if something is not clear, put it in the comments below :) -- if everything works, please do let me know as well by commenting)<br />
<br />
~creek23<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com2tag:blogger.com,1999:blog-2635530141396811255.post-85107697461187373882015-04-11T21:54:00.000+08:002015-04-11T21:54:25.625+08:00[Sk8Factory/Mimic Review] Skateboard manufacturing scum<div dir="ltr" style="text-align: left;" trbidi="on">
I've been wanting to write this review to a skateboard deck manufacturer called <a href="http://www.sk8factory.com/" target="_blank">Sk8 Factory</a>. -- btw, they also own <a href="http://www.mimicskateboards.com/" target="_blank">Mimic Skateboards</a>. Since there is no real way of informing other possible customers of these sub-standard manufacturer, I really think this review is needed to be posted to keep this money-sucking sub-standard Sk8 Factory away from the industry.<br />
<br />
Whatever you do, DO NOT BUY from Sk8Factory (or Mimic Skateboards)!!!<br />
<br />
They sell cheap because THEIR PRODUCTS ARE CHEAP! <br />
<br />
The skateboard decks that Sk8 Factory (or Mimic Skateboards) produces gets easily delaminated. This is due to their lack of experience in having a dyed ply mixed in the 7-ply deck -- the paint/color they use in dying the ply causes the dyed ply to not properly bind with the other plies. This <a href="http://www.skateboard-city.com/messageboard/showthread.php?t=278085" target="_blank">other skater's review</a> shows that Sk8Factory (or Mimic Skateboards) were originally not using dyed ply.<br />
<br />
Also, they only produce deck on demand but waits for a bulk batch to maximize the labor cost -- which is understandable to any business-minded individuals BUT this is a deadly combination for your skateboard decks. After a month of production, they will start shipping your products hoping they cure while being delivered. They need to deliver the product soonest the graphics are dried because you as their client have been waiting months when they were still waiting for other others. And here you are so gullible and eager to test their product upon receiving it not knowing that the boards have not cured to its maximum curing time. You'll only realize once it's all too late.<br />
<br />
Their price is too good to be true because they are experimenting on the products that you will order from them. So, whatever you do, DO NOT BUY anything from Sk8Factory or from Mimic Skateboards!<br />
<br />
There's <a href="https://www.youtube.com/watch?v=j28BqXZbs0I" target="_blank">another video review</a> which is basically a shallow review, IMHO. The client is (or was) happy because finally his orders came in with his own graphics. That same reviewer <a href="https://www.youtube.com/watch?v=gVNXHvhfr4I" target="_blank">has a second video review</a> where it shows how the board works, but as you can see the skater is kind of beginner that any sub-standard deck would probably pass his standards -- the reviewer can't even pop the board proper to level a proper ollie.<br />
<br />
<br />
The only thing they got right is that their graphics doesn't easily come off like most brands. But would that actually matter to you if the wood won't even last?</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com14tag:blogger.com,1999:blog-2635530141396811255.post-65343133513771547272014-11-11T13:18:00.002+08:002014-11-11T13:18:38.318+08:00[Android Studio] Error : Failed to find: com.android.support<div dir="ltr" style="text-align: left;" trbidi="on">
It's nice that Google is trying to make a full-fledged <a href="http://tools.android.com/" target="_blank">Android Authoring Software</a>, complete with what is <a href="http://en.wikipedia.org/wiki/Authoring_system#Authoring_tool" target="_blank">expected from an authoring tool</a>. But as of now, the tool itself is in Beta which has a few hiccups hidden somewhere, and one of this is not being able to compile an Android Project. o_o<br />
<br />
Like, really?<br />
<br />
So if you, like me, had encountered this problem saying:<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><b>Error : Failed to find: com.android.support</b></span></blockquote>
Relax and open <b>SDK Manager</b> then install the <b>Android Support Repository</b> and/or <b>Android Support Library.</b> Better yet, install those two. :)<br />
<br />
Upon restart of Android Studio, that problem should go away.<br />
<br />
Happy hacking!<br />
<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com4tag:blogger.com,1999:blog-2635530141396811255.post-29169963380911450422014-10-09T18:41:00.001+08:002014-10-16T22:07:23.872+08:00[FFMPEG] Adjust video volume<div dir="ltr" style="text-align: left;" trbidi="on">
Before anything else, here's a quick <b>disclaimer:</b> I do not promote the use of torrent for downloading movies you do not currently own. Yes, I do download movies but <b>only if I have a DVD/Bluray copy of it</b>. The only reason I download it so I would have a soft copy -- yes, I suck at ripping DVD/Blurays.<br />
<br />
Okay. Now, onto the issue at hand.<br />
<br />
It seems that this torrent group called YIFY is famous among torrent freaks because of quality Bluray rips packed in very small HD files. Sadly, YIFY configured their rips to lessen the quality of audio. Which is not a problem for people watching the video on their computers since VLC Media Player can double the movie's volume and everybody's happy.<br />
<br />
Well, not quite.<br />
<br />
People who have LED TVs happen to enjoy the quality of the movie they downloaded by watching it on their 40~50in TVs. And it so happen that their TVs doesn't have the feature VLC Media Player has (doubling the volume) -- so they are stuck with the audio quality that YIFY offers with their small-size HD movies.<br />
<br />
So how do you fix it?<br />
<br />
Have I mentioned my disclaimer, yet?<br />
<br />
Anyway, let's use <a href="http://ffmpeg.org/" target="_blank"><b>FFMPEG</b></a>! Just type this into your <b>Command Prompt</b>:<br />
<br />
<b><span style="color: blue;"><span style="font-family: "Courier New",Courier,monospace;">ffmpeg -i "input.mp4" -c:v copy -af "volume=10dB" "thanksToCreekCodes.mp4"</span></span></b><br />
<br />
Above <span style="font-family: "Courier New",Courier,monospace;">ffmpeg</span> command should make sure that you should now have a louder audio while having the same video quality.<br />
<br />
I'm pretty sure you understood my disclaimer right? Well, happy viewing!<br />
<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com3tag:blogger.com,1999:blog-2635530141396811255.post-87806183709721433102013-05-24T17:10:00.000+08:002013-05-24T17:18:00.542+08:00Compiling Geany on Windows<div dir="ltr" style="text-align: left;" trbidi="on">
Can't remember exactly how many times I've tried compiling Geany or even thought of trying to compile it on Windows. But I remember that my last try was last 2011 -- about February or March.<br />
<br />
It's been a while that I've been trying to find a stable and reliable free and open source (not to mention cross-platform) Source Code Editing software so I could strip it down to provide an IDE specifically functioning for my <a href="http://konsolscript.org/" target="_blank">open source game creation project called KAGE</a>. Finally, -- finally! -- I successfully compiled it yesterday!<br />
<br />
I know that <a href="http://geany.org/" target="_blank">Geany's project page</a> has a <a href="http://www.geany.org/Support/BuildingOnWin32" target="_blank">how-to page for compiling it on Windows</a> but I still had bumps along the way. This tutorial is simply to compliment what seems to be missing in the official tutorial.<br />
<br />
So, just a recap. You need to have this things done already:<br />
<ul style="text-align: left;">
<li><a href="http://www.mingw.org/wiki/InstallationHOWTOforMinGW" target="_blank">GNU Compiler Collection (GCC)</a> , as your compiler, made available through <a href="http://www.mingw.org/" target="_blank">MinGW project</a> -- I used version 4.6.2</li>
<li><a href="http://www.mingw.org/wiki/MSYS" target="_blank">MSYS</a>, as your Shell Interface for Windows, also made available through MinGW</li>
<li><a href="http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip" target="_blank">GTK+</a>, as the GUI library, available on <a href="http://www.gtk.org/" target="_blank">GTK.org</a> </li>
<li>And of course, the <a href="http://download.geany.org/geany-1.23.1.tar.bz2" target="_blank">Geany source code</a></li>
</ul>
<br />
Not sure if we also need the GtkMM for Scintilla, but I did have that installed on my machine before I tried compiling Geany for the last time.<br />
<br />
Before we proceed, let's make sure that you had the contents of GCC and GTK+ under <span style="font-family: "Courier New", Courier, monospace;"><strong>C:\libs</strong></span> directory. And that <span style="font-family: "Courier New", Courier, monospace;"><strong>C:\libs\bin</strong></span> is added on your <span style="font-family: "Courier New", Courier, monospace;"><strong>%PATH%</strong></span>, as well as <span style="font-family: "Courier New", Courier, monospace;"><strong>C:\libs\msys\1.0\bin</strong></span>.<br />
<br />
Now, for the `<em>complimentary</em>' part of my tutorial.<br />
<br />
First, download the <a href="https://github.com/geany/geany/blob/master/geany.exe.manifest" target="_blank">Manifest file</a> from Geany's Git repo, which was not included in the downloadable zipped source code.<br />
<br />
Rename <span style="font-family: "Courier New", Courier, monospace;"><strong>win32-config.h</strong></span> to config.h then change the content of <span style="font-family: "Courier New", Courier, monospace;"><strong>makefile.win32</strong></span> from<br />
<br />
<span style="color: #073763; font-family: "Courier New", Courier, monospace;"><strong>all: config.h<br /> $(MAKE) -C tagmanager/ctags -f makefile.win32<br /> $(MAKE) -C tagmanager/mio -f makefile.win32<br /> $(MAKE) -C tagmanager/src -f makefile.win32<br /> $(MAKE) -C scintilla -f makefile.win32<br /> $(MAKE) -C plugins -f makefile.win32<br /> $(MAKE) -C src -f makefile.win32</strong></span><br />
<span style="color: #073763; font-family: "Courier New", Courier, monospace;"><strong>config.h: win32-config.h<br /> $(CP) $< $@</strong></span><br />
<br />
to this<br />
<br />
<span style="color: #073763;"><span style="font-family: "Courier New", Courier, monospace;"><strong>all:</strong></span></span><span style="color: #073763; font-family: "Courier New", Courier, monospace;"><strong> $(MAKE) -C tagmanager/ctags -f makefile.win32<br /> $(MAKE) -C tagmanager/mio -f makefile.win32<br /> $(MAKE) -C tagmanager/src -f makefile.win32<br /> $(MAKE) -C scintilla -f makefile.win32<br /> $(MAKE) -C plugins -f makefile.win32<br /> $(MAKE) -C src -f makefile.win32</strong></span><br />
<br />
The reason behind is that, there seems to be wrong with the makefile that the command COPY thinks <span style="font-family: "Courier New", Courier, monospace;"><strong>config.h</strong></span> is supposed to be a directory.<br />
<br />
Now, open a command line then run <span style="font-family: "Courier New", Courier, monospace;"><strong>cd</strong></span> to the directory where you extracted Geany's source code.<br />
<br />
Finally, type-in: <span style="font-family: "Courier New", Courier, monospace;"><strong>make -f makefile.win32</strong></span><br />
<br />
Wait for it to compile and you'll then end up a very fresh build of Geany on Windows.<br />
<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-71072542999256564762013-02-08T22:39:00.000+08:002013-05-24T10:25:11.845+08:00LMMS: Fixing distorted sound<div dir="ltr" style="text-align: left;" trbidi="on">
So I have been casually using <a href="http://lmms.sourceforge.net/" target="_blank">Linux Multimedia Studio</a>, or LMMS, since 2010. It is a really good free and open source alternative to FruityLoops.<br />
<br />
I won't go detailing how great this tool is for digitally creating your music as I am assuming you bump onto this post already knowing what LMMS is.<br />
<br />
One issue of this tool on Windows is that LMMS keeps distorting your (if I may) compositions, adding buzz and other weirdness to your music.<br />
<br />
The problem is even added on its <a href="http://lmms.sourceforge.net/wiki/index.php/Troubleshooting#It_keeps_corrupting_my_sample_files_for_some_reason.2C_and_occasionally_it_will_add_this_ticking_sound_to_the_sound_that_sounds_like_a_kicker_except_really_distorted_and_not_added_anywhere." target="_blank">Troubleshooting page</a> but it is still currently unanswered as of this post.<br />
<br />
Luckily, the answer is actually <a href="http://sourceforge.net/apps/phpbb/lmms/viewtopic.php?f=3&t=283" target="_blank">already on its Forums</a> posted by a fellow LMMS user, darkill. And it's just waiting for someone to add it on <a href="http://lmms.sourceforge.net/wiki/" target="_blank">LMMS' Wiki</a>.<br />
<br />
For archiving purposes (just in case the forums and/or the wiki won't be accessible), let me state the steps here on this post.<br />
<br />
<strong>Open DirectX Diagnostic Tool</strong><br />
<ol style="text-align: left;">
<li>Open a <strong>Command Prompt</strong></li>
<li>Type-in: <strong>dxdiag</strong></li>
<li>Check the tabs with labels "<em>Sound1</em>", "<em>Sound2</em>", etc.</li>
<li>Check for the <strong>Driver's name</strong> (<em>mine is STWRT.SYS</em>)</li>
<li>Take note of this now do the next steps </li>
</ol>
<strong>Update LMMS Settings</strong><br />
<ol style="text-align: left;">
<li>Run our favorite digital music authoring tool called LMMS :)</li>
<li>Go to <strong>Edit</strong> -> <strong>Settings</strong></li>
<li>Now goto <strong>Audio Settings</strong></li>
<li>Change the <em>Audio Interface</em> to <strong>SDL (Simple DirectMedia Layer)</strong></li>
<li>Then specify your <em>Driver's Name</em> of your <em>Audio Device</em> on <strong>Settings for SDL</strong></li>
</ol>
Now restart LMMS and hope that the distortion and other weirdness on your music is gone.<br />
<br />
Happy composing!<br />
<br />
~creek23</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com11tag:blogger.com,1999:blog-2635530141396811255.post-41771669158839991922012-08-26T00:15:00.000+08:002012-08-26T09:43:15.876+08:00Gimp 2.8 gzdirect problem<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="background-color: white; font-family: inherit;">This simple solution should fix the problem: "</span><i><span style="background-color: white; color: #222222; font-family: inherit; line-height: 16px;">The procedure entry point </span><span style="background-color: white; font-family: inherit; line-height: 16px;">gzdirect</span><span style="background-color: white; color: #222222; font-family: inherit; line-height: 16px;"> could not be located in the dynamic link library </span><span style="background-color: white; font-family: inherit; line-height: 16px;">zlib1</span><span style="background-color: white; color: #222222; font-family: inherit; line-height: 16px;">.</span><span style="background-color: white; font-family: inherit; line-height: 16px;">dll.</span></i><em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;">"</em></div>
<div style="text-align: left;">
<em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;"><br /></em></div>
<div style="text-align: left;">
<em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;">To non-programmers, this error message simply means that your </em>
<span style="font-family: Courier New, Courier, monospace; line-height: 16px;"><b>zlib1.dll</b></span><span style="font-family: inherit; line-height: 16px;"> </span><em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;">is outdated and needs to be replaced.</em></div>
<div style="text-align: left;">
<em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;"><br /></em></div>
<div style="text-align: left;">
<em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;">Somehow, most (if not all) Gimp plugins are using </em><em style="background-color: white; font-style: normal; line-height: 16px;"><span style="font-family: Courier New, Courier, monospace;"><b>gzdirect</b></span></em><em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;"> which is supposed to be available on </em>
<span style="font-family: Courier New, Courier, monospace; line-height: 16px;"><b>zlib1.dll</b></span><em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;">.</em></div>
<div style="text-align: left;">
<em style="background-color: white; font-family: inherit; font-style: normal; line-height: 16px;"><br /></em></div>
<div style="text-align: left;">
<span style="line-height: 16px;"><span style="font-family: inherit;">Try checking </span><span style="font-family: Courier New, Courier, monospace;"><b>C:\Windows\System32\</b></span><span style="font-family: inherit;"> and look for </span><span style="font-family: Courier New, Courier, monospace;"><b>zlib1.dll</b></span><span style="font-family: inherit;"> then rename it to something else, maybe something like </span>
<b style="font-family: 'Courier New', Courier, monospace;">zlib1.dll.old</b><span style="font-family: inherit;">.</span></span><br />
<span style="line-height: 16px;"><span style="font-family: inherit;"><br /></span></span>
<span style="line-height: 16px;"><span style="font-family: inherit;">So where to get the latest one? It's actually installed along with Gimp 2.8, but since you have another </span>
<b style="font-family: 'Courier New', Courier, monospace;">zlib1.dll</b> <span style="font-family: inherit;">on your Windows' System32 path, Windows is trying to load that copy instead of the copy that Gimp 2.8 has.</span></span></div>
<div style="text-align: left;">
<span style="line-height: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div style="text-align: left;">
<span style="line-height: 16px;"><span style="font-family: inherit;">Now, re-run Gimp 2.8.</span></span></div>
<div style="text-align: left;">
<span style="line-height: 16px;"><span style="font-family: inherit;"><br /></span></span></div>
<div style="text-align: left;">
<span style="line-height: 16px;"><span style="font-family: inherit;">Happy Gimping!</span></span></div>
</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-53054044904078197992012-08-10T19:52:00.002+08:002012-08-10T19:52:20.250+08:00Jenkins: Executing binary from Jenkins script<div dir="ltr" style="text-align: left;" trbidi="on">
If anyone of you are having the <a href="http://jenkins.361315.n4.nabble.com/How-can-I-run-a-Windows-executable-from-a-Jenkins-script-td4426035.html">same problem as detailed on Jenkins forum</a> about not being able to execute any Windows executables from Jenkins Job configuration. The reason might be that <strong>slave-agent.jnlp</strong> is <em>running as a service</em> -- and for whatever reason, Windows won't let it run other executables. To verify if it is the case, try uninstalling the slave-agent.jnlp service -- to do so, use Google -- then try running slave-agent.jnlp as is (meaning, right after executing the code below).<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"><strong>javaws </strong></span><a href="http://yourjenkins.com/computer/yourslaveIP/slave-agent.jnlp"><span style="font-family: "Courier New", Courier, monospace;"><strong>http://yourjenkins.com/computer/yourslaveIP/slave-agent.jnlp</strong></span></a><br />
<br />
If that didn't solve the problem, sorry but I currently don't have any other solution.</div>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-82811625037542865472012-06-22T21:54:00.000+08:002012-06-22T22:28:07.271+08:00Screencasting with Android<div dir="ltr" style="text-align: left;" trbidi="on">
Well, if you are already using the <a href="https://play.google.com/store/apps/details?id=com.ms.screencast">Screencast Video Recorder</a>, there's no use of reading this -- but I'm betting you're not because you stumbled onto this tutorial.<br />
<br />
First of all, I am not related to the said screencasting app and I am in no way endorsing it. I haven't even tried that app yet because 1.) it's not supported on my low-end Android device and 2.) it's a paid app -- yes, I'm cheap, sue me. :P<br />
<br />
So this tutorial is about creating a screencast of your Android device using a free and open source tools called <a href="http://sourceforge.net/projects/ashot/">Android Screen Capture</a> (or AShot) and <a href="http://ffmpeg.org/">FFmpeg</a>. I should warn you that this tutorial is not for the fainthearted -- it's gonna be messy through setting these tools up, and through creating of the screencast video itself.<br />
<br />
I'm going to assume you know what we mean by <a href="http://en.wikipedia.org/wiki/Screencast">screencast</a>. And I'm going to assume you are using Windows on your PC.<br />
<br />
To start, download the tools:<br />
AShot - <a href="http://sourceforge.net/projects/ashot/files/latest/download">http://sourceforge.net/projects/ashot/files/latest/download</a><br />
FFmpeg - <a href="http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20120620-git-5a90e55-win32-shared.7z">http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20120620-git-5a90e55-win32-shared.7z</a><br />
<br />
Here's a <a href="http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/">very detailed tutorial of setting-up AShot</a>, which I'm very glad not to write over again. It talks about downloading Android SDK, which AShot uses to capture images from your <span style="background-color: white;">Android</span><span style="background-color: white;"> </span><span style="background-color: white;">device. One quick note, however, is the copying of the three files, namely:</span><br />
<ul style="text-align: left;">
<li><span style="background-color: white;">adb.exe</span></li>
<li><span style="background-color: white;">AdbWinApi.dll</span></li>
<li><span style="background-color: white;">AdbWinUsbApi.dll</span></li>
</ul>
<span style="background-color: white;">from this directory: </span><span style="background-color: white; font-family: 'Courier New', Courier, monospace;">C:\Program Files\Android\android-sdk\platform-tools</span><br />
<br />
to this directory: <span style="font-family: 'Courier New', Courier, monospace;">C:\Program Files\Android\android-sdk\tools</span><br />
<br />
Again, simply <b>COPY</b> the three files and <b>not MOVE</b> from one to the other.<br />
<br />
Lots of troubleshooting is also discussed on <a href="http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/">that page</a>, so go thoroughly through <a href="http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/">that page</a> if AShot won't seem to work.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzyW0Bhdohyphenhyphen87M53QR0RhXOEOdKQOI4CJsHC8TM0t8tVb6gGLf8l0vT59iUD_LMrL8wnEWTusx7spnRXnRMmDsItbRmxFVEzUMoox4B7i7B13K-08nPlxF_uFG-WHat9mhhI9Y2DxYABvg/s1600/ashot.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzyW0Bhdohyphenhyphen87M53QR0RhXOEOdKQOI4CJsHC8TM0t8tVb6gGLf8l0vT59iUD_LMrL8wnEWTusx7spnRXnRMmDsItbRmxFVEzUMoox4B7i7B13K-08nPlxF_uFG-WHat9mhhI9Y2DxYABvg/s400/ashot.JPG" width="400" /></a></div>
<br />
<br />
At this stage, I'm assuming you already got AShot working and you're seeing the same image in your PC as what's on your <span style="background-color: white;">Android</span><span style="background-color: white;"> </span><span style="background-color: white;">device as shown in the photo above. You might have also tried screencapturing, and saw a tiny little problem -- (aside from the low FPS which is already answered many times on </span><a href="http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/" style="background-color: white;">that page mentioned</a><span style="background-color: white;">) instead of a video output, AShot outputs a series of PNGs. Here's where FFmpeg comes in.</span><br />
<br />
The FFmpeg binary download is just a zip file that can easily be extracted by 7zip or WinRAR -- though, I prefer 7zip.<br />
<br />
I'm going to assume you extracted it on the root of your computer in such a way that <span style="font-family: 'Courier New', Courier, monospace;"><b>ffmpeg.exe</b></span> will be in this path: <span style="font-family: 'Courier New', Courier, monospace;">C:\ffmpeg\bin</span><br />
<br />
And I'm also going to assume that you set AShot to output screenshots on this path: <span style="font-family: 'Courier New', Courier, monospace;">C:\ashot\</span><br />
<br />
Now, all you have to do is open a Command Prompt and type this:<br />
<span style="font-family: 'Courier New', Courier, monospace;"><b>cd c:\ashot\<br />c:\ffmpeg\bin\ffmpeg -f image2 -i screenshot_%05d.png screencast.avi</b></span><br />
<br />
Then using any movie player -- I use VLC media player by the way -- you can now view your <b>screencast.avi</b>.<br />
<br />
Lastly, if you want to adjust the FPS of your AVI, try adding <span style="font-family: 'Courier New', Courier, monospace;">-framerate X</span> when executing ffmpeg, where X is your desired FPS.<br />
<br />
Happy screencasting!<br />
<br />
~creek23</div>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-54445729940622302882012-04-23T15:46:00.000+08:002012-04-23T15:51:17.150+08:00Android Development: Override the Device's Back button<div dir="ltr" style="text-align: left;" trbidi="on">
When browsing a game's <em>Options Menu</em> and decided to not modify the current settings, you simply want to use your phone's Back button as, well, for going back to Main Menu.<br />
<br />But sadly, this is not the default behavior of that Back button. When you try to create your game, pressing that button will quit (umm... hide, rather) your app.<br />
<br />But don't lose hope. There's actually a way of changing that default behavior.<br />
<br />On your app's Activity class, add the following snippet.<br />
<br />
<span style="color: #444444; font-family: "Courier New", Courier, monospace;"><strong>@override</strong></span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"><strong>public void onBackPressed<span style="color: black;">() {</span></strong></span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"><strong> if <span style="color: black;">(</span>state <span style="color: black;">==</span> STATE_MAINMENU<span style="color: black;">) {</span><br /> super.onBackPressed();<br /> <span style="color: black;">}</span> else <span style="color: black;">{</span></strong></span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"><strong> <span style="color: #38761d;">//do something else</span></strong></span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"><strong> <span style="color: black;">}<br />}</span></strong></span><br />
<br />Of course, both <span style="font-family: "Courier New", Courier, monospace;"><strong>state</strong></span> and <span style="font-family: "Courier New", Courier, monospace;"><strong>STATE_MAINMENU</strong></span> has to be defined for the snippet to be usable. Also, whatever new behavior you want the Back button will have to do will be coded on the <span style="font-family: "Courier New", Courier, monospace;"><strong>else</strong></span> part of the snippet, as indicated by <span style="color: #38761d; font-family: "Courier New", Courier, monospace;"><strong>do something else</strong></span>.<br />
</div>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com0tag:blogger.com,1999:blog-2635530141396811255.post-38980926945427222642012-04-21T12:52:00.000+08:002012-04-21T13:00:08.777+08:00Android Development: Disable Screen Rotation<div dir="ltr" style="text-align: left;" trbidi="on">
By default, your app will run in Portrait mode. And you might opt to keep it that way, but would also rotate to Landscape mode if the phone it handled sideways.<br />
<br />
To keep it in Portrait mode, open your AndroidManifest.xml then add the highlighted text below.<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><b><activity</b></span><br />
<b><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;">android:label="@string/app_name"</span></b><br />
<b><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;">android:name="HelloWorld"</span></b><br />
<b><span style="font-family: 'Courier New', Courier, monospace;"> </span></b><b><span style="font-family: 'Courier New', Courier, monospace;"> </span></b><b><span style="color: blue; font-family: 'Courier New', Courier, monospace;">android:screenOrientation="portrait" ></span></b><br />
<b><span style="font-family: 'Courier New', Courier, monospace;"> ...</span></b><br />
<span style="font-family: 'Courier New', Courier, monospace;"><b>< /activity></b></span><br />
<br />
But if you are creating an Android game, chances are you wanted to default it in Landscape and stay that way. If so, just change <span style="font-family: 'Courier New', Courier, monospace;"><b>portrait</b></span> to <span style="color: blue; font-family: 'Courier New', Courier, monospace;"><b>landscape</b></span>.<br />
<br /></div>creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com1tag:blogger.com,1999:blog-2635530141396811255.post-10956409501772002242012-03-26T11:26:00.001+08:002012-08-26T09:48:09.832+08:00Jenkins: Setting up Email Notification using Google SMTP<div dir="ltr" style="text-align: left;" trbidi="on">
This is just about the same as the earlier post about <a href="http://creekcodes.blogspot.com/2012/03/jenkins-setting-up-email-notification.html">Setting up Jenkins' Email Notification using Yahoo SMTP</a>, only now it's for Google SMTP.<br />
<br />
<b>SMTP server</b> - pop.gmail.com<br />
<b>Default user e-mail suffix</b> - @gmail.com<br />
<b>Sender E-mail Address</b> - Foobar CI <your.email@gmail.com><br />
<br />
<b>Use SMTP Authentication</b> - yes<br />
<b>User Name</b> - your.email<br />
<b>Password</b> - p******d<br />
<br />
<b>Use SSL</b> - yes<br />
<b>SMTP Port</b> - 995<br />
<b>Reply-To Address</b> - noreply@gmail.com<br />
<b>Charset</b> - UTF-8<br />
<br />
To try if it's really working, type-in your email address and click <b>Test Configuration</b>, then you should be able to receive something like: "<i>This is test email #1 sent from Jenkins</i>"<br />
<br />
Alternatively, you can also use <span style="font-family: Courier New, Courier, monospace;"><b>smtp.gmail.com</b></span> as <b>SMTP server</b> then use the <b>SMTP port</b>, <span style="font-family: Courier New, Courier, monospace;"><b>465</b></span>. (Big thanks to Anthony Panozzo for sharing and Julio Carrettoni for confirming)</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com5tag:blogger.com,1999:blog-2635530141396811255.post-27949807109817979682012-03-26T11:19:00.000+08:002012-03-26T11:19:50.399+08:00Jenkins: Setting up Email Notification using Yahoo SMTPNOTE: This tutorial is for developers who are using Jenkins installed on their local server (with Internet Connectivity).<br />
<br />
So you want to setup Jenkin's Email Notification but you don't have email server?<br />
<br />
Assuming you have Yahoo Email account, that will work just fine. We just have to configure the Email Notification of Jenkins.<br />
<br />
Under <b>Manage Jenkins</b>, go down to <b>E-mail Notification</b> then set these following information:<br />
<b>SMTP server</b> - smtp.mail.yahoo.com<br />
<b>Default user e-mail suffix</b> - @yahoo.com<br />
<b>Sender E-mail Address</b> - Foobar CI <your.email@yahoo.com><br />
<br />
<b>Use SMTP Authentication</b> - yes<br />
<b>User Name</b> - your.email<br />
<b>Password</b> - p******d<br />
<br />
<b>Use SSL</b> - yes<br />
<b>SMTP Port</b> - 465<br />
<b>Reply-To Address</b> - noreply@yahoo.com<br />
<b>Charset</b> - UTF-8<br />
<br />
Optionally, you might want to try if it's really working. Type-in your email address and click <b>Test Configuration</b>.<br />
<br />
You should be able to receive something like: "<i>This is test email #20 sent from Jenkins</i>"<br />
<br />
Below is what your configuration should look like.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgikl6Khr4qO5LPA4G3FNKIj8TBjVnVQ6Ke9PMu0Ayjn3Xs97Qq9zpsPQfuqMNgZa_bSWpaBle81kFM93rWL2IOq-PYK9xHOSHAYVf2EYxUJ0FCN7vMxqhCrQ4K7nEI689c444H24tIY9n_/s1600/email-yahoo.com.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="309" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgikl6Khr4qO5LPA4G3FNKIj8TBjVnVQ6Ke9PMu0Ayjn3Xs97Qq9zpsPQfuqMNgZa_bSWpaBle81kFM93rWL2IOq-PYK9xHOSHAYVf2EYxUJ0FCN7vMxqhCrQ4K7nEI689c444H24tIY9n_/s400/email-yahoo.com.png" /></a></div><br />
Happy spamming! :Pcreek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com4tag:blogger.com,1999:blog-2635530141396811255.post-197209214408214402011-07-28T10:24:00.001+08:002012-08-26T09:52:22.937+08:00How to Real-time Scan with Clamwin<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://www.clamwin.com/"><img align="right" src="http://www.clamwin.com/templates/ClamWin/images/clamwin_logo.png" />Clamwin</a> is a free and open source Anti-virus for Windows -- thus the suffix "win". This means that the community provides the developers tons and tons of possible virus infected files thus making Clamwin more efficient in tracking new virus than any other proprietary anti-virus. But there's a catch.<br />
<br />
With its large database of virus definitions, Clamwin cannot do a real-time or active scan of your computer. It will not detect a virus-infected file from being copied to and from your computer. Although it does offer a scheduled scan, we know that a real-time scan if far safer.<br />
<br />
As quoted from Clamwin's homepage,<br />
<blockquote>
Please note that ClamWin Free Antivirus <b>does not include an on-access</b> real-time scanner. You need to manually scan a file in order to detect a virus or spyware.</blockquote>
<br />
So how do you make a real-time scan with Clamwin? First, download and install Clamwin if you haven't done already.<br />
<br />
Next, download and install complimentary free and open source software called <a href="http://clamsentinel.sourceforge.net/">Clam Sentinel</a>.<br />
<br />
Clam Sentinel detects file system changes like when some unauthorized program copy, or modify a file. Each file being accesed is thrown to Clamwin to do some virus-checking. This is a good thing if you want to keep your computer safe from unwanted virus. The down side however is that you computer will run slower each time you launch an application, copy files, and such. But this would not be a problem if you are already used to <a href="http://www.amazon.com/Norton-Antivirus-2011-User-Pc/dp/B0040GHL02?ie=UTF8&tag=widgetsamazon-20&link_code=btl&camp=213689&creative=392969" target="_blank">Norton</a><img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=widgetsamazon-20&l=btl&camp=213689&creative=392969&o=1&a=B0040GHL02" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" />'s behavior.</div>
creek23http://www.blogger.com/profile/02403692416983978722noreply@blogger.com8