Skip to content

Instantly share code, notes, and snippets.

View ryuichimatsumoto-single's full-sized avatar

Ryuichi Matsumoto ryuichimatsumoto-single

View GitHub Profile
@ryuichimatsumoto-single
ryuichimatsumoto-single / gist:1710621
Created January 31, 2012 13:58
曜日に応じてヘッダーの画像を切り替える(changing of header per day)
<!--Changing of header start-->
<!--Sorry,Comments of this program is written in Japanese.-->
<script type="text/javascript">
<!--
today = new Date();
/*rand関数に乱数を加えてみても面白そうです。*/
var rand = today.getDay();
@ryuichimatsumoto-single
ryuichimatsumoto-single / gist:2216590
Created March 27, 2012 14:56
array to print to html
<?php
/**
* デザイナーとの分業しやすいソースコード
* This source use if corder and designer divide your works.
*表示の為の連想配列(array to print to html)
*/
$data = array
(
0 => "column0",
1 => "column1",
@ryuichimatsumoto-single
ryuichimatsumoto-single / MySQL_Connect.php
Created March 28, 2012 14:45
Class for MySQL C0nnect
<?php
/**
*MySQLの接続の為のクラス
*Class for connecting MySQL
*/
class MySQL_Connect
{
/*
*コンストラクタ
*@var url:パス
#define board_size 5
#include<stdio.h>
main()
{
int board[board_size][board_size];
int i;
for(i= 0;i<board_size;i++)
{
board[i][j] = 0;//initlizing board
@ryuichimatsumoto-single
ryuichimatsumoto-single / gasoline.html
Last active October 4, 2015 14:28
Calculate Gasoline costs
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body
{
width:260px;
color:#ffffff;
}
body
{
@ryuichimatsumoto-single
ryuichimatsumoto-single / gist:2923595
Created June 13, 2012 11:45
motion:earthquake using JQuery (JQueryを用いた地震のようなモーション)
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("#right").click(function(){
$(".block").animate({"left": "+=50px"}, "slow");
});
@ryuichimatsumoto-single
ryuichimatsumoto-single / gist:2939992
Created June 16, 2012 05:03
how to solve FizzBuzz problem
define MAX_VALUE 100
#include<stdio.h>
int main()
{
/*
* How to solve FizzBuzz problem
* Copiled program:http://ideone.com/clgJw
* FizzBuzz Problem explains:http://code.google.com/p/fizzbuzz/
*
@ryuichimatsumoto-single
ryuichimatsumoto-single / FizzBuzz.c
Created June 16, 2012 05:07
how to solve FizzBuzz problem
#define MAX_VALUE 100
#include<stdio.h>
int main()
{
/*
* How to solve FizzBuzz problem
* Copiled program:http://ideone.com/clgJw
* FizzBuzz Problem explains:http://code.google.com/p/fizzbuzz/
*
@ryuichimatsumoto-single
ryuichimatsumoto-single / gist:3052341
Created July 5, 2012 08:40
function_bubble_sort
void bubble_sort(int a[],int n)
{
int i;//ループ用変数
int j;//ループ用変数
int tmp;//交換用変数
for(i=0;i<n;i++){
for(j=(n-1);j>i;j--){
if(a[j-1] > a[j]){
tmp = a[j];
a[j] = a[j-1];
<?php
/*
*問題用の配列
*
*/
$question = array
(
1 => array ("value1" => 10,"value2" => 22, "plus" => 1),
2 => array ("value1" => 2,"value2" => 4, "plus" => 2),