์ค๋ฌธ์กฐ์ฌ ์ฌ๋ก๋ก ์ดํด๋ณด๋ ๋ชจ๋ธ ๊ด๊ณ์ ๋ฐ๋ผ ์ค์ฒฉํ๋ ์ ๋ ฅ ํผ
rails new surveyform
| #encoding: utf-8 | |
| require 'net/http' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'timeout' | |
| TIMEOUT_CNT = 42 | |
| def print_info code | |
| retries = TIMEOUT_CNT |
| #encoding: utf-8 | |
| require 'net/http' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'timeout' | |
| TIMEOUT_CNT = 42 | |
| def print_header | |
| puts 'no,name,address,contact,doctor' |
| class Place | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| include Geocoder::Model::Mongoid | |
| field :type | |
| field :category | |
| field :category_desc | |
| field :name | |
| field :description |
| #encoding: utf-8 | |
| require 'net/http' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'timeout' | |
| require 'json' | |
| TIMEOUT_CNT = 42 | |
| def egen_print_pharm_info code |
| name = [ | |
| "์ํ", | |
| "๋ถ๋น์๊ฐ", | |
| "๋ฐฑํ์ ", | |
| "NC๋ฐฑํ์ " | |
| ] | |
| print "name = " | |
| p name |
| var OneThingBar=function() { | |
| // 1thing.kr - Let's start with one thing. | |
| var styl = document.createElement('style') | |
| styl.innerHTML = "div#notification-banner { background: rgba(255, 51, 0, 1); border-radius: 0 0 6px 6px; color: rgba(255, 255, 255, 1); cursor: pointer; font-weight: bold; font-family: Open Sans; left: 0%; line-height: 25px; margin-left: 0px; position: fixed; text-align: center; top: 0; width: 100%; } div#notification-banner span { padding: 3px 10px; }" | |
| document.body.appendChild(styl) | |
| var banner = document.createElement("div") | |
| banner.id = "notification-banner" | |
| banner.onclick = (function () { return function() {this.style.display='none'} })() | |
| banner.title="๋๋ฅด๋ฉด ์ฌ๋ผ์ง๋๋ค.(click to hide)" | |
| banner.innerHTML = '๋ญ๋ผ๋ ํด์ผ๊ฒ ๋๋ฐ ๊ทธ์ ๋ง๋งํ์ ๊ฐ์? ์์ ๊ฒ ํ๋๋ฅผ <a href="http://1thing.kr/" target=_blank>์์</a>ํด๋ด์.' |
| require 'minitest/autorun' | |
| begin | |
| require_relative 'hamming' | |
| rescue LoadError => e | |
| puts "\n\n#{e.backtrace.first} #{e.message}" | |
| puts DATA.read | |
| exit 1 | |
| end | |
| class HammingTest < Minitest::Test |
| require 'FileUtils' | |
| Dir["contents/**/*"].select{ |f| File.file? f }.map{ |f| FileUtils.move "#{f}", "images/#{File.basename f}.jpg" } |
| <h1>Test</h1> | |
| <%= form_tag { 'basic form tag' } %> | |
| <%= form_tag('/posts') { 'form posts'} %> | |
| <%= form_tag('/posts/1', method: :put) { 'form posts/1'} %> | |
| <%= form_tag('/upload', multipart: true) { 'form upload' } %> | |
| <%= form_tag('/posts') do -%> | |
| <div><%= submit_tag 'Save' %></div> | |
| <% end -%> | |
| <%= form_tag('/posts', remote: true) { 'remote' } %> | |
| <%= form_tag('http://far.away.com/form', authenticity_token: false) { 'token false' } %> |