Author Archive

WordPress – Weird characters after wordpress upgrade

Saturday, January 16, 2010 23:02 No Comments

If you see weird characters after upgrading your wordpress version, the reason for that might be wrong character encodings. 1. Easy solution: – open wp-config.php for edit. – make sure you have empty values for  define(’DB_CHARSET’, ”); and define(‘DB_COLLATE’, ”); 2. Convert all tables to UTF-8 – follow these steps. not tested yet!

This was posted under category: Wordpress Tags: , , , , , , , , , , , , ,

MYSQL – Disabling FULLTEXT Search stopwords

Friday, January 15, 2010 0:38 1 Comment

To disable MySQL FULLTEXT Search stopwords open the mysql config file and below [mysqld] add the following line: ft_stopword_file = “” By setting the ft_stopword_file value to an empty string the usual stopwords won’t be ignored any more. Here is what the manual says about setting a new stopwords file: To override the default stopword [...]

This was posted under category: Database Tags: , , , , ,

MySQL – How to change the FULLTEXT SEARCH 4 character minimum behaviour

Thursday, January 14, 2010 23:56 No Comments

By default the FULLTEXT minimum characters behaviour is set to 4 characters. To check what value is preset on your server type the following query: SHOW VARIABLES LIKE ‘ft%’; That shoud bring up a result similar to this: Variable_name Value ft_boolean_syntax + -><()~*:””&| ft_max_word_len 84 ft_min_word_len 4 ft_query_expansion_limit 20 ft_stopword_file (built-in) To change the ftp_min_word_len [...]

This was posted under category: Database Tags: , , , , , , , ,

PHPList – user_blacklist_data Fatal Error

Wednesday, November 4, 2009 23:20 No Comments

While installing PHPList 2.10.10 on my system i got the following error for the table user_blacklist_data: “Fatal Error: Debugging not configured properly!” Searching the Internet i found the solution for it by editing the file /admin/structure.php Find the query where the user_blacklist_data is created and replace this line: “email” => array(“varchar(255) not null unique”,”Email”), with [...]

This was posted under category: Scripts Tags: , , , , , , , , ,

WGET – FTP Download a directory recursively

Monday, October 26, 2009 0:09 No Comments

We often need to download a directory from a ftp server to a local computer. You can do this using wget and its -r parameter.  The command would be: wget -l 30 -r ftp://user:pass@host/some_directory/ -l  sets the level depth. default value is 5 layers. i put 30 to be sure wget gets the whole tree

This was posted under category: Unix/Linux Tags: , , , ,

Eclipse – Exclude / de-exclude from build

Thursday, June 25, 2009 22:02 6 Comments

Sometimes working with Eclipse can be frustrating. I just spent an hour of my life looking how to include back a file into build that was excluded before (exclude from build). To spare you that drama, just go to: Project Preferences -> C/C++ General -> Paths & Symbols ->  Source Location Click on the folder [...]

This was posted under category: IDE Tags: , , , , , , , ,

Doxygen

Tuesday, June 23, 2009 20:33 1 Comment

Doxygen is a source code documentation generator tool. Comment blocks are constructed like this: (JavaDoc style) /** *  multiline bloc… some text */ /// single ling comment… some text “some text” can be replaced with various special commands in order to make the generated documentation more user friendly. Doxygen special commans overview.

This was posted under category: C++, Programming Tags: , , , , ,

Eclipse / Doxygen – Documentation Generator

Tuesday, June 23, 2009 19:22 No Comments

Doxygen is a well known source code documentation generator. More information about it is available on their homepage. For all those of you who prefer Eclipse as your main development platform there is a plugin that provides a high-level graphical user interface integration over Doxygen. More info about Eclox.

This was posted under category: IDE Tags: , , , , , , , ,

C++ static keyword

Tuesday, June 23, 2009 1:10 No Comments

The static keyword can be used in the following situations. When you declare a variable or function at file scope (global and/or namespace scope), the static keyword specifies that the variable or function has internal linkage. When you declare a variable, the variable has static duration and the compiler initializes it to 0 unless you [...]

This was posted under category: C++, Programming Tags: , , , ,

C++ Generate random numbers in Range

Monday, June 8, 2009 17:06 No Comments

To make use of the rand() command you must include the cstdlib library #include <cstdlib> Before we generate a random number we call the srand(int) function to seed the randomizer so we dont get the same random number each time. #include <ctime> srand(time(NULL)); // time(NULL) returns seconds since 1.1.1970 To get the random number in [...]

This was posted under category: C++, Programming Tags: , , , , , , , , ,