This file contains hidden or 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 | |
// 50ページ目(24冊✕50ページ=1200冊)までしか表示されなかった | |
for($i=1; $i < 50+1; $i++){ | |
// コンテンツを取得 | |
$ch = curl_init(); | |
curl_setopt_array($ch, [ | |
CURLOPT_URL => 'https://www.amazon.co.jp/s/?rh=n%3A465392%2Cn%3A%21465610%2Cn%3A466280%2Cn%3A2278488051%2Cp_n_publication_date%3A2285541051&sort=date-asc-rank&unfiltered=1&page=' . $i, // 未来30日以内 | |
// CURLOPT_URL => 'https://www.amazon.co.jp/s/?rh=n%3A465392%2Cn%3A%21465610%2Cn%3A466280%2Cn%3A2278488051%2Cp_n_publication_date%3A82837051&sort=date-asc-rank&unfiltered=1&page=' . $i, // 過去30日以内 |
This file contains hidden or 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 | |
// サンプル初期値を入れておく。POSTされた値があったら、それを使う | |
if(empty($_POST['parents'])){ | |
$posted_parents = "100-0001\n100-0002\n100-0003"; | |
}else{ | |
$posted_parents = $_POST['parents']; | |
} | |
if(empty($_POST['children'])){ | |
$posted_children = "100-0001\n100-0002\n100-0003\n123-4567"; |
This file contains hidden or 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
// twitterモジュールを読み込み( npm install twitter ) | |
var twitter = require('twitter'); | |
// アプリ登録時に取得したkeyを入れてOAuth認証し、初期化 | |
var client = new twitter({ | |
consumer_key: 'xxxx', | |
consumer_secret: 'xxxxx', | |
access_token_key: 'xxxxx', | |
access_token_secret: 'xxxxx' | |
}); |
This file contains hidden or 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>連絡先の第三希望まで選択肢を減らしていくサンプル</title> | |
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script> | |
$(function() { | |
$("#優先順位1").change(function() { |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
/* | |
※kintoneでの検索の注意点!! | |
1, 1文字では検索出来ない(最低でも2文字以上) | |
2, 英数字検索が単語単位(cyで、cybozeがヒットしない!) | |
https://help.cybozu.com/ja/k/user/search_details.html | |
*/ | |
// 設定値 | |
const FIELD_CODE1 = "company_name_a"; | |
const FIELD_CODE1_NAME = "会社名A"; |
This file contains hidden or 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 hidden or 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 | |
/* | |
kintone REST APIのupsert自動化の処理時間テスト。 | |
時間かかかるので、コマンドラインから実行する( php upsert.php ) | |
100件で試した所、処理時間は33-38秒だった。単純計算すると1時間で1万レコード? | |
1レコード毎にselect → update/insertしているので遅い(オーバーヘッドがありすぎ) | |
フィールド数が50なのは、csv/excelからのアプリ生成の上限だから(フィールド数は、速度に無関係っぽい) | |
Web APIのエラーコード一覧みたいなのが無いので、エラー処理が出来ない。 |
NewerOlder