Tag Archives: bug

Bug – count() function in ColdFusion query of query


Hi,

It has been a great time since I started working on ColdFusion. I must say that it is the easiest language in the world and yet it is a powerful and can be compared to any major programming language.

In last few days, I was using ColdBox and MockBox framework in our current project. I was using query of query which is very similar to SQL query, and we can use it over query object in ColdFusion.

Count() is a math function, but if we use it with select statement like count(*), it returns a number of rows fetched in select query. I used it query of query, and it was giving me the correct count if my select statement is returning some rows, but if it is not returning any row then ideally it should give 0 as output, but it gives [empty string].

I must need to come out of this issue, and I used a recordCount property of returning object, but you can also use CodlFusion function val() to convert the empty string to 0.

I can state that it is a bug base on the answer I get from the community. See my question on Stack Overflow Community. Still I will wait for some time if it is appropriate I’ll report it to ColdFusion bug tracking system.

Android emulator bug while changing orientation


Hi,

In documentation, it has been stated that when we change orientation, it destroys Activity and restart it. It is expected because applying new configuration causes recreation of UI view.

Android has different emulators depending on the SDK versions. For example 1.5, 1.6 2.1 update 1, 2.2, 2.3 etc.

I noticed that in 2.3 version, when you change the orientation first time, it restarts your current activity and recreate you view. When you again change the orientation, it restarts the Activity but it does not display correct layout (landscape/portrait). see

I perform the same test on 1.5 and 2.1 update1. Here I get the strange output!  Changing the orientation from portrait to landscape, it restarts your activity and shows correct layout, While changing the orientation from landscape to portrait it restarts your activity twice and  shows correct layout.

To test the bug, just create a project from eclipse with myTest activity and write a line to display in LogCat.

Example:

public class myTest extends Activity {    
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        System.err.println("Test Activity created!");
    }
}