Loading...
サーバサイド(特にNode.js)とクライアントサイド両方で動かしたいものは最近はこんな感じで書いている。 CommonJSのwiki見ててそこに紹介されてるソースコードで(どれだったか忘れたけど。。)やってたのを見ていいなーと思って真似っこした。 (function(define) { define([], function() { 'use strict'; /** * @constructor */ var SomeClass = function() { // initialize }; /** * @type {string} * @private */ SomeClass.prototype.hoge_ = 'hoge'; /** * @return {string} */ SomeClass.prototype.getHoge = function() { return th
Getting started Hogan.js is a 3.4k JS templating engine developed at Twitter. Use it as a part of your asset packager to compile templates ahead of time or include it in your browser to handle dynamic templates. If you're developing with Node.js, just use NPM to add the Hogan package. $ npm install hogan.js Alternatively, drop hogan.js in your browser by adding the following script. <script src="h
JavaScript Advent Calendar 2011 (フレームワークコース) の9日目です。 せっかくの機会だったので、ものすごく気になってたけど、触る機会がなかった、Underscore.jsをいろいろと弄ってみました。 配列関係の便利メソッドの集合ライブラリなイメージでしたが、タイマーやユーティリティ関数、条件判断関数など、いろいろ機能があって面白いですね。 とりあえず、ひと通り実行しながら、すべての関数を触ってみました。 非常に見難くて恐縮ですが、以下のGoogleスプレッドシートにいろいろとメモを取っていったので、参考にしてください。 間違いなどあるかもしれませんし、自分自身理解しきっていないため説明がおかしい箇所があるかもしれません。 その際はご指摘いただけると助かります。超めんどくさかったので、自主的なアップデートは、たぶん、しません... リンク先: Unders
Table of Contents Collections each, map, inject, detect, select, reject, all, any, include, invoke, pluck, max, min, sortBy, sortedIndex, toArray, size Arrays first, last, compact, flatten, without, uniq, intersect, zip, indexOf Functions bind, bindAll, delay, defer, wrap Objects keys, values, extend, clone, isEqual, isElement, isArray, isFunction, isUndefined Utility uniqueId, template Collection
iPhoneのSafariでCover Flowを行う事ができるライブラリcss-vfxを使ってみました。 css-vfx - Project Hosting on Google Code http://code.google.com/p/css-vfx/ 実行するとこの様に動作します。 付属のサンプルではFlickr APIを使ってFlickrから画像ファイルを取得して表示していましたが実際に使用する場合は自身のサーバに有る画像ファイルを表示する事が多いと思いますのでそちらのパターンのサンプルを作成しました。 作成手順 1. 作業フォルダを作成後、ターミナルを起動。作業フォルダに移動し、以下のコマンドを実行(※事前にsvnをインストールしておく必要有り)。 svn checkout http://css-vfx.googlecode.com/svn/trunk/ css-vfx-read
©Powered by hamsketch Quoraの"What are some good resources for Backbone.js?" のトップ回答がcoolだったので、翻訳して追加して編集してコメントしてメモ。 - 公式 Backbone.js 公式サイト ソースコード 解説付きソースコード 解説付きソースコードの翻訳(日本語) Underscore.js(公式サイト)(ソースコード) backbone.jsはunderscore.jsに強く依存してるから、こっちも勉強した方が良いよ 実はこの2つはホストしてるところは一緒だよ(DocumentCloud) 最新の情報が欲しいなら... 公式Wiki GithubのWiki。活発 Backbone.jsは、コードのホストは勿論、公式サイトもデモサービスもgithub::pages、Wikiもgithub::wikiと、Oc
About reserved postingIf you register a secret article by the day before the same day, it will be automatically published around 7:00 on the same day. About posting periodOnly articles submitted after November 01, 2011 can be registered. (Secret articles can be registered anytime articles are posted.)
CoffeeScript, Meet Backbone.js is a simple Backbone.js tutorial written in CoffeeScript comprised of self-explanatory "hello world" examples of increasing complexity. It was designed to provide a smoother transition from zero to the popular Todos example The bulk of this tutorial is a rewrite of the original hello-backbonejs tutorial. Backbone.js offers a lean MVC framework for organizing your Jav
eBayが、JavaScriptアプリケーションからSQL文のような形式でデータベースへの問い合わせを記述できるDSL(ドメイン固有言語)のql.ioを発表。オープンソースとして公開しました。 現在、多くのWebアプリケーションが、バックエンドとのデータのやりとりにHTTPをベースにしたAPIを用いています。しかし、WebベースのAPIによってデータを取り出すのは、プログラマにとって実は手間のかかることです。 例えば、キーワードを入力すると関連する商品の名前、詳細、購入者の評価をユーザーに表示する、というWebアプリケーションでは、まずキーワードでデータベースを検索して商品IDを取得し、今度はその商品IDをキーにして名前や概要、評価の情報を取得する、といったように、APIを繰り返し呼び出す必要があります。 ql.ioはこうした内容をSQLのように分かりやすい記述で実現するだけでなく、複数の
backbone.js + Rails3.1で作成したサイト「best vimrc」を題材にSonicGarden社内で勉強会を開催しました。ustreamされながら話すのは緊張しますねー。。 結果的に「クライアントサイドのコードを無理にMVCで書く理由が分からない。もっとシンプルで分かりやすいアーキテクチャがあるのでは?」という話に落ち着きましたが、サーバ側がRailsでフルAjaxなアプリを作る際には、backbone.js + Railsはgemが充実しているので良い選択肢なのかなという気がしています。 Getting Start backbone.js with Rails 次はknockout.js + Sinatraの組み合わせを試してみよう。 「best vimrc」のソースコードはgithubにあげてありますので、興味のある方はご覧下さい。
最近またLocal Player (Chrome Player)を実装しなおしています. 一応説明しておくと, Local Playerは, 完全にローカルで動作する音楽プレイヤーです. シンプルさを求め(実装がめんどくさいだけ), 操作しやすく(これは大事), 良い感じのプレイヤーです. 半年前に, ソースコードがスパゲッティになって, 開発を中断していましたが, 最近また書きなおし始めたのです. 音楽プレイヤーをブラウザー上で実装するのには, 音楽ファイルをJavaScriptで読み込まなければなりません. そこでHTML5ですよ!!! <audio src="url/to/musicfile.mp3" type="audio/mp3" /> みたいな感じで, 音楽を再生できます. 詳細は他のページに譲ります. さて, 音楽ファイルを再生するには, ローカルファイルからurlをaudi
Moment.js 2.30.1 Parse, validate, manipulate, and display dates and times in JavaScript. Install npm install moment --save # npm yarn add moment # Yarn spm install moment --save # spm meteor add momentjs:moment # meteor bower install moment --save # bower (deprecated) Format Dates moment().format('MMMM Do YYYY, h:mm:ss a'); moment().format('dddd'); moment().format("MMM Do YY"); moment().format('YY
formに入力させてsubmitされたらajaxでphp呼び出して〜って良くある処理を簡略化する拡張 jQureryを拡張する。 jquery.ajaxFrom.jsとか適当に名前を付けて保存します。 〜内にではさんで書いても大丈夫。 /* (C) makoto@2ch.to */ if(jQuery) jQuery.fn.extend({ ajaxForm : function($_){ var $opt = {}; if( typeof $_ === 'function' ) $opt.success = $_; if( typeof $_ === 'object' ) $opt = $.extend($opt,$_); return $(this).submit(function(event){ event.preventDefault(); return jQuery.ajax($
Open Source Castword GNOME app that rewrites your draft text in any tone — via a single keypress. Tusk Native PostgreSQL clients for macOS and GNOME — minimal, powerful, zero telemetry. Published Work Platform Agentic Compliance, governance, and accountability for teams building agentic AI systems. Zero Agenda News Evidence-graded timelines for public-interest news and geopolitical claims. Product
alt-scape.com 2019 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く