Femi Byte

Ranch Hand
+ Follow
since Jul 09, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Femi Byte

I am trying to use Flex Unit in FlashBuilder 4.5.1 and I am getting the warning " import AbstractMatcherTestCase could not be found".
Can anyone let me know what I'm missing? I have hamcrest-as3-flex-1.1.3.swc as one of my referenced libraries for the project.

I am trying to import as follows:

8 years ago

Mark Spritzler wrote:Personally, I think it would be saner to break it apart into multiple views or multiple GridViews. Or wrapper GridViews. You could have an outer GridView with 1 row three columns. Then in each column have a GridView, the left being 2x5, the middle just a single view, sounds like it doesn't have to be a gridview, and the right however you need it.

Hope that helps.

Always try to go the easy route. If something is becoming difficult. stop and think there has got to be a better way and then go find it.


Thanks, my sentiments exactly. I was thinking the same thing
8 years ago
I am looking to use AQGridView to layout a screen that has 3 different sub-layouts. The top part of the screen should be laid out in a 2x5 grid, with each cell being occupied by a different graphic. This I have successfully accomplished. The middle portion of the screen should be a single image that occupies the entire width of the screen, spanning across columns and of height 2 cells.

The bottom portion of the screen should be another grid layout with dimensions that may vary, but should fill up the remaining space. My question is, what's the best way to achieve this? Should I use 3 separate AQGridViews, one for each section, since the grid layouts are different, or can I fit the layout all in the same AQGridView? I have tried the latter approach, but I am having great difficulty in getting the image in the middle portion of the screen to properly span across cells. It is skewed to one side.
8 years ago
Is the Initialize-On-Demand idiom really necessary when implementing a thread safe singleton using static initialization, or would a simple static declaration of the instance suffice?

Simple declaration of instance as static field:


I ask this because Brian Goetz recommends the 1st approach in this article:


while he suggests the latter in this article


Does the latter approach provide any benefits that the former doesn't?
Your responses below clarify things quite a bit. Thanks for your responses.
9 years ago

Stephan van Hulst wrote:List<? extends A> is the supertype of all lists of types that are subtypes of A. Therefore, List<? extends A> is the supertype of List<A>, as well as List<C>, if C extends A.

List<? super A> is the supertype of all lists of types that are supertypes of A. Therefore, List<? super A> is the supertype of List<A>, as well as List<Object>.

Wildcards always indicate supertypes.

[edited 10.000 times because the forum interprets my type arguments as bold text ]

So you're saying that List<? extends A> is a supertype, not subtype of List<A>?
9 years ago
I am wondering whether the statements below are true

Upon looking at Angelika Langer's generics FAQ, she states in the following section:

Is List<Object> a supertype of List<String>?

No, different instantiations of the same generic type for different concrete type arguments have no type relationship.

So, my assumption would be that the answer would be false for each of the above statements.

But later down in the same section of the FAQ, there is this statement:

Compatibility between instantiations of the same generic type exist only among wildcard instantiations and concrete instantiations that belong to the family of instantiations that the wildcard instantiation denotes.

which indicates to me that there is a super-sub type relationship for wildcards.
So which is correct for the examples above?
9 years ago
This is succinct and will be pretty useful. Thanks a lot.
9 years ago
I guess so, I was just wondering if there was one. Thanks.
9 years ago
Hi, I am working on a simulation problem and was wondering if there is any design pattern/idiom I could draw on to implement a percentage choice scenario.
Here is an example of what I mean:

45% of the time choose A
35% of the time choose B
20% of the time choose C

and so on. I know I can do this using the Random class and the modulus operator, but I was wondering if there was a formal idiom for something like this.

Thanks in advance.
9 years ago
Hi, I have the following questions about Andriod development

1. Do I need to have an Android phone to properly test my an app that I'm writing ? Or is there a simulator/VM that will let me test effectively?
2. Is there a separate SDK/Eclipse plugin for Android tablet vs phone app development?
3. Can I assume that an app that was developed for the phone will work reasonably well for the tablet platform?
4. What is the status of Android for tablets? How mature is it, in light of recent statements by the Apple CEO dismissing it as bizarre (http://techcrunch.com/2011/01/18/apple-cook-android-bizarre/) ?

9 years ago
Since I got no responses to my question, maybe I should rephrase it a bit differently. Is it possible to use the entity manager in Seam against a non-SQL database, such as XML datastore or data caches, if one can define the finder methods? If so, are there any examples doing so?
9 years ago
Is it possible to use Seam with a non-relational datastore e.g. a data cache such as Coherence?
I ask this because JPA seems tightly integrated with Seam, and as far as as I know only works with relational datastores.
I'd like to be able to define CRUD functionality against such a datastore, and use this within Seam? Does anyone know of any examples that depict this?

Appreciate your responses.
9 years ago
Hi guys, I am trying to get a small application that uses JSF for rendering.
I can't get it to render JSF tags in an .xhtml file properly. However, these tags are properly rendered in an equivalent .jsp file.

Here are the contents of the web.xml file:

The application server I am using is JBoss 5.1.0 GA.
Can anyone provide any pointer as to what could be wrong?

Here are the contents of the register.xhtml file:

Here are the contents of the register.jsp file:

9 years ago