技術メモ

技術メモ

2017-02-01から1ヶ月間の記事一覧

smarty(FuelPHP)でphpタグを利用する

やりたいこと キャッシュを有効にしつつ、cssやjsファイルの変更を確実に反映させる – doop クラスView_Smarty(fuel/packages/parser/classes/view/smarty.php)のメソッドparserの下記1行

スクロール追尾ボタンをつくる

js

スクロール追尾ボタンをつくりたい そこで...sticky https://github.com/garand/sticky When the target element is about to be hidden, the plugin will add the class className to it (and to a wrapper added as its parent), set it to position: fixe…

FuelでAjaxを使う

Ajaxでリクエストを投げて、FuelPHPのコントローラで処理する。 フロント var res_json = $.ajax({ type : 'post', url : '/result/fetch.json', data : JSON.stringify(post_data), // POSTするJSONデータ contentType : 'application/json', dataType : 'j…

パイプで並列処理

はじめに 「Software Design 2012年8月号」の「開眼シェルスクリプト」の焼き直し。 Webにあるので一読することを勧める。開眼シェルスクリプト2012年8月号 – 上田ブログ パイプ パイプにつなげたコマンドは並列稼働する(複数のCPUをなるたけ休まず働かせよ…

psqlでSQLとメタコマンドを併用する

結論 実行するSQLとメタコマンドが記述されたファイルsqlite.txtを用意する。 ※デリミタがタブ文字の場合は、カンマを「Ctrl+v+tab」に置き換える。 delete from zipcode_info; delete from zipcode_info2; \copy zipcode_info (pref_code, city_code, zipco…