Wt, C++ Web Toolkit

Wt (pronounced 'witty') is a C++ library and application server for developing and deploying web applications. It is not a 'framework', which enforces a way of programming, but a library.

I've found myself a new toy :). No more php or C# or ASP or other things i don't like to use but i have to use. I haven't yet started to use Wt, but looks nice. Like it or not the web-app is competing really well with the native-app, at least from the desktop user's point of view. It would be nice to have a way of writing web apps with things like type safety, generic code and most important reusing libraries like boost.

From the first look at the Wt code i looks somehow familiar, maybe because I've used Qt a lot and the Wt's slot/signal mechanism seems similar.

A C++ library that allows creation of a web graphical interface by using widgets rather than hand written html. Sounds wonderful. I can only hope it will raise up to the expectations.

More after a play with it.

details at: http://www.webtoolkit.eu/wt/

Flash on FreeBSD - Gnash

Watching flash content on FreeBSD was and still is a problem. It's sad Adobe won't publish a native version of flash for FreeBSD, or even better open the sources for the flash player. It's strange they don't, unless the sources are a real mess I don't see any strong reason for not doing so. Now that rumors are found about new technologies for web graphics like svg, html 5, flash might not be so popular in the future.

About the linux plugin for native firefox i don't have much to say. I does not work reliable. Yes you can watch some movies in some conditions with linux-flash7 with nspluginwrapper but still with a lot of problems depending on arch/site/browser/movie version. With linux-flash9 even more problems. I realized that in the end it's more frustration than satisfaction and the feeling was that I'm fighting the wrong battle in trying to make the linux-flash work on FreeBSD.

Now I'm living with gnash ( graphics/gnash ). Well, it's not perfect but at least it's open source and does play a lot of movies. And the best thing about it was that with the release of a new version ( 0.8.2 ) movies that did not work with 0.8.1 are now working so it's progressing. Youtube is working pretty well also.

In conclusion if you really need flash on FreeBSD try supporting gnash. As an open source alternative to the flash plugin it's starting to look more than promising.

WordPress WassUp Error

I've upgraded the wassup plugin to the latest version ( 1.5 ) and an error started to show in the pages:

[ wp_wassup_tmp' doesn't exist ]

The solution is to deactivate the plugin and then reactivate it... witch should be the right way to upgrade your plugins.

Update:

I also get a syntax error from the wassup plugin, on the dashboard:

***WordPress database error:*** [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND 1207656596' at line 1]
SELECT COUNT(DISTINCT wassup_id) AS itemstot FROM wp_wassup WHERE wassup_id IS NOT NULL  AND timestamp BETWEEN  AND 1207656596

It seems that the errore comes from a debug query that was left in the wassupDashChart() function. To fix the error you need to comment two lines (1631,1632) of code in wassup.php:

 1 // This is the function to print out a chart's preview in the dashboard
 2 function wassupDashChart() {
 3   global $wpdb;
 4   $table_name = $wpdb->prefix . "wassup";
 5   $to_date = wassup_get_time();
 6   $Chart = New MainItems;
 7   $Chart->tableName = $table_name;
 8   $Chart->to_date = $to_date;
 9 
10   //$itemstot = $Chart->calc_tot("count", $search, null, "DISTINCT");
11   //print $itemstot;
12 
13   echo '<h3>WassUp Stats <cite><a href="admin.php?page=wassup">More ยป</a></cite></h3>';
14   echo $Chart->TheChart(1, "400", "125", "", $wassup_options->wassup_chart_type, "bg,s,00000000", "dashboard", "left");
15 } //end function wassupDashChart

myWeather widget

To create a quick and dirty widget from myWeather wordpress plugin just add the following to the end of myweather.php

 1 function widget_weather_init(){
 2   if ( !function_exists('register_sidebar_widget') )
 3     return;
 4   register_sidebar_widget(array('Weather', 'widgets'), 'widget_weather');
 5 }
 6 
 7 function widget_weather($args){
 8   extract($args);
 9   echo $before_widget . $before_title . $title . $after_title;
10   wp_myweather();
11   echo $after_widget;
12 }
13 
14 add_action('widgets_init', 'widget_weather_init');

Also the part where you search for the city could be added as a control for the widget but i didn't relay need it to be .

MyWeather plugin's homepage.

Update

If you have multiple users with different credentials on your blog and you are the only administrator you can restrict the access to myWeather plugin administration interface by changing the function myweathertoadmin() to look like this (use 10 instead of 1 for required level) :

1 function myweather_to_admin() {
2   if (function_exists('add_submenu_page')) {
3     add_submenu_page('options-general.php', 'myWeather',
4     'myWeather', 10, basename(__FILE__),'myweather_admin');
5   }
6 }

qmake error: sible braces mismatch %s:%d

I've just received this error with qmake on windows. Googling for it showed no results so after i've solved the problem i decided to put it here.

The error was near a conditional block like:

1 unix{
2 }
3 win32{
4   QMAKE_UIC+ = -L ../bin/plugin
5 }

...after searching for unclosed/missing braces for a while without any result and comparing svn versions i've finally found the problem. On the QMAKE_UIC linke instead of "+=" somehow ( probably kdevelop's qmake parser/generator ) got saved as "+ =" (notice the space). The problem would have been much easier to solve if the error message wasn't so misleading.

1 #bad version
2 QMAKE_UIC + = -L ../bin/plugin
3 #good version
4 QMAKE_UIC += -L ../bin/plugin

So if you see this error look for operators that might have a space inserted in the middle. Hope this will save somebody's time.