// 起動時に一度実行されます
void setup() {
// デジタル13番ピンを出力用として設定
pinMode(13, OUTPUT);
}
// 起動中の間繰り返し実行されます
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
const arrA = [1, 2, 3, 4, 5]; | |
const arrB = [6, 7, 8, 9, 10]; | |
const arrDuplicated = [1, 2, 3, 3, 2, 2, 5]; | |
const dataList = [ | |
{id: 1, name: "Sapporo"}, | |
{id: 2, name: "Tokyo"}, | |
{id: 3, name: "Osaka"} | |
]; | |
// ルール |
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
/** | |
* コンテンツのHTML文字列からimg要素をamp-img要素に変換します。 | |
* 動作には「phpQuery-onefile.php」が必要です。 | |
* ダウンロードして参照できるようにしておいてください。 | |
* | |
* @param string | |
* @return string | |
*/ | |
function convertImgToAmpImg($the_content) |
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 deleteJapaneseName(){ | |
var lib = fl.getDocumentDOM().library; | |
for(var i=0; i<lib.items.length; i++){ | |
var o = lib.items[i]; | |
var obj = getItemObject(o.name); | |
var name = obj.name; | |
// 日本語を英語に置換する | |
name = name.split("アセット").join("asset"); | |
name = name.split("シェイプ").join("shape"); |
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> | |
<head> | |
<style> | |
svg{ | |
background-color: #FFFFFF; | |
} | |
</style> | |
</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
// プラグインの読み込み | |
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
gulp.task('compress', function() { | |
return gulp.src('src/*.js') // JSファイルを監視 | |
.pipe(uglify()) // JSファイルを結合 | |
.pipe(gulp.dest('dist')); // 結合したファイルを保存 | |
}); |
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
// インスタンスを作成 | |
var touchManager = new utils.TouchManager(); | |
// デフォルトの挙動を停止させる | |
touchManager.enableTouch(); | |
// 要素を指定。この要素から発生するTouchEventはMouseEventになる | |
touchManager.addListener(document.body); |