Pages

Wednesday, December 29, 2010

Nokia SDK and MIDlet

Yesterday I played with the SDK from Nokia. Do you think that it's easy to create a MIDlet?
Finally, I managed to make an application "Hello World'.
Maybe I'll write a little tutorial in the near future when I'll know more about MIDlets and java.
Here is the resulting feedback.

Sunday, December 12, 2010

Blender 3D and F14 killed by "Save as"

Although he reached the 2.55 beta, Fedora 14 is still struggling with version 2.49b.
Not bad if it goes, but here's one little problem
It's all well and good until the "Save as".
Then it breaks and you have just this reason:
Process /usr/bin/blender.bin was killed by signal 6 (SIGABRT)

Friday, December 10, 2010

Christmas - new decor script for your desktop .

Last year I made a python script to beautify your desktop on Christmas Day.
I wrote it here about this script.
I lost the script, but now  I wrote this script again.
The script is very simple and you can get it here.
Here's what makes this script:

Thursday, December 9, 2010

gDEBugger - FREE or NOT ?

A very popular OpenGL debugger is now available for FREE?
On official site we saw:
Order
gDEBugger is not available for purchasing for the time being.
We plan to release a new and **FREE** gDEBugger version for Windows, Linux and Mac OS X. This version will be available for download by the end of 2010.
Please make sure to check our website for this version in the near future.
Until the free version will be released, please find below a temporary license file that will enable you to use the current gDEBugger version for free immediately.

Now is the end of 2010, but is not free.
What is gDEBugger
Named gDEBugger is an advanced OpenGL Debugger, Profiler and Graphic Memory Analyzer.
This 3D software saves you debugging time and helps you boost application performance.
We can download it from :here.
I searched my computer the lib libstdc++, see below :
# yum search libstdc++
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
============================== Matched: libstdc++ ==============================
compat-libstdc++-296.i686 : Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33.i686 : Compatibility standard C++ libraries
libstdc++.i686 : GNU Standard C++ Library
libstdc++-devel.i686 : Header files and libraries for C++ development
libstdc++-docs.i686 : Documentation for the GNU standard C++ library
libstdc++-static.i686 : Static libraries for the GNU standard C++ library
The archive named gDEBugger57-i386-cpp3.tar.gz has 13Mb.
Then I use commands :

$gzip -dc gDEBugger57-i386-cpp3.tar.gz | tar xf -
$ cd gDEBugger57-i386-cpp3
$ su 
# yum install compat-libstdc++-33.i686 
The gDEBugger run well under fedora 14 , but is free only 7 days. See below:

Wednesday, December 8, 2010

Fakeroot and Yum

It seems that the yum and fakeroot do not get along too well.
I did not understand why ... Here is output:
yum search aaa
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Cannot open logfile /var/log/yum.log
Could not create lock at /var/run/yum.pid: [Errno 13] Permission denied: '/var/run/yum.pid'
Another app is currently holding the yum lock; waiting for it to exit...
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 258, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    show_lock_owner(e.pid, logger)
  File "/usr/share/yum-cli/utils.py", line 107, in show_lock_owner
    ps = get_process_info(pid)
  File "/usr/share/yum-cli/utils.py", line 62, in get_process_info
    if (not os.path.exists("/proc/%d/status" % pid) or
TypeError: %d format: a number is required, not str
 

And I have nothing on, like rpm, yum or gpk-prefs...

Sunday, December 5, 2010

Fedora 14 and NVIDIA FX5200

Today I set video driver on Fedora 14.
I have an FX5200 and I use akmod to make this working.
First when I install akmod with :
yum install kmod-nvidia-173xx-2.6.35.6-48.fc14.i686.PAE.i686
I have some errors:
$ glxinfo | grep direct
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
But i solve and Savage XR working well :

Thursday, December 2, 2010

Fedora 14 versus 3D software .

In the next few days ago I decided to try software 3d with Fedora 14.
I am disappointed again. I was expecting some improvements in this area by the developers.
Especially because it is a difficult topic.
But let's see why I have this impression...
I have searched for packages that are required with this command:
# yum search "3d engine"
...
============================== Matched: 3d engine ==============================
irrlicht.i686 : A high performance realtime 3D engine
crystalspace.i686 : Crystal Space a free 3D engine
ember.i686 : 3D client for WorldForge
ogre.i686 : Object-Oriented Graphics Rendering Engine
Code:: Blocks does not work with Ogre 3D or Irrlicht 3D packages. Although I spent quite a long time. However, on Windows XP this combination worked well.
Ember game working hard. Maybe because my video card - FX5200, not really likes the new drivers.
Code:: Blocks is very stubborn. Ogre and Irrlicht Wizards of the Linux version of Code:: Blocks does not work at all.

Friday, November 26, 2010

Savage Server and Selinux under Fedora 14

If you want to install fedora Savage Game Server 14, you will have problems with SELinux.
Use this commands to fix it.
$ chcon -t execmem_exec_t '/home/mythcat/SavageSer/silverback.bin'

Thursday, November 25, 2010

Fun with F-Spot 0.8.0 and sqlite3

Today I focused on the F-Spot version 0.8.0.
I knew that contains a database that keeps information about the pictures.
I found the database and tried a few commands:
$ cd .config/
$ cd f-spot/
$ ls
addin-db-001  photos.db
Once I found the database, I started SQLite3. See the example below:
$ sqlite3  photos.db 
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
exports         meta            photo_versions  rolls         
jobs            photo_tags      photos          tags          
sqlite> .schema photos
CREATE TABLE photos (
 id   INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 
 time   INTEGER NOT NULL, 
 base_uri  STRING NOT NULL, 
 filename  STRING NOT NULL, 
 description  TEXT NOT NULL, 
 roll_id   INTEGER NOT NULL, 
 default_version_id INTEGER NOT NULL, 
 rating   INTEGER NULL 
);
CREATE INDEX idx_photos_roll_id ON photos(roll_id);
sqlite> select * from photos;
1|1279913277|file:///home/mythcat/Photos/2010/07/23|IMG_2970.JPG||1|1|0
It is easy to use and implemented various python scripts.

Sunday, November 21, 2010

Linux and denial of service - DoS

A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a computer resource unavailable to its intended users.
We can see more on the wiki web page.

On Linux we can see if an attack is attempted with this:

netstat -ant | grep SYN_RECV | wc -l
This is an indication of a denial of service (DoS) attack against your system's X port.

It is likely one attack against a public service such as a web server or mail server.

Thursday, November 11, 2010

Notifications in Fedora 14

We use the following command
$ notify-send  "This is some text"
or
$zenity --info --text "This is some text"
This will display a text balloon "This is some text".
The problem appears when we want to display the output of a command.
For this, I used a python script. Here's the source code:
#!/usr/bin/env python
import os
import sys
import pynotify
pynotify.init("Output comand")
arg=sys.argv[1]
print arg
s = os.popen(arg).read()
n = pynotify.Notification("Output",s)
n.show()
If you wish to use a compound command, then you will need to use quotes.
For example, we use the command "ls-a 'as follows:
$python testpy.py "ls -a"
This is just a small example, you can create more complex applications.

Saturday, November 6, 2010

How Install Firefox 4 on Fedora 14.

Firefox is one of the latest versions of the Mozilla .

It is currently available in two repositories - Remi and Spot.

See the next steps if you want install Firefox 4.

First , go on super user shell.

# wget http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo -O /etc/yum.repos.d/fedora-firefox4.repo

Now, you can install Firefox 4

# yum --enablerepo fedora-firefox4 install firefox4

That is all.

Fedora 14 and Blender 3D

It is a great disappointment to me that Fedora 14 comes with Blender 3D version 2.49b-10.
I expected a pleasant surprise to see version 2.5.
Here is the result:

# yum search blender
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
updates/pkgtags                                                   |  10 kB     00:00     
============= Matched: blender =====================
blenderplayer.i686 : Standalone blender player
LuxRender-blender.i686 : Blender export plugin to LuxRender
blender.i686 : 3D modeling, animation, rendering and post-production
spe.noarch : Python IDE with UML,PyChecker,Debugger,GUI design,Blender & more
libpano13-tools.i686 : Tools that use the libpano13 library
yofrankie-bge.noarch : 3D Game with characters from Big Buck Bunny movie
Of course, you can use version 2.5 from the official site.

Sunday, October 31, 2010

Ogre 3D on Fedora - first step.

My son has 2 years old.
I had to make a little game to keep him busy.
Little known to push so I used the arrow keys to make it more interesting.
First Ogre 3D tutorial

Saturday, October 2, 2010

"Sintel premiere" by Blender 3D Team

The last project named "Sintel" is better than expected .
I watched all projects and this  is one of the best.
Sintel official page

Thursday, September 30, 2010

A new update for "SEO Starter Guide".

Google say us:
"About two years ago we published our first SEO Starter Guide, which we have since translated into 40 languages..." The new version is more explicit and useful to have it.
Unfortunately, it is not translated in all languages.
I wonder why Google does not use the open source community to translate them.
Now we can download the new update from here.

Wednesday, September 22, 2010

Python, pyuno and OpenOffice

Some time ago, I discovered Python. Then I saw that he can work with the OpenOffice.
Today I will briefly introduce how to do this. I do this in Windows XP, and Windows users could benefit.
In the folder : C:\Program Files\OpenOffice.org 3\program there was a file called python.exe.
Go there and type the following script to start OpenOffice:

import os
import subprocess
import sys
import time
import uno

NoConnectionException = uno.getClass("com.sun.star.connection.NoConnectException")
ooffice = 'soffice "-accept=socket,host=localhost,port=8100;urp;"'
def start_OOo():
    '''Starts OpenOffice.org with a listening socket.'''
    # Start OpenOffice.org and report any errors that
    # occur.
    try:
        retcode = subprocess.call(ooffice, shell=True)
        if retcode < 0:
            print >>sys.stderr, \
                "OOo was terminated by signal", \
                -retcode
        elif retcode > 0:
            print >>sys.stderr, \
                "OOo returned", \
                retcode
    except OSError, e:
        print >>sys.stderr, "Execution failed:", e
    # Terminate this process when OOo has closed.
    raise SystemExit()
started_OOo = False
if not started_OOo:
    print "Starting OOo"
    started_OOo = True
    start_OOo()
time.sleep(3)
print "OOo started"
This will start OpenOffice 3.
We can use now python scripts to create any type of file used by OpenOffice.
Let show one image create with few lines :

Thursday, September 2, 2010

My linux counter machine

The Linux Counter website is a good site to share your machine's info.

At Sep 02 2010 16:22:56 GMT, there are
125104
users registered
133701
machines registered
My guess at the number of Linux users:
Twenty-nine million 
 
My number machine is :

We can use a script to registers or updates a machine's info in the counter.
The script allows here.
We can use add, update and send mail with info about your Linux machine.
We can add a crontab job with -c arg.
The user ID must only be able to send mail and write to its own home directory.

Sunday, August 22, 2010

Create html file with bash script using awk

We will present a more special method of using the Linux command line.
This method comes in helping those who need to text or HTML content.
In fact, a combination of Linux commands to get an output.
Suppose we have a list of jpeg files in folder image.
They should exist into HTML to be displayed.
As we know an image has the form:
<img src="image/name_of_jpeg.jpg" alt="" /> 
The list of file is :
11.jpg,12.jpg,13.jpg,14.jpg,15.jpg
My method uses two commands: ll and awk.
First, I will display files:
$ ll | awk '/jpg/ {print $9}'
11.jpg
12.jpg
13.jpg
14.jpg
15.jpg 
I created one variable f1.
In these variables put the beginning of each line:
f1=‘<img src="image‘; 
We add two sed commands.
First, remove the space before the file name.
The second will add the rest to complete the link.
The xargs command is used with echo and print the first part of the link.
Finally we use <<< aaaa.html to output the HTML file.
The full script is here .

Friday, August 13, 2010

OpenGL - OpenGL Utility Toolkit (GLUT) on Fedora 13

The freeglut allows the user to create and manage windows containing OpenGL contexts.
This library allows the user to use mouse, keyboard and joystick functions.

#yum install freeglut-devel
...
Dependencies Resolved
================================================================================
 Package                   Arch        Version               Repository    Size
================================================================================
Installing:
 freeglut-devel            i686        2.6.0-5.fc13          updates      112 k
Installing for dependencies:
 libX11-devel              i686        1.3.1-3.fc13          fedora       1.0 M
 libXau-devel              i686        1.0.5-1.fc12          fedora        13 k
 libXdamage-devel          i686        1.1.2-2.fc13          fedora       8.8 k
 libXext-devel             i686        1.1.2-2.fc13          updates       77 k
 libXfixes-devel           i686        4.0.4-2.fc13          fedora        11 k
 libXxf86vm-devel          i686        1.1.0-1.fc13          fedora        17 k
 libdrm-devel              i686        2.4.21-2.fc13         updates       64 k
 libxcb-devel              i686        1.5-1.fc13            fedora       139 k
 mesa-libGL-devel          i686        7.8.1-8.fc13          updates      486 k
 mesa-libGLU-devel         i686        7.8.1-8.fc13          updates      111 k
 xorg-x11-proto-devel      noarch      7.4-36.fc13           fedora       250 k
Transaction Summary
================================================================================
Install      12 Package(s)
Some tutorials about glut on C programming language: Glut and C tutorial

Sunday, August 1, 2010

Frogatto new game crossplatform...

A new game is very nice and interesting. Named "Frogatto", this game should replace some older games from gnome.
Frogatto is freely available for Mac, Windows, and Linux.
Download it.

Monday, July 19, 2010

Sunflow rendering on Fedora 13

How to install Sunflow ?
It's pretty simple. Download the zip archive from here.
Unzip and edit the sh script sunflow.sh
from the sunflow folder.
By default the script is :

#/bin/sh

mem=1G

java -Xmx$mem -server -jar sunflow.jar $*
If we run this script will have this error :

$ sh sunflow.sh 
Invalid maximum heap size: -Xmx1G
Could not create the Java virtual machine.
The solution is:

$ whereis java
java: /usr/bin/java ...
Now change the script :

#!/bin/bash
/usr/bin/java -Xmx1024M -server -jar sunflow.jar $*
And run it ...

$ sh sunflow.sh 
The result is :

Makehuman 3D on Fedora

Makehuman software installation is simple. You must be superuser, and then use yum:
$su
#yum search mhgui
#yum install mhgui.i686
#yum search makehuman
#yum install makehuman.i686  
It will automatically install animorph-0.3-6.fc12.i686.
A negative aspect of Fedora 13 is the lack of 3D software: Moonlight, Sunflow, Blender 2.5 or Loki Render
It looks like 3D graphics programs are not a priority.

Sunday, July 18, 2010

Fedora 13, FX 5200 and Yo Frankie!

Today I tried to run game "Yo Frankie."
The computer used in this case is older.
It has an FX 5200 video card with 1Gb RAM and processor ASUS motherboard.
I was not expecting a success but he did seem somewhat.
Here are some pictures:



In the "Options" I set no shaders
I must say that without activating the button "Maximize" will not be able to get to the "Back" from "Option".
The operating system is undoubtedly Fedora 13 with default graphics drivers.
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Mesa Project
OpenGL version string: 2.1 Mesa 7.8.1

Sunday, June 27, 2010

New tutorial about Eclipse.

I just finished a new tutorial.
The title of this tutorial is:
"Installing and configuring the Eclipse IDE - Eclipse Plugin for Google"
This tutorial can be found in the tutorials section on this site.

Saturday, June 26, 2010

About my name ...

My name often poses difficulties for Americans.
CĂTĂLIN = Romanian masculine form of KATHERINE.
Pronunciation of CĂTĂLIN:

The surname is of Dacian origin.
My nickname is a combination.
And mean sum of myth from mythical and cat from Catalin or cat.
About KATHERINE
Pronounced: KATH-ə-rin, KATH-rin
From the Greek name Αικατερινη (Aikaterine). The etymology is debated: it could derive from the earlier Greek name ‘Εκατερινη (Hekaterine), which came from ‘εκατερος (hekateros) "each of the two"; it could derive from the name of the goddess HECATE; it could be related to Greek αικια (aikia) "torture"; or it could be from a Coptic name meaning "my consecration of your name". In the early Christian era it became associated with Greek καθαρος (katharos) "pure", and the Latin spelling was changed from Katerina to Katharina to reflect this.

The name was borne a semi-legendary 4th-century saint and martyr from Alexandria who was tortured on a spiked wheel. The saint was initially venerated in Syria, and the name was introduced to Western Europe by returning crusaders. It has been common in England since the 12th century in many different spellings, with Katherine and Catherine becoming standard in the later Middle Ages.

Famous bearers of the name include Catherine of Siena, a 14th-century mystic, and Catherine de' Medici, a 16th-century French queen. It was also borne by three of Henry VIII's wives, including Katherine of Aragon, and by two empresses of Russia, including Catherine the Great.

Friday, June 25, 2010

Fedora 14 - next wallpaper concept

The new concept of wallpaper on which I worked.
I used Blender 3D. Rendering time was short, less than 2 min.
This is because I used some tricks.
It seems more appropriate for a wallpaper.
See bellow:

Find more about my work are here:
Activities_within_Fedora

Thursday, June 24, 2010

Fedora 14 - my new wallpaper concept

Today I worked on a new proposal for Fedora 14 wallpaper.
Looks soft and is more ergonomic ...
This is how it looks on my desktop:

Find more about my work are here:
Activities_within_Fedora

Tuesday, April 13, 2010

Simple script to get the exchange rate.

Some time ago I made a small script to find out the exchange rate.
I have not used it much and today I came across it.
Who needs something, here's how it looks:
from xml.dom import minidom as dom
import urllib
def fetchPage(url):
a = urllib.urlopen(url)
return ''.join(a.readlines())

def extract(page):
a = dom.parseString(page)
item2 = a.getElementsByTagName('SendingDate')[0].firstChild.wholeText
print "DATA ",item2
item = a.getElementsByTagName('Cube')
for i in item:
if i.hasChildNodes() == True:
e = i.getElementsByTagName('Rate')[10].firstChild.wholeText
d = i.getElementsByTagName('Rate')[26].firstChild.wholeText
print "EURO  ",e
print "DOLAR ",d

if __name__=='__main__':
page = fetchPage("http://www.bnro.ro/nbrfxrates.xml")
extract(page)

That's all.

Parsing files and rename ...

Sometimes you have to rename files.
This can be tiring when we do it manually.
Command "sed" may be helpful in this case.
I'll take a simple example. I will create a working directory called "work."
We have to create files with the command:
for (( i=1; i<10; i++ )); do echo data$i > data[$i]x[$i].txt;done

The result should be :
$ ls
data[1]x[1].txt  data[3]x[3].txt  data[5]x[5].txt  data[7]x[7].txt  data[9]x[9].txt
data[2]x[2].txt  data[4]x[4].txt  data[6]x[6].txt  data[8]x[8].txt

Try these commands to parse and rename files:
$ for i in  *[]x[]*; do mv -v "$i" "$(echo $i | sed 's/[]x[]//')"; done
`data[1]x[1].txt' -> `data1]x[1].txt'
`data[2]x[2].txt' -> `data2]x[2].txt'
`data[3]x[3].txt' -> `data3]x[3].txt'
`data[4]x[4].txt' -> `data4]x[4].txt'
`data[5]x[5].txt' -> `data5]x[5].txt'
`data[6]x[6].txt' -> `data6]x[6].txt'
`data[7]x[7].txt' -> `data7]x[7].txt'
`data[8]x[8].txt' -> `data8]x[8].txt'
`data[9]x[9].txt' -> `data9]x[9].txt'
[work@test work]$ for i in  *[]x[]*; do mv -v "$i" "$(echo $i | sed 's/[]x[]//')"; done
`data1]x[1].txt' -> `data1x[1].txt'
`data2]x[2].txt' -> `data2x[2].txt'
`data3]x[3].txt' -> `data3x[3].txt'
`data4]x[4].txt' -> `data4x[4].txt'
`data5]x[5].txt' -> `data5x[5].txt'
`data6]x[6].txt' -> `data6x[6].txt'
`data7]x[7].txt' -> `data7x[7].txt'
`data8]x[8].txt' -> `data8x[8].txt'
`data9]x[9].txt' -> `data9x[9].txt'
[work@test work]$ for i in  *[]x[]*; do mv -v "$i" "$(echo $i | sed 's/[]x[]//')"; done
`data1x[1].txt' -> `data1[1].txt'
`data2x[2].txt' -> `data2[2].txt'
`data3x[3].txt' -> `data3[3].txt'
`data4x[4].txt' -> `data4[4].txt'
`data5x[5].txt' -> `data5[5].txt'
`data6x[6].txt' -> `data6[6].txt'
`data7x[7].txt' -> `data7[7].txt'
`data8x[8].txt' -> `data8[8].txt'
`data9x[9].txt' -> `data9[9].txt'
[work@test work]$ for i in  *[]x[]*; do mv -v "$i" "$(echo $i | sed 's/[]x[]//')"; done
`data1[1].txt' -> `data11].txt'
`data2[2].txt' -> `data22].txt'
`data3[3].txt' -> `data33].txt'
`data4[4].txt' -> `data44].txt'
`data5[5].txt' -> `data55].txt'
`data6[6].txt' -> `data66].txt'
`data7[7].txt' -> `data77].txt'
`data8[8].txt' -> `data88].txt'
`data9[9].txt' -> `data99].txt'
[work@test work]$ for i in  *[]x[]*; do mv -v "$i" "$(echo $i | sed 's/[]x[]//')"; done
`data11].txt' -> `data11.txt'
`data22].txt' -> `data22.txt'
`data33].txt' -> `data33.txt'
`data44].txt' -> `data44.txt'
`data55].txt' -> `data55.txt'
`data66].txt' -> `data66.txt'
`data77].txt' -> `data77.txt'
`data88].txt' -> `data88.txt'
`data99].txt' -> `data99.txt'

This is just a simple example ...

Tuesday, March 16, 2010

OpenGL and Python - Motion blur

What is glAccum? The OpenGL function - glAccum operate on the accumulation buffer.
This function provides support for many special effects.
Today I simulated the effect of motion blur with this function.
See the picture below:

Sunday, March 14, 2010

OpenGL and Python - Fog

Today I spent my time with something new - the OpenGL fog effect.
I made one simple fog effect using the last code source.
The result is this image:

Friday, February 12, 2010

"Santa Claus" on Google Map

I wrote on my blog python-catalin.blogspot.com about Google Map and Santa Claus:

I wrote a python module. I called it "geo" because it is a geographic module.
The funny stuff is when i use it with "Santa Claus".

>>> import geo
>>> geo.adress("Santa Claus")
{'status': '200', 'latitude': '32.1715776', 'longitude': '-82.3315138', 'accuracy': '4'}

So where is Santa Claus ?!
Google Maps API should be prepared to respond.
Tomorrow a child will know how to use the Python language.
Who knows ...

Tuesday, February 9, 2010

Paris Game AI Conference 2010

The first sessions of the Paris Game AI Conference 2010 was announced.
AI Conference brings together veteran game developers and artificial intelligence professionals.
Tickets are now available, but the price is from 47EUR to 97EUR.
They have now only 160 tickets.
gameaiconf.com