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 Excel_cell_pointer { | |
private $map = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Z']; | |
/** | |
* | |
* @param string $col_label // 列 | |
* @param integer $row_label // 行 | |
*/ | |
public function __construct($col_label = 'A', $row_label = 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
- Backtraking | |
- Knight's tour problem | |
- N Queens Problem | |
- Cryptography | |
- Affine Cipher | |
- Caesar Cipher | |
- Dynamic Programming | |
- Catalan Number | |
- Fibonacci Sequence | |
- Integer Partition |
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
!function(app){ | |
let instance = null; | |
let listener = {}; | |
let callback = {}; | |
let nonameListener = 'event'; | |
let nonameListenerNum = 0; | |
class Event{ | |
constructor(){ |
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
class Path{ | |
private static function encode_special_text($path){ | |
$path = str_replace(':/','{{ptcl_sep}}',$path); | |
return $path; | |
} | |
private static function decode_special_text($path){ | |
$path = str_replace('{{ptcl_sep}}',':/',$path); | |
return $path; | |
} | |
// ========================================================================= |
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
// register_taxonomy ↓ | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/register_taxonomy | |
add_action('init','custom_tax'); | |
function custom_tax(){ | |
$label_arr = array( | |
'name' => '', // タクソノミーの一般的な名前(普通は複数形)。 $tax->label によって上書きされて同じになる。デフォルトは _x( 'Post Tags', 'taxonomy general name' ) または _x( 'Categories', 'taxonomy general name' ) 。この文字列を国際化するときは、gettext context を使用してカスタム投稿タイプに合わせてください。例: _x('Writers', 'taxonomy general name'); | |
'singular_name' => '', // タクソノミーのオブジェクト 1 個の名前(単数形)。デフォルトは _x( 'Post Tag', 'taxonomy singular name' ) または _x( 'Category', 'taxonomy singular name' ) 。この文字列を国際化するときは、gettext context を使用してカスタム投稿タイプに合わせてください。例: _x('Writer', 'taxonomy singular name'); | |
'menu_name' => '', // メニュー名の文字列。メニュー項目の名前になります。無指定の場合、デフォルトで name のラベルが入ります。 | |
'all_items' => '', // 「すべての項目」の文字列。デフォルトは __( 'All Tags' ) または __( 'All Categories' ) | |
'edit_item' => '', // 「項目を編集」 |
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
// register_post_type ↓ | |
// http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/register_post_type | |
// taxonomiesは省略しています。追加するかregister_taxonomy()を利用してください。 | |
add_action('init', 'custom_post'); | |
function custom_post(){ | |
$label_arr = array( | |
// 'name' => '', // 投稿タイプの一般名、通常は複数形。省略すると $post_type_object->label と同じ値になる。 | |
// 'singular_name' => '', // この投稿タイプのオブジェクト 1 個の名前(単数形)。デフォルトは 'name' の値。 | |
// 'menu_name' => '', // メニュー名のテキスト。メニュー項目の名前を決める文字列です。デフォルトは 'name' の値。 | |
// 'name_admin_bar' => '', // 管理バーの「新規追加」ドロップダウンに入れる名前。デフォルトは、'singular_name' があればその値になり、無ければ 'name' の値になる。 |
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
ini_set('display_errors', 0); // 画面へのエラー非表示 | |
ini_set("log_errors", 1); // エラーログ出力 | |
ini_set('error_log','/home/sites/heteml/users86/y/o/k/yokotakenji/web/log/wp-content/themes/log2015/log/debug.log'); // エラーログのパス指定 | |
// ob_start(); // バッファへの出力を開始 | |
// var_dump("dddd"); // ダンプして | |
// $cnt = ob_get_contents(); // バッファ内容を取得して | |
// ob_end_clean(); // バッファ終了 : 終了と同時にバッファが消されるので注意 | |
// error_log($cnt); // エラーログとして出力 | |
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
// ============================================================================= | |
// 指定された固定ページの親子関係か否か | |
// ============================================================================= | |
function _in_page($val = ""){ | |
global $post; | |
$valArr; | |
$val = preg_replace('/\/$/', '', $val); | |
$val = preg_replace('/^\//', '', $val); | |
$valArr = preg_split("/\//", $val); |
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
<!doctype html> | |
<html lang="ja-JP"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>DmP03 template</title> | |
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | |
<script> | |
// ここにコードを書きましょう! | |
</script> | |
</head> |
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
/// <reference path="../d.ts/DefinitelyTyped/jquery/jquery.d.ts" /> | |
/// <reference path="../d.ts/DefinitelyTyped/threejs/threejs.d.ts" /> | |
class Sample{ | |
camera : THREE.PerspectiveCamera; | |
scene : THREE.Scene; | |
renderer : THREE.CanvasRenderer; | |
geometry : THREE.CubeGeometry; | |
material : THREE.MeshBasicMaterial; | |
mesh : THREE.Mesh; |