Skip to content

Instantly share code, notes, and snippets.

View ncmbedu's full-sized avatar

ニフクラ mobile backend Education ncmbedu

View GitHub Profile
@ncmbedu
ncmbedu / practice_03_1_index.html
Created November 2, 2020 06:59 — forked from natsumo/practice_03_1_index.html
参考書第二版 第3章章末演習「①ボタンを押すとデータが保存されるアプリを作る」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script>
@ncmbedu
ncmbedu / practice_03_2_index.html
Created November 2, 2020 07:00 — forked from natsumo/practice_03_2_index.html
参考書第二版 第3章章末演習「①ボタンを押すとデータが保存されるアプリを作る」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script>
@ncmbedu
ncmbedu / practice_04_index.html
Created November 2, 2020 07:01 — forked from natsumo/practice_04_index.html
参考書第二版 第4章章末演習「おみくじアプリを作る」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script>
@ncmbedu
ncmbedu / practice_05_index.html
Created November 2, 2020 07:05 — forked from natsumo/practice_05_index.html
参考書第二版 第5章章末演習「簡単なメモアプリを作る」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script>
@ncmbedu
ncmbedu / basis_1.js
Created November 2, 2020 07:06 — forked from natsumo/basis_1.js
参考書第二版 基礎編まとめ模範解答(虫食い:その1)
// **********【虫食い:その1】名前とスコアを保存しよう*************
// 保存先クラスを作成
var GameScore = ncmb.DataStore("GameScore");
// クラスインスタンスを生成
var gameScore = new GameScore();
// 値を設定
gameScore.set("name", name)
.set("score", score)
.save()
.then(function(){
@ncmbedu
ncmbedu / basis_2.js
Created November 2, 2020 07:06 — forked from natsumo/basis_2.js
参考書第二版 基礎編まとめ模範解答(虫食い:その2)
// **********【虫食い:その2】ランキングを表示しよう**************
// 保存先クラスを指定
var highScore = ncmb.DataStore("GameScore");
// scoreの降順でデータ5件を取得するように設定する
highScore.order("score", true)
.limit(5)
.fetchAll()
.then(function(results){
// 取得に成功した場合の処理
console.log("取得成功");
@ncmbedu
ncmbedu / practice_06_index.html
Created November 2, 2020 07:09 — forked from natsumo/practice_06_index.html
参考書第二版 第6章章末演習「アンケートアプリを作る(前編)」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/app.js"></script>
@ncmbedu
ncmbedu / practice_06_app.js
Created November 2, 2020 07:09 — forked from natsumo/practice_06_app.js
参考書第二版 第6章章末演習「アンケートアプリを作る(前編)」模範解答 app.js
var applicationKey = "******";
var clientKey = "******";
var ncmb = new NCMB(applicationKey, clientKey);
var Survey_A = ncmb.DataStore("SurveyA");
var Survey_B = ncmb.DataStore("SurveyB");
var Response = ncmb.DataStore("Response");
var surveyData_A = [];
var surveyData_B = [];
@ncmbedu
ncmbedu / practice_07_index.html
Created November 2, 2020 07:10 — forked from natsumo/practice_07_index.html
参考書第二版 第7章章末演習「アンケートアプリを作る(後編)」模範解答 index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: content: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/app.js"></script>
@ncmbedu
ncmbedu / practice_07_list.html
Created November 2, 2020 07:10 — forked from natsumo/practice_07_list.html
参考書第二版 第7章章末演習「アンケートアプリを作る(後編)」模範解答 list.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: https://ssl.gstatic.com; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<link rel="stylesheet" href="components/loader.css">
<script src="components/loader.js"></script>
<script src="js/app.js"></script>
</head>