You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
!!! 5 html(lang="en") head title= pageTitle(car insurance montana) :javascript | if (foo) { | bar() | } body h1 Jade - node template engine #container - if (youAreUsingJade) You are amazing - else Get on it! Get on it! Get on it! Get on it! <!DOCTYPE html> <html lang="en"> <head> <title>Jade</title> <script type="text/javascript"> //<![CDATA[ if (foo) { bar() } //]]> </script> </head> <body> <h1>J
2011/5/10 以下の訂正をしました。 s/prefetch/preflight/g JavaScriptのクロスドメイン通信で微妙な話があったので書いてみます。ちなみにクライアントサイドJavaScriptの話です。下記仕様に敬意を表して以下ではクロスオリジンと書きます。一般にクロスドメイン通信と呼ばれているものと同じ意味で使います。 Cross-Origin Resource Sharing XMLHttpRequest2(XHR2) WebブラウザからXMLHttpRequest(XHR)で外部のWeb APIを直接叩こうとするとクロスオリジンの制限に当たります。制限の必要性は次の説明がわかりやすいのでリンクを張っておきます。 Same-Originポリシーの必要性 クロスオリジン制限がある中でWebブラウザから直接Web APIを叩こうと先人は知恵を絞ってきました。iframe
これに対して、CommonJSグループはPromiseという形でこれに答えている。これは任意の時点で、完了しているかもしれないし完了していないかもしれない、非同期に実行されるアクションの結果を表現したオブジェクトとのインターフェイスを提供する。この方法では、さまざまなコンポーネントが非同期アクションのためのpromiseを返すことができ、コンシューマは予測可能な形でそのpromiseを利用できる。また、Promiseは非同期性を支援するために構文上便利な言語レベル拡張のために利用される基本エンティティを提供することもできる。 Stratified JavaScriptはこれとは別のアプローチをとっており、JavaScript言語のスーパーセットを提供することで、この問題を解決している。しかし、使う言語を切り替えられないのなら、とるべき道はシーケンシャルなコードをエミュレート可能な、柔軟なA
FUTURE - ICEのファーストシングル。1993年発売。 Future - 三重野瞳のシングル。1996年発売。 Future - 小林恵(現:meg)のシングル。1998年発売。 FUTURE - 中島ちあきのシングル。1999年発売。 Future - 嵐のシングル、「We can make it!」c/w曲。2007年発売。 FUTURE - Small Circle of Friendsのアルバム。2008年発売。 FUTURE (ステファニーの曲) - ステファニーのシングル。2009年発売。 Future - AILIのアルバム。2010年発売。 FUTURE (Sound Scheduleのアルバム) - Sound Scheduleのアルバム。 Future - TOKIOのシングル、「ホントんとこ/Future」収録曲。2013年発売。 FUTURE (三代目 J
Stratified JavaScript Adding modular, structured concurrency to JS http://stratifiedjs.org Emerging Languages Camp, OSCON Portland 2010 Alexander Fritze alex@onilabs.com, Oni Labs Note: While the information in this presentation is still valid, the StratifiedJS language has evolved quite a bit. For a more up-to-date presentation, please see the slides for this AmsterdamJS talk from December 2010.
☕ CoffeeScript CoffeeScript is a little language that compiles into JavaScript. Think of it as JavaScript's less ostentatious kid brother — the same genes, roughly the same height, but a different sense of style. Apart from a handful of bonus goodies, statements in CoffeeScript correspond one-to-one with their equivalent in JavaScript, it's just another way of saying it. Disclaimer: CoffeeScript i
JavaScriptへコンパイルして実行することを前提としたスクリプト言語「CoffeeScript」がちょっとした注目を集めています。CoffeeScript自体は2009年末に登場し、その1年後の2010年12月にバージョン1.0がリリースされていますが、注目を集めたのは、数日前(2011年4月13日)にRuby on Railsの生みの親であるDHHが、次期バージョンのRails3.1でjQueryやSCSSと合わせて、CoffeeScriptをデフォルトとして採用するとTwitter上で発言して議論が巻き起こったからです。 Yes, it's true, Rails 3.1 is going to ship with CoffeeScript and SCSS in the box for use with the new asset pipeline. It's bad ass.
このデータを読み込み利用するにはdata = eval("("+データ+")")とすると変数dataにJSONで定義されたプロパティの値が入ります。例えば以下のようなJSONファイルがあるとします。 このデータを変数dataに読み込んだとします。userIDプロパティの値を読み出すにはdata.userIDと記述します。するとajaxの文字が返されます。同様にdata.userPWとするとxanaduの文字が返されます。単純にオブジェクト名.プロパティ名の記述で済みます。プロパティの値には関数なども定義することができます。これによりオブジェクト名.プロパティ名()として末尾にカッコを付加した場合にプロパティの内容=関数が実行されます。つまりメソッドを定義したのと同じことになります。 それでは実際のデータを読み込み表示してみます。以下の商品名とそれに関するデータが記述されたJSONデータを読
本稿では、Node.jsの特徴や動作原理に触れ、サンプルや役に立つパッケージ、活用事例などを紹介したいと思います。 主なサーバサイドJavaScript Node.jsに触れる前に、予備知識として他のサーバサイドJavaScriptにも触れておきます。Node.js含め、サーバサイドJavaScriptには、主に以下のようなプロジェクトがあります。 サーバサイドJavaScripの標準仕様「CommonJS」とは サーバサイドJavaScriptには、「CommonJS」と呼ばれる標準化が策定されています。標準化というと難しい感じがしますが、要はサーバサイドでJavaScriptを実行するのに何が必要かを仕様として、定義しているドキュメントのことです(例えば、「ログが必要だよね」など)。 Node.jsは、このCommonJSに則って開発されています。現段階であれば、CommonJSの仕様
It's CSS, with just a little more. Use with Node.js: npm install -g less > lessc styles.less styles.css Or the browser: <link rel="stylesheet/less" type="text/css" href="styles.less" /> <script src="https://cdn.jsdelivr.net/npm/less" ></script> Or try the online playground ! 🆕 Less (which stands for Leaner Style Sheets) is a backwards-compatible language extension for CSS. This is the official do
StratifiedJS is Free and Open-Source Latest Stable Release Branch: 0.19 Stratified JavaScript Bringing JavaScript into the modern age. Today. For every browser & nodejs. Introduction StratifiedJS modernizes the JavaScript language for use in non-trivial web applications: No more asynchronous spaghetti. Underpinned by ideas from the Orc process calculus, SJS offers all the advantages of asynchronou
StratifiedJS is Free and Open-Source Latest Stable Release Branch: 0.19 Stratified JavaScript Bringing JavaScript into the modern age. Today. For every browser & nodejs. Introduction StratifiedJS modernizes the JavaScript language for use in non-trivial web applications: No more asynchronous spaghetti. Underpinned by ideas from the Orc process calculus, SJS offers all the advantages of asynchronou
今日、11時過ぎにkanasan.js#2に行ってみた。 既に20人以上も会場にいて、プレゼンが始まっていた。 なんと朝9時から夜9時まで、12時間のマラソン勉強会(^。^) 最初は、前回の復習。 講演者の話す内容は非常に面白かった。 継承、MixIn、wrap、いずれの具体例も非常に興味深い。 それから、Prototype.js1.6.0のコードリーディング。 12時間かけて、1000行を読んで、ようやくAjaxオブジェクトの所まで解読しましたよ! JavaScriptは面白いなと思った箇所がある。 Prototype.jsの内部で、Hashを作っているソースがある。 そのソースに、intersect() という関数があり、その定義は、Lispみたいなソース。 つまり、無名関数をつなげまくって、わずか2行のソースで、二つのリストの共通部分を取り出す。 intersect: functio
JavaScript is a general purpose programming language that was introduced as the page scripting language for Netscape Navigator. It is still widely believed to be a subset of Java, but it is not. It is a Scheme-like language with C-like syntax and soft objects. JavaScript was standardized in the ECMAScript Language Specification, Third Edition. JSON is a subset of the object literal notatio
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く