Defining custom components in Facelets is easy and quick but there's one thing I can't figure out.
Is it possible with Facelets to define what attributes my custom component has? I.e: I've created a component which is used in such a way:
<blue:modalWindow id="editFeesWizard" width="500" height="440" title="Wizard">
and is defined in…
I've seen this question and this article on how to debug a native Java crash. The article is with respect to Windows. What are the equivalent debugging aids on Linux?
Note: All I have is this crash log from a user in the field. I do not have access to the machine on which the crash occurred.
Update: I am pretty sure the crash is due to JNI…
How can I call a route (in the view) in CakePHP as the same way in Rails?
Ruby on Rails
routes.rb
map.my_route '/my-route', :controller => 'my_controller', :action => 'index'
view
link_to 'My Route Name', my_route_path
CakePHP
routes.php
Router::connect('/my-route', array('controller' => 'my_controller', 'action' =>…
Some people would rather user if statements then a ternary operator because they say the increase complexity in your programs. I personally like ternary operators, what is your opinion? Should you use if statements or ternary operators?
I want to know if the mysqlplus gem is a better database driver than the common Ruby mysql gem? I used to have some problems in my Rails application, like:
ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away
I'm trying to get started on libvirt with VirtualBox as a virtualization solution. I installed everything and VirtualBox itself is running when using their VBoxHeadless command.
However, libvirt fails to connect to VirtualBox:
# virsh -c vbox:///session
libvir: error : could not connect to vbox:///session
error: failed to connect to the…
I am trying to get the Highlighter class from Lucene to work properly with tokens coming from Solr's WordDelimiterFilter. It works 90% of the time, but if the matching text contains a ',' such as "1,500" the output is incorrect:
Expected: 'test 1,500 this'
Observed: 'test 11,500 this'
I am not currently sure whether it is…
I recently encountered an issue with NSIS that I believe is related to an interaction with UAC, but I am at a loss to explain it and I do not know how to prevent it in the future.
I have an installer that creates and removes IIS virtual directories using the NsisIIS plugin. The installer appeared worked correctly on my Windows 7…
The setup:
I have a project that is using CouchDB. The documents will have a field called "tags". This "tags" field is an array of strings (e.g., "tags":["tag1","tag2","etc"]). I am using couchdb-lucene as my search provider.
The question:
What function can be used to get couchdb-lucene to index the elements of "tags"?
If…
I am trying to POST an attachment to CouchDB using the HttpWebRequest. However, when I attempt "response = (HttpWebResponse)httpWebRequest.GetResponse();" I receive a WebException with the message "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."
I have found some…
Can I order the result of a view by the value, returned by reduced?
{
"rows": [
{"key":"bob","value":2},
{"key":"john","value":3},
{"key":"zztop","value":1}
]
}
I wanna a result like this:
{
"rows": [
{"key":"zztop","value":1},
{"key":"bob","value":2},
…
Are content observers persistent in Android? If I create a content observer in an activity, will that observer continue to run until I remove the observer.
Basically I am creating a service for SMS, where on receive and on send I post the SMS out to a web service, so I can check my messages with out having my…
I know of two ways of creating custom JSF components:
1. Native JSF way: creating JSF component class, tag, etc.
2. Facelets way: defining component in a xhtml file and then creating appropriate decrption in facelets taglib.
Currently I work on a project in which introducing facelets is unfortunately out of the…
Hello! I'm using Richfaces + HibernateQuery to create a data list. I'm trying to use Hibernate Projections to group my query result. Here is the code:
final DetachedCriteria criteria = DetachedCriteria
.forClass(Class.class, "c")
.setProjection(Projections.projectionList()
…
This code:
System.out.println(String.format("%f", Math.PI));
System.out.println(Math.PI);
produces that result on my computer:
3,141593
3.141592653589793
Why does the first line print float number with comma while the second one uses dot?
I have developed a XML schema for an application I wrote. Now I want to document the valid structure for the end user, however I can't come up with any natural way to do this. I've seen things like xs3p, which essentially converts a xsd schema to a HTML representation, however that…