Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2382 connectés 

 


 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  156  157  158  ..  327  328  329  330  331  332
Auteur Sujet :

BlaBlaTech@JAVA [ELITE, viendez les boobs]

n°1431019
the real m​oins moins
Posté le 24-08-2006 à 21:42:56  profilanswer
 

Reprise du message précédent :
Sachant que


    @CollectionOfElements
    @MapKey(columns = @Column(name = "locale" ))
    public Map<Locale, String> getTags() {
        return tags;
    }

fonctionne bien pour Map<Locale, String>, à votre avis je fais quoi pour Map<Locale, Map<String, String>> ? [:petrus75]


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
mood
Publicité
Posté le 24-08-2006 à 21:42:56  profilanswer
 

n°1431215
lorill
Posté le 25-08-2006 à 10:13:59  profilanswer
 

bon, j'ai envie de foutre en place un moteur de recherche sur les javadocs de nos composants, avec comme gros objectif de retrouver dans quel jar y'a quelle classe. La doc, c'est bonus.
 
j'avais testé ashkelon y'a un bail, ca merdait pas mal. Quelqu'un connait un outil du genre ?

n°1431223
the real m​oins moins
Posté le 25-08-2006 à 10:18:20  profilanswer
 

à part ashkelon non; tu peux aller voir ce qu'ils utilisent sur je sais plus quel projet de javalobby, mais je crois que c'était ashkelon [:jdf]


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1431544
the real m​oins moins
Posté le 25-08-2006 à 17:05:20  profilanswer
 

bon j'ai dans une classe
List<Foo> foos
 
avec Introspection, je récupere un PropertyDescriptor pour "foos".
propDesc.getPropertyType() me renvoie un List.class.
Comment je peux connaitre "Foo" bordel ?


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1431556
the real m​oins moins
Posté le 25-08-2006 à 17:35:09  profilanswer
 

http://216.239.59.104/search?q=cac [...] =firefox-a
 
bon ouais d'accord.
http://www.google.be/search?q=generics+type+runtime
2e lien, en cache (le blog de Joe Walnes)


Message édité par the real moins moins le 25-08-2006 à 17:35:37

---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1431567
the real m​oins moins
Posté le 25-08-2006 à 18:17:20  profilanswer
 

Bon, java.beans et Iterator => poubelle.
Class.getDeclaredFields() à la papa, puis


    private void printGenericParameterTypes(Writer out, Field field) throws IOException {
        final Type[] actualTypeArguments = getActualTypeArguments(field);
        out.write('<');
        for (int i = 0; i < actualTypeArguments.length; i++) {
            if (i > 0) {
                out.write(", " );
            }
            final Class paramType = (Class) actualTypeArguments[i];
            out.write(paramType.getSimpleName());
        }
        out.write('>');
    }
 
    private Type[] getActualTypeArguments(Field field) {
        final Type genericType = field.getGenericType();
        return ((ParameterizedType) genericType).getActualTypeArguments();
    }


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1431597
souk
Tourist
Posté le 25-08-2006 à 19:43:11  profilanswer
 

faut se mefier de getDeclaredFields, je crois me souvenir que c'est pas pareil selon que t'es sur une jvm sun ou une jvm ibm [:dawa]
 
edit: en fait ca a l'air d'etre getDeclaredMethods [:pingouino]
=> http://howardlewisship.com/blog/20 [...] works.html


Message édité par souk le 25-08-2006 à 19:46:17
n°1431599
the real m​oins moins
Posté le 25-08-2006 à 19:55:27  profilanswer
 

ouaich... enfin mon truc pour le moment c'est juste un outil à 10 lignes pour printer la gueule de mon modèle, et faire du search/regex/replace pour me faire un formulaire vite fait :D


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1431876
el muchach​o
Comfortably Numb
Posté le 26-08-2006 à 16:42:13  profilanswer
 

Au fait, je vous ai dit que Pnuts, ça roule(z) ?
Non ? Ben comme ça c'est fait.


---------------
Les aéroports où il fait bon attendre, voila un topic qu'il est bien
n°1432837
the real m​oins moins
Posté le 29-08-2006 à 03:53:02  profilanswer
 

connaissez http://h2database.com/ ?


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
mood
Publicité
Posté le 29-08-2006 à 03:53:02  profilanswer
 

n°1432838
souk
Tourist
Posté le 29-08-2006 à 04:52:30  profilanswer
 

c'est pour de vrai les stats ? [:mlc]
en tout cas je bookmark [:dawao]

n°1432839
the real m​oins moins
Posté le 29-08-2006 à 04:53:34  profilanswer
 

beh je sais pas. ils en parlaient sur la dev-list de magnolia, ptet pour remplacer derby sur la distrib par defaut [:cupra]


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1432980
gizmo
Posté le 29-08-2006 à 11:38:55  profilanswer
 

ouais, c'est vrai pour les stats, mais ce n'est pas représentatif d'une utilisation normale. Et puis, t'a pas intérêt à arreter le serveur vu que comme un max est en mémoire, il doit tout sauver et recharger au prochain démarrage, ce qui peut prendre une plombe. C'est typiquement le style de DB que tu gardes en embarqué pour classer tes DVD ou ce genre de connerie, mais dès que tu traites des gros volumes de donnée, ça tient pas la charge.

n°1433354
the real m​oins moins
Posté le 29-08-2006 à 20:14:44  profilanswer
 

wtf?


    public static void main(String[] args) {
        String c  = "€";
        System.out.println("c = " + c);
        System.out.println("c.codePointAt(0) = " + c.codePointAt(0));
 
        System.out.println("" );
        c="\u20AC";
        System.out.println("c = " + c);
        System.out.println("c.codePointAt(0) = " + c.codePointAt(0));
    }


 
oui donc je wtf parce que (chez moi en tous cas), ça sort

c = ?
c.codePointAt(0) = 63
 
c = ?
c.codePointAt(0) = 8364
 
Process finished with exit code 0

Alors le codePoint, déjà je sais pas exactement ce que c'est, mais je m'attendais quand meme à ce que ça me sorte la meme valeur ?


Message édité par the real moins moins le 29-08-2006 à 20:15:46

---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433357
nraynaud
lol
Posté le 29-08-2006 à 20:19:35  profilanswer
 

moinsmoins > ça dépend, si ton javac a chié sur l'encoding de ton fichier d'entrée, il s'est chié sur le caratère qu'il a lu pour l'euro.
 
le codepoint, c'est le numéro du caractère dans la table unicode (donc indépendamment de la manière dont il est code, que ce soit UTF-8, 16 ou 32)


---------------
trainoo.com, c'est fini
n°1433358
the real m​oins moins
Posté le 29-08-2006 à 20:21:55  profilanswer
 

c'est bien ce que je croyais pour le codepoint, donc ce 63 correspond effectivement à un "?", bravo idea.


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433362
nraynaud
lol
Posté le 29-08-2006 à 20:32:30  profilanswer
 

ouais, l'euro a peu de chance d'être à moins de 128 en unicode, il t'as foutu un autre encoding, mais il a dit à javac que c'était un UTF quelconque


---------------
trainoo.com, c'est fini
n°1433363
el muchach​o
Comfortably Numb
Posté le 29-08-2006 à 20:33:42  profilanswer
 

souk a écrit :

c'est pour de vrai les stats ? [:mlc]
en tout cas je bookmark [:dawao]


This is a single-connection benchmark.
 
Multiple connections, table level locking (MySQL aussi, remarquez, et c'est quand même performant)
 
Ok. C'est pour concurrencer AccessSQLite, quoi.


Message édité par el muchacho le 29-08-2006 à 20:39:04

---------------
Les aéroports où il fait bon attendre, voila un topic qu'il est bien
n°1433366
nraynaud
lol
Posté le 29-08-2006 à 20:36:45  profilanswer
 

bizarre, en latin9, c'est 164 la position de l'euro, il t'as foutu un encoding utilisé traditionnellement dans le sud de la Manchourie du Xvème au milieu du XVIème siècle je crois [:pingouino]


---------------
trainoo.com, c'est fini
n°1433370
masklinn
í dag viðrar vel til loftárása
Posté le 29-08-2006 à 20:40:00  profilanswer
 

Ben non il a fait comme les navigateurs: caractère inconnu -> remplacé par un point d'interrogation


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433383
the real m​oins moins
Posté le 29-08-2006 à 20:59:02  profilanswer
 

(c'est ce que je disais)
(cela dit le 8364 je sais pas d'ou il sort)


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433389
masklinn
í dag viðrar vel til loftárása
Posté le 29-08-2006 à 21:08:17  profilanswer
 

the real moins moins a écrit :

(c'est ce que je disais)
(cela dit le 8364 je sais pas d'ou il sort)


Ptin mais t'es vraiment un gros naze :o

Code :
  1. >>> hex(8364)
  2. '0x20ac'


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433402
the real m​oins moins
Posté le 29-08-2006 à 21:20:20  profilanswer
 

non mais certes [:mlc]
me demandait juste pourquoi il était si loin :o


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433411
the real m​oins moins
Posté le 29-08-2006 à 21:35:57  profilanswer
 

(parce que ma webapp, elle, me sort un \u0080 , ce \u20AC je l'ai trouvé sur le ouaibe, mais il sent des pieds, non ?)


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433412
masklinn
í dag viðrar vel til loftárása
Posté le 29-08-2006 à 21:36:58  profilanswer
 

Ptin mais franchement, on voit bien que t'es javateux toi [:mlc]
 
Tu vas voir les tables unicode, Range 20, et tu remarques que le titre est Unicode range 20: General Punct., Super/Subs, Currency, Comb. Diacr. Marks for Symbols
 
et on y trouve donc pelle melle ₡, ₢, ₣, ₤, ₥, ₦, ₧, ₨, ₩, ₪, ₫, ₯, ₰, ₱, ₲, ₳, ₴ et ₵

the real moins moins a écrit :

(parce que ma webapp, elle, me sort un \u0080 , ce \u20AC je l'ai trouvé sur le ouaibe, mais il sent des pieds, non ?)


\u0080 ça doit être le code Windows-1250 (enfin windows 12quelquechose quoi), \u20AC c'est le codepoint unicode, le caractère € n'existe pas en iso-88591 et est le caractère 0xA4 en iso-8859-15


Message édité par masklinn le 29-08-2006 à 21:42:42

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433414
the real m​oins moins
Posté le 29-08-2006 à 21:39:43  profilanswer
 

ouais j'ai vu ça. (va chier ? [:itm])
et ce \u0080 alors, hein, d'ou i sort? :o


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433418
masklinn
í dag viðrar vel til loftárása
Posté le 29-08-2006 à 21:43:42  profilanswer
 

Et hop, je confirme:
 
Unicode and Codepage Assignments
 
Q. What is the symbol's Unicode assignment?
A. The euro character is encoded in the Unicode Standard as U+20AC EURO SIGN. To avoid confusion, the historical character U+20A0 EURO-CURRENCY SIGN has been updated with an informative note and a cross reference to U+20AC EURO SIGN. See the Unicode Consortium's Unicode Technical Report #8 for more details.
 
Q. What is the symbol's Windows codepage location?
A. The symbol has been added to the following codepages at position '0x80': 1250 Eastern European, 1252 Western, 1253 Greek, 1254 Turkish, 1257 Baltic, 1255 Hebrew, 1256 Arabic, 1258 Vietnamese, 874 Thai. In 1251 Cyrillic, the symbol will be added at position '0x88'. Other codepages are controlled by governments or standards bodies. Microsoft is working with these organizations on the placement of the euro.


Message édité par masklinn le 29-08-2006 à 21:44:28

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433421
the real m​oins moins
Posté le 29-08-2006 à 21:46:42  profilanswer
 

Mais oui, ça fait un moment qu'on a compris, confiture :o
Mais ! Quand je tape un € dans un form de ma webapp, je récupere un \u0080, et d'après http://fr.wikipedia.org/wiki/Table [...] code/U0080 , ça veut pas dire grand chose d'interessant. pourtant quand j'outpute \u0080 j'ai effectivement un €.
probablement pareil pour \u00A3 pour la £ au lieu de \u20A4
 
donc euh ? :o


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433436
masklinn
í dag viðrar vel til loftárása
Posté le 29-08-2006 à 22:22:57  profilanswer
 

Citation :

In Unicode, the character at U+0080 is reserved for control characters, to be determined by the application, but suggested as ISO 6429 C1 set by default. (The C1 controls are the characters in an 8-bit set between 0x80 and 0x9F, reserved for control functions.)
 
In any case, neither Unicode nor ISO 6429 specify a character for the control code 0x80, so by any criteria if you find a character at 0x80 in your Unicode data there is something fishy going on. The most likely explanation is that someone has used the new CP 1252 but has mislabeled it as ISO 8859-1 or ISO 8859-15. Developers should note that they cannot rely on transcoding software to catch the error where there is a 0x80 in data labeled ISO 8859-n; even though modern APIs such as Java 1.4's transcoders will generate exceptions when a bad encoding is detected, 0x80 is a legitimate (though unused) code in ISO 8859-n encodings and so will probably not generate an error. I note that at least some versions of MSXML 4 do the right thing and complain, but in XML 1.0 the behavior has been underspecified and largely up to the skills and expectations of the programmers creating XML parsers.


Donc problème dans l'encodage d'entrée apparement, je peux pas te proposer mieux [:spamafote]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433449
the real m​oins moins
Posté le 29-08-2006 à 23:15:05  profilanswer
 

url please :o


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433458
benou
Posté le 29-08-2006 à 23:37:51  profilanswer
 

the real moins moins a écrit :

Mais oui, ça fait un moment qu'on a compris, confiture :o
Mais ! Quand je tape un € dans un form de ma webapp, je récupere un \u0080


c'est pas le 1er octet de ton caractère encodé en 2 octets en UTF-8 ?

n°1433459
benou
Posté le 29-08-2006 à 23:41:42  profilanswer
 

j'ai déjà posté ça sur blabla je crois, mais ça peut peut être t'aider à comprendre.
 
http://ppewww.ph.gla.ac.uk/~flavel [...] -i18n.html
 
bienvenu en enfer


Message édité par benou le 29-08-2006 à 23:41:48
n°1433462
the real m​oins moins
Posté le 29-08-2006 à 23:57:24  profilanswer
 

bouh


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433464
benou
Posté le 30-08-2006 à 00:11:36  profilanswer
 

mais encore ?

n°1433465
masklinn
í dag viðrar vel til loftárása
Posté le 30-08-2006 à 00:15:37  profilanswer
 


http://www.xml.com/pub/a/2002/09/18/euroxml.html


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1433466
the real m​oins moins
Posté le 30-08-2006 à 00:25:04  profilanswer
 

rci


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
n°1433724
nraynaud
lol
Posté le 30-08-2006 à 14:23:26  profilanswer
 

hep les cons, j'ai ça :  

Code :
  1. final URLClassLoader classLoader = (URLClassLoader) GatherAsClass.class.getClassLoader();
  2.             File classes = new File("classes" );
  3.             final File file = new File(classes, className.replace('.', '/') + ".class" );
  4.             final boolean fileExists = file.exists();
  5.             final String message;
  6.             try {
  7.                 message = className + " was not found in " + classLoader + " file "+ file.getCanonicalPath() + " extists : " + fileExists + " containing " + Arrays
  8.                         .asList(classLoader.getURLs());
  9.             } catch (IOException e) {
  10.                 throw new RuntimeException(e);
  11.             }
  12.             try {
  13.                 final Class clazz = Class.forName(className, true, GatherAsClass.class.getClassLoader());
  14.                return clazz;
  15.             } catch (ClassNotFoundException e) {
  16.                 throw new RuntimeException(message, e);
  17.             }
  18.             catch (Throwable t){
  19.                 throw new RuntimeException(message, t);
  20.             }


et ça me renvoit ça :  

java.lang.RuntimeException: com.pouet.TestsCampaignStrategies was not found in sun.misc.Launcher$AppClassLoader@53ba3d file C:\Documents and Settings\Nicolas\Mes documents\dev\LTG\classes\com\pouet\TestsCampaignStrategies.class extists : true containing [ .... file:/C:/Documents%20and%20Settings/Nicolas/Mes%20documents/dev/LTG/classes/, file:/C:/Documents%20and%20Settings/Nicolas/Mes%20documents/dev/LTG/Quality/classes/, .... ]


 
ce qui signifie en gros que le classloader ne trouve pas la classe, mais que le fichier .class existe et que le répertoire dans lequel elle est est surveillé par le classloader.
 
D'autre part, quand ça marche (le run des tests ne marche qu'une fois, après il faut recompiler tout pour qu'il re-passe), c'est bien dans un classloader qui a la même tête (les même URL) qu'il la trouve.
 
 
edit - la question est :  
quelqu'un a-t-il une idée du pb ?


Message édité par nraynaud le 30-08-2006 à 14:24:14

---------------
trainoo.com, c'est fini
n°1433790
nraynaud
lol
Posté le 30-08-2006 à 16:13:35  profilanswer
 

:up: :fou:


---------------
trainoo.com, c'est fini
n°1433973
el muchach​o
Comfortably Numb
Posté le 30-08-2006 à 21:17:22  profilanswer
 

En même temps, c'est pas vraiment transparent ton code. :o
Avec 2-3 commentaires, ça irait un peu mieux :o
Tu cherches des classes à partir de chemins des .java, c'est ça ?


Message édité par el muchacho le 30-08-2006 à 21:22:28

---------------
Les aéroports où il fait bon attendre, voila un topic qu'il est bien
n°1433975
nraynaud
lol
Posté le 30-08-2006 à 21:21:25  profilanswer
 

le bug non plus remarque [:pingouino]
 


---------------
trainoo.com, c'est fini
n°1434841
nraynaud
lol
Posté le 01-09-2006 à 08:32:16  profilanswer
 

au fait, on avait discuté de la proxytisation il y a quelques années, je retrouve plus le topic, benou était impliqué.
 
on parlait du dé-wrapping de l'exception, voici la bonne réponse :
http://java.sun.com/j2se/1.3/docs/ [...] proxy.html

Code :
  1. public Object invoke(Object proxy, Method m, Object[] args)
  2. throws Throwable
  3.     {
  4.         Object result;
  5. try {
  6.     System.out.println("before method " + m.getName());
  7.     return m.invoke(obj, args);
  8.         } catch (InvocationTargetException e) {
  9.     throw e.getTargetException();
  10.         } catch (Exception e) {
  11.     throw new RuntimeException("unexpected invocation exception: " +
  12.           e.getMessage(), e);
  13. }
  14.     }


je me souviens plus si elle avait été donnée.
 
 
(accesoirement, c'est ça mon bug d'au-dessus, sauf que l'erreur était dans un initialiseur statique de la classe, d'où l'erreur top-level NoClassDefFound)


---------------
trainoo.com, c'est fini
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  156  157  158  ..  327  328  329  330  331  332

Aller à :
Ajouter une réponse
 

Sujets relatifs
[java]Ouvrir un fichier dans la fenetre principaleformation pour developpeurs Java
crontab : programme java[JAVA] Aide pour packager un jar
[java] copie de fichier et progressbarinstallation java
[JAVA]Comment insérer un texte dans un fichier audio?[JAVA] Intégrer ANT : API ou ligne de commande ?
[Java][Bouley]Serializable : mauvaise instanciation des champs[JAVA : JNI] Pb a l'execution avec library
Plus de sujets relatifs à : BlaBlaTech@JAVA [ELITE, viendez les boobs]


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)