Tous les codes sources "Et pourtant ca fonctionne !"
JavaScript
18 September, 2020 à 13:36
#312
(Math.random() * (5 - (-5)) + - 5).toFixed(2)
Markup
27 June, 2016 à 01:30
#292
/* A vendors way of adding padding... */
<p> Jesus sinners doth receive;<br />
Oh, may all this saying ponder<br />
Who in sin's delusions live<br />
And from God and heaven wander!<br />
Here is hope for all who grieve:<br />
Jesus sinners doth receive.<br /><br />
We deserve but grief and shame,<br />
Yet His words, rich grace revealing,<br />
Pardon, peace, and life proclaim;<br />
Here our ills have perfect healing.<br />
Firmly in these words believe:<br />
Jesus sinners doth receive.<br />
(<em>LSB</em> 609:1–2)</div>
</p>
Java
7 June, 2016 à 01:30
#272
public static final String escapePl(String s){
StringBuffer sb = new StringBuffer();
int n = s.length();
for (int i = 0; i < n; i++) {
char c = s.charAt(i);
switch (c) {
case '?': sb.append("a"); break;
case '?': sb.append("c"); break;
case '?': sb.append("e"); break;
case '?': sb.append("l"); break;
case '?': sb.append("n"); break;
case 'ó': sb.append("o"); break;
case '?': sb.append("s"); break;
case '?': sb.append("z"); break;
case '?': sb.append("z"); break;
case '?': sb.append("A"); break;
case '?': sb.append("C"); break;
case '?': sb.append("E"); break;
case '?': sb.append("L"); break;
case '?': sb.append("N"); break;
case 'Ó': sb.append("O"); break;
case '?': sb.append("S"); break;
case '?': sb.append("Z"); break;
case '?': sb.append("Z"); break;
default: sb.append(c); break;
}
}
return sb.toString();
}