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
a = [1, 3, 5, 7, 9, 11, 13, 15]; a.each{|x| puts "x = #{x}"; a.each{|y| puts "y = #{y}"; a.each{|z| puts "#{x} + #{y} + #{z} = #{x+y+z}" } } } |
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
ru: | |
spree: | |
master: Master | |
prices: Цены | |
show_currency_selector: Показывать переключатель валюты | |
supported_currencies: Поддерживаемые валюты | |
allow_currency_change: Разрешить смену валюты | |
variant_prices_search_placeholder: Искать по коду SKU или названию | |
notice: | |
prices_saved: Цены успешно сохранены |
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 PostsController < ApplicationController | |
# GET /posts | |
# GET /posts.xml | |
def index | |
@posts = Post.find(:all) | |
respond_to do |format| | |
format.html # index.html.erb | |
format.xml { render :xml => @posts } | |
end |
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 checkRequiredPayments() { | |
$('input.payment_sum_field').each(function() { | |
if ($(this).hasClass("required")) { | |
var tr = $(this).parents("tr"); | |
var checkbox = $("input[type=checkbox]:first", tr); | |
if (!checkbox.attr("checked")) { | |
checkbox.attr("checked", true); | |
} | |
var re = new RegExp("r_([0-9]+)"); |
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
var week_days = ['', 'понедельникам','вторниками','средам','четвергам','пятницам','субботам','воскресеньям']; | |
nsMain.OrderForm = Ext.extend(Ext.form.FormPanel, { | |
initComponent: function(){ | |
var old_delivery_type; | |
var old_delivery_city; | |
var old_delivery_country; | |
var old_delivery_metro; | |
Ext.apply(this, { | |
url: '/office/server/callcenter/server.php', |
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
if defined?(Object::RedCloth) and (!RedCloth.instance_methods.include?(:stock_pgl)) | |
# RuTils выполняет перегрузку Textile Glyphs в RedCloth, перенося форматирование спецсимволов на Gilenson. | |
class ::Object::RedCloth < String #:nodoc: | |
# Этот метод в RedCloth при наличии Гиленсона надо отключать | |
alias_method :stock_htmlesc, :htmlesc | |
def htmlesc(text, mode=0) #:nodoc: | |
RuTils::overrides_enabled? ? text : stock_htmlesc(text, mode) | |
end |
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
if defined?(Object::RedCloth) and (!RedCloth.instance_methods.include?(:stock_pgl)) | |
# RuTils выполняет перегрузку Textile Glyphs в RedCloth, перенося форматирование спецсимволов на Gilenson. | |
class Object::RedCloth < String #:nodoc: | |
# Этот метод в RedCloth при наличии Гиленсона надо отключать | |
alias_method :stock_htmlesc, :htmlesc | |
def htmlesc(text, mode=0) #:nodoc: | |
RuTils::overrides_enabled? ? text : stock_htmlesc(text, mode) | |
end |
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 CreateVisaforms < ActiveRecord::Migration | |
def self.up | |
create_table :visaforms do |t| | |
t.string :lastname #1 | |
t.string :lastname_prev #2 | |
t.string :firstname #3 | |
t.date :birth_date #4 | |
t.string :birth_place #5 | |
t.string :birth_country #6 |
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
<p id="notice"><%= notice %></p> | |
<p> | |
<b>Lastname:</b> | |
<%= @request.lastname %> | |
</p> | |
<p> | |
<b>Lastname prev:</b> | |
<%= @request.lastname_prev %> |
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 Request < ActiveRecord::Base | |
validates_length_of :lastname, :minimum => 2 | |
validates_length_of :lastname_prev, :minimum => 2, :allow_blank => true | |
validates_length_of :firstname, :minimum => 2 | |
belongs_to :birth_country_rel, :class_name => 'Country', :foreign_key => :birth_country | |
belongs_to :national_rel, :class_name => 'Country', :foreign_key => :national | |
belongs_to :birth_national_rel, :class_name => 'Country', :foreign_key => :birth_national | |
belongs_to :country_start_rel, :class_name => 'Country', :foreign_key => :country_start | |
belongs_to :country_dest_rel, :class_name => 'Country', :foreign_key => :country_dest | |
end |