Jūs esateProgramavimas

Programavimas


Žinutės, susijusios su programavimu

Howto install OpenCV 2.3.1 on Ubuntu Linux 11.10?

I have Ubuntu Linux 11.10 OS. And I want like to use the (currently) latest version of OpenCV - 2.3.1. But Ubuntu provides only 2.1. So, I had to recompile OpenCV library by myself.
I found a good tutorial about how to do that: http://ozbots.org/opencv-installation/ - it worked.
Just one interesting note. If you have problems when compiling OpenCV and you're using 64 bit OS - add two flags when ./configure'ing x264 and ffmpeg: --enable-pic --enable-shared
Good luck ;)

How to calculate lines of code in Linux?

I have a C++ project on NetBeans IDE. I would like to count the lines of code. So, how to count the lines of code in Ubuntu Linux?
Well, you can install additional software like sloccount (sudo apt-get install sloccount): http://manpages.ubuntu.com/manpages/natty/man1/sloccount.1.html, or you can use wc command like this:
wc -l + `find . -name \* -print`

How to write a packet sniffer

I found a very nice article about how to write a packet sniffer in the C programming language: http://www.binarytides.com/blog/packet-sniffer-code-in-c-using-linux-soc...
 
Happy reading/coding ;)

MySQL table names are case sensitive in Linux

At the moment I'm writing a small program for my master's theses. And I found one very interesting thing.
I have a table in my MySQL server called "Books" (with uppercase). And I have query: "SELECT title FROM books" (lowercase).
And my server says: can not found table "books" :) So, I renamed by table to "books" :)

Palinkėjimas praėjusios Programuotojų dienos proga

Kaip žinia, kiekvienais metais praėjus 2^8 = 256 dienoms nuo metų pradžios (t.y. kiekvienų metų rugsėjo 13-ą dieną (o jei tai keliamieji metai - rugsėjo 12-ą)) yra švenčiama Programuotojų diena. Dėkoju visiems mane pasveikinusiems ;)
Kaip jinai švenčiama - negaliu pasakyti (gal geriama daugiau (nei paprastai) alaus?), bet turiu gerą palinkėjimą visiems programuotojams praėjusios šventės proga:
 

My Expierence With Emulator of Android Development Tools 11

Yesterday I installed the latest version (currently - 11th) of Android Development Tools into my ASUS X53Ka (AMD Athlon X2 64 TK-57 1.9 GHz, 4 GB of RAM). But the emulator loads very slowly - I've waited for about 5 minutes but the emulator haven't started (the title "Android..." was still blinking).

So, what I did? I pressed on Window->Android SDK and AVD Manager and changed some options a bit:

Integration testing

I have to make a small speach about Integration testing on Wednesday. So, I wrote down some main points I would like to discuss. I think they might be interesting for the readers of my blog. Here are they.

 

MySQL InnoDB vs. MyISAM saugojimo varikliai

Vienam universiteto moduliui ruošiau pristatymą apie InnoDB vs. MyISAM MySQL saugojimo variklius (storage engine). Pagalvojau, kad tai gali būti naudinga ir mano blogo skaitytojams. Tad štai ir mano pristatymas - praktiškai paėmus, santrauka iš kelių rastų internetinių šaltinių :)

 

ActivityNotFoundException on Android?

I am creating a small Android client for my Master's theses. Unfortunately, I've encountered a problem: I get ActivityNotFoundException during runtime process. I just need to change the activity of my program (to show the help box). Maybe someone could give me a hint what I'm doing wrong?

My main file/activity looks like that:

C++ List

I was looking for analogue of ArrayList (or List) datatype in C++ and I found today: STL List :)

Take a look over here: http://www.cplusplus.com/reference/stl/list/

64 bit MySQL C++ Connector, 64 bit MySQL Server and 64 bit Windows 7 are not compatable?

This evening I tried to connect to MySQL server from my C++ application. So, some notes about this task:

PHP. Simple SOAP client & server

Today we're going to create a simple Simple Object Access Protocol (SOAP) client and server.

First of all you must ensure that your php.ini file have PHP SOAP and XML RPC extensions enabled:

 

extension=php_soap.dll

extension=php_xmlrpc.dll

 

Notes about Drupal 7. hook_theme() changed a bit

Today I was programming with Drupal 7. And I expierenced a problem with hook_theme() hook.

In Drupal 6 I did like that:

SQL. Case sensitive search in MySQL database

As stated here nonbinary string comparisons are case insensitive by default.