Skip to content

Instantly share code, notes, and snippets.

View BcRikko's full-sized avatar
👾
Working, working, working

B.C.Rikko BcRikko

👾
Working, working, working
View GitHub Profile
@BcRikko
BcRikko / index.html
Created July 7, 2015 02:03
Vue.jsでページ番号付きのページネーションをつくる
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>ページ番号付きのページネーション</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="page-demo">
@BcRikko
BcRikko / index.html
Created July 6, 2015 02:41
ファイルのアップロード・ダウンロード
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>ファイルのアップロードとダウンロード</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div>
<button id="upload">upload</button>
@BcRikko
BcRikko / index.html
Created July 2, 2015 07:25
Vue.jsでページナビゲーション(ページネーション)をつくる
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Vue.js De Pagination</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="page-demo">
<div id="pagination">
@BcRikko
BcRikko / index.html
Created July 1, 2015 14:01
Vue.jsのv-transitionの使い方
<!doctype html>
<html lang="ja">
<head>
<meta chraset="utf-8">
<title>ファイル出力</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="transition-demo">
<input type="text" v-model="input | validator" />
@BcRikko
BcRikko / index.html
Created July 1, 2015 04:02
JSでファイルを出力する(Chrome Extensionsで使えないfileSystem APIの代用として)
<!doctype html>
<html lang="ja">
<head>
<meta chraset="utf-8">
<title>ファイル出力</title>
</head>
<body>
<span id="export-link"></span>
<script src="index.js"></script>
</body>
@BcRikko
BcRikko / background.js
Created June 26, 2015 09:45
Chrome Extensions send message from content scripts to background. -> http://kuroeveryday.blogspot.jp/2015/06/ChromeExtensionssendMessage.html
chrome.runtime.onMessage.addListener(
function (request, sender, sendResponse) {
switch (request.type) {
case 'add':
add(request.value, sendResponse);
break;
case 'search':
search(request.value, sendResponse);
break;
default:
@BcRikko
BcRikko / GCDandLCM.c
Created June 9, 2015 16:51
最大公約数と最小公倍数を表示する(ユークリッドの互除法)
#include <stdio.h>
#include <time.h> // clock用
// 最大公約数の計算(ユークリッドの互除法)
int calcGCD(int in1, int in2)
{
int big, small, r;
// 入力値の大小を判定する
if (in1 < in2)
{
@BcRikko
BcRikko / prime.c
Last active August 29, 2015 14:22
素数を表示する(エラトステネスのふるい)
#include <stdio.h>
#include <math.h> // sqrt用
#include <time.h> // clock用
#define NUM 10000
int main(void){
clock_t start, end;
int i, j;
int prime[NUM];
@BcRikko
BcRikko / bundle.js
Created May 27, 2015 06:05
TypeScriptとVue.jsでつくったTodoアプリ
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@BcRikko
BcRikko / IdAndTagName.js
Created April 10, 2015 02:21
getElementsByTagNameとquerySelectorAllの違いについて
var list = document.getElementById('list1').getElementsByTagName('li');
// 1
console.log(list.length);
var list1Item = document.createElement('li');
list1Item.innerText = 'List1_Item2';
document.getElementById('list1').appendChild(list1Item);
var list2Item = document.createElement('li');