Skip to content

Instantly share code, notes, and snippets.

if (localidad.Barrios.Count() == 1)
{
if (localidad.Barrios.First().Nombre == BowConstsZonificacion.BARRIO_NO_IDENTIFICADO)
{
if (localidad.Zonas.Count() == 0)
{
if (localidad.TiposOrientacionLocalidad.Count() == 0)
{
if (localidad.SufijosLocalidad.Count() == 0)
{
@darwinrc
darwinrc / ml-ruby.md
Created May 8, 2016 17:29 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

@darwinrc
darwinrc / gist:a07c84b290a78b149090
Created August 25, 2015 19:33
Error gulp build
C:\Users\darwin\Source\Repos\naut\angularjs> gulp build
[13:56:04] Using gulpfile ~\Source\Repos\naut\angularjs\gulpfile.js
[13:56:04] Starting 'build'...
[13:56:04] Starting 'clean-scripts'...
[13:56:04] *** Cleaning: app/js/*{js,map}
[13:56:04] Starting 'clean-styles'...
[13:56:04] *** Cleaning: app/css/*{css,map}
[13:56:04] Starting 'clean-markup'...
[13:56:04] *** Cleaning: index.html,app/views/
[13:56:04] Finished 'clean-scripts' after 20 ms
@darwinrc
darwinrc / gist:359bbda691ef81ce22d6
Created July 2, 2015 02:44
Cannot instantiate adapter of Lotus::Model::Adapters::SqlAdapter
Cannot instantiate adapter of Lotus::Model::Adapters::SqlAdapter (Sequel::Database.connect takes either a Hash or a String, given: nil)
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model/config/adapter.rb:101:in `rescue in instantiate_adapter'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model/config/adapter.rb:95:in `instantiate_adapter'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model/config/adapter.rb:81:in `build'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model/configuration.rb:168:in `_build_adapter'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model/configuration.rb:59:in `load!'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/gems/lotus-model-0.3.2/lib/lotus/model.rb:87:in `load!'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/bin/ruby_executable_hooks:15:in `eval'
/home/darwin/.rvm/gems/ruby-2.2.1@mobijob-be/bin/ruby_executable_hooks:15:in
@darwinrc
darwinrc / warden_lotus.md
Last active August 29, 2015 14:24
Warden implementation in Lotus

apps/web/application.rb

controller.prepare do
        use YourApp::WardenImpl::WebManager
        include YourApp::WardenImpl::WardenHelper
        authentication_via :web_strategy
        auth_failure_to "/login"
        before :authenticate!    # run an authentication before callback
      end
//bow.js

var bow = bow || {};
(function () {
bow.tablas = bow.tablas || {};
bow.fechas = bow.fechas || {};
/**
* Método encargado de paginar los registros de una tabla
*
@darwinrc
darwinrc / gist:22fe79cad5091e74d250
Created March 8, 2015 00:29
Migration Lotus and Sequel
class CreatePosts < Sequel::Migration
def up
create_table :posts do
primary_key :id
String :title
String :content
Integer :user_id
index :user_id
end
end
@darwinrc
darwinrc / gist:b616700a168bf4f2b9b8
Created February 19, 2015 18:30
Exception loading pg adapter in lotus example
Boot Error
Something went wrong while loading /home/darwinrc/dev/kommit/lotustest/config.ru
RuntimeError: Cannot instantiate adapter of Lotus::Model::Adapters::SqlAdapter (LoadError: cannot load such file -- pg)
/var/lib/gems/2.1.0/gems/lotus-model-0.2.3/lib/lotus/model/config/adapter.rb:101:in `rescue in instantiate_adapter'
/var/lib/gems/2.1.0/gems/lotus-model-0.2.3/lib/lotus/model/config/adapter.rb:95:in `instantiate_adapter'
/var/lib/gems/2.1.0/gems/lotus-model-0.2.3/lib/lotus/model/config/adapter.rb:81:in `build'
/var/lib/gems/2.1.0/gems/lotus-model-0.2.3/lib/lotus/model/configuration.rb:168:in `_build_adapter'
/var/lib/gems/2.1.0/gems/lotus-model-0.2.3/lib/lotus/model/configuration.rb:59:in `load!'