Surprisingly, the ListBox class has none of these methods.
- getValue() to return the selected value
- empty() / clear() to remove all values
- addAll(List<String> newValues) to add a group of new methods
Aller au contenu | Aller au menu | Aller à la recherche
vendredi 4 mai 2012
Par Jerome le vendredi 4 mai 2012, 00:27 - Informatique
dimanche 22 avril 2012
Par Jerome le dimanche 22 avril 2012, 21:38 - Ma vie
Back to office with lots of ideas to put in projects.
mardi 10 avril 2012
Par Jerome le mardi 10 avril 2012, 23:37 - Informatique
lundi 9 avril 2012
Par Jerome le lundi 9 avril 2012, 23:18 - Informatique
mardi 27 mars 2012
Par Jerome le mardi 27 mars 2012, 22:39 - Ma vie
mardi 7 février 2012
Par Jerome le mardi 7 février 2012, 21:52 - Informatique
<property name="eclipselink.logging.level" value="FINEST"/>
jeudi 19 janvier 2012
Par Jerome le jeudi 19 janvier 2012, 16:43 - Informatique
AuthenticationUtil.getFullyAuthenticatedUser();
/**
* Get the fully authenticated user.
* It returns the name of the user that last authenticated and excludes any overlay authentication set
* by {@link #runAs(org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork, String) runAs}.
*
* @return Returns the name of the authenticated user
* @throws AuthenticationException
*/
Lessons learned, again :
HELL, THAT NEARLY SCREWED MY LAUNCH !
Fortunately, this has been detected during internal tests.
mardi 17 janvier 2012
Par Jerome le mardi 17 janvier 2012, 15:16 - Informatique
Note for future self :) (and yesterday's self)
On a GWT ListBox widget, it is natural to write
listbox.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {...}
}
But do not forget to
listbox.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {...}
}
for else, the event "the listbox has been selected and value is modified with the keyboard arrows"
will not be handled even though the value "changes".
Now, shouldn't the ChangeHandler be called ChangeByMouseHandler ? No ?
mardi 3 janvier 2012
Par Jerome le mardi 3 janvier 2012, 00:01 - Informatique
If you read my blog, you certainly know I am an Android fan.
But I am not fond of its SQL features. Some times ago, I looked for
alternatives and I found ORMLite for Android.
My first use was very simple (yet unpublished).
Recently, I tried it with a parent-child relation. There is a persistent object
in another persistent object.
As I wrote in https://plus.google.com/u/0/117007069948230044999/posts/fGyVgXPPf57
After some browsing, I found that parentDao.refresh(parent) must be done
explicitly, else the child is not loaded.
Well ... ok ... its weird for me, as I'm used to server-side ORMs.
Unfortunately it did not work with only
@DatabaseField(foreign= true) on the child field (yes, I believe in
magic ;) )
so, I annotated it with
@DatabaseField(foreign= true, foreignAutoRefresh = true, foreignAutoCreate
= true) and it worked.
I have not tested the updates behaviour yet or the performance as for the
moment, I just want to load my db.
This lib is a nice tool for your android toolbox.
vendredi 23 décembre 2011
Par Jerome le vendredi 23 décembre 2011, 15:37 - Informatique
find / -name cacerts |more
and find / -name .keystore |more
mercredi 30 novembre 2011
Par Jerome le mercredi 30 novembre 2011, 15:18 - Informatique
mercredi 9 novembre 2011
Par Jerome le mercredi 9 novembre 2011, 14:13 - Informatique
As I was installing an Alfresco on a Linux machine, I learned AGAIN.
Damn Alfresco, I know it since the "not yet 1.0" version (was 0.6??) and
everytime I use it, I learn new stuff.
Problem:
It all started with my test user seeing mixed languages, English and French in
the web interface despite the choice of English at login time.
OK, problem is solved but it was a pita as I had to "DROP DATABASE alfresco;".
Was empty, fortunately.
Short version :
As the "system spaces" like "data dictionnary" are created upon first boot of
the webapp, you must not leave YOUR language packs (.properties files) in the
.war file. Main culprit was bootstrap-spaces_fr.properties
in alfresco.war\WEB-INF\classes\alfresco\messages\
Long version :
I installed on a Linux machine, not
using the 1-click installer provided by Alfresco but it would not have changed a
thing considering it's the .war file the guilty.
I am not a US resident, nor EN.
I use a Linux VM that I have not set up, physically located in fr_FR, which I
tend to forget as I mostly write/code in english (sometimes frenglish).
On first start, the .war file deployed in Tomcat is unpacked and its content is
used by the initial process -- including the
deadly bootstrap-spaces_fr.properties.
This process creates what I'll call the "system spaces" (like "data dictionnary") and they are created accordingly to the locale whenever the files are available. If not, the default are used and they are plain English, which is better for a system to be used by people around the world.
The culprit file can be found at
alfresco.war\WEB-INF\classes\alfresco\messages\bootstrap-spaces_fr.properties.
I moved all _fr.properties files to a subfolder -- just in case.
My advice is to remove all I18N files from the .war before to use it.
Or, you'll have to drop the database and empty the alf_data folder and of
course, bear with another looong first start.
Hint: Setting the JVM's locale to "en_US" could be an option (not
verified) at install time.
jeudi 9 juin 2011
Par Jerome le jeudi 9 juin 2011, 22:57 - Informatique
As I have already said, I am the happy owner of a Galaxy Tab 10.1 :D
This may sound like a conclusion but do not stop reading yet.
It runs Android 3.0 for the moment and I have not used it for hours and hours
...
My main expectation with this device was access to the v3 API branch, due to
the slowness of the emulator on my C2D laptop.
However, since I have received it, I have not had time to code :(
Still I had enough time and concentration to test a few apps.
Thus, the apps cons
That's it for the general cons.
Now the general pros :)
On the "general cons" side.
However, this is balanced by
I expect more stability with the announced 3.1 OTA. Despite the listed cons, I
am an happy owner.
Thanks again Santa ;)
mercredi 27 avril 2011
Par Jerome le mercredi 27 avril 2011, 21:13 - Informatique
This post is not about teaching a phone to eat all your waste :)
As time goes by, one (developper) gets more and more smartphones and specs
evolve, leaving older phones behind in terms of daily use.
Thus the question that arises is what to do of "old" phone ?
Of course, the quick and easy answers are :
What else ... ???
There is a computer in the phone ! Remember ?
Depending on the phone model and the work done for it by the wonderful
community, you can :
To give an example to that second point, it would be to install a web server
with a few pages, tie it to a dynamic dns (you'll need to configure your
box/modem of course)
There is web servers for Android, you are not forced to install Ubuntu + Apache
:) or even to cook your own.
It all depends all your available time
That is how innovation happens.
Maybe one day, we'll see Tomcat running on a mobile phone without slowing it to
death.
mardi 26 avril 2011
Par Jerome le mardi 26 avril 2011, 21:59 - humour
Hommage aux départements de France, la patrie de Jean Lambert.
Ce n'est pas compliqué : Il faut d'abord s'assurer qu'elle est Seine
Gironde et bien en Cher.
Lorsque l'on sent son Eure venue on commence par lui caresser le Haut-Rhin puis
on descend vers le Bas-Rhin.
On contourne alors l'Aisne pour rentrer dans la Creuse.
Là on trouve quelquechose de bien Doubs.
Sans perdre le Nord on attend que ça Vienne et si on ne se débrouille pas comme
un Manche on peut y rester jusqu'à l'Aube.
En Somme il ne s'agit Pas-de-Calais pour être un Hérault.
Merci à Karim de me l'avoir envoyée
jeudi 24 mars 2011
Par Jerome le jeudi 24 mars 2011, 14:00 - Informatique
Entre autres choses, j'apprécie les traits d'esprit et les jeux de
mots.
Il y a quelques années, je me suis intéressé aux contrepeteries et j'ai
constaté que le web n'en manquait pas, mais qu'il y avait souvent les mêmes,
dupliquées de sites en sites.
J'ai initié le site http://contrepeteries.free.fr pour qu'il soit
collaboratif : que les visiteurs l'enrichissent et puissent récupérer les
contrep's pour les utiliser sur d'autres supports.
Il y a eu des échanges fructueux avec le créateur d'une appli pour mac, des
visiteurs qui ont beaucoup participé (Merci encore à Maud du fond du
champ).
Mais le site vivote à 50 visites par jour.
Comme dirait le chien parlant que je n'ai pas : ça c'est de la niche
!
A partir des données de mon site, j'ai créé une appli pour smartphones
Android.
Elle s'enrichira au fil des versions. Aujourd'hui (v1.1), elle permet de
Voici le lien vers le market web https://market.android.com/details?id=org.wadael.contrepeteries
Et le QR code correspondant
Amusez-vous bien et donnez-moi votre avis.
Merci
lundi 14 mars 2011
Par Jerome le lundi 14 mars 2011, 21:32 - Informatique
Today,
I have decided to publish a small app dedicated to spoonerisms (in
French).
It is titled "Contrepeteries".
Another day, another occasion to learn.
I built apps mostly for myself so this was the occasion to 'market' an
app.
From my coder point of view, it is quick but not as direct as should be.
Guess what, after all the ProGuard errors solved (thx to Guillaume of
Capptain), I had errors on installing my own app !
"not signed correctly"
"Damn how can it be ?" I thought, considering I was using the very last
version of the tool provided.
Isn't it checked right after I upload the apk ?
Based on what I've read on the web and this experience, what one must do is
:
Coming back to the ProGuard point, as I use Capptain and AdMob on this app, a
working proguard configuration can be found at https://docs.google.com/document/d/1r-zv0XDsJNDmkuhQYTNRW2Tv46WOSBV0QAA3hHcN3IM/edit?hl=en
Find Capptain at
http://pages.capptain.com/homepage_01/
Find my app at https://market.android.com/details?id=org.wadael.contrepeteries
mardi 18 janvier 2011
Par Jerome le mardi 18 janvier 2011, 20:07
Today's new concept is
AD-jacking a word based on "AD" (for advertisement) for prefix
and "-jacking" (same idea is hijacking, carjacking etc...).
Means : benefiting from another advertisement.
That is, your ad reuse a word, concept or element of language introduced to the
audience by a previous advertisement, thus benefiting from it in terms of time.
Anything known by your audience does not have to be explained by your own ad,
making it shorter than in the opposite case.
Alternate syntax : adjacking, ADjacking, ADJacking
First references I get from googling it refer to hacking with online ads using
XSS techniques.
So I might have invented this term.
lundi 15 novembre 2010
Par Jerome le lundi 15 novembre 2010, 20:01 - Informatique
Imagine continuous usage of the phone. Battery would drain quickly.
Calculations only happen when the phone is charging OR battery level higher then a percentage to be determined by user.
Smartphones cannot hold a complex model in memory.
Connectivity is not always available.
Be honest. Advise users without a real unlimited data plan not to join.
Side note :
An architecture involving cloud computing machines and portable machines
(drops) could be called "rain computing". But that would not be a very bankable
term.
mardi 19 octobre 2010
Par Jerome le mardi 19 octobre 2010, 23:31 - Informatique
I have read a post from Eric Vetillard (javacard expert amongst all and a
colleague), about smudge attack against android terminals.
To quote his post :
this attack targets the authentication pattern that is used to unlock an
Android phone. .... owners also know that smudge really is dangerous for this
authentication technique. I have tried it with a colleague: after picking up my
phone, it took him 3 tries to get my combination
Why that ? Because :
So, that post triggered some thinking. I think I've found possible solutions
:)
First proposal
The pattern has to not be static. To reach that, my proposal is to have the
dots or equivalents to be in a circle that will rotate.
Not randomly but more like a compass.
Just like a compass has an arrow, an arrow is used so that the user has a
landmark and not get lost
Then either link the dots to unlock. (5 tries are allowed instead of 3)
With that, you will never not touch the screen at the same place (unless you
unlock only at the very same place, with the same position of the body)
Derivated proposal :
A keyboard which keys are never at the same place, used to enter PIN
code.
Most of us already know that, as this is used by online banks. The proposal is
to integrate it as a proposed unlocking system.
Third proposal, I call it the psycho-camembert :)
It looks like a camembert (or pie chart) with equal parts coloured differently
and having patterns (stripes, dots, etc ..).
This camembert is centered on the screen. Those parts are displayed in a random
order.
To unlock, parts have to be dragged toward the exterior. Therefore, the traces
on the screen are all lines from the center to the outside.
Of course, its a memory thing and one will have to memorize a colour order.
Sorry for those who cannot distinguish colors, thats why patterns can be
added.
I hope this contribution will find its way to the good ears.
Let's be frank, all the better if it brings me an all-inclusive invitation to
IO 2011 !
I really liked San Francisco and have no idea on how to deserve an invite for
next year.
Feel free to indicate me the classes of the API to look at in order to
implement it.
Cheers,
Jérôme
Eric's post is here http://javacard.vetilles.com/2010/10/18/smudge-attacks-on-android
You can follow Eric on Twitter : @evetillard http://twitter.com/evetillard
« billets précédents - page 1 de 4