Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Saturday, March 1, 2014

Koding.com the social collaborative plaform

Last time I tried openshift from RedHat, it's good platform. But there is some thing that I don't get is about root access to virtual machine, and live code editing :-), with koding platform I get 20GB for a free, root access to virtual machine, live code editing, social collaborative and the best part is I don't really need local setup for development because I can code on the fly for testing app :-).

The thing is we need to register to koding.com to get 20GB free storage and awesome platform.

With this I try to create web application, but still in progress hope I can finish this in 2014 :-) and make something useful for other people.

Some awesome feature:

1. Social Development, also you can create interactive class for tutoring



Saturday, February 8, 2014

RedHat OPENSHIFT Cloud


Today I will write my experience using Openshift cloud framework from RedHat, It's not just cloud storage but it's complete application framework cloud base. #In my Opinion Openshift based on Redhat Openstack Cloud.

What really I get from Openshift ?
OpenShift is Red Hat's Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment. With OpenShift you have choice of offerings, including online, on premise, and open source project options.
One thing why I like Openshift ? because is about easy development, I don't care about backend from Openshift but I just need care and focused on how my code will work and how it should be deployed. Just in case in Openshift you already have many server language based, you just need to select which one is appropriate to you :D + git integration. It's like one shot. #damn.

First thing that you need to do is sign up, is it easy ? of course, you just need to fill detailed form in sign up form. No need to be worried :D, after finish sign up you will get 3 different application + 1 GB free space. So you can create and develop your application until you really want to release your application.

After sign up success, you can start create new application depend on your based server side language, it's about 5 minute to setup :D. What do you want ? just do simply select and follow the instruction.






In this case I'd like to select and setup DJango framework #coz I like Python :D, you can select which database you will use I'd like to select Postgresql and it will automatically create your git repository in the Openshift, so don't worry you just need to fill ssh key for clone project purpose.

After finish setup application, next step I need to do is to clone my application from Openshift in to my local computer. Then you will get this layout tree after you do git clone.


But it will give different file list, depend on what server side framework do you select. I just need to open setup.py then change configuration field.



The final step I need is just need to push again setup file configuration via git in to Openshift, Openshift will take a rest of installing framework do you need. :D.


Then start create your code and make great and use full application for human being :D

Wednesday, August 15, 2012

Setup Eclipse C++ and OpenGL support on Ubuntu Linux

Currently I am using Ubuntu 12.04 and Eclipse Version 3.7.2. I am trying to write little note how to setup Ubuntu Linux and Eclipse C++ for developing openGL purpose.

We usually use Glut, FreeGlut and Mesa for developing openGL in Linux  system. We need to get update from Ubuntu repository before installing openGL development resource and then second step install the openGL library.
sudo apt-get update
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
After resource got installed, we need to setup Eclipse IDE, Eclipse can be done by install from Ubuntu repository with CDT Support.
sudo apt-get install eclipse eclipse-cdt eclipse-cdt-jni
After all tools installed, now it's time to start setup Eclipse IDE and then after Eclipse started, we need to create new C++ project using menu File->New->C++ Project or using key shortcut Shift+Alt+N.


Select Empty Project and Cross GCC then give project name to whatever, in this case I use "opengl_glut" as project name. Then select finish button to completed creating project.

Before start create code, we need to add some linker option, so when linker process the library can be found by linker program. To add glut library on the linker process can be complete by using rigth click on the opengl_glut project then select properties.


Choose C/C++ Build Section, select Setting then select Libraries on C++ Linker section. Add "glut" and "GLU" library on the project then select Ok Button to apply changes.

Now we can start openGL code, create main.cpp by right click on the opengl_glut project and select New->File then give File Name as entry point "main.cpp". Add this code to main.cpp to check if our Eclipse setting is correct:


#include <GL/glut.h>
#define window_width  640
#define window_height 480
// Main loop
void main_loop_function() {
    // Z angle
    static float angle;
    // Clear color (screen)
    // And depth (used internally to block obstructed objects)
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    // Load identity matrix
    glLoadIdentity();
    // Multiply in translation matrix
    glTranslatef(0, 0, -10);
    // Multiply in rotation matrix
    glRotatef(angle, 0, 0, 1);
    // Render colored quad
    glBegin(GL_QUADS);
    glColor3ub(255, 000, 000);
    glVertex2f(-1, 1);
    glColor3ub(000, 255, 000);
    glVertex2f(1, 1);
    glColor3ub(000, 000, 255);
    glVertex2f(1, -1);
    glColor3ub(255, 255, 000);
    glVertex2f(-1, -1);
    glEnd();
    // Swap buffers (color buffers, makes previous render visible)
    glutSwapBuffers();
    // Increase angle to rotate
    angle += 0.25;
}
// Initialze OpenGL perspective matrix
void GL_Setup(int width, int height) {
    glViewport(0, 0, width, height);
    glMatrixMode(GL_PROJECTION);
    glEnable(GL_DEPTH_TEST);
    gluPerspective(45, (float) width / height, .1, 100);
    glMatrixMode(GL_MODELVIEW);
}
// Initialize GLUT and start main loop
int main(int argc, char** argv) {
    glutInit(&argc, argv);
    glutInitWindowSize(window_width, window_height);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    glutCreateWindow("GLUT Example!!!");
    glutIdleFunc(main_loop_function);
    GL_Setup(window_width, window_height);
    glutMainLoop();
}


Build the code by right click on the opengl_glut then select Build Project menu, this should compile without any error. Then select menu Run->Run or using shortcut Ctrl+F11. If no error, the sample should become to be like this...then we completed all setting setup step for openGL development environment using Eclipse in Ubuntu Linux system.


Friday, August 3, 2012

IRRLICHT






IRRLICHT adalah platform 3D engine yang kenceng dan open source.dibawah lisensi libpng/zlib.Dibuat dengan menggunakan bahasa pemrograman C++ tetapi juga dapat menggunakan beberapa bahasa pemrograman lain yang dikembangkan oleh komunitas. Pengembangan IRRLICHT didasarkan pada dua jenis bagian rendering API yaitu DirectX ,OpenGL dan dua bagian software render. IRRLICHT didesain dengan filosofi ringan, sederhana namun tetap merupakan sebuah grafik engine yang powerfull, serta memberikan kemudahan untuk dipelajari dibandingkan dengan engine yang ada saat ini akan tetapi tidak mengorbankan kualitas dari grafik engine ini.

IRRLICHT adalah grafik engine dan bukan game engine (jadi jangan menyalah artikan sebagai game engine), dedesain dengan beberapa fasilitas yaitu simple collision detection dan user input berupa keyboard/mouse/joystick, tidak disebut sebagai game engine karena tidak dilengkapi dengan fasilitas AI ,path finding, sound (see irrKlang), networking dan fasilitas yang lain seperti yang terdapat di dalam paket game engine pada umumnya. Meskipun tidak mendukung fasilitas untuk kelengkapan segabai sebuah game engine tetapi IRRLICHT mempunyai fondasi yang kuat untuk dikembangkan sebagai sebuah game engine karena mempunya grafik render yang powerfull dan ini adalah bagian yang paling penting untuk membuat sebuah game yang berkualitas.

Berdasarkan pada lisensi yang dimiliki oleh IRRLICHT, kita bisa menggunakan source code dan memodifikasinya
You never have to release to the public any programs you make, any changes you make to the engine, or pay royalties. The engine is free to use for commercial use without debilitating restriction. Of course the community would be happy to receive any donation of code you would be willing to make
untuk lebih jelas mengenai lisensi bisa dilihat di sini (see license), yang jelas free untuk penggunaan dan dapat digunakan untuk tujuan komersial.

Untuk mendapatkan informasi yang lebih detail tentang grafik engine ini bisa dilihat disini (please visit the features page) atau mau bersabar untuk menunggu tulisan di blog ini :D

Saturday, March 3, 2012

Compare image scan method

Original Image Link

In this section I will try to compare performance from some scanning method using OpenCV, the compare is about performance image scanning for manipulate per color data.

What will be compare on this section:
  • Classic C style operator scanning method
  • Iterator safe method scanning method
  • On-the-fly address calculation with reference returning scanning method
  • Use LUT() core function from OpenCV

Setup OpenCV With QT Creator

OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
OpenCV is released under a BSD license, it is free for both academic and commercial use. It has C++, C, Python and soon Java interfaces running on Windows, Linux, Android and Mac. The library has >2500 optimized algorithms (see figure below). It is used around the world, has >2.5M downloads and >40K people in the user group. Uses range from interactive art, to mine inspection, stitching maps on the web on through advanced robotics.

How to install opencv? it's depend on our operating system, installation procedure can be found here http://opencv.willowgarage.com/wiki/InstallGuide.

I assume that OpenCV already installed on the computer, it's easy to integrate OpenCV lib and header to QTCreator
  • Create Empty QTCreator Project
 Open QTCreator and creaate empty QT Project File -> New File or Project


then give the project name, in this case I use OpenCV as project name.
  • Add Library OpenCV to .pro file project
 Open .pro file and add OpenCV library, in this case I use Linux as my operating system so in the .pro file will be like this