2016年2月26日金曜日

【Javascript】ホームページ上でグラフ作成するツール(Google Chart Tools)

ホームページ上で、グラフを作成するツールに、
 Google Chart Tools
があります。

下が、私が実際に作成したグラフです。
・円グラフ(Pie Chart)


・StepLineグラフ


・棒(Bar)グラフ


このツールは、プログラミング言語(JavaScript )にて、チャート作成用APIを使って、 SVG を使ったグラフを表示するツールです。
JavaScriptだと普通ソースコードがみれるのですが、このチャートツールは、JavaScript のソースをダウンロードして使用することができません。
 ※ 必ず Google のサイトにアクセスし行かなければなりません。

 ただし、Google Chart Tools は商用利用も OK でそうです。
実際に使ってみたので、使い方や、参考にしたサイトを紹介します。

1、HTMLでの記述
(1) HTMLに「Google Chart の JavaScirpt ファイルのロード指定」する
 <script type="text/javascript" src="https://www.google.com/jsapi"></script> 

(2) グラフ作成のスクリプトの記述
Load時に、drawChart関数を実行して、グラフを作成します。
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); 
 function drawChart() {  
    // グラフ作成 //
 
</script>
 
(3) グラフを描画する div 要素
グラフを描画するところには ID 名をつけた div 要素を置きます。
<div id="chart_div" style="width: 80%; height: 400px;"></div>


2、グラフ作成の関数
グラフ作成用の関数内ではさらに 3 つのことを行います。
・データの作成
・オプションの設定
・グラフの描画


【drawChart 関数内:】
(1) データテーブルの作成 
var data = google.visualization.arrayToDataTable([ ['年度', '売上', '費用'], ['2004', 1000, 400], ['2005', 1170, 460], ['2006', 660, 1120], ['2007', 1030, 540] ]);

(2) グラフのオプションを設定 
 グラフのオプションオブジェクト(連想配列)で指定します。
指定可能な要素は title のようなグラフで共通のものや 円グラフの is3D といった特定のグラフで固有のものがあります。

var options = { title: '会社業績' };

【StepLineチャートの設定例
            var lcolor1 = _AppliedColorSettings.getValue("PersonalizedTradeLine1");  // 線1の色
            var lcolor2 = _AppliedColorSettings.getValue("PersonalizedTradeLine2"); // 線2の色
            var colors: string[] = [lcolor1, lcolor2]; // 色の配列化
            var bcolor = _AppliedColorSettings.getValue("GraphBackGround");//背景色
            var gfcolor = _AppliedColorSettings.getValue("GraphFont");//フォント色
            var gaxis = _AppliedColorSettings.getValue("Axis");//軸色
            var dash = _AppliedColorSettings.getValue("DashLine");//破線色
            var legend = _AppliedColorSettings.getValue("LegendBackGround");//凡例色

            var options = {
                'backgroundColor': bcolor,
                'titleTextStyle': {
                    color: gaxis
                },
                'colors': lcolors, 
                'hAxis': {//横軸
                    'textStyle': {
                        fontSize: 10,
                       color: gfcolor
                   },
                    'gridlines' : {  // 補助線
                       color: dash
                   },
                    'baselineColor' : gaxis// 補助線の背景色
                },
                'vAxis': {
                    'textStyle': { fontSize: 10, color: gfcolor },
                },
                'pointSize': 8,
                'legend': { // 凡例
                    position: isLegend,
                    color: legend,
                    textStyle: {
                        color: gfcolor
                    },
                },
                'crosshair': { trigger: 'both' }  // •プロットにマウスオーバーすると十字に線を表示
            };【Barチャートの設定例】
            var bcolor = _AppliedColorSettings.getValue("GraphBackGround");
            var gfcolor = _AppliedColorSettings.getValue("GraphFont");
            var gaxis = _AppliedColorSettings.getValue("Axis");
            var dash = _AppliedColorSettings.getValue("DashLine");
            var legend = _AppliedColorSettings.getValue("LegendBackGround");
            var barcolor = _AppliedColorSettings.getValue("BarGraph");
            var options = {
                'colors': [barcolor],
                'backgroundColor': bcolor,
                'title': title,
                'width': 300,
                'height': 200,
                'titleTextStyle': { color: gfcolor },
                'hAxis': {
                    'textStyle': { fontSize: 10, color: gfcolor },
                    'gridlines': { count: 4, color: dash },
                    'minorGridlines': { count: 2, color: 'gray' },
                    'stroke': { color: gfcolor }
                },
                'vAxis': {
                    'textStyle': { fontSize: 10, color: gfcolor },
                },
                'legend': {
                    position: 'none',
                    color: legend,
                    textStyle: {
                        color: gfcolor
                    },
                }             };
【Pieチャートの設定例 】
            var bcolor = _AppliedColorSettings.getValue("GraphBackGround");
            var gfcolor = _AppliedColorSettings.getValue("GraphFont");
            var legend = _AppliedColorSettings.getValue("LegendBackGround");

            var bcolor = _AppliedColorSettings.getValue("GraphBackGround");

            var options = {
                backgroundColor: bcolor,
                'title': title,
                'titleTextStyle': { color: gfcolor },
                'width': 350,
                'height': 300,
                'legend': {
                    slingment: 'end',
                    color: legend,
                    textStyle: {
                        color: gfcolor
                    },
                }
            };

(3) LineChart のオブジェクトの作成 
 グラフの描画ではまず対象グラフのオブジェクトを作成します。
この際、描画先の div 要素を ID 名から取得して渡します。

var chart = new google.visualization.LineChart(document.getElementById('chart_div'));

(4) データテーブルとオプションを渡して、グラフを描画 
chart.draw(data, options);

【参考URL】
http://dotinstall.com/lessons/basic_chart_tools/3301 ⇒動画で紹介しているので、便利
http://yohshiy.blog.fc2.com/blog-category-24.html

※上記二つをみれば十分ですが、その他にもっと勉強するために、以下サイトも読むとよいと思います

http://www.showa-corp.jp/special/graphtools/gct.html
http://yohshiy.blog.fc2.com/blog-entry-195.html
https://developers.google.com/chart/interactive/docs/gallery/motionchart?hl=ja 
https://developers.google.com/chart/interactive/faq#offline
http://yohshiy.blog.fc2.com/blog-entry-206.html

https://developers.google.com/chart/interactive/docs/gallery/columnchart#Configuration_Options
←アニメーションの設定方法

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