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 <stdlib.h> | |
//降順ソート関数 | |
int compare_int(const void *b, const void *a) | |
{ | |
return *(int*)a - *(int*)b; | |
} | |
int main(void) |
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 | |
// アプリケーション設定 | |
define('CONSUMER_KEY', 'xxxx.apps.googleusercontent.com'); // クライアント ID | |
define('CALLBACK_URL', 'http://xxx.com/contacts/callback.php'); //認証が終ったら戻ってくる自分のページ | |
define('AUTH_URL', 'https://accounts.google.com/o/oauth2/auth'); // Goole側で認証してくれる | |
//-------------------------------------- | |
// 認証ページにリダイレクト | |
//-------------------------------------- | |
$params = array( |
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 | |
// アプリケーション設定 | |
define('CONSUMER_KEY', 'xxxx.apps.googleusercontent.com'); //クライアント ID | |
define('CONSUMER_SECRET', 'password mitaina'); // パスワードみたいなもの | |
define('CALLBACK_URL', 'http://xxx.com/contacts/callback.php'); | |
// URL | |
define('TOKEN_URL', 'https://accounts.google.com/o/oauth2/token'); // アクセストークンを取得するURL | |
define('INFO_URL', 'https://www.google.com/m8/feeds/contacts/default/full'); // Contacts(アドレス帳の)API | |
//-------------------------------------- |
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"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>c3.jsのテスト</title> | |
<!-- グラフのライブラリをインポート --> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<!-- https://github.com/masayuki0812/c3 からダウンロードする --> | |
<script src="c3.min.js"></script> |
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
/* | |
chart.jsを使ったkintoneレコードのグラフ化 | |
http://www.messiahworks.com/archives/9005 | |
kintoneデフォルトのグラフ化機能に比べて、これを使うメリット | |
メリットその1、過去の年月と比較できる(デフォルトだと日付順にしかグラフ化できない) | |
メリットその2、データのない月(月単位はともかく、売上等など日単位だとレコードが生成されない)でも、初期値の0で表示される | |
公式サンプル(レーダーチャート) | |
https://cybozudev.zendesk.com/hc/ja/articles/202982064-Cybozu-CDN%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%83%AC%E3%83%BC%E3%83%80%E3%83%BC%E3%83%81%E3%83%A3%E3%83%BC%E3%83%88%E3%82%92%E8%A1%A8%E7%A4%BA%E3%81%99%E3%82%8B |
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
@echo off | |
echo %time% | |
set APP_NO= | |
set SUB_DOMAIN= | |
set API_TOKEN= | |
rem 会員管理アプリから全レコードをダウンロード | |
echo kintone downloading... | |
cli-kintone.exe -a %APP_NO% -d %SUB_DOMAIN% -t %API_TOKEN% -c "$id,年齢" -e sjis > download.csv |
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 | |
// 設定値 | |
define("SEARCH_KEYWORD", '横須賀線,遅延'); // twitter検索したいキーワード | |
define("TWEET_NUM_FOR_MAIL", 10); // 何件以上ヒットしたらメールするか | |
define("SEND_MAIL_ADDRESS", 'your@gmail.com'); // 通知して欲しいメアド | |
define("FROM_MAIL_ADDRESS", 'your@gmail.com'); // 送信元メールアドレス(迷惑メールにならないようにする) | |
define("SINCE_HOUR", 6); // 検索開始する時刻。6なら朝6時から開始(crontabで開始させる) | |
define("UNTIL_HOUR", 7); // この時刻を超えると検索しない。7なら7:59まで | |
define("SLEEP_SECOND", 60); // twitter検索する間隔(秒) |
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
# -*- coding:utf-8 -*- | |
# OpenCVの検出器を指定 | |
cascade_list = [ | |
'/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml', #正面顔 | |
'/usr/share/opencv/haarcascades/haarcascade_profileface.xml', #横顔 | |
# '/usr/share/opencv/haarcascades/haarcascade_eye.xml', #目 | |
# '/usr/share/opencv/haarcascades/haarcascade_eye_tree_eyeglasses.xml', #眼鏡を掛けた目 | |
# '/usr/share/opencv/haarcascades/haarcascade_frontalface_alt2.xml', #正面顔 | |
# '/usr/share/opencv/haarcascades/haarcascade_frontalface_alt_tree.xml', #正面顔 |
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 | |
// 問題: | |
// プログラム引数で与えられる5枚のカード情報から、その5枚を用いて出来る一番強いポーカーの役を判定して出力せよ(*1)(*2)。 | |
// プログラム引数は以下のように与えられる。 | |
// $ prog Ac Th Kd 3h As | |
// カード情報について(*3)(*4)(*5) | |
// 1文字目:数値 (A:エース 2〜9:数字 T:10 J:11 Q:12 K:13) | |
// 2文字目:スート(s:スペード h:ハート d:ダイヤ c:クローバー) | |
// ポーカー役の強さの順番と出力値、それに対応する入力例 |
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 plugin_info{ | |
/** プラグインコード(必須):プラグインを識別する為キーで、他のプラグインと重複しない一意な値である必要があります*/ | |
static $PLUGIN_CODE = "PluginCodeForTest"; | |
/** プラグイン名(必須):EC-CUBE上で表示されるプラグイン名. */ | |
static $PLUGIN_NAME = "テスト用プラグイン"; |