2016年2月22日月曜日

【Javascript】ホームページ作成につかえる、JQuery+Javascript+Cssサンプルコード

ホームページ作成時に、使えるコードを紹介します。

1、buttonやimageっを使わずに、クリックしたら、リンクしたサイトへ飛ばす
 (1) 説明
  ・<div>タグでboxを作成する
  ・<p>タグで文章を記載して、<a>タグでリンク先を指定する。
  ・<strong>で強調文字とする
 (2) コード
 <div style="margin-top:65px;margin-left:1170px;position:absolute;background-color:white; border: outset;  width:200px;height:30px;border-color:black;border-radius:5px">
     <p style="margin-top:4px;margin-left:14px;">
         <a href="http://www.yahoo.co.jp/" style="text-decoration: none;color:black">              <strong>yahoo!</strong>
         </a>
      </p>
 </div>

※タグ内でstyle定義していますが、css側で定義した方が、レスポンシブwebサイトで対応しやすくなります。

 2、起動時に初期設定する window.onload、もしくは、 $(document.body).readyにて、設定を行います
  ・window.onload
   文書のローディング工程の終了時に発生します。このイベントが発生した時点で、文書中の全てのオブジェクトは DOM 内にあり、全ての画像とサブフレームのロードは完了している。
  ・$(document.body).ready
  画像の読み込みなどは待たず、 DOMツリーの構築が終わった時点で実行されます。
※window.onloadと$(document.body).readyの違いは、「$(document).ready() が先に実行されて、$(window).load() の方が後に実行される」となります。
詳しくは次のサイト一読すると理解しやすいです。
http://rcmdnk.github.io/blog/2015/07/11/computer-javascript-jquery/


3、ブラウザ判別
 (1) 説明
   window.navigator.userAgentを使って判別を行います 
 (2) コード 
   var  browzer;
    if (userAgent.indexOf("Chrome") != -1) {
        //Chrome
        _browzer = BrowzerType.chrome;
    } else if (userAgent.indexOf("Firefox") != -1) {
        //Firefox
        _browzer = BrowzerType.firefox;
    } else if (userAgent.indexOf("Trident") != -1) {
        //IE11
        _browzer = BrowzerType.ie11;
    } else if (userAgent.indexOf("MSIE") != -1) {
        //IE 6 - 10
        _browzer = BrowzerType.ie10;
    } else if (  userAgent.indexOf("Edge") == -1)
    {   // Edge
        _browzer = BrowzerType.edge;

    } else {
        //other
   }
      

4、デバイス判別
 (1) 説明
   window.navigator.userAgentを使って判別を行います 
 (2) コード 
   var _device
     var userAgen2t = window.navigator.userAgent.toLowerCase();
    if (userAgen2t.indexOf('ipad') != -1) {
        _device = DeviceType.tablet;
    } else if (userAgen2t.indexOf('iphone') != -1) {
        _device = DeviceType.sp;
    } else if (userAgen2t.indexOf('Android') != -1) {
        _device = DeviceType.sp;
    } else if (userAgen2t.indexOf('windows') != -1) {
        _device = DeviceType.pc;
    } else {
        _device = DeviceType.onther;
    };


2016年2月21日日曜日

【もう一度、英語をやり直そう】英会話日記(2/17) ~本八幡getgo英会話

今週もJosh先生は、スノーボード休みでした。
代わりに、久々のShana先生でした。


【今週覚えたこと】
・マッサージ師の単語
 masseur(男性)、masseuse(女性)
   ※発音や例文は次のサイト参照ください。
     http://ejje.weblio.jp/content/masseur

【授業内容】
1.  映画について、内容など質問する会話を学習

(1) Actors, Starsについて
Who's in it?      Brusce Willis is in it.
Who's the star?    It stars Bruce Wills.

(2) Setting(ロケ地など、状況設定一般)について
 Where/What is it set?     It is set in Tokyo.
Where does it take place?   It takes place in Hakone.

(3) Plot/Story(映画ストーリ)について
 What's it about?   It's about robot.

(4) Climax(最高点)について
 What happens?   In the end,  world end.

(5) Theme(主題)について
 Do you think it has a message?   It's about love is all.

(6)  Genre(ジャンル)について
※発音は、こちらで確認 http://ejje.weblio.jp/content/Genre (ジャンルでなく、ジャヌラと聞こえます)
 What kind of movie is it?  It's a animated film.


2. Language
映画について述べるときに使う単語

前の方の単語は、
The movies was .....
と使用して、後ろの方の単語は、
I was ....
と使用する

・interesting, ,  interested(in)
⇒ The movie was interesting.      I was interested in the movie.
・fascinating ,  fascinated(by)
   魅(惑)する
・boring , bored(by)
  退屈
・moving , moved(by)
  感動
・surprising , surprised(at)
・disappointing , disappointed(in)
・disgusting , disgusted(at)
  うんざり
・shocking , shocked(at)
・amazing , amazed(by)
 びっくりする
・uplifting , uplifted(by)
 高揚する
・funny  ,     なし
 おかしい、こっけい
・fun  ,    なし
 おもしろい
・scary ,  scared(of)
 恐ろしい


【宿題】Vocabulary Log
(+)=for pasitive words, (-)=for negative words
 
absurd (不合理な、こっけいな) : unreasonable (-)
amazing (驚くべき) : surprising(+)
awful  (ひどい、おそろしい) : scary(-)
bizarre (奇妙な) :  very strang (-)
boring (うんざりするような) : tedious (-)
disgusting  (実にいやな) : dislike (-)
dreadful (おそろしい、いやな) : awful (-)
dumb (口のきけない、無口な) : can't speek(-)
fabulous  (伝説上の、途方もない) : on legend(+)
fantastic (空想的な、途方もない) :tremendous (+)
fascinating  (魅了的な) : interesting(+)
frightening (驚くべき) : surprising(-)
horrible (恐ろしい、ぞっとするような) : awful(-)
interesting  (面白い) : fun(+)
marvelous  (すばらしい) : wonderful(+)
odd (変な) : strange(-)
outstanding (傑出した) : particular(+)
ridiculous (ばかげた) : waste of labor(-)
silly (おろかな) : stupid(-)
strange (変な) :not exact(-)
stupid (愚かな) : foolish(-)
surprising (驚くべき) :wonderful(+)
terrible (恐ろしい) :awful(-)
unusual (普通でない) : not correct(-)
weird (気味の悪い、奇妙な) : odd(-)
wonderful (すばらしい) : amazing(+)






http://www.getgo.co.jp/
      ※上記画像クリックでHPにジャンプします(Shana先生プロフィール確認できます) 

2016年2月20日土曜日

色パレット(色と、RGBと、色名と、Hex(16進 ))

ホームページ作成時に、色指定は、Hex(16進)で、指定します。
そこで、よく使う色の、「色とHex(16進 )」対応表を作成しました。



 位置    RGB                  色名               Hex(16進)
 -------------------------------------------------------
1行A列    255,0,0,0               黒                            #000000
1行B列    255,153,51,0         茶                             #993300
1行C列    255,51,51,0           オリーブ                     #333300
1行D列    255,0,51,0             濃い緑                       #003300
1行E列    255,0,51,102          濃い青緑                   #003366
1行F列    255,7,92,209           濃い青                     #92209a
1行G列    255,51,51,153        インディゴ                   #333399
1行H列    255,77,73,73          80%灰色                    #4d4949
2行A列    255,205,51,53        濃い赤                      #cd3301
2行B列    255,255,102,0        オレンジ                     #FF6600
2行C列    255,128,128,0        濃い黄                      #808000
2行D列    255,0,128,0            緑                             #008000
2行E列    255,0,128,128         青緑                        #008080
2行F列    255,0,0,255             青                            #0000FF
2行G列    255,102,102,153      ブルーグレー             #666699
2行H列    255,128,128,128       50%灰色                  #808080
3行A列    255,255,0,0             赤                             #FF0000
3行B列    255,255,153,0         濃いオレンジ             #FF9900
3行C列    255,153,204,0          ライム                      #99cc00
3行D列    255,51,153,102        シーグリーン             #99cc00
3行E列    255,51,204,204        アクア                      #33cccc
3行F列    255,51,102,255        薄い青                     #3366ff
3行G列    255,128,0,128         紫                            #800080
3行H列    255,150,150,150     40%灰色                    #969696
4行A列    255,255,0,255         ピンク                       #00FFFF
4行B列    255,255,204,0         ゴールド                    #FFCC00
4行C列    255,255,255,0        黄色                          #FFFF00
4行D列    255,0,255,0            明るい緑                    #00FF00
4行E列    255,0,255,255        水色                           #00ffff
4行F列    255,0,204,255         スカイブルー             #00ccff
4行G列    255,153,51,102      プラム                        #993366
4行H列    255,202,196,196      25%灰色                   #cac4c4
5行A列    255,255,153,204      ローズ                      #ff99cc
5行B列    255,255,204,153      ベージュ                   #ffcc99
5行C列    255,255,255,153      薄い黄色                  #ffff99
5行D列    255,204,255,204      薄い緑                     #CCFFFF
5行E列    255,204,255,255      薄い水色                  #CCFFFF
5行F列    255,153,204,255      ペールブルー             #99CCFF
5行G列    255,204,153,255      ラベンダー                #cc99ff
5行H列    255,255,255,255      白                             #ffffff
6行A列    255,205,92,92          Indian Red                #CD5C5C
6行B列    255,224,164,96        Sandy Brown            #e0a460
6行C列    255,242,164,81        Sunshade                 #f2a451
6行D列    255,205,133,63        Peru                        #CD853F
6行E列    255,255,140,0          Deep Pink                 #FF8C00
6行F列    255,244,124,2          angerine                   #f47c02
6行G列    255,255,128,0         Dark orange               #FF8000
6行H列    255,211,211,211      Light Gray                 #d3d3d3
7行A列    255,217,51,63          赤紅                         #d9333f
7行B列    255,255,215,0          Gold                         #FFD700
7行C列    25,560,179,113        Medium Sea Green     #3cb371
7行D列    25,580,138,102        Como                        #8a5074
7行E列    255,90,107,48          Dark Olive green        #5a6b30
7行F列    255,0,191,255          Deep Sky Blue           #00bfff
7行G列    255,128,128,128      藤色                         #808080
7行H列    255,25,25,112          Midnight Blue            #191970







































































































































































































































2016年2月12日金曜日

【もう一度、英語をやり直そう】英会話日記(2/10) ~本八幡getgo英会話

一週間は早いものです。
あっという間に今週のレッスンになりました。


【今週覚えたこと】
 ・obviously(当たり前)、Exactly(確かに)、Abusolutely(絶対)=definitely(絶対)
Abusolutely(絶対)=definitely(絶対) は同じ意味だが、 definitelyを使う方が自然

  ・Freezing/Boiling
とても寒い(Abusolutely Freezing)、とても暑い(Absolutely Boiling)
使い方は次のサイトを一読すると、理解しやすいです。
http://allankenglish.jugem.jp/?eid=132

【授業内容】
 接続詞の使い方の復習(接続詞を使って、現在及び過去を述べ方)

「when」の後が未来を表す場合であっても、動詞は現在形にします。これは「before」や「after」の場合と同じです。

使い方は、次のサイトを一読すると理解しやすいです。
http://honmono-eigo.com/syokyuu/setsuzokushi1.html
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q11128481636
⇒「接続詞の種類に関係なく、その文を言ったときを基準にして動詞の時制は決まる」そうです。

接続詞と時制については、こちらのサイトを一読すると理解しやすいです。
(中学英語だったのですね。。。)
http://eigo-gakushu.com/eigo2/28.html

 1. We _________________(have) a wonderful surprise a month after we _________________(get) married. One night while we _________________(cook) dinner, we _________________(hear) a strange roise outside.
When we _________________(open) the door, we _________________(find) a puppy!
⇒had, got, are cooking(were cookingではないのか?), heard, opened, found

2. My husband and I _________________(ice-skate) when we _________________(meet). I _________________(fall) down because I _________________(look) at him
⇒are ice-skating, meet(?),  fell, was looking,.

3. Last summer, we _________________(see) a tomado while we _________________(travel) in the U.S. It was really scary!
⇒saw, were traveling

4.Last weekend, we _________________(watch) TV when the phone _________________(ring), It was my best friend from high school!
⇒were watching, rung

【宿題】
1. Vocabulary Log
Write words or draw pictures to help you remember.(思い出す為の言葉を考える)    
 


With the simple past and past continuous:
during my childhood  _________________  ⇒ I did aikido during my childhood
last month _________________ ⇒ I started to study programing language, Javascript
  ※start to study とstart studingと二つの言い方がありますが、~ingの方がfeelingが入っている場合に使うそうです。
last year _________________ ⇒ I made my brother's Home page.
  ※last year は過去を述べるので、 I have been making ....といった使い方はしない。
   I have been making Home Page for last year.といったようにfor を使います
on my first day of school _________________ ⇒ tense ⇒ I was nervous on my first day of school
several years ago _________________ ⇒ I have been to getgo.(×) 過去を述べなければならない
two years ago _________________ ⇒ start to writing blag
when I was in elementary school _________________⇒ I would play baseball(よく~したものだはwould)

With the present perfect and present perfect continuous:
for ten years _________________⇒ I have been to sports gym.
for the last six months _________________⇒ I have not
for the past few months _________________⇒ I have been to dentist.
in ages _________________⇒ (久しぶり) I got toothache.
lately _________________⇒ I have been making My brother's friend's HP.
recently _________________⇒ I have been to healthy center(hotspring).
since I graduated _________________⇒ I have been using PC.
since yesterday _________________⇒ I have been reading IT book.
these days _________________⇒ I cannot deep sleep.
this year _________________⇒ I got headche several times.



 

2016年2月7日日曜日

【もう一度、英語をやり直そう】英会話日記(2/3) ~本八幡getgo

今週は、歯が痛く何もやる気がしませんでしたので、勉強不足です。
しかし、ホームページ作成等やること多く、なかなか英語勉強とる時間を考えないと、まずいな、と思う日々です。


【今週覚えたこと】
・contagious
〈病気が〉(接触)伝染性の
※今に季節は病気になりやすいので、覚えておくと便利です。
(例)a contagious disease 伝染病
   Colds are contagious. 風邪は伝染する。

・I caught it from ...
以下のサイトでcaughtを使った例文を覚えると便利です。
http://ejje.weblio.jp/sentence/content/caught+it

・filling
(パイ・サンドイッチなどの)中身・詰め物、(歯科の)充填材.
※歯の治療で、使う詰め物という言葉で、fillingを使います

・adorable
愛らしい、かわいい、かわいらしい、魅力的な、ほれぼれする
 ⇒動詞:adoreで「崇拝する」「あこがれる」、「大好き」
※かわいい犬といった場合で使われるようです。
http://catherin.at.webry.info/200804/article_29.html
http://maggiesensei.blog61.fc2.com/blog-entry-1.html

・messed up
滅茶苦茶
http://eow.alc.co.jp/search?q=messed%20up

※その他使い方は、次のサイト読むと便利です。
http://www.eigowithluke.com/2013/06/messed-up/

 

【授業内容】
 文の置き換え(英文法で受動態といったような。。。。)
1. The Greeks buit the Parthenon in fifth century B.C.
 ⇒The Parthenon was built by the Greeks in the fifth century B.C.
2. Russia sold Alaska to the United States in the 1860s.
 ⇒The Alaska was sold to the United States by Russia in the 1860s.
3. Over one million workers constructed the Suez Canal in the 1860s.
 ⇒The Suez Canal was constructed by over one million workers in the 1860s.
4. The U.S. govermment named Yellowsone a national park in 1872.
 ⇒ Yellowsone was named a national park by the U.S. government.
5. The French architect Gustave Effel designed the Effel Tower.
  ⇒ The Effel Tower was designed by the f\French architect Gustave Effel.

【宿題】
1. Vocabulary Log
Write words or draw pictures to help you remember.(思い出す為の言葉を考える)   

cars ⇒ vhicle ⇒ veihicle
catch ⇒ glab ⇒garade
cattle(牛、畜牛) ⇒ cow
consume ⇒ spend ⇒expend
com ⇒company ⇒waize
cultivate(耕作) ⇒ feed
electronics(電子耕作) ⇒ technology
employ ⇒ use workers
export ⇒ side out
farm ⇒ at country
goats(やぎ) ⇒eat paper
grow ⇒ bigger and bigger
industry ⇒ manufacture good
lobsters ⇒ sea living

---->TA in charge
manufacture ⇒ make goods
microchips(体内に埋め込む微小な電子標識基板) ⇒ mini thing into the body ⇒ mini thing inside the body
oysters(かき) ⇒ eat at fall ⇒ eat in fall
raise ⇒ feed up⇒ graw
rice ⇒ gohan
seafood ⇒ raw fish
sheep ⇒ ram
ship ⇒vehicle of sea
shrimp ⇒ lobster⇒ prawn
soybeans ⇒ setubun
tea ⇒ green water
textiles(織物) ⇒silk
wheat (小麦)⇒ material of bread⇒ ingredients(食物の材料)

 

2016年2月1日月曜日

歯が痛いときの薬~ロキソニン・今治水

土曜日から歯が痛く、今日緊急治療を歯医者にしてもらいました。
治療後に、ロキソニンを1錠飲んで、効かなかったので、2錠目をのんだら、10分位したら、
突然寒気がして、振るえが30分くらいとまりませんでした。

原因及び、歯が痛い場合の対策を調査しました。

【ロキソニン副作用】
・公式情報として胃部不快感、腹痛、悪心・嘔吐、食欲不振等の消化器症状の発生確率の参考となる発生頻度としては2.25%だそうです
・長期間ロキソニンの胃腸・消化器系の副作用が続くと胃潰瘍・消化器潰瘍といった重めの副作用につながる可能性もあるそうです
眠気の副作用の発生頻度が0.1~1%未満あると報告
・副作用の一つに浮腫(発生頻度0.1〜1%)が報告されており、むくみの症状を訴える方もいるそうです
https://minacolor.com/drug/%E3%83%AD%E3%82%AD%E3%82%BD%E3%83%8B%E3%83%B3%E9%8C%A060mg/articles/2442

ここに記載された副作用に、「震え」はありませんですが、循環器系に「動悸(ドキドキする)」も記載されているので、副作用が行ったような気がします。


【歯痛薬~今治水】
即効薬で、今治水という薬があります。
今日会社の同僚の方に教えてもらいましたので、帰りに買って試してみました。
確かに、直ぐ痛みは和らぎますが、長時間効かない気がしました。
結局、その後で、ロキソニンのんで、痛みを我慢しています。


虫歯に直接作用する液体歯痛薬で、歯の質を傷めない、2分以内に鎮痛効果があらわれる薬です。
https://www.tampei.co.jp/products/KO/

 下のサイトをよんだのですが、私の虫歯の場合は、神経を抜いている箇所なので、余り効果がなかったのかもしれません。
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1120320976 

下のサイトにも書いてあるように、応急措置なので、結局は医者に行って直しましょう
http://karadanote.jp/18677

2016年1月31日日曜日

【もう一度、英語をやり直そう】英会話日記(1/27) ~本八幡getgo

Josh先生に、もっと目的をもって勉強したほうがよいとアドバイスされました。
他のクラスでは、授業は質問で終わってしまうそうで。
もっと英語勉強しないと。。。。

【今週覚えたこと】
・be Impressived with ....
  (尊敬的な感情はなく)感動した、感銘をうけて
・I'm Fade up with ...
  うんざりする
 【参考URL】 http://オンライン英会話ガイド.com/phrase/intermediate/fed-up.html
・ All of ....
  殆どすべて ( almost ではなく、All of を使う) 
 【参考URL】 http://dictionary.goo.ne.jp/ej/2089/meaning/m0u/  
・ I don't remember
  覚えてません
 (今週は野々村元議員が90回も発した言葉なので、英語だとどういうのかJosh先生に教えてもらいました)
 ・hibernate
  冬眠する
・ off course
   当たり前!


【授業内容】

英語文法では、仮定法といったような。
文を完成させる思考のテストでした。
・If I execise more, ________________________________________________
  ⇒(例)  If I execise more, I'll take part in marason.

 ・If ________________________________________________, I'll have to move.
  ⇒(例) If I change my job, I'll have to move.

If ________________________________________________, I might buy a new car.
  ⇒(例) If I crashed my car, I might buy a new car.

If ________________________________________________, I'll be very surprised.
  ⇒(例)If I find the treasure, I'll be very surprised.

If ________________________________________________, I'll be very happy.
  ⇒(例)If I speak English fluently, I'll be very happy.


【宿題】
1、授業で勉強した事を、使って今と昔の仮定文を作成する
1) 昔
If I was student, I studied abroad.
⇒〇I would study abroad, I studied abroad.
 
2) 未来
If I win lottery, I'll buy apartment.
⇒〇I won lottery, I would buy apartment.

※英語では、マンションもアパートというみたいですね。
http://www.eigowithluke.com/2014/01/apartments/

 2、Vocabulary Log
Write words or draw pictures to help you remember.(思い出す為の言葉を考える)
・communicate in a different language 異なる言語を使う ⇒ speak English
・earn your own spending money こづかいを稼ぐ ⇒ doing side work
・experience culture shock  ⇒ surprise in foregin country.
・fall in love ⇒in love
・fall out of love 恋にさめる ⇒usual after love. ⇒〇Stop loving
・feel better about yourself ⇒study myself
・feel jealous ⇒envious
・feel really tired ⇒exhausted
・feel worse about yourself ⇒ dislike
・get a part-time job ⇒ get a side work
・get in shape 体を鍛える ⇒wan to get muscle
・get into a good college ⇒ be Tokyo unv. student
・get married ⇒wife an husband
・get valuable work experience 貴重な仕事の経験をする⇒doing precious work.
・have a lot more free time ⇒vacation
・improve your grades ⇒ develop myself
・join a gym ⇒take part in gym
・learn a new language ⇒Spanish
・move to a foreign country ⇒go abroad
・pay membership dues 会費を払う ⇒pay money in circle ⇒〇pay money in club
・start a new job ⇒change company⇒〇quit company
・stop studying ⇒forgive study
・study very hard ⇒ hard study