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
(function($) { | |
$.fn.formatCurrency = function(settings) { | |
settings = jQuery.extend({ | |
name: "formatCurrency", | |
useHtml: false, | |
global: true | |
}, settings); | |
return this.each(function() { |
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
$("#emForm input.number").keypress(function(e) { | |
if (48 < e.which && e.which > 57) { | |
return false; | |
} | |
}); |
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 ReportsController < ApplicationController | |
def index | |
#creating a column3D chart. | |
@col3d = Ezgraphix::Graphic.new(:div_name => 'columnd3d', :c_type => 'col3d') | |
@col3d.data = {:usa => 306173000, :uk => 60975000, :brazil => 190467249, :russia => 142008838} | |
@col3d.render_options(:w => 400, :y_name => 'Population/Millions') | |
#creating a pie3D chart. | |
@pie3d = Ezgraphix::Graphic.new(:div_name => 'pie3d', :c_type => 'pie3d', :w => 400, :data => @col3d.data) |
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
<div class="span-10 colborder"> | |
<h6>Rendering a Column 3D</h6> | |
<%= render_ezgraphix @col3d %> | |
</div> | |
<div class="span-10 last"> | |
<h6>Rendering a Pie 3D</h6> | |
<%= @pie3d %> | |
</div> |
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
#<fatal: exception reentered> | |
#<Mysql::Error: MySQL server has gone away> | |
#<ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away: SELECT * FROM `posts` WHERE (`post`.`title` = 'hello world') LIMIT 1> |
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
>> server_time = Time.now | |
=> Sat Feb 14 17:44:48 +0000 2009 | |
>> col_time #returns the current Colombian Time | |
=> Sat Feb 14 12:45:02 UTC 2009 | |
>> col_time > server_time # It should be true! | |
=> false | |
# Colombia to Server Time | |
>> col_to_utc = TZInfo::Timezone.get('America/Bogota').local_to_utc(col_time) | |
=> Sat Feb 14 17:45:02 UTC 2009 | |
>> col_to_utc > server_time #now It should be true! |
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
environment: production | |
chdir: /home/acoplet/www/acoplet/current/ | |
address: 127.0.0.1 | |
user: acoplet | |
group: acoplet | |
port: 8000 | |
pid: /home/acoplet/www/acoplet/current/tmp/thin.pid | |
rackup: /home/acoplet/www/acoplet/current/config.ru | |
log: /home/acoplet/www/acoplet/current/log/thin.log | |
max_conns: 1024 |
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
load 'deploy' if respond_to?(:namespace) | |
set :application, "acoplet" | |
set :user, "acoplet" | |
set :use_sudo, false | |
set :scm, :git | |
set :repository, "[email protected]:jpemberthy/acoplet.git" | |
set :deploy_via, :remote_cache | |
set :deploy_to, "/home/#{user}/www/#{application}" |
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 'sinatra' | |
set :environment, :production | |
set :port, 8000 | |
disable :run, :reload | |
require 'acoplet' | |
run Sinatra::Application |
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 'sinatra' | |
Sinatra::Application.default_options.merge!( | |
:run => false, | |
:env => :production | |
) | |
require 'acoplet' | |
run Sinatra.application |
OlderNewer