This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = array ('ハンガーゲーム2', 'ゼロ・グラビティ', 'エヴァQ'); | |
$r = mt_rand(0, 2); | |
echo $a[$r] . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "math/rand" | |
import "time" | |
func main() { | |
var a = map[int]string{ | |
0: "ハンガーゲーム2", | |
1: "ゼロ・グラビティ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mb_internal_encoding('UTF-8'); | |
$s = 'ハンガーゲーム2'; | |
$strlen = mb_strlen($s); | |
$a = array(); | |
for ($i = 0;$i < $strlen;$i++) { | |
$a[] = mb_substr($s, $i, 1); | |
} | |
shuffle($a); | |
for ($i = 0;$i < $strlen;$i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GCCX { | |
const DISC = 20; | |
private $_others = array( | |
'USA1', | |
'USA2', | |
'24hour', | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PasswordGenerator { | |
const DEFAULT_LENGTH = 8; | |
private $_numeric = '0123456789'; | |
private $_alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
private $_tmp = array(); | |
public function __construct() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
J.L.A.=.] O.z.c.c.c.c.B.S.S.S.S.F.F.S.Z.v.*.] _ ~ W Q j j j j h h g g g g g h j | |
L.L.F.=.O.O.z.x.c.c.c.c.G.F.F.F.F.F.D.S.F.S.Z.-.&.] _ ~ ~ j j j h j h g g g g g | |
L.L.J.z.O.O.,.c.V.c.c.C.G.D.n.b.9.9.n.n.J.n.n.J.Z.v.l.#._ _ _ j j j j h h h h g | |
L.L.I.w.@.O.,.V.V.V.c.C.S.9.J c J K c x 8.n.J.K.F.F.F.S.l.l.l.] _ ~ j j j j h h | |
L.L.I.N.@.O.,.V.V.H.V.C.P z J J z z s < - k 0.P K 9.n.n.K.S.v.l.l.l._ j _ j h h | |
L.U.L.w.&.O.,.B.H.V.C.J 0 s G V z z c a , , 8 N q l K b.n.K.S.Q.S.v.l.l.l._ Q h | |
L.U.U.Z.&.O.,.B.H.C.L q 8 B B G s J 8.c z < : 8 s z c o.c l.K.K.S.S.S.n.l.l.l.l. | |
P.U.U.Z.#.O.>.B.C.P b 4 8 n V G s J 0.8.c a @ , l K b.o.k k b.K.S.Q.S.S.S.v.v.v. | |
P.U.U.Z.*.@.,.C.0.D 7 4 7 B I G 0 s z p : - @ % < x 8.8.a r a 9.Q.Q.S.S.S.S.S.v. | |
U.P.~.Z.#.@.$.w.D M 4 4 3 G I V q 9 * % + > a : @ < t k k r ; t m.*X2XQ.Q.S.S.S. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"encoding/json" | |
"io/ioutil" | |
"golang.org/x/oauth2" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "github.com/ChimeraCoder/anaconda" | |
func main() { | |
anaconda.SetConsumerKey("") | |
anaconda.SetConsumerSecret("") | |
api := anaconda.NewTwitterApi("", "") | |
var status string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyValidateModel | |
{ | |
public $foo1; | |
public $foo2; | |
public $foo3; | |
public function __construct(stdClass $obj) | |
{ | |
foreach ($obj as $propety => $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"github.com/ChimeraCoder/anaconda" | |
"github.com/garyburd/redigo/redis" | |
"io/ioutil" | |
"math/rand" |
OlderNewer