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 | |
$dsn = 'mysql:dbname=singularity;host=localhost'; | |
$user = 'ユーザー名'; | |
$pass = 'パスワード'; | |
$pdo = new PDO($dsn, $user, $pass); | |
// 1年のうちの日ごとに処理をする | |
for ($i = 0; $i < 365; $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
-module(salvageon). | |
-export([main/0]). | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% CodeIQ / サルベジオン問題 を解きました。 | |
% (https://codeiq.jp/ace/yuki_hiroshi/q1215) | |
% | |
% ・db1 はキーが昇順にソートされているので二分探索で探せば見つかります。 | |
% 大きな整数を扱える、Erlang でプログラムを書きました。 | |
% |
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
bool HelloWorld::init() | |
{ | |
if ( !Layer::init() ) | |
{ | |
return false; | |
} | |
auto ud = UserDefault::getInstance(); | |
ud->setStringForKey("aaa", "ほげほげほげ"); | |
ud->flush(); |
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
use std::fs::OpenOptions; | |
use std::path::Path; | |
use std::io::BufWriter; | |
use std::io::Write; | |
// 画素 | |
struct PIXEL { | |
r: u8, | |
g: u8, |
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 | |
require __DIR__ . '/../vendor/autoload.php'; | |
define('CONSUMER_KEY', ''); | |
define('CONSUMER_SECRET', ''); | |
define('ACCESS_TOKEN', ''); | |
define('ACCESS_TOKEN_SECRET', ''); |
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 com.example.ndkpointer; | |
import android.app.Activity; | |
import android.os.Bundle; | |
public class MainActivity extends Activity { | |
static { | |
System.loadLibrary("NdkPointer"); | |
} |
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 <jni.h> | |
#include <android/log.h> | |
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"NdkPointer", __VA_ARGS__) | |
static JavaVM* jvm = nullptr; | |
static JNIEnv* env; | |
class CppClass { |
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 | |
// ファイルを開く | |
$fp = fopen('./logo_blog.bmp', 'r'); | |
// ファイルヘッダの解析 | |
$fielHeaderFormat = [ | |
'a2'.'bfType', | |
'V'. 'bfSize', | |
'v2'.'bfReserved', | |
'V'. 'bfOffBits', |
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 | |
// PHPのプロセスをデーモン状態にする | |
$pid = pcntl_fork(); | |
if ($pid < 0) { | |
die("フォーク失敗\n"); | |
} else if ($pid > 0) { | |
// 親プロセス | |
exit(); |
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 | |
error_reporting(E_ALL); | |
set_time_limit(0); | |
ob_implicit_flush(); | |
function main() { |
OlderNewer