A basic example of using mbostock's weekday.js gist to to plot only weekdays using a linear scale. The resulting charts will not show gaps where weekends would be.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MarcasDeTiempo | |
def self.included(base) | |
# Propiedades especiales | |
# Permite guardar la fecha y hora de eliminación del recurso | |
property :deleted_at, ParanoidDateTime | |
# Permite conocer cuándo fue creado y cuándo fue modificado el recurso | |
property :created_at, DateTime | |
property :updated_at, DateTime | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
have_header: checking for win32.h... -------------------- no | |
"mingw32-gcc -E -I. -I/usr/home/mayo/.rake-compiler/ruby/ruby-1.8.6-p287/lib/ruby/1.8/i386-mingw32 -I/usr/home/mayo/do/do_postgres/ext/do_postgres_ext -I/usr/home/mayo/do/cross/postgres-8_2_11/pgsql/include/server/port/win32 -I/usr/home/mayo/do/cross/postgres-8_2_11/pgsql/include -g -O2 conftest.c -o conftest.i" | |
conftest.c:1:19: error: win32.h: No such file or directory | |
checked program was: | |
/* begin */ | |
1: #include <win32.h> | |
/* end */ | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <libpq-fe.h> | |
#include <postgres.h> | |
#include <mb/pg_wchar.h> | |
#include <catalog/pg_type.h> | |
/* Undefine constants Postgres also defines */ | |
#undef PACKAGE_BUGREPORT | |
#undef PACKAGE_NAME | |
#undef PACKAGE_STRING | |
#undef PACKAGE_TARNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Luis@KEORE (D:\Users\Luis\projects\oss\datamapper\do.git\do_postgres\ext\do_postgres_ext) | |
$ ruby extconf.rb --with-pgsql-dir=d:/users/luis/projects/oss/_libs/pgsql --with-pgsql-server-include=D:/users/luis/projects/oss/_libs/pgsql/include/server --with-pgsql-win32-include=d:/users/luis/projects/oss/_libs/pgsql/include/server/port/win32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'dm-core' | |
require 'dm-serializer' | |
class Test | |
include DataMapper::Resource | |
property :id, Serial | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
require DataMapper::Resource | |
property :id, Serial | |
property :... | |
has n, :interests | |
has n, :questions, :through => :interests | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b = Book.get(1) | |
b.latest_page #=> yields Page with id 3, as if I did Page.first(:order => [ :book_id.desc ]) | |
#if I replace the line in latest_page with | |
self.pages.first(:book_id => self.id, :order => [ :created_at.desc ]) | |
b.latest_page #=> yields Page with id 2, as expected | |
#if I replace the line in latest_page with |
Expanding on mbostock's weekday.js and my Weekdays gists by adding adaptive tick mark format and wrapping it all up in a dayselect scale (d3.scale.dayselect
).
View at bl.ocks.org;
Playground gist for bl.ocks.org
OlderNewer