Install bower install moment-timezone --save # bower npm install moment-timezone --save # npm yarn add moment-timezone # Yarn Format Dates in Any Timezone var jun = moment("2014-06-01T12:00:00Z"); var dec = moment("2014-12-01T12:00:00Z"); jun.tz('America/Los_Angeles').format('ha z'); // 5am PDT dec.tz('America/Los_Angeles').format('ha z'); // 4am PST jun.tz('America/New_York').format('ha z'); // 8
JavaScript is now used for advanced web applications, rich user interfaces, and single page apps. Ensuring high-quality JavaScript code requires enforced coding guidelines, automated and manual testing, measuring code quality, and accountability. Key techniques include code reviews, static analysis, unit tests, and visibility of quality metrics.Read less
というスライドの流れが結構良かったので紹介。 AKQA Anoraks というイベントで発表されたもので、 タイトル通りコードのクオリティがテーマの内容です。 内容的には、モジュールパターン、JSDoc、コードレビュー、Lint、テスト、自動化、コードカバレッジ、ステータスの可視化 のツール、サービスなどを それぞれ軽く触れられていて、最近見る感じのツールが良い感じの流れでまとまってる気がします。 ただ、スライドにURLやツール名が載ってなかったので、自分で書きだしたものをまとめておきます。 Module/JSDoc YUIDoc - Javascript Documentation Tool Peer Code Review ピアコードレビューツール | Atlassian Static Code Analysis JSHint, a JavaScript Code Quality To
最近、といってもここ2年ぐらいからだけど、「jQueryの勉強してます」とか「Backbone.jsの勉強してます」とか、そういう人からのプログラミングの修得の相談とかを頂いたりする機会が多い。 それらの中で、非常に口をすっぱくして言っているんだけど、なかなか理解して頂けないのが、『「jQuery」や「Backbone.js」を使うな』という個人的なアドバイスだ。これは個人的には本当に守ってほしい、絶対に手を出してほしくない、Framework達である。 なぜかみんな「jQueryってイケてる技術だよね」「jQueryだったらこんなこともいとも簡単にできちゃうんだよね」みたいな印象を持っている。もちろん、それは間違いではない。jQueryは早い。ライブラリもたくさんある。コミュニティも活発だ。リッチなウェブサイトなんて昔は数人月かけて作ったものだが、いまはjQueryとプラグインなんて使え
本ブログでは、サイトの高速化に直結する「JavaScript 非同期読み込み」の話題を多数取り上げてきました。タイトルに釣られてこの記事を見てくれている方なら Google Analytics の非同期コードスニペット はご存知でしょうし、規模の大きいサイトやアプリ用に RequireJS などのフレームワークを使っている方もいるでしょう。 GA も RequireJS も、動的に生成したスクリプト要素を DOM に埋め込む「DOM 挿入法」が用いられています。さらに遡れば、Steve Souders が 2009年4月の記事 ノン・ブロッキングなスクリプト読み込み で、6つの手法に分類しています。 果たしてこれらの方法は、サイトの高速化にとってベストなのでしょうか? 答えは2012年12月の海外記事にありました。そこで本エントリーでは、日本ではほとんど取り上げられていない Frame i
Posted at July 9, 2013 by Nicholas C. Zakas Tags: Performance, process.nextTick, setImmediate, setTimeout One of my favorite new APIs that has been beaten about is setImmediate(). While I’ll concede the naming is completely wrong, the functionality is completely awesome. The basic idea is to tell the browser that you want some JavaScript code executed after the last UI task in the event loop compl
Node.js の次のメジャーバージョン 0.12 で yield が使えるようになります。 そのおかげで、JavaScript のコールバック地獄に光が差し込むのです。ああ、さようなら、コールバック地獄。 7 年ごしで実現した yield 2006 年、Firefox 2 のリリースと同時に yield は JavaScript 界に登場しました。随分と前の話ですね。 登場した当時は JavaScript 界隈でけっこう話題になっていました。 JavaScript 1.7 の yield が凄すぎる件について - IT戦記 Latest topics > JavaScript 1.7のyield文ってなんじゃらほ - outsider reflex JavaScript 1.7 の新機能: Days on the Moon 登場したときにはインパクト大きかったものの、結局 Firefox
果敢にもMVCフレームワークの図解を試みたので、どうぞ! MVCの動機 MVCという言葉が初めて登場してから30年以上たった今、最早なんだったのか分からないほどMVCの定義は混迷をきたしているわけだが、どれがMVCでMVVMでMVPであるという定義についてあれこれ考察するのは個人的には好きでなくて、「結局何がしたいのか」という動機がぶれていなければ何でも良いと思っている。 じゃあそれは一体何なのかということを自分なりに考えてみたところ、次の一言に落ち着いた。 「ModelはViewに依存したくない」 世間的には(?)ModelとViewを単に「分ける」と説明されることが多いが、私はそれだけでは納得していなくて、依存の方向こそが重要だと思っている。たとえ分かれているように見えてもModelがViewを参照していたら、情報の取得先や表現方法は固定化されてしまう。 ModelはViewの事情から
Mid May, I gave a talk at NodePDX on functional reactive programming in JavaScript. I discussed the general ideas behind the programming paradigm and various implementations that exist. The video is finally available online and the slides are also available. Here’s some links to the various different approaches to functional reactive programming: Flapjax Reactive Extensions (RxJS) Shafty Javelin B
Bacon.js A functional reactive programming lib for TypeScript JavaScript, written in TypeScript. Turns your event spaghetti into clean and declarative feng shui bacon, by switching from imperative to functional. It's like replacing nested for-loops with functional programming concepts like map and filter. Stop working on individual events and work with event streams instead. Combine your data with
Deep dive into the murky waters of script loading Stay organized with collections Save and categorize content based on your preferences. Introduction In this article I’m going to teach you how to load some JavaScript in the browser and execute it. No, wait, come back! I know it sounds mundane and simple, but remember, this is happening in the browser where the theoretically simple becomes a legacy
We’ve made the very difficult decision to cancel all future O’Reilly in-person conferences. Instead, we’ll continue to invest in and grow O’Reilly online learning, supporting the 5,000 companies and 2.5 million people who count on our experts to help them stay ahead in all facets of business and technology. Come join them and learn what they already know. Become an O’Reilly online learning member
Update: Thank you guys for voting me up to the top of Hacker News! Update: React was a side project that I reviewed the day it launched, and you guys liked this post. Please try Rate My App, where you improve every morning with daily video feedback for new side projects from Show HN and Product Hunt. Thanks! Facebook React is a new JavaScript framework. I found their official tutorial for creating
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く