呼称: インスペクション機能の触り 目的: inspect モジュールの使用方法を学ぶ 特徴: ログ出力時に pprint モジュールを使うと整形されて見易い 用例: 実行中のソースの行番号を出力する、デバッグ 備考: inspect モジュールはもっと奥が深そう Python で実行中のソースの行番号を出力する仕組み(C 言語でいう __LINE__ マクロがあるかどうか)を調べてみたら、幾つかの方法が分かりました。sys._getframe を使う方法もありますが、ここでは inspect モジュールの使用方法を紹介します。 シンプルな方法では、以下で現在行を取得できます。 inspect.currentframe().f_lineno ある共通関数で、どこから呼び出されたか知りたい場合、以下で呼び出し元の行番号を取得できます。 inspect.currentframe().f_bac
This site has been moved to a new location - Bin-Blog. All new post will appear at the new location. The moment I saw the print_r() function of PHP, I fell in love with it. It is a very necessary function and I cant understand why no other language supports it. Perl does - if you are using the Data::Dumper module. I have created a function in PHP that will call print_r() function. It will put the
OpenJS > Scripts > dump() - Javascript equivalent of PHP's print_r() function The moment I saw the print_r() function of PHP, I fell in love with it. It is a very necessary function and I cannot understand why no other language supports it. JavaScript is one such language. So, I have ported the print_r function to javascript. /** * Function : dump() * Arguments: The data - array,hash(associative a
The component is available from GitHub: Direct Download (Master Branch, Zip format) GitHub Repository Home All downloads and code are covered by our Source Code Policy. The library consists of a single JavaScript file with a .JS extension. Importing the Library The library must be imported before it is used. To import the library use the <script> tag. For example: <script type="text/javascript" sr
お探しのページが見つかりませんでした。 この度は、八千代産業株式会社WEBサイトご来訪いただきありがとうございます。 お客様のアクセスしようとしたページ、またはファイルは、下記のような理由によりご覧いただくことができません。 ・入力したURLが間違っているため ・2016年4月のサイトリニューアルに伴い、該当するURLのページが移転し、URLが変更されたため ・ページが削除されたため ・現在、メンテナンス中のため一時的に表示していないため ブラウザの再読み込みを行ってもこのページが表示される場合は、URLをご確認いただくか、 または以下よりサイトマップページへアクセスし目的のページをお探しください。 > サイトマップ
A attempt to port the php function print_r to javascript and jQuery. It simply returns a nested string containing information about the passed object. Returns information about: Strings Numbers Booleans Dates Arrays Objects jQuery Objects RegExp Errors DOMElements Functions Usage: $.dump( object ): <pre id="dump"></pre> <script type="text/javascript"> $(document).ready(function(){ var
あっという間に、弊社の「旅する支社」制度、自分の滞在最終日になりました。 この「旅する支社」制度、参加する社員がいっせいにイタリアオフィスに移動するわけではなく、数人ごとのチーム編成を組んでローテーションで時期をずらしながら約一ヶ月間滞在しています。 さて、本題のObjectDumperについて。 本当は「ポップアップブロックをブロックして指定サイズでウィンドウを開く方法」を記事にまとめるつもりだったんですが、いろいろ調べていくうちに迷宮に入ってしまったので、今回は最近Flashで感動したObjectDumperについて(いまさら!)まだ知らない方へ向けての意味も込めて記事にしてみました。 さらば“ [object Object] ” オブジェクトをtrace出力すると、[object object]と表示されるだけで、その中身を見ることができません。なので、今まではいちいちtrace(m
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く