Replace in your config/application.rb
require "rails/all"
with:
require "rails"
module Ohm | |
module Expiring | |
def self.included(base) | |
base.send(:extend, ClassMethods) | |
end | |
module ClassMethods | |
def expire(ttl) | |
@@expire = ttl.to_i | |
end |
port java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import java.util.*; | |
public class Agente_Viajero extends JFrame implements Runnable | |
{ | |
Container c; | |
Mapa mapa; | |
JList Caminos; |
<?php | |
/* se recupera el carrito de la variable de sesión */ | |
$carrito = $_SESSION['carrito']; | |
/* acá se harian las operaciones de agregar/quitar del carrito */ | |
/* se guardan las modificaciones en la variable de sesión */ | |
$_SESSION['carrito'] = $carrito; | |
?> |
class AssetsCompiler < Sprockets::StaticCompiler | |
def precompile(paths) | |
ensure_clean_git | |
Rake::Task["assets:clean"].invoke | |
super | |
commit_compiled_assets | |
push | |
end | |
def ensure_clean_git |
require 'eventmachine' | |
require 'evma_httpserver' | |
class MyHttpServer < EM::Connection | |
include EM::HttpServer | |
def post_init | |
super | |
no_environment_strings | |
end |
[1] (pry) main: 0> 1.class | |
=> Fixnum | |
[2] (pry) main: 0> 1.method(:+) | |
=> #<Method: Fixnum#+> | |
[3] (pry) main: 0> 1 + 0 == 0 + 1 | |
=> true | |
[4] (pry) main: 0> 2.0.class | |
=> Float | |
[5] (pry) main: 0> 2.0.method(:*) |
[1] (pry) main: 0> class AdditionMonoid | |
[1] (pry) main: 0* def identity | |
[1] (pry) main: 0* 0 | |
[1] (pry) main: 0* end | |
[1] (pry) main: 0* | |
[1] (pry) main: 0* def operation(a, b) | |
[1] (pry) main: 0* a + b | |
[1] (pry) main: 0* end | |
[1] (pry) main: 0* end | |
=> :operation |
desc "Compile all the assets named in config.assets.precompile" | |
task :precompile do | |
# We need to do this dance because RAILS_GROUPS is used | |
# too early in the boot process and changing here is already too late. | |
if ENV["RAILS_GROUPS"].to_s.empty? || ENV["RAILS_ENV"].to_s.empty? | |
ENV["RAILS_GROUPS"] ||= "assets" | |
ENV["RAILS_ENV"] ||= "production" | |
Kernel.exec $0, *ARGV | |
else | |
Rake::Task["environment"].invoke |
cat ./1-219.1.txt | convert \ | |
-font Courier \ | |
text:- \ | |
-rotate `convert null: -format '%[fx:rand()*15-7]' info:` \ | |
-attenuate 0.1247 +noise Gaussian \ | |
-colorspace Gray \ | |
1-219.1.pdf |