今回はDXレジェンドライドマグナムをベースに、レジェンドライダーのライドケミートレカの認識機能を強化して、全てのライダーを個別認識可能にしてみました。各作品の1号・2号・ダークライダーも区別して認識します。 開発経緯元ネタ ...
今回はDXレジェンドライドマグナムをベースに、レジェンドライダーのライドケミートレカの認識機能を強化して、全てのライダーを個別認識可能にしてみました。各作品の1号・2号・ダークライダーも区別して認識します。 開発経緯元ネタ ...
Summary 普段使い用 PowerShell メモ 思惑 個人的には、 PowerShell はスクリプトをゴリゴリ書くよりも、 ちょこちょこ作業するのに向いていると思っている。 ただ、しばらく使っていないと忘れたりするので、そういうものをまとめてみる。 Linux で、grep とか使って、よくやりそうな感じのやつ。 共用パソコンなどの自分の環境以外でも使えることを想定しているので、 できるだけデフォルトの状態で、できるものに限定する。 また、普段使い想定なので、タイプ数を減らすのを優先していたりするので、 PowerShell の文法的には微妙なところも多少ある。 grep それ Select-String でできるよ
Pythonを使ってこの方さまざまな点につまずいたが、ここではそんなトラップを回避して快適なPython Lifeを送っていただくべく、書き始める前に知っておけばよかったというTipsをまとめておく。 Python2系と3系について Pythonには2系と3系があり、3系では後方互換性に影響のある変更が入れられている。つまり、Python3のコードはPython2では動かないことがある(逆もしかり)。 Python3ではPython2における様々な点が改善されており、今から使うなら最新版のPython3で行うのが基本だ(下記でも、Python3で改善されるものは明記するようにした)。何より、Python2は2020年1月1日をもってサポートが終了した。よって今からPython2を使う理由はない。未だにPython2を使う者は、小学生にもディスられる。 しかし、世の中にはまだPython3に
そこそこの複雑な計算をするのにExcelはものすごく便利です。何かのプログラミング言語を使って書いたら1時間くらいかかるような計算が、ものの数分でシート上にできあがります。 この素晴らしいExcelを、より使いやすくするワザを、プログラマ的な視点から書きたいと思います。 拡張性のないシート そういうわけで、Excelは素晴らしいんですが、使う人によってはなんとも「拡張性のないシート」ができあがります。 僕はプログラマなので、こういう素晴らしいツールを使いはじめると、どうしても拡張性とか保守性みたいなものが気になってしまいます。プログラマは同じことを繰り返すのが苦手です。シートにデータを入力してから完成形ができあがるまでに人手を使うことを避けて、全部を自動化したくなります。 次のようなことをしていたら、Excelを正しく使えていないような気がします。 途中で電卓を使って計算してセルを埋めてい
2008年04月09日01:00 カテゴリLightweight Languages perl - Encode 入門 すでにOSCONでもYAPCでも、あちこちそちこちでこの基本方針に関しては話したのですが、ここ 404 Blog Not Found でも改めて。 Perl で utf8 化けしたときにどうしたらいいか - TokuLog 改め だまってコードを書けよハゲ 入り口で decode して、内部ではすべて flagged utf8 で扱い、出口で encode する。これがすべてです!とにかくこの基本方針をまもっていれば幸せになれます。ここでは、EUC-JPでエンコードされたファイル中の「小飼弾」「こがいだん」「コガイダン」「Kogai Dan」を正規表現で書き換えて標準出力にEUC-JPで出力するプログラムを例にとって説明します。 decode() then encode(
JavaScriptが、いま注目を浴びている。 長い冷遇の時代を経ながらも、Ajaxという技術の登場とも相まって、JavaScriptの価値はいままた確実に見直されつつある。その過去の凋落と近年の華々しい脚光は、「復権」と呼んでもよいかもしれない。 本連載は、JavaScript復権のいまこの時代に求められる、JavaScriptという言語への理解を再確認しようというものだ。その連載、第3回となる今回扱うテーマは、「変数」である。どのような言語においても同様であるが、コード上で値を入力し、処理した結果を格納し、また、ほかへと引き渡すすべての基本となるのが変数だ。プログラミング言語を理解するうえにおいて、変数の理解は欠かせない。そして、それはJavaScriptの世界においても同様だ。 本稿では、JavaScriptにおける変数のデータ型に始まり、そのスコープ(有効範囲)の概念、そして、初学
LinuxカーネルやRuby on Rails、Perlなど、近年多くの大規模プロジェクトで採用されているバージョン管理システムが「Git」だ。Gitには非常に多数のコマンドが用意されているが、日常的に使用するコマンドは20個程度と言われている。本記事では、Gitを使いこなすために覚えるべき20個のGit基本コマンドを紹介する。 LinuxカーネルやRuby on Rails、Perlなど、近年多くの大規模プロジェクトで採用されているバージョン管理システムが「Git」だ。Gitには非常に多数のコマンドが用意されているが、日常的に使用するコマンドは20個程度と言われている。本記事では、Gitを使いこなすために覚えるべき20個のGit基本コマンドを紹介する。 なお、Gitの基本的な考え方や使い方については分散バージョン管理システムGit入門でも紹介しているので、そちらも参照してほしい。
今まで、PHPからPOSTリクエストを送信する方法は、fsockopen関数を使って書く方法しか知らなかったが、調べてみると意外といろいろな方法があった。 fsockopen関数を使う方法 →参考:PHP TIPS Vol.3 ソケット拡張モジュールを使う方法 →参考:HTTPリスエストをそのまま返すPHPサーバ | Shin x blog ストリーム関数+ファイルシステム関数を使う方法 →参考:cURLを使わずに、PHPでPOSTリクエストを送信する - PHPプロ!ニュース HTTP拡張モジュールを使う方法 CURL関数を使う方法 →参考:php curlをつかったオリジナルクラス (myCurlRequest) - hiyuzawa.jpn.org Zend_Http_Clientを使う方法 →参考:【PHP TIPS】 51. ス
なにかとPerl、Python、Ruby、JavaScript等の言語と比べて機能の不足を言及されることの多いPHPですが、 PHPには逆にこれらの言語にはない機能がある、それはインターフェイスだ、という話です。 このインターフェイスという奴は、タイプヒンティングと共に、PHPという言語がさっき挙げたような他の軽量言語とは違ったプログラミングスタイルを持っていることを象徴しています。 インターフェイスって何? JavaやAS3なんかをやっている人だとわかるかと思いますが、有体にいえばinterfaceとはメソッドの宣言を集めたものです。 PHPマニュアルから説明を引用すると インターフェイスにより、あるクラスが実装する必要があるメソッドの 種類を、 これらのメソッドの実体を定義することなく、指定するコードを作成できるようになります。 (PHP: オブジェクト インターフェイス - Manu
PHPを始めたばかりのころ自分なりにやってた工夫と、それこうした方がいいんじゃないのという提案 2010年12月07日 09:00PHP PHP Advent Calendar jp 2010 に参加しています。 PHP に関する記事を日替わりで書こうというイベントですね。 昨日の slywalker さんに続いて6日目。 さて PHP というかウェブに関することは何もかも独学で 始めたばかりの頃は特に 一般的なやり方というものがさっぱりわかっていなかったので わかることの範囲内で自分なりの工夫をしてました。 そういう経験はとても大切だと思うんだけど、 かなり無駄な手間がかかっていたり やらない方がいいことをやっていたりもしたので 導いてくれる人がいなかったその頃の自分に対して こうやってはどうか、という提案を書いてみようと思います。 「なに、そんな愚かしいことしてたの」 と言いたくなるよ
Make a note of it: Web tech, montaineering, and so on. Note: この記事は、3年以上前に書かれています。Webの進化は速い!情報の正確性は自己責任で判断してください。 JavascriptでGETリクエストパラメータを取得する方法。ポップアップ・ウィンドウに値を渡すとか、処理にワンクッション挟みたい場合に便利。 key1 = Script var qsParm = new Array(); function retrieveGETqs() { var query = window.location.search.substring(1); var parms = query.split('&'); for (var i=0; i<parms.length; i++) { var pos = parms[i].indexOf('=')
正規表現の概要 正規表現は、Perlの中で最も重宝する機能のひとつです。正規表現にはテキスト処理のための様々な機能があり、文字列の中から特定のパターンを見つけ出したり、置換したりすることができます。 正規表現の基本的な使用方法 たとえば、$strという変数に格納したデータの中から、「A」で始まって途中は何があるかわからないが最後が「E」という文字列を探したい場合、次のように記述することで、条件にマッチする文字列を見つけることができます。 $str =~ /A.*E/; 上記では、ドット( . )が改行以外の1文字を表し、アスタリスク( * )がその任意の文字の0回以上の繰り返しを意味します。このように、正規表現において特殊な働きを持った文字を正規表現演算子、またはメタ文字と呼びます。また、=~ はパターン結合演算子と呼ばれ、「左辺の値から右辺の値を検索する」という意味があります。 正規表現
Hacking the Hack #92: iTunes COM API で今聞いている曲を Blog エントリに掲載 Blog Hacks Hack #92 では、Winamp とそのプラグイン amip を使用して、今聞いている曲をエントリに追記する方法を紹介していますが、iTunes の場合は COM を利用してもっとスマートにできます。 以下のコードを nowPlaying-iTunes.js として保存します。 // Configurtaion: path to your MT script and blogID var mtUrl = "http://blog.bulknews.net/mt/mt.cgi"; var blogID = 6; // Get Trackname from iTunes using COM var iTunes = WScript.CreateObj
Javascriptのdocument.writeを使ってたくさんの内容を出力したいことってあると思います。複数行出力するときはいろいろな書き方ができます。 以下のように都度記述する方法もあれば… document.write('<div id="exampleBlock">'); document.write('<h2>example</h2>'); document.write('<p>foo bar</p>'); document.write('</div>'); 以下のようにwith文を使って親オブジェクトの名前を省略して記述する方法もあります。 with(document){ write('<div id="exampleBlock">'); write('<h2>example</h2>'); write('<p>foo bar</p>'); write('</div>');
最近 PHP 日付関連の関数をいろいろいじっていたので、いろいろな日付の計算関係をまとめてみました。 日付の単位について 基本的なことですが、一応まとめておきます。 1秒は1000ミリ秒 1分は60秒 1時間は60分 よって 1時間=60分=3600秒 1日=24時間=1440分=86400秒 現在時刻の取得 まずは、最もよく使う処理です。 //date関数を使う場合 date("Y-m-d H:i:s"); //strftime関数を使う場合 strftime("%Y-%m-%d %H:%M:%S"); 日付/時刻のパース 日付/時刻を表したある書式の文字列から、年、月、日、時、分、秒を取得します。 //strptime関数を使用した場合 $date = strptime("2007-08-12 10:35:20", "%Y-%m-%d %H:%M:%S"); print("yea
id:cheesepie:20070131:1170172709 最近は、こういう風に JavaScript を勉強する人が増えていてとても嬉しいです ^^ id:cheesepie さん頑張ってください! で、ちょっと配列と連想配列の使いかたが違うようなので、エントリーを書こうと思いました。おせっかいだったらすみません>< ! やっぱり、このへんが JavaScript の難しいところのひとつなのだろうか。 ということで、 JavaScript の配列と連想配列の違い いってみよおー 連想配列とは JavaScript では連想配列は一番シンプルなオブジェクトのことである。つまり、すべてのオブジェクトは連想配列である。 以下のすべての連想配列はまったく同じものである。 // 1 var obj = { hoge: 'hoge' }; // 2 var obj = { 'hoge': 'h
スクリプト言語であるPHPとOracleの連携の他、XML、オブジェクト指向、デザインパターン、周辺ツールについて、色々と試したり調べたりしたことを備忘録的にまとめて公開Do You PHP?では、スクリプト言語であるPHP - PHP Hypertext Preprocessor -とOracleの連携の他、XML関連、オブジェクト指向、デザインパターン、PhpUnitなどの周辺ツールについて、色々と試したり調べたりしたことを(備忘録的に)まとめて公開しています。 初めての方は、まず「初めての方へ」のページをご覧下さい。 2008/08/08付で、PHP4.4.9がリリースされました。PHP4.4.9が最後のPHP4となり、今後、機能改善・バグFIX・セキュリティFIXなどのサポートは行われません。このため、現在ではPHP5系への移行が推奨されています。詳細は、GoPHP5.orgを参照
My ErgoDox! 1ヶ月ちょい前のことですが。ErgoDox users meet upというマジキチ紳士の集いに参加してきました。 ErgoDoxそのものは前からちょっと気になってた程度ですが、尊敬する握力王が推奨しているとなれば、手に入れるほかありません。 HHKBの打鍵感は大好きですが、そろそろ新しいキーボードが欲しかったというのもアリ。 やっぱ入力装置は定期的に交換して、脳に刺激を入れてやらないとネ。 その点、カスタマイズ性の高いErgoDoxは最適だと思いました。 なお、ポート株式会社ではエンジニアの福利厚生の一環として「PC周辺機器購入制度」なるものが存在しており、どんなキーボードでも経費で購入できます。デザイナ、エンジニアは常に募集中です!(宣伝おわり) ErgoDoxとは 左右分割式のキーボードです。正確にはプロジェクト名と言ったほうが良く、ErgoDoxという商品が
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く