Skip to content

Instantly share code, notes, and snippets.

View yucao24hours's full-sized avatar
🎀
Learning DNS

Yuka Kato yucao24hours

🎀
Learning DNS
View GitHub Profile
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>カレーのレシピ</title>
</head>
<body>
<h1>カレーのレシピ</h1>
<div>
@yucao24hours
yucao24hours / myBadMarkup.html
Last active December 19, 2015 19:48
256インターンで書いた、W3C HTML5 Validatorでチェックする"前"のソースです。
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>カレーのレシピ</h1>
<p>
誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。
@yucao24hours
yucao24hours / sample.css
Last active December 19, 2015 21:08
cssの練習
body {
background-image:url("curry.jpg")
background-repeat: no-repeat;
background-attatchment: fixed;
}
h1 {
color :blue;
}
@yucao24hours
yucao24hours / prettyOldWoman.rb
Last active December 20, 2015 02:09
1. 耳の遠いおばあちゃんのプログラムを書いてみましょう。 おばあちゃんに何を言っても(何をタイプしても)、叫ばない限り (つまり、全部大文字でタイプしない限り)、 は?! もっと大きな声で話しておくれ、坊や! と返事をします。もし叫んだときは、彼女はあなたの言葉を聞いて (少なくとも聞いた気がして)、 いやー、1938年以来ないねー! と大声で返事をします。 プログラムにちょっと真実味 を持たせるため、 1930年から1950年のランダムな数字で毎回違う年を叫ぶようにしましょう。 2. 上で作った、「耳の遠いおばあちゃんのプログラム」を拡張しましょう。 おばあちゃんはあなたに行って欲しくないのです。 あなたがBYEと叫んでもおばあちゃんは聞こえないふりをします。 BYEを3回連続で …
puts 'Hello! May I help you?'
word = gets.chomp
while word != 'BYE'
if word.upcase == word
puts 'Well, it hasn\'t happened since ' + (1930 + rand(21)).to_s + ' !'
else
puts 'Huh? Could you speak up, please??'
end
word = gets.chomp
end
@yucao24hours
yucao24hours / pretty_old_woman.rb
Last active December 20, 2015 04:49
https://gist.github.com/yucato/6054328 でいただいたアドバイスをもとに書いたコード(「3回連続で'BYE'と叫ぶまで帰してくれないおばあちゃん」)その2 です。
puts 'Hello! May I help you?'
while true
word = gets.chomp
unless word == 'BYE'
# BYE以外を話しかけられた時はきちんと答える
if word.upcase == word
puts "Well, it hasn't happened since #{(1930..1951).to_a.sample} !"
else
puts 'Huh? Could you speak up, please??'
end
@yucao24hours
yucao24hours / pretty_old_woman.rb
Created July 29, 2013 06:35
https://gist.github.com/yucato/6073280 でいただいたアドバイスをもとに書いたコード(「3回連続で'BYE'と叫ぶまで帰してくれないおばあちゃん」)その3 です。もとの問題:https://gist.github.com/yucato/6054328
count = 0
puts 'Hello! May I help you?'
begin
word = gets.chomp
if word != 'BYE'
# BYE以外を話しかけられた時はきちんと答える
if word.upcase == word
puts "Well, it hasn't happened since #{(1930..1950).to_a.sample} !"
else
puts 'Huh? Could you speak up, please??'
@yucao24hours
yucao24hours / leap_year.rb
Last active December 20, 2015 09:49
入力されたふたつの年のあいだにある閏年を表示するプログラムです。
puts "Type the start year."
start_year = gets.chomp.to_i
puts "Then, type the end year."
end_year = gets.chomp.to_i
puts "=================================="
puts "The followings are the leap years."
puts "=================================="
i = start_year
while i <= end_year
@yucao24hours
yucao24hours / update_amount.sql
Last active December 22, 2015 08:39
「勤続年数に応じてボーナスを支給したい。ついては、支払日を2007年度として、入社年度との差で1年毎に1000円上乗せしてくれ」(SQL書き方ドリル 第4章その6 より)
UPDATE
Salary
SET
Amount
= Amount +
(
SELECT
(2007 - e.HireFiscalYear) * 1000
FROM
Employees AS e
@yucao24hours
yucao24hours / 02_04_with_join.sql
Last active December 23, 2015 12:19
テーブルSales,Customers,Employees,Productsを結合して、Sales.Quantityが200以上のデータについてQuantity,CustomerName,ProductName,EmployeeNameを表示しなさい。JOINを用いずに書きなさい。(SQL書き方ドリル / 第3章 その2 第4問)
SELECT
s.Quantity
, c.CustomerName
, p.ProductName
, e.EmployeeName
FROM
Sales AS s
JOIN
Customers AS c
ON
@yucao24hours
yucao24hours / self_introduction_yucato.md
Last active December 30, 2015 08:28
ゆかおの自己紹介です。

@yucato_ について

開発技術とのお付き合い歴

2011年にWebエンジニアに転身しました。 経験があるのは C, C++, Java, PHP だけど、ほとんど中途半端です。。 今年8月に Ruby をメインに使う会社に転職し、Rails を使ったプロジェクトで仕事をしています。

Ruby On Rails とわたし

Rails歴とよべるような期間は 3ヶ月ほど。 現在は仕事で使っているため さわらない日はありませんが、やっとキホンをわかってきたかなあ、くらいの認識です(>_<)

Githubとわたし

最近この よちよち.rbのために ものすごい勢いでGithubをさわる機会が増えたので、ちょっとずつ仲良くなれてきたかんじ :octocat: