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

 

 

 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  890  891  892  ..  2943  2944  2945  2946  2947  2948
Auteur Sujet :

Topic du forum - NEW : multismiley, le nouveau jocebug

n°7235462
joce
"BugHunter"
Posté le 17-12-2005 à 18:00:49  profilanswer
 

Reprise du message précédent :

masklinn a écrit :

Tant mieux, ptet qu'avec la 9.5 finale on aura la coloration pour le java, le C#, le python ou le ruby comme ça :o

Spoiler :

merci kangol :o


 
edit: mais en attendant t'as cassé la balise CPP :o

Code :
  1. #include <stdio.h>
  2. int main(void) {
  3.         int b;
  4.        
  5.         for (b = 99; b >= 0; b--) {
  6.                 switch (b) {
  7.                 case 0:
  8.                         printf("No more bottles of beer on the wall, no more bottles of beer.\n" );
  9.                         printf("Go to the store and buy some more, 99 bottles of beer on the wall.\n" );
  10.                         break;
  11.                 case 1:
  12.                         printf("1 bottle of beer on the wall, 1 bottle of beer.\n" );
  13.                         printf("Take one down and pass it around, no more bottles of beer on the wall\n" );
  14.                         break;
  15.                 default:
  16.                         printf("%d bottles of beer on the wall, %d bottles of beer.\n", b, b);   
  17.                                    printf("Take one down and pass it around, %d %s of beer on the wall.\n"
  18.                                 ,b - 1
  19.                                 ,((b - 1) > 1)? "bottles" : "bottle" );
  20.                         break;
  21.                 }
  22.         }
  23.         return 0;
  24. }



je pourrais même le rajouter tout de suite :o

mood
Publicité
Posté le 17-12-2005 à 18:00:49  profilanswer
 

n°7235480
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:03:02  profilanswer
 

joce a écrit :

oui mais la 9.5 finale est déjà sortie :D


 [:zytrasnif]  
 
9.5.1 alors :o

joce a écrit :

je pourrais même le rajouter tout de suite :o


Hésite pas, un attribut à la balise [code] et roule ma poule :o

Message cité 2 fois
Message édité par masklinn le 17-12-2005 à 18:03:33

---------------
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°7235513
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:07:09  profilanswer
 

d'un coté ca m'étonne pas c'est mon code repris tel quel :D


---------------
Nos estans firs di nosse pitite patreye...
n°7235524
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:08:18  profilanswer
 

masklinn a écrit :

[:zytrasnif]  
 
9.5.1 alors :o
 
Hésite pas, un attribut à la balise [code] et roule ma poule :o


c'est fait :o

n°7235526
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:08:24  profilanswer
 

masklinn a écrit :


Hésite pas, un attribut à la balise [code] et roule ma poule :o


et aussi le numéro de ligne tant qu'on y est (vu que le script le gere)


---------------
Nos estans firs di nosse pitite patreye...
n°7235529
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:08:43  profilanswer
 

[code:cpp][/code]

n°7235534
Prems
Just a lie
Posté le 17-12-2005 à 18:08:56  profilanswer
 

C'est quoi d'ailleurs cette manie de mettre l'accolade sur la même ligne que la fonction ?


---------------
Ratures - Cuisine
n°7235536
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:09:02  profilanswer
 

KangOl a écrit :

et aussi le numéro de ligne tant qu'on y est (vu que le script le gere)


ca y est déjà

n°7235538
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:09:20  profilanswer
 

Prems a écrit :

C'est quoi d'ailleurs cette manie de mettre l'accolade sur la même ligne que la fonction ?


moi j'aime bien :D

n°7235549
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:10:03  profilanswer
 

[code:codealacon]test[/code]

mood
Publicité
Posté le 17-12-2005 à 18:10:03  profilanswer
 

n°7235553
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:10:42  profilanswer
 

KangOl a écrit :

d'un coté ca m'étonne pas c'est mon code repris tel quel :D


ha non pas tel quel et c'est pour ca que ca double les lignes :o
 
remis vite les <p> a la place des <div> :o


---------------
Nos estans firs di nosse pitite patreye...
n°7235554
HumanRAGE
Rage d'être un Humain...LIBRE!
Posté le 17-12-2005 à 18:10:43  profilanswer
 

meme apres ctrl+f5, le double clic dans le code fait tjs n'imp :o
m'en fous jm'en sers pas mais c pour dire quoi [:meganne]


---------------
When I give food to the poor, they call me a saint. When I ask why the poor have no food, they call me a communist. Helder Camara | Telling your employees they're "family" is the corporate equivalent of saying "I love you" to a sex worker.
n°7235560
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:11:06  profilanswer
 

trucs supportés :
 
vb
ruby
python
php
perl
pascal
mysql
java
csharp
cpp
c
asp
 
:o

n°7235595
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:13:54  profilanswer
 

taist:
[code:java]public class EOP99Bottles
{
    /**
     * this main method is very simple -  
     * only throws exception and prints stack trace
     * would You suspect it is 99 bottles program ? :-)  
     */
    public static void main(String[] args)
    {
 try
 {
     throw new BottleException(1, null);
 }
 catch (Exception e)
 {
     e.printStackTrace();
 }
    }
     
    private static class BottleException extends Exception
    {
 private final int cnt;
 /**  
  * notice beauty of this signature: object that may throw exception of  
  * its own type during its creation !!!
  */
 public BottleException(int i, BottleException c)
 throws BottleException
 {
     super(c);
     this.cnt = i;
     try
     {
  int a  = 03 / (99-i);
  throw new BottleException(i+1, this);
     }
     catch (ArithmeticException e)
     {
  //deliberately
     }
 }
 
 public  void printStackTrace()
 {
     System.out.println(cnt+" Bottle(s) of beer on the wall,"+cnt+"bottle(s) of beer" );
     System.out.println("Take one down and pass it around," );
     System.out.println((cnt-1)+" bottle(s) of beer on the wall" );
     try
     {
  getCause().printStackTrace();
     }
     catch (NullPointerException npe)
     {
  //deliberately
     }
     
 }
    }
     
}[/code]
 
Va faloir revoir les couleurs :o
[code:python]## Functional Python:
## Fully-features '99 bottles' with proper English grammar and English numerals.
## Written without procedures or side-effects; no assignment was used except
## that which is inherent in generator expressions and lambda calls.
##
## Nicely fits on one (long) line. :)
 
print ''.join('%(pre)s%(num)s %(bot)s on the wall, %(nul)s %(bot)s,\n%(tak)s\n' % (lambda c,b:
{'pre':['','%s %s on the wall.\n\n' % (c,b)][abs(cmp(c,'Ninety-nine'))],
 'num':c, 'nul':c.lower(), 'bot':b,
 'tak':['Go to the store and buy some more... Ninety-nine %s.' % b,'Take one down, pass it
around,'][abs(cmp(x,0))]
})((lambda x,o: [(['Twenty','Thirty','Forty','Fifty',
'Sixty','Seventy','Eighty','Ninety'][x/10-2]+'-'+o.lower()).replace('-no more',''),
o][int(x<20)])(x, ['No more','One','Two',
'Three','Four','Five','Six','Seven','Eight',
'Nine','Ten','Eleven','Twelve','Thirteen','Fourteen',
'Fifteen','Sixteen','Seventeen','Eighteen','Nineteen'][[x,x%10][int(x>=20)]]),'bottle%s of beer' %
['','s'][abs(cmp(x,1))])
for x in xrange(99,-1,-1))[/code]
 
Ah ben bravo, ce con me sort un smiley pourri quand je lui demande du python :o
 
[code:ruby]#99 Bottles of beer, in Ruby
#by Mike Gertz, Jan 5, 2003
#See www.rubycentral.com for info on the language.
 
class OneBottle
     def sing
 puts "One bottle of beer on the wall."
 puts "One bottle of beer."
 puts "Take it down, pass it around."
 puts "No more bottles of appear on the wall!"
     end
end
 
class TwoBottles
     def sing
 puts "Two bottles of beer on the wall."
 puts "Two bottles of beer."
 puts "Take one down, pass it around."
 puts "One bottle appears on the wall."
 puts  
     end
end
 
class Bottles
    attr_reader :number
 
    def Bottles.verse( number )
 if number > 2
     Bottles.new( number )
        elsif number == 2
     TwoBottles.new
 else
     OneBottle.new
        end
    end
 
    def initialize( number )
        @number = number
    end
 
    def sing
 puts "#{number} bottles of beer on the wall."
 puts "#{number} bottles of beer."
 puts "Take one down, pass it around,"
 puts "#{number - 1} bottles appear on the wall!"
 puts
    end
end
 
99.downto(1) do | i |
    Bottles.verse(i).sing
end[/code]

Message cité 1 fois
Message édité par masklinn le 17-12-2005 à 18:16:07

---------------
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°7235606
stitch+
fais moi Plop !
Posté le 17-12-2005 à 18:15:07  profilanswer
 


le problème du double clic persiste [:gorn nova]  


---------------
viendez broder, mon blog et à écouter : la Pause Bad, parlons badminton
n°7235613
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:15:58  profilanswer
 

ya un stuuut avec ta balise code, j'ai l'impression qu'il y a maintenant des balises <ol> inutiles et ca expliquerait que les couleurs disparaissent lors du double click...


---------------
Nos estans firs di nosse pitite patreye...
n°7235616
Tolor
Mais heu...
Posté le 17-12-2005 à 18:16:05  profilanswer
 

masklinn a écrit :

Nanan on est qu'à la 9.5b, il peut encore ajouter des fitioures :o


Oui mais ça donnera la version 9.6 la finale


---------------
Je ne crois qu'aux statistiques que j'ai moi-même falsifiées
n°7235641
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:18:31  profilanswer
 

stitch+ a écrit :

le problème du double clic persiste [:gorn nova]


c'est la faute a the qui a modifier mon code alors qu'il aurait pas du :o


---------------
Nos estans firs di nosse pitite patreye...
n°7235651
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:19:58  profilanswer
 

[code:cpp]:p[/code]

n°7235662
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:20:58  profilanswer
 

ah ouais c'est con ca aussi :o

n°7235674
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:22:27  profilanswer
 

bon plus de double click maintenant :o


---------------
Nos estans firs di nosse pitite patreye...
n°7235692
stitch+
fais moi Plop !
Posté le 17-12-2005 à 18:24:17  profilanswer
 

KangOl a écrit :

c'est la faute a the qui a modifier mon code alors qu'il aurait pas du :o


trop facile comme réponse :o


---------------
viendez broder, mon blog et à écouter : la Pause Bad, parlons badminton
n°7235696
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:24:52  profilanswer
 

joce a écrit :

[code:cpp]:p[/code]


ca c'est corrigé :o

n°7235713
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:27:15  profilanswer
 

stitch+ a écrit :

trop facile comme réponse :o


bha non compare toi meme :o
 
version de the : http://forum.hardware.fr//include/forum2.js
version original : http://kangol.dyndns.org:81/tests/numberswitcher.htm


---------------
Nos estans firs di nosse pitite patreye...
n°7235750
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:31:04  profilanswer
 

[code:lisp](labels ((foo (x)
   (and (<= 0 x) (cons x (foo (1- x))))))
   (format t (format nil  
        "~~{~~&~~@(~~%~~R ~A ~A!~~)~~:*~~&~~@(~~R~0@*~A!~~)~~&~~@(~2@*~A!~~)~~&~~@(~~[~A~~:;~~:*~~R~~:*~~]~0@*~A!~~)~~}"
     "bottles of beer"
     "on the wall"
     "take one down, pass it around"  
     "no more"
     )
 (foo 99)))[/code]
Et pourquoi on a pas lisp [:petrus dei]

Message cité 1 fois
Message édité par masklinn le 17-12-2005 à 18:31:27

---------------
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°7235753
KangOl
Profil : pointeur
Posté le 17-12-2005 à 18:31:28  profilanswer
 

sinon pour le :p qui fait souvent sont apparition a des endroits ou il devrait pas, suffit que la séquence des smiley courts ( :p, :d, :), :( et autres) soient soit précédé et suivi d'un espace soit les seuls caractères du message :o


---------------
Nos estans firs di nosse pitite patreye...
n°7235759
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:32:04  profilanswer
 

le truc du python est corrigé aussi :o

n°7235764
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:32:22  profilanswer
 

masklinn a écrit :

[code:lisp](labels ((foo (x)
   (and (<= 0 x) (cons x (foo (1- x))))))
   (format t (format nil  
        "~~{~~&~~@(~~%~~R ~A ~A!~~)~~:*~~&~~@(~~R~0@*~A!~~)~~&~~@(~2@*~A!~~)~~&~~@(~~[~A~~:;~~:*~~R~~:*~~]~0@*~A!~~)~~}"
     "bottles of beer"
     "on the wall"
     "take one down, pass it around"  
     "no more"
     )
 (foo 99)))[/code]
Et pourquoi on a pas lisp [:petrus dei]


ba je te le mets si tu veux :o

n°7235780
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:34:41  profilanswer
 

done pour le lisp
 
c'est vrai que les couleurs via le css sont pas top quand même :/

n°7235787
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:35:42  profilanswer
 

sans passer par le CSS ca donne ca

n°7235799
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:38:06  profilanswer
 

joce a écrit :

sans passer par le CSS ca donne ca


Failed :o
 
Au fait, pour tester les langages tu peux récupérer du code à http://99-bottles-of-beer.net/ :o


---------------
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°7235806
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:39:03  profilanswer
 

masklinn a écrit :

Failed :o
 
Au fait, pour tester les langages tu peux récupérer du code à http://99-bottles-of-beer.net/ :o


pour le LISP oué :D

n°7235828
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:41:56  profilanswer
 

joce a écrit :

pour le LISP oué :D


Nan failed pour le "sans passer par les CSS" :o
(enfin un peu pour Lisp aussi j'ai l'impression, mais pas grave)


---------------
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°7235861
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 18:46:23  profilanswer
 

masklinn a écrit :

Nan failed pour le "sans passer par les CSS" :o
(enfin un peu pour Lisp aussi j'ai l'impression, mais pas grave)


ba si ca marchait bien sans passer par le CSS :??:
sinon pour le lisp y a un bug dans geshi, il coupe au milieu le &lt; :D

n°7235866
masklinn
í dag viðrar vel til loftárása
Posté le 17-12-2005 à 18:47:13  profilanswer
 

joce a écrit :

ba si ca marchait bien sans passer par le CSS :??:


Ah ok je pensais que tu postais un truc :o


---------------
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°7235958
Mjules
Parle dans le vide
Posté le 17-12-2005 à 19:02:10  profilanswer
 

ça pose pas de problème de licence d'intégrer Geshi dans le forum ?


---------------
Celui qui pose une question est idiot 5 minutes. Celui qui n'en pose pas le reste toute sa vie. |  Membre du grand complot pharmaceutico-médico-scientifico-judéo-maçonnique.
n°7235963
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 19:02:50  profilanswer
 

je suis en train de lire la partie "license" là :D

n°7235971
Profil sup​primé
Posté le 17-12-2005 à 19:04:41  answer
 

pour ou contre la confirmation lors de la mise en ignore list... p'tin, y en a qui ont des soucis métaphysiques dans la vie quand même [:dawa]

n°7235982
0x90
Posté le 17-12-2005 à 19:06:07  profilanswer
 

Serait-il possible d'avoir des noms de classes plus significatives pour la coloration-syntaxique ? ( genre des classes keywords, strings, etc... et pas de1 li1 co1 ... )


---------------
Me: Django Localization, Yogo Puzzle, Chrome Grapher, C++ Signals, Brainf*ck.
n°7236057
joce
&#034;BugHunter&#034;
Posté le 17-12-2005 à 19:14:13  profilanswer
 

0x90 a écrit :

Serait-il possible d'avoir des noms de classes plus significatives pour la coloration-syntaxique ? ( genre des classes keywords, strings, etc... et pas de1 li1 co1 ... )


non, c'est généré automatiquement par geshi

Message cité 1 fois
Message édité par joce le 17-12-2005 à 19:14:24
n°7236086
0x90
Posté le 17-12-2005 à 19:16:29  profilanswer
 

joce a écrit :

non, c'est généré automatiquement par geshi


 
Arf tt pis ... [:spamafote] ( 'fin ca va y'a une classe avec le nom du language c'est cool ca :) )
 
Sinon le bug des caractères UTF-8 tronqués, c'est corrigé ou pas ?


---------------
Me: Django Localization, Yogo Puzzle, Chrome Grapher, C++ Signals, Brainf*ck.
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  890  891  892  ..  2943  2944  2945  2946  2947  2948

Aller à :
Ajouter une réponse
 

Sujets relatifs
Votre avis sur forum HFRforum sexy
recencement des sarthois du forumForum Etudiant ...
j chui new sur ce forum é jé un pbPetite modif sur le forum ?
A quoi ressemblera le forum dans 10 ans ?pas tres actif le forum à 2h du mat ...
Info : Forum Indisponible à partir de 1 heureTopik Unique des posts qui vous ont fait le plus rire sur le forum !
Plus de sujets relatifs à : Topic du forum - NEW : multismiley, le nouveau jocebug


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