Skip to content

Instantly share code, notes, and snippets.

%{
/* Deklaracje dla C */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define YYDEBUG 1
#include "deklaracje.h"
#include "code_generator.h"
VAR
a b c d
START
a:= 1231303;
b:= 834;
c:= a/b;
IF c=1476 THEN
PRINT 1;
- form_for :user, :url => user_profile_path(@user), :html => { :method => :put } do |f|
- f.fields_for @user.user_profile do |pf|
%p
= pf.label t("profile.name")
= pf.text_field :name
%p
= pf.label t("profile.surname")
= pf.text_field :surname
%p
= pf.label t("profile.bday")
<%form_for :user, :url => user_profile_path(@user), :html => { :method => :put } do |f|%>
<% f.fields_for @user.user_profile do |pf|%>
<%= pf.label t("profile.name")%>
<%= pf.text_field :name%>
<% end %>
<% f.fields_for :languages do |lang|%>
%p
<%= lang.label t("profile.languages")%>
lite@stallman2:~$ satan mysql list ruby | grep xmpp
my2924_xmpp
my2924_xmpp all my2924_xmpp.* yes
Config:
production:
adapter: mysql
host: wall.rootnode.net
@pages = Page.paginate :page => params[:page],
:order => 'created_at DESC',
:conditions => ['user_profile_id = ?', nil]
module ActiveRecord
module ConnectionAdapters
class Mysql2Adapter
def truncate_table(table_name)
execute("TRUNCATE TABLE #{quote_table_name(table_name)};")
end
end
end
end
# -*- encoding: utf-8 -*-
module Textual
def to_ascii
foo = self.downcase.strip
foo.gsub!(/[ĄÀ�?ÂÃâäàãáäå�?ăąǎǟǡǻ�?ȃȧẵặ]/,'a')
foo.gsub!(/[Ęëêéèẽēĕėẻȅȇẹȩęḙḛ�?ếễểḕḗệ�?]/,'e')
foo.gsub!(/[Ì�?ÎĨ�?iìíîĩīĭïỉ�?ịįȉȋḭɨḯ]/,'i')
foo.gsub!(/[ÒÓÔÕÖòóôõ�?�?ȯö�?őǒ�?�?ơǫ�?ɵøồốỗổȱȫȭ�?�?ṑṓ�?ớỡởợǭộǿ]/,'o')
NoMethodError: undefined method `length' for nil:NilClass
from /opt/rails/tweetscreener/releases/20101117090454/app/models/post.rb:111:in `body_length'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `send'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `evaluate_method'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:166:in `call'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `run'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `each'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `send'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `run'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:276:in `run_callbacks'
<% f.with_options :class => "rounded_field" do |opt| %>
<%= opt.text_field :twitter_api %>
<br /> <br />
<%= opt.text_field :facebook_api %>
<br /> <br />
<%= opt.text_field :feedback_url %>
<% end %>