27 Feb 2012

WebView, qdeclarativewebview has no direct connection to webkit javaScriptConsoleMessage

I stumbled upon on the doc of WebView QML component for Qt 4.7 http://doc.qt.nokia.com/4.7-snapshot/qml-webview.html. It seems it has features to connect the JavaScript console to be printed directly to 'main console' as QML's console.log does. But, it doesnt! http://trac.webkit.org/changeset/81471

The connected console should be done by overriding QWebPage::javaScriptConsoleMessage of QWebPage, as what phantom.js does: https://github.com/ariya/phantomjs/blob/master/src/webpage.cpp

 

 

 

2 Dec 2010

My First Rails 3 Web App

I'm so excited to learn this new thing (for me it is a new thing). I have been working on other things like developing native apps, mostly in C/C++. My web app experience was limited to ASP .NET only. 

What I wanna build is an application that could receive data from user (user could upload data), then identify the data and parse (extract) it. The extracted information then served in RESTful manner.

1. Generate a new Rails app.
$ rails new dipa --skip-active-record 

The --skip-active-record means, I  don't want to use the Rails' ActiveRecord, since I would like to get advantage in using MongoDB instead. 

2. Edit the Gemfile

$ vim Gemfile

require 'rubygems'
require 'mongo'
source 'http://rubygems.org
# gem list
gem 'rails', '3.0.3'
gem 'mongo_mapper'
gem 'rails3-generators'

$ bundle install

3. Add the Mongo initializer

vim config/initializers/mongo.rb

MongoMapper.connection = MongoMapper::Connection.new('localhost',27017);
MongoMapper.database = "dipa-#{Rails.env}"

if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
MongoMapper.connection.connection_to_master if forked
end
end
26 Sep 2010

Building OpenSplice DDS OpenSource from source on Mac OS X Snow Leopard

Get the OpenSplice DDS source code:

$ git clone git://www.opensplice.org/opensplice 
$ cd opensplice/ 
$ git checkout -b snowleopard origin/snowleopard

Configure, make and then make install :-)

Uh-oh! Don't forget to set JAVA_HOME environment variable to "/System/Library/Frameworks/JavaVM.framework/Home"

$ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home

Then you can safely do the classic mantras:

$ source ./configure
$ make
$ make install

Note: the source ./configure is needed since this configuration script exports several environment variables that are needed for building the package

The package will provide you two types of tarred distribution HDE (development version) and RTS (for runtime system -- for system deployment I guess).

Then, you can just follow the instructions given in INSTALL.txt

One more, don't forget to change the LD_LIBRARY_PATH to DYLIB_LIBRARY_PATH inside the release.com since Mac OS X only knows the latter. 

Have fun!

dio dot rahman at gmail dot com
28 Mar 2010

Minihidro Part 1

Essential Information

*Summary
#Significant energy resource; it involves estimating or measuring the flow and available head, and estimating what annual energy capture would result
#Potential output is attractive -- permission! i.e. to develop the scheme and to have the necessary access to it.
#Clear destination for the power

*Flow
#Obtaining data flow,++Use available data from:
+agencies+data collection from gauging stations
--If no data
-hydrological methods: based on long-term rainfall and evaporation records and on discharge records for similar catchment areas. Analysis on hydraulic potential first, then site measurement (observation) once the project looks likely to be feasible.-the most accurate and reliable flow measurement method is to install a measuring weir
-expressing the variation in river flow over the year
->the annual hydrograph
shows day-by-day variation
->the flow duration curve: FDC
shows how flow is distributed over a period (usually a year). Horizontal axis gives percentage of the year that the flow exceeds the value given on the y-axis. Affected by: soil conditions, vegetation cover, to a lesser extent by catchment shape. Also: man-made reservoirs, abstractions and discharges

To be continued :-)

14 Mar 2010

VMC - Voxel Monte Carlo

It's been a while I haven't wrote anything in this "Posterous". My
head is quite full these days: I'm being a dad!, yes, my wife is
pregnant; I have no job for now, keep searching for a PhD position
somewhere; and I arrived in this chair, sitting and reading a paper
entitled VMC++, electron and photon Monte Carlo calculations optimized
for Radiation Treatment Planning.

I graduated from Physics. Oh yeah -- that was 5 years ago!. I've
played with Monte Carlo for a while. Now, holding this paper, I
couldn't understand what 'class II condensed history Monte Carlo
simulation'-beast is!.

I believe VMC++ is a cool work done by Iwan Kawrakaw. Well, before
this, my Grand Supervisor -- Fippel (he is the supervisor of my
supervisor) -- released a library on VMC based dose calculation
algorithm, called xVMC to be compared directly with other famous
method on dose calculation: Pencil Beam method!.

I'm quite surprised, five years ago I tried to submit a paper on
comparing two methods on dose calculation in inhomogeneous medium! --
and highlight the problem on the vicinity of two different mediums!
That is the main argument why VMC is considered "better" than Pencil
Beam: it's accuracy on "predicting" dose distribution in the vicinity
of two different medium.

I'll continue this post later.

18 Nov 2008

G-Speak

16 Nov 2008

Graphical Model Videos

14 Nov 2008

Boost Graph Library

Oops.. I found an e-book of BGL

Ciao!
12 Nov 2008

Mumbling with graphical model

Since yesterday, I have been trying to understand the mystery covered by graphical model. Luckily, from one of my RSS subscriptions, I got a good link to start exploring it again (Thanks Vidit Jain!). At least this link helped me to motivate my self reading the PMRL book again. 

12 Nov 2008

Exploring vision, understanding actions, establishing interactions

Cute huh!? That line on the title was written by me when I was trying to establish a new web page for my lab (before hurdled by a very pityful person who really wants to control everything in the lab!!!). 

Well, this line should be my 'line' for my own business in the future. Believe in the richness of computer vision. When you can grab 'compact' data at once. Modeling that data on a 'fancy-feature' space; knitting the frames into sequence of actions. And by having this understanding, we can establish 'natural interaction'. Hopefully. Just my two cents.

Cheers!

Dio's Posterous

don't lose faith!