- GET /musics : 曲一覧をJSONで取得 DB::search()の返り値をjsonに変換
- GET /audio/<id> : <id>の音声ファイルを出力
- GET /cover/<id> : <id>のカバー画像ファイルを出力
- POST /upload : 音声ファイルをアップロード
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
// プログラムは WinMain から始まります | |
int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int) | |
{ | |
// ウィンドウモードにする | |
ChangeWindowMode(true); | |
// DXライブラリ開始処理 | |
DxLib_Init(); | |
// 裏画面に描画するように変更 |
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
# -*- coding: utf8 -*- | |
import os | |
import shutil | |
dir = os.getcwd() | |
rules = { | |
u"画像": [".jpg", ".png", ".gif"], | |
u"音楽": [".mp3", ".m4a"], | |
} |
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
#include <stdio.h> | |
int stack_head = 0; | |
int stack[100]; | |
/** | |
* 四則演算に使う演算子 | |
*/ | |
typedef enum | |
{ |
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
package sim02; | |
public class River { | |
/** | |
* 横の長さと縦の長さを使って三平方の定理より斜辺の長さを求める | |
* @param width | |
* @param height | |
* @return | |
*/ |
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
#include <iostream> | |
#include <functional> | |
using namespace std; | |
void pyramid(int max, function<void(int)> each) | |
{ | |
for (int i = 1; i < max * 2; i++){ | |
each(i - (i / max) * (i % max) * 2); | |
} |
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
#include<stdio.h> | |
#include<math.h> | |
double qc(double a,double b,double c)/*qc means quadratic formula*/{ | |
double result; | |
result=(-b+sqrt(pow(b,2)-4*a*c))/(2*a); | |
return result; | |
} |
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
void reveive_completely(SOCKET sock, const int length, char* output) { | |
int received = 0; | |
while (received < length) recv(sock, output + received, length - received, 0); | |
} |
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
window.onload = function() { | |
// 初期設定 | |
var canvas = document.createElement("canvas"); | |
canvas.width = 500; | |
canvas.height = 250; | |
document.body.appendChild(canvas); | |
var stage = new createjs.Stage(canvas); | |
// 追従する箱 | |
var box = new createjs.Shape(); |