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
;;; qi-mode-el -- Major mode for editing Qi files | |
;;; qi-inferior-mode provided below | |
;; Author: Michael Ilseman | |
;; Created: 12 May 2007 | |
;; Keywords: Qi major-mode | |
;; Copyright (C) 2007 Michael Ilseman | |
;; This program is free software; you can redistribute it and/or |
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
(def πρόσθεσε +) | |
(def αφαίρεσε -) | |
(def σύμβολο symbol) | |
(def σύμβολο? symbol?) | |
(def διάλεξε take) | |
(def διάλεξε-τελευταίο take-last) | |
(def διάλεξε-ν take-nth) | |
(def διάλεξε-μέχρι take-while) | |
;(def μακροεντολή defmacro) | |
(def τέσταρε test) |
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
(def πρόσθεσε +) | |
(def αφαίρεσε -) | |
(def σύμβολο symbol) | |
(def σύμβολο? symbol?) | |
(def διάλεξε take) | |
(def διάλεξε-τελευταίο take-last) | |
(def διάλεξε-ν take-nth) | |
(def διάλεξε-μέχρι take-while) | |
;(def μακροεντολή defmacro) | |
(def τέσταρε test) |
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 = "" | |
func1 = Proc.new do | |
i = 0 | |
while i <= 100 | |
puts "func1 " | |
sleep(0.001) | |
a.concat "aaaa" | |
i = i + 1 | |
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
a = "" | |
func1 = Proc.new do | |
i = 0 | |
while i <= 100 | |
puts "func1 " | |
sleep(0.001) | |
a.concat "aaaa" | |
i = i + 1 | |
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
hjgkhjgjjjk | |
jkhkhjklj | |
hghjjhhj |
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
#config/routes.rb | |
ActionController::Routing::Routes.draw do |map| | |
map.resources :chatters do |chatter| | |
chatter.resources :chats | |
end | |
#app/controllers/chats_controller.rb | |
#Parameters: {"chat"=>{"id"=>"1", "message"=>"cool"}} | |
class ChatsController < ApplicationController |
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
#config/routes.rb | |
#**before | |
#/chatters | |
#/chatters/1 | |
#/chats | |
#/chats/1 | |
ActionController::Routing::Routes.draw do |map| | |
map.resources :chatters | |
map.resources :chats |
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
#app/models/chatter.rb | |
class Chatter < ActiveRecord::Base | |
has_one :chats | |
end | |
#app/models/chat.rb | |
class Chat < ActiveRecord::Base | |
belongs_to :chatter, :foreign_key => 'chatter_id' | |
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
#app/models/chatter.rb | |
class Chatter < ActiveRecord::Base | |
has_one :chats | |
end | |
#app/models/chat.rb | |
class Chat < ActiveRecord::Base | |
belongs_to :chatter, :foreign_key => 'chatter_id' | |
end |