Category Archives: Programming

programming

Create first android project using adt-bundle-linux-x86

If you make android applications then in this tutorial you’ll learn how to create an Android project. The easy way is to use adt bundle linux. To use the ADT bundle Linux you need to install JRE and JDK.

You can get from oracle website. The ADT Bundle includes everything you need to… Read More »

Simple way to create png image with an input text.

First, you need to have the PIL python module and import this.

Next will be this function. Basically will make and return one RGBA image data type.

The next step is to set the text, font, and the new image. I use Arggotsc.ttf. You can use any TrueType font.

Now we can… Read More »

Using pip for installing and managing Python packages.

An easy_install replacement is pip. The pip installs packages and managing Python packages. Let’s try to install packages.

Install the pip package. The recommended way to use the pip tool is within virtualenv since every virtualenv has pip installed in it automatically.

Let’s try again with PyOpenGL and PyOpenGL_accelerate packages.

Now we… Read More »

Embedding python in C under Fedora 16.

About the source code. I will try to embed python in C application. I will use a simple python script. This is a simple example using pygame python module.

Make a new folder and named Python_C using these commands in the shell:

Let’s see the C source code.

You can read… Read More »

Simple WebGL example.

WebGL is a software library and cross-platform API that extends the capability of the JavaScript programming language. That brings OpenGL to the web as a 3D drawing context within HTML Today we present a simple example of using WebGL. Here, there is an HTML content, javascript, and content of WebGL content. The three main sections… Read More »

XSS sanitization on django – variables and templates

XSS attacks allow a user to inject client-side scripts into the browsers of other users. Using Django templates protects you against the majority of XSS attacks. To do this you need to protect your templates this code:

If you need to disable auto-escaping for an individual variable, then use the safe filter:

Read… Read More »

How to create an executable in Linux using OpenGL.

I will try to show you briefly how to create Linux OpenGL applications. We check if the graphics card and settings are done correctly, using the command:

As freeglut devel package provides libraries for OpenGL. Let’s install that package.

Then we see if we have the necessary files.

Let’s try a simple… Read More »

Using pstats python module .

Today I will show how to use the pstats python module. It’s just some simple example, but can be useful for us.

Let’s add some source code to test this python module.

The documentation tells us: A profiler is a program that describes the run time performance of a program, providing a variety… Read More »