Es gibt eine Petition an den hessischen Landtag, das Tanzverbot (ich berichtete hier) aufzuheben und die entpsrechenden Paragraphen aus dem Gesetz zu streichen:
Open Petition: Aufhebung des Tanzverbots an Feiertagen in Hessen
Es gibt eine Petition an den hessischen Landtag, das Tanzverbot (ich berichtete hier) aufzuheben und die entpsrechenden Paragraphen aus dem Gesetz zu streichen:
Open Petition: Aufhebung des Tanzverbots an Feiertagen in Hessen
Die Frankfurter Rundschau hat einen weitern Bericht zum Thema gebracht.
Besonders brisant finde ich die Tatsache, dass diese Aktion mit der christlichen Kirche abgesprochen ist. Zitat aus der FR:
Stein, einstmals Vize des Evangelischen Regionalverbandes, hat sein Eingreifen nach eigenen Worten “mit den beiden großen christlichen Kirchen abgesprochen”. Tatsächlich begrüßen die evangelische Pröpstin Gabriele Scherle und der katholische Stadtdekan Stefan Scholz in einer gemeinsamen Erklärung „die entschiedene Haltung“ Steins.
Das muss man sich mal auf der Zunge zergehen lassen! Ich finde das verhalten unseres Ordnungsdezernenten Volker Stein, vor dem Anspruch Frankfurts eine internationale, kultur-offene Großstadt zu sein, völlig inakzeptabel!
To exclude a website from all search robots (google, etc.), you have to create a robots.txt
file at its root:
User-agent: * Disallow: /
Interesting: ehow.com
The Maquetta HTML5 Framework looks promising.
When connecting to a remote machine via RDP you may specify a resolution on the command line like this:
$> mstsc.exe -v:<remote_host> /w:1280 /h:1024
Das Frankfurter Orndnungsamt nimmt Ostern dieses Jahr wirklich ernst!
Nach einem Bericht der Frankfurter Rundschau FR Online: “Kein Spaß: Tanzverbot für Osterhasen” wurden einige frankfurter Clubbesitzer (u.a. Mattias Morgenstern, Besitzer des “Tanzhaus West” und Rudi Link, Geschäftsführer vom “Sinkkasten”) vom Ordnungsamt angeschrieben und auf ein hessisches Gesetz (von 1952) hingewiesen, dass Tanzveranstaltungen:
verbietet. Das Ordnungsamt hätte die Clubs angeschrieben, bei denen es bekannt wäre, dass sie Veranstaltungen Ostern angesagt hätten.
Den Clubbesitzern droht ein Bußgeld in nicht genannter Höhe, sollten sie kontrolliert werden und gegen das Gesetz verstoßen.
In diesen Sinne: Schöne Feier-Tage!
Here is a german youtube video, about the usage of trend lines.
I’m developing an oracle based rails application with an oracle db using:
German umlauts don’t work out-of-the box (for me) and when I start the console, I get following warning:
$> rails c Warning: NLS_LANG is not set. fallback to US-ASCII. Loading development environment (Rails 3.0.3) irb(main):001:0> exit
I suppose that these two things go together.
The official oracle NLS_LANG faq: oracle.com: NLS_LANG FAQ
Connect to oracle db with sqlplus and issue following command to get the needed NLS_LANG settings:
SELECT USERENV('LANGUAGE') FROM DUAL; => GERMAN_GERMANY.WE8ISO8859P1
The trick is to set the NLS_LANG environment variable before any gems are loaded. This would be in Rails.root/config/boot.rb
:
# Set up oracle parameters ENV['NLS_LANG'] = 'GERMAN_GERMANY.WE8ISO8859P1'
Voila!
API Dock is a commentable API reference documentation for:
I decided to learn MetaQuotes Language 4 so I can program the MetaTrader.
My understanding is, that you can use all trading operation from inside a script.
What I’m not sure about, is if…
Yesterday, we celebrated the first international “Hello World” day ever!
This day is dedicated to all people, that have ever written or have shown a “Hello World” to others
Wikipedia says: >A “Hello world” program is a computer program that prints out “Hello world” on a display device. It is typically one of the simplest programs possible in most programming languages. Therefore, by tradition, it is often the first program taught in a beginning class on a particular language. It is also used to illustrate the most basic syntax of a programming language.
Most of these programs are very simple, especially those that rely on a command-line interpreter (shell) to perform the actual output. However, they can be surprisingly complex, especially when writing the program for graphical user interface.
When programming an embedded system, the text may be sent to a liquid crystal display. In a device that does not display text, a simple program to produce a signal, such as turning on an LED, may be substituted for “Hello world” as the introductory program.
I’d never thought it would be that much, but I’ve written over 20 posts in 7 days!
$> git config --global core.editor "nano"
Install Factory Girl:
$> gem install factory_girl_rails
Add factory girl to your Rails.root/Gemfile
:
group :test do gem "factory_girl_rails" end
Install your bundle:
$> bundle install
If you use rspec2, put your factories in Rails.root/spec/factories.rb
:
Factory.define :admin do |admin| admin.email "admin@example.com" admin.password "foobar" end
Edit your Rails.root/config/application.rb
:
module YourApplication class Application < Rails::Application . . . config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir["#{config.root}/lib/**/"] . . . end eend
Install the rspec gem:
$> gem install rspec-rails
Add rspec to your Rails.root/Gemfile
:
group :test, :development do gem "rspec-rails" end
Install your bundle:
$> bundle install
Generate the basic rspec files:
$> rails g rspec:install
Create a new Rails project:
$> rails new <project_name>
Put your rails project under local version control:
$> cd$> git init . </pre> Edit the .gitignore file: .bundle db/*.sqlite3 log/*.log tmp/**/* doc/api doc/app *.swp *~ .project webrat.logCommit:$> git add . $> git commit -am "Initial commit"Go to [GitHub](http://www.github.com) and create a new project Add your github master: $> git remote add origin git@github.com:/ .git $> git push -u origin master That's it! After that, a regular commit looks like that: $> git add . $> git commit -am "Your commit message"Pushing to GitHub:$> git push
it "should set a flash error message" do get :read, :id => @unpublished_post.id flash[:notice].should == "This post is not yet published." end
I keep forgetting how to get the attributes of a factory.
From the official documentation:
# Returns a hash of attributes that can be used to build a User instance: attrs = Factory.attributes_for(:user)
Assume you have a custom devise sessions controller for your customer login at Rails.root/app/controllers/customers/sessions_controller.rb
:
class Customers::SessionsController < Devise::SessionsController end
To test it with rspec, you’ll have to add a before(:each)
to the test:
before(:each) do setup_controller_for_warden request.env["devise.mapping"] = Devise.mappings[:customer] end
You’re test should look like this:
require 'spec_helper' describe Customers::SessionsController do render_views before(:each) do setup_controller_for_warden request.env["devise.mapping"] = Devise.mappings[:customer] end context "as a visitor" do describe "GET 'sign_in'" do it "should have an email field" do get :new response.should have_selector("input[name='customer[email]']") end it "should have a password field" do get :new response.should have_selector("input[name='customer[password]']") end end end end
Devise uses built-in controllers and views by default. If you want to customize them, you have to add them to your rails application.
Assume you have a customer login.
Create a new controller at Rails.root/app/controllers/customers/sessions_controller.rb
:
class Customers::SessionsController < Devise::SessionsController end
Customize your Rails.root/config.routes.rb
to use the controller:
devise_for :customers, :controllers => { :sessions => "customers/sessions" }
First you’ll have to add support for scoped views. Uncomment following lines in your Rails.root/config/initializers/devise.rb
:
Devise.setup do |config| config.scoped_views = true end
Then generate the views:
rails generate devise:views customers
A very good tutorial about the snake shot can be found at foosmanchu
Put
# encoding: utf-8
in the first line in files using special chars like german umlauts to avoid errors.
When trying to user the pdf_toolkit gem on windows, I got following error:
Errno::ENOENT: No such file or directory - /dev/null
When you look at the gems source (lib/pdf/toolkit.rb) at line 175, you’ll see this:
STDERR.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
This does not work on my machine. So I created my first monkey patch in new file at Rails.root/lib/pdf_toolkit_patch.rb:
module PDF
class Toolkit
class <<self
private
def call_program(*args,&block)
old_stream = nil
options = args.last.is_a?(Hash) ? args.pop : {}
options[:mode] ||= 'r' if block_given?
unless options[:silence_stderr] == false
old_stream = STDERR.dup
#STDERR.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
STDERR.reopen(RUBY_PLATFORM =~ /i386-mingw32/ ? 'NUL:' : '/dev/null')
STDERR.sync = true
end
if options[:mode]
command = (args.map {|arg| %{"#{arg.gsub('"','\\"')}"}}).join(" ")
retval = IO.popen(command,options[:mode],&block)
retval
# block_given? ? $?.success? : retval
else
system(*args)
end
ensure
STDERR.reopen(old_stream) if old_stream
end
end
end
end
Then I added following line to the file, where I use the pdf-toolkit:
require 'pdf_toolkit_patch'
That’s it! My first ruby monkeypatch!