Search This Blog

Wednesday, April 20, 2011

The order of probabilities is given by considering the state of the first parent of the node as the most significant coordinate (thinking of the coordinates in terms of bits), then the second parent, and so on, and finally considering the coordinate of the node itself as the least significant one.

The order of CPT depends on the order of adding nodes and arcs, as well as the order of defining states.

Tuesday, April 19, 2011

The problem occurs while downloading data from DB into Flex’s DataGrid. If we have a Date column and it’s filled with null values, these values will automatically get the current date (time) value in the process of conversion (when new Date() object is created). To avoid this we can override labelFunction in DataGrid and prevent current_data values from being displayed.

Wednesday, April 13, 2011

What we want to do is send an email with embedded image. The email is of course in HTML format. What DID not work for me is:

- setting mail body type to HTML, adding attachment of png format and content id set to ID_IMAGE and using <img src=”cid:ID_IMAGE”>

I did it in a different way:

You can define AlternateView and add LinkedResource to it of type = “image/png”. Then define image’s content id and transfer encoding type. This solution does not prevent you from adding different attachments as well.

Tuesday, April 12, 2011

Getting the actual executable directory comes handy when you need to execute the program remotely (e.g. from STAF). The execution directory is then different than the actual executable (*.exe) location. With the tricks below you need to create a *.log file near the (*.exe) file:

Friday, April 8, 2011

When you use a service connected to db’s methods (get data from db) in flex you have to use rpc calls to get the data. When you just fire service.getSth() method it will return an AsyncToken object with nothing in AsyncToken.result field.

Monday, April 4, 2011

We have an ItemRenderer with a Button inside (Column in DataGrid with buttons doing something). We want these buttons to be visible/invisible depending on a specific column value in a row. DataGrid’s dataProvider is a database (mysql).

All we have to do to achieve this behavior is to extend ItemRenderer and override its function set data(value:Object):void;