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
--- | |
title: "R Notebook" | |
output: html_notebook | |
--- | |
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. | |
Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*. | |
```{r} |
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
import { Component, State, h } from '@stencil/core'; | |
import { Holdings } from "../../services/holdings"; | |
// interfaceで連想配列Holdingの中身の型の定義を行う | |
// value? は値が存在しなくてもよいという意味? | |
interface Holding { | |
crypto: string; | |
currency: string; | |
amount: number; | |
value?: number; |
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
import { Component, h } from "@stencil/core"; | |
import { Holdings } from "../../services/holdings"; | |
@Component({ | |
tag: "app-add-holding", | |
styleUrl: "app-add-holding.css" | |
}) | |
export class AppAddHolding { | |
private holdingsService: Holdings = new Holdings(); | |
private cryptoCode: string; |
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
// Animalクラスの定義 | |
class Animal { | |
// コンストラクタの定義 | |
constructor(name) { | |
this.name = name; | |
} | |
// speakメソッドの定義 | |
speak() { | |
console.log(this.name + "「鳴き声」"); | |
} |
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
import { Component, State, Prop, h } from "@stencil/core"; | |
import { Todo } from "../../interfaces/todo"; | |
import { TodosService } from "../../services/todos"; | |
@Component({ | |
tag: "app-detail", | |
styleUrl: "app-detail.css" | |
}) | |
export class AppDetail { | |
public navCtrl = document.querySelector("ion-router"); |
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
import { set, get } from "./storage"; | |
import { Todo } from "../interfaces/todo"; | |
class todosServiceController { | |
public todos: Todo[]; | |
async load(): Promise<Todo[]> { | |
if (this.todos) { | |
return this.todos; | |
} else { |
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
import { Component, State, Listen } from '@stencil/core'; | |
@Component({ | |
tag: 'app-home', | |
styleUrl: 'app-home.css' | |
}) | |
export class AppHome { | |
@State() todos: any; | |
@State() newTodo; |
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
<template> | |
<div class="about"> | |
<h1>現在地</h1> | |
<p>緯度:{{latitude}}</p> | |
<p>経度:{{longitude}}</p> | |
<h2>1分前</h2> | |
<p>緯度:{{lat2}}</p> | |
<p>経度:{{lng1}}</p> |
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
<template> | |
<div class="about"> | |
<h1>現在地</h1> | |
<p>緯度:{{latitude}}</p> | |
<p>経度:{{longitude}}</p> | |
<h2>歩いた距離</h2> | |
<p>1分間で歩いた距離:{{d}} km</p> | |
<p>合計:{{length}} km</p> | |
</div> |
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
<template> | |
<div id="mapid"></div> | |
</template> | |
<script> | |
import "leaflet/dist/leaflet.css"; | |
import L from "leaflet"; | |
delete L.Icon.Default.prototype._getIconUrl; | |
L.Icon.Default.mergeOptions({ |