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
#include <stdio.h> | |
#include <limits.h> | |
int main() | |
{ | |
long i1 = -1; | |
long i2 = LONG_MIN; // -9223372036854775808 | |
unsigned long u = ULONG_MAX; // 18446744073709551615 | |
printf("%ld\n", i1>>1); // 最上位ビット維持、算術シフト (-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 | |
abstract class Foo { | |
abstract public function func(int $y); | |
} | |
class Bar extends Foo { | |
public function func(int $y) { | |
return 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
package main | |
import ( | |
"log" | |
"time" | |
) | |
func main() { | |
log.Fatalf("Now() = %s", time.Now()) |
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
// ----------------------------------------------------------------------------- | |
// To build softfloat enabled go binary, apply this patch to go1.8.3 source tree. | |
// | |
// $ patch -p1 <this file> | |
// | |
// And then, build like below. | |
// | |
// $ cd src | |
// $ GOROOT_BOOTSTRAP=<your_GOROOT> GOOS=linux GOARCH=misp GOMIPS=softfloat ./make.bash | |
// |
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 | |
$sleep_time = 0; | |
$loop = 1000; | |
if (preg_match('/^(\d+)s$/', $argv[1])) { | |
$sleep_time = (int)$argv[1]; | |
} | |
$usleep_time = (isset($argv[1]) && $argv[1] > 0) ? (int)$argv[1] : 1000; | |
if ($sleep_time > 0) { | |
printf("sleep%d\n", $sleep_time); |
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
APCu | |
APM | |
Bitset | |
Druid | |
Mosquitto | |
PDO_IBM | |
PDO_INFORMIX | |
PDO_SQLANYWHERE | |
SeasLog | |
Weakref |
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
#!/usr/bin/env php | |
<?php | |
/* | |
+----------------------------------------------------------------------+ | |
| PHP Version 7 | | |
+----------------------------------------------------------------------+ | |
| Copyright (c) 1997-2017 The PHP Group | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 3.01 of the PHP license, | | |
| that is bundled with this package in the file LICENSE, and is | |
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 | |
$manufacture = "敇瑭步挮浯䩟"; | |
echo mb_convert_encoding($manufacture, "UTF-16LE", "UTF-8"); |
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 | |
$array_size =isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 1024; | |
$access_loop = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : 16; | |
$usleep_time = 200000; // 200ms | |
$loop_for_accuracy = ($array_size >= 1024) ? 1 : (1024 / $array_size); | |
// 事前準備 | |
for ($j = 0; $j < $loop_for_accuracy; $j++) { | |
for ($i = 0; $i < $array_size; $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
#!/bin/bash | |
# Channel hopping shell script | |
# GPLv2 | |
# Portions of code graciously taken from Bill Stearns defragfile | |
# http://www.stearns.org/defragfile/ | |
# | |
# jwright@hasborg.com | |
# Defaults | |
BANDS="IEEE80211B" |