Page 31 of 31

Първи впечатления от GPS

Щастлив собственик съм на Prestigio. Въпреки, че вообще не ми се занимаваше успях да кача най-новата карта за България на IGO в PNA-то и потеглих с колата към Чепеларе през междинен пункт POI-то Беленташ.

Навигацията беше безупречна. В Асеновград пътя, по който трябваше да минем беше затворен за ремонт, но бързо се оправихме по обходен маршрут благодарение на IGO.

С изкачването на баирите и отдалечаване от населените места картата ставаше все по-неточна. В един момент пътя изчезва и започваш да се движиш в празното пространство. Този ефект го получих при Беленташ-а, при Кръстова гора и вообще във всичките ми крайни точки, които разбира се бяха доста отдалечени от населени места.

Това, че пътя просто свършваше вообще не ми попречи, защото за мой късмет пътищата не се разклоняваха и водеха до едно и също място.

Единственото място където картата (от 2008-01) се издъни много гадно беше като се опита да ме прекара през един много черен път от Смолян към Могилица. Въпреки, че му бях задал да не използва черни пътища, така ни оплете че видяхме не една а три Могилици на куп в махалите на с. Турян, който между другото местните го наричат Турен.

С GPS-а не мисля къде съм и кога трябва да завия. Горещо препоръчвам на всички да ползват GPS. Кефиш се като знаеш кога ще пристигнеш и винаги знаеш колко още остава.

Registering in DMOZ/Bulgaria

Update

Nor dmoz is alive nor my site up anymore…

I am curious to see how much time will take to register my website in DMOZ. My website is old and has thousands of visits per day.

Till now I don’t have site included in DMOZ just because all my requests were silently ignored.

Now I will keep track on this registration with the help of my blog.

I have registered the website in all the categories that are suitable for it, here and here

I have heard that google likes DMOZ but I never suppose that google like DMOZ so much that it uses information from there check this google page.

  • Date of the registration: May 4th, 2008
    • I am optimistic! Finaly I think that I have point the right categories.
  • Checkpoint: 8 June, 2008
    • No results….Getting nervous and pesimistic
    • I have read here that one of the editors has waiting second registration for an entry to publish it. lets do it

I will give one more month for the Bulgarian editors before I say something bad against them.

Please help me to NOT curse the Bulgaria Internet.

www.cenite.com is the biggest price monitoring website in Bulgaria.

It is online from 4 years and STILL is no-one has included it in DMOZ even I have write sevaral times.

The Bulgarian version of DMOZ in my opinion is compromized!

Another try in this category here, I hope that this time the editor will not accept only friends.

Another finger for the DMOZ/bulgaria editors. Today I found this nice URL

http://report-abuse.dmoz.org/

I will use it.  Here is the FAQ

GENIUS!

Save your eyes, the planet, and …funds for a new monitor

http://blackle.com/

vino server password fix

Gnome has easy to use remote desktop feature provided by the vino server.

It was time taking for me to find why the password authentication doesn’t work, and aways rejects my passwords.

  • I have used the screen System => Preferences => Remote Desktop to change the password.
  • I have tried  also to change/hash it directly in ~/.gconf/desktop/gnome/remote_access/%gconf.xml

But it doesn’t work because I have another version of VNC server installed on my Ubunto box. When I have removed the ~/.vnc directory vino-server manage to login with the passwords

Database migration from cp1251 -> utf8

It was time to migrate http://www.cenite.com database from cp1251 -> utf8, I have prepared one nice script which will show you step by step the commands that you should run in order to migrate your database.

Copy the content to cp1251toUTF8.sh or use the commands manually

The script is making echo instead of running the commands because this will give you a chance to fix an error if occurs.

#!/bin/bash
echo "Set the params in the script and you will get the commands that you must run in order to get your database converted"

SOURCE_DATABASE=source_database_name
TARGET_DATABASE=new_database_name

USER=router
HOST=mysql.spider.bg

# ----------------------------------- No need to touch bellow
echo -e  "\n\n# Lets export the source database"
echo "mysqldump -u $USER -p -h $HOST --default-character-set=cp1251 --max_allowed_packet=64M $SOURCE_DATABASE > db1.sql"

# recode latin1..utf8 or what ever...
echo -e "\n\n# Lets convert it"
echo "recode -v -f windows-1251..UTF-8 < db1.sql > db2.sql"

echo -e "\n\n# Lets replace some sql creation statements. maybe you will want to do it manually"
echo perl -pi -e "s/cp1251/utf8/g" db2.sql
echo perl -pi -e "s/utf8_bulgarian_ci/utf8_general_ci/g" db2.sql

echo -e "\n\n# Lets create the target database"
echo mysql -u $USER -p -h $HOST mysql -e \"drop database $TARGET_DATABASE\; CREATE DATABASE $TARGET_DATABASE CHARACTER SET utf8 COLLATE utf8_general_ci\";

echo -e "\n\n# Lets do the initial import"
echo "mysql -u $USER -p -h $HOST $TARGET_DATABASE --max_allowed_packet=64M --default-character-set=utf8 < db2.sql"

As a bonus here is a command with which you can convert an all your html pages to utf8 also

find . -name '*.html' -exec recode -v -f windows-1251..UTF-8 \{\} +

This would recursively find all htmls in the current directory.

How to detect character sets

http://linux.die.net/man/1/enca

Migrating Latin1 -> UTF8

We have the mistake to enter all the data in the database (utf8) without setting the right connection encoding (set names utf8). In this case our content is stored as latin1 characters in the utf8 database.

Here is the magic that fixes the encoding found by my bright colleague bl8cki

alter table articles convert to character set latin1;
alter table articles change content content blob;
alter table articles change title title blob;
alter table articles change author author blob;
alter table articles change content content text character set utf8;
alter table articles change title title text character set utf8;
alter table articles change author author text character set utf8;

here is an example

mysql> CREATE TABLE `articles` (`id` int(11) NOT NULL auto_increment,   `title` mediumtext, PRIMARY KEY  (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=10313630 DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> set names latin1;
Query OK, 0 rows affected (0.00 sec)

mysql>  insert into articles (title) values('закъсал');
Query OK, 1 row affected (0.00 sec)

mysql> alter table articles convert to character set latin1;
Query OK, 1 row affected (0.01 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> alter table articles change title title blob;
Query OK, 1 row affected (0.01 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> alter table articles change title title text character set utf8;
Query OK, 1 row affected (0.00 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from articles;
+----------+----------------+
| id       | title          |
+----------+----------------+
| 10313630 | закъсал        |
+----------+----------------+
1 row in set (0.00 sec)

As the example shows it works with cyrilic (pasted in utf8) !

© 2026 Ivo Bardarov

Theme by Anders NorénUp ↑