Author: yodi

  • Pyglet text label segmentation fault

    I got this errors when trying running Pyglet on Fedora 18 (Updated) and Fedora 19. I use Macbook Pro with VGA Nvidia 320M. When i running pyglet.text.label(“Hello”), it’s gave me segmentation fault. After debugging, I realize the problem because I use opensource VGA Nvidia driver Nouveau which doesn’t works well with OpenGL. The solution, i’m […]

  • Install Love2D and SublimeText Love editor in Windows 8

    Here is a quick guide to setup Love2D in Windows 8 and SublimeText as IDE. First, we can go to the official website of Love2D at https://love2d.org/ and choose installer 32/64bit installer (depend on your OS). Executable Love in CommandLine Add LOVE path into Environment variables by : “Window Key” + W and type “edit […]

  • Love2D with SublimeText in Mac OS X

    I’m not often using SublimeText, but seems it’s very good for Love2D development. Here is my configuration, first we need to install SublimeText2 / 3 in our Mac OS X. Then, we need to install SublimePackageManager (http://wbond.net/sublime_packages/package_control/installation). Then here is the cure, add this github repo on Package Settings -> Install 1https://github.com/minism/SublimeLove Then we’re ready […]

  • Love2d font segmentation fault (core dumped)

    Updated After debugging and tested on several laptop and OS (OSX, Fedora 18 and Windows 8), the culprit is because Nouveau driver (OpenSouce VGA driver for Nvidia) can’t works with OpenGL perfectly. After installing Nvidia properietary drivers, everything must be works. This is because VGA drivers. Here is my question in Love2D forum I change […]

  • Solve Error: LUBE.lua:30: A Class Commons implementation is required

    To solve this Lube errors, we need to create a class : class.lua 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100–[[ Copyright (c) 2010-2012 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, […]

  • Game Development With Love2D Introduction

    I’m trying to compare pyglet (Python based game engine) with Love2D (Lua based) for Game Development. I use Fedora 19 at this examples. 123456sudo yum install lua love sudo yum install SDL SDL-devel gsl gsl-devel libtheora libtheora-devel libtiff libtiff-devel libpng libpng-devel imlib2 imlib2-devel bzip2-devel ImageMagick ImageMagick-devel libxml2 libxml2-devel libjpeg libjpeg-devel libdv libdv-devel libavc1394 libavc1394-devel libmpeg3-devel […]

  • Re-generate new key same alias name using keytool

    1Key pair not generated, alias  already exists This errors will showed if we re-generate new key using same key alias with keytool. To solve this problems, we need to remove the previous key by: 1keytool -delete -alias <your-alias-name> -keystore <your-keystore> Then, we can re-generate new key by: 1keytool -genkey -v -keystore <your-keystore> -alias <your-alias> -keyalg […]

  • Example access Camera with getUserMedia WebRTC

    Here is quick example to access camera from browser using getUserMedia(). Make sure you have latest Firefox / Chrome version and have getUserMedia enabled. 1234567891011121314151617181920212223242526272829303132333435<html>     <head>         <title>Getting started with RTC</title>     </head>     <body>         <video id="video" width="320" height="400"></video>         <script […]

  • Example check WebRTC support enabled in Chrome Browser Linux

    WebRTC is hot trends right know. We can test it on Fedora 18 with the latest google chrome. At this example, I use Chrome 28. First, we need to enable getUserMedia() in Google Chrome by enter URL “chrome://flags” and find for “getUserMedia”. Then we can enable and relaunch the browser. Now, we can test if […]

  • Java int or integer

    In Java, should I use “int” or “Integer”? This is common question for new Java developer like me. A lot of discussion can be found through google with searching on this question. Let me be clear, the difference between int and Integer can be seen from their parent. As we know, int is primitive data-type […]

  • Seeing the workflow of Class Inheritance in Java

    When it comes to Inheritances, that means we try using code reuse. In Java, Python, C++, Inheritance is a common thing since we want to reduce duplicate code and manage them easily. In Java, we can create a subclass by inheriting from parent using “extends”. Here is some trivial example: InheritanceImplementation.java 12345678910111213141516171819import java.lang.String; class Bank […]

  • Example of clone array in Java

    To making copy of array in Java, we can use method “clone” in the array objects. First step, we need to create one-dimensional array : 12// Create first array variable float[] floatArray = {5.0f, 3.0f, 1.5f}; This will create an array objects with 3 elements. We can clone this by: 12// Create clone variable float[] […]

  • Grab Twitter Search JSON using simple JAVA bufferStream

    Open JSON files from twitter search using JAVA is easy. We can use simple buffer stream reader. Here is the example: 123456789101112131415161718import java.io.BufferedReader;  // 1 import java.io.InputStreamReader; import java.net.URL; public class OpenWebsite {     public static void main (String[] args) throws Exception { // 2     URL twitter = new URL("http://search.twitter.com/search.json?q=" +   […]

  • Example using Map in Java

    The Map Interface in Java just like dictionaries in Python. It have function to create key – value data structure which each key must be unique. In Java term, this data structure create association between one object to another object. This is how to use Map() interface in Java: Filename: MapExample.java 123456789101112131415161718// I need to […]

  • Interesting Keyword and Topic about Java usage in Bank and domain knowledge

    I’m trying to make a jump in learning Java and Banking. Because I’m interesting with the big problem there. So, here are the results that what I’m looking for the problem that faced in Bank and Java implementation. Because there are some domain knowledge in bank that also I need to know, so I put […]

  • Understanding Getter and Setter in Java

    Getter and Setter is new things for me since I have experience in Python which all attribute in a Class can be invoked anytime. It’s different in Java which all data should be thread-safe and manipulation between data should be isolated and not interfere another process/task. Btw, did i mean “encapsulation” here? Well, there are […]

  • Solve how to compile and run Java in SublimeText 2

    I found a lot of people discussing about how to compile and run the results of Java (single file) in SublimeText 2. Well, after trying another alternative and failing, finally I found how to make it works. It’s easy actualy, all you need are: 1. Edit SublimeText2 Java Build 1~/.config/sublime-text-2/Packages/Java/JavaC.sublime-build