Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives
たとえば PHP で、 if ($hoge) { ... } とか書いてあったら、 $hoge がどんな値のときに if の中身が実行されるのか即答できますか。 こういう書き方は多くの言語で可能ですが、言語によって何が真で何が偽になるのかが異なるので、それぞれまとめてみました。 C言語 C言語には bool 型が無い。 0 (int) だけが偽となり、それ以外はすべて真となる。 NULL 定数は stddef.h で以下のように ((void*)0) と定義されているため、偽値として使える。 意見が分かれそうなところですが、個人的にはNULLを偽値として使用するは好きじゃないです。 #ifndef __cplsuplus #define NULL ((void*)0) #else #define NULL __null #endif C++ C++になると bool 型が出てくる。C と同
I'd like to store a JavaScript object in HTML5 localStorage, but my object is apparently being converted to a string. I can store and retrieve primitive JavaScript types and arrays using localStorage, but objects don't seem to work. Should they? Here's my code: var testObject = { 'one': 1, 'two': 2, 'three': 3 }; console.log('typeof testObject: ' + typeof testObject); console.log('testObject prope
Sorta like a couch except smaller and outside, also, a client side JSON document store. Perfect for webkit mobile apps that need a lightweight, simple and elegant persistence solution. Features micro tiny storage without the nasty SQL: pure and delicious JSON clean and simple oo design with one db table per store key/value store.. specifying a key is optional happily and handily will treat your st
口上 historyとAjaxといえば、JavaScriptからある程度任意でhistoryのエントリをpushできるhistory.pushStateとか、history.replaceStateは既に大分有名になった感がある。 素晴らしい未来では、全てのブラウザにpushStateが乗っていて「location.hashを使ったAjax遷移が許されるのは10年前のブラウザまでだよねー」というハッピーな世界が実現するのだろう。が、今現在ではまだpushStateに対応していないブラウザのシェアも多く、Ajaxによる擬似画面遷移をモリモリ行うようなサイトではpushStateのある環境、ない環境の両方を考慮してやる必要がある。 (ちなみに、要件によっては「pushStateがないブラウザは通常の遷移で我慢しろ!」という割り切りも全然ありだと思う) 先に言っておくと、この記事は長いです。 環
Semantic templatesHandlebars provides the power necessary to let you build semantic templates effectively with no frustration. Mustache-compatibleHandlebars is largely compatible with Mustache templates. In most cases it is possible to swap out Mustache with Handlebars and continue using your current templates. Fast executionHandlebars compiles templates into JavaScript functions. This makes the t
↤ February 13th, 2011 Dear Mustache community, users and implementors: This is a lengthy call to arms; in short: I need your help. Thank you for reading. If you already know all the background, feel free to skip to the end. Mustache[.js] In late 2009, Chris Wanstrath released mustache, a Ruby library with a an intriguing premise: “Logic-less templates.” — I’ve been through many iterations of mixin
I’ve had a little utility that I’ve been kicking around for some time now that I’ve found to be quite useful in my JavaScript application-building endeavors. It’s a super-simple templating function that is fast, caches quickly, and is easy to use. I have a couple tricks that I use to make it real fun to mess with. Here’s the source code to the templating function (a more-refined version of this co
フォームバリデーション系のプラグインは 既に数多く良質なものが揃っているので、 今更、という気もしますが、自分と相性が 良さそうだったので備忘録。軽量でシンプル で、カスタマイズもしやすかったです。 高機能ではなくていいので、こういうのが 欲しいんですよね・・ もちろん、クロスブラウザで動作してくれます。圧縮すれば2KB以下にまで落とせる軽量ライブラリです。 バリデーション用のライブラリです。軽量でクロスブラウザ対応。コードもシンプルでカスタマイズしやすい印象でした。 サンプルです。エラーメッセージは適当なので気にしないで下さい。 Sample コード <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script
created by Brian LeRoux & Andrew Lunny. sparodically uncurated by David Trejo. 2016 03 19 weird instanceof2016 03 10 Object And Array Prototype Length2016 03 09 Two Special Numbers2015 04 23 screwy negative array index2015 04 16 moving numbers2015 04 08 array sort2015 03 23 adding arrays2015 02 05 good old octal decimal wtf2015 02 02 Boolean constructor2014 11 22 object as object key2014 10 07 tru
パーフェクトJavaScript 井上誠一郎、土江拓郎、浜辺将太 (著) 技術評論社 2011年9月 ISBN-10: 477414813X ISBN-13: 978-4774148137 3360円(税込) ■今、どこにでもあるJavaScript 前世紀、JavaScriptは「ホームページのおまけ」として使われる言語だった。ロールオーバーするアイコン、マウスポインタを追いかける猫、「右クリックは禁止です!」……。うっとうしい仕掛けを回避し、セキュリティを高めるため、JavaScriptはブラウザの設定でOffにするのがネットサーファーのたしなみとされていた時代もあった。Webブラウザでのクライアントサイドスクリプティングでできることなんて、その程度だったのだ。 あれから十余年。今やJavaScriptはどこにでもある。Webアプリケーションの中核的な動作を担っていることだって少なくな
List.js v2.3.1 Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript that adds search, sort, filters and flexibility to plain HTML lists, tables, or anything. Hi! I'm Jonny and the author of List.js. I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;) Follow @javve Donate a c
(на русском, 日本) Let’s begin with a funny tweet: The ‘c’ at the end is for the lowly comma operator. Last in the line of operator precedence and rarely documented, the comma operator hides its light under a bushel. It may not be a JavaScript heavy-hitter but I like it anyway. Its simple, elegant and you should make it your friend. So, here we go – more than you’ll ever need to know about JavaScrip
はじめに Windows VistaのJIS2004対応により、WindowsのUnicode環境で使用できる日本語漢字の数が増えました。従来、12238字(Windows XP)だったのが13145字(Windows Vista)になり、907字追加されることになりました。これによって、JIS第3水準、JIS第4水準の漢字がすべてサポートされることになったのです(Windows XPまでは一部サポート)。 またWindows XPでも、パッチさえ当てれば、Windows Vistaと同じように追加907字を加えた13145字の漢字が使用できるようになりました。 ところが、この追加された907字の中には「サロゲートペア」という特殊な文字が304字あり、これらは今までのUnicodeの文字とは扱いが少し違います。この点について解説していきたいと思います。 対象読者 Unicodeでデータ処理
I took time away from the Mozilla all-hands last week to help out on-stage at the Intel Developer Forum with the introduction of RiverTrail, Intel’s technology demonstrator for Parallel JS — JavaScript utilizing multicore (CPU) and ultimately graphics (GPU) parallel processing power, without shared memory threads (which suck). Then over the weekend, I spoke at CapitolJS, talking about ES6 and Dart
Insanely fast, full-stack, headless browser testing using node.js View the Project on GitHub Download ZIP File Download TAR Ball View On GitHub Zombie.js Insanely fast, headless full-stack testing using Node.js Zombie 6.x is tested to work with Node 8 or later. If you need to use Node 6, consider using Zombie 5.x. The Bite If you’re going to write an insanely fast, headless browser, how can you no
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く