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
\documentclass[a4j]{jsarticle} | |
% コメント | |
\begin{document} | |
\section{節名はここ} | |
本文1 | |
\subsection{入れ子の節1} | |
本文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
system('chcp 65001'); | |
system('cls'); | |
sub neg { | |
return -$_[0]; | |
} | |
sub add { | |
return($_[0] + $_[1]); | |
} |
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
<!DOCTYPE html> | |
<script> | |
function ADate(year, month, date) { | |
this.year = year; | |
this.month = month; | |
this.date = date; | |
} | |
var today = new Date(); |
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
function ADate(year, month, date) { | |
this.year = year; | |
this.month = month; | |
this.date = date; | |
} | |
var today = new Date(); | |
var year = today.getFullYear(); | |
var month = today.getMonth() +1; | |
var lastMonth = new Date(year, month-1, 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
var Calendar = {}; | |
Calendar.create = function(year, month, baseWeek, amplitude) { | |
if (amplitude == undefined) amplitude = 2; | |
var weeks = {}; | |
weeks['amplitude'] = amplitude; | |
weeks['weekCount'] = amplitude*2 +1; | |
for (var i=0; i<weeks['weekCount']; i++) { |
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
var Calendar = function(year, month, baseWeek, amplitude) { | |
if (amplitude == undefined) amplitude = 2; | |
var weeks = []; | |
var weekCount = amplitude*2 +1; | |
for (var i=0; i<weekCount; i++) { | |
var week = []; | |
var weekI = baseWeek +i-amplitude; | |
var weekTop = new Date(year, month-1, 7*(weekI-1)+1); |
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
def fibo(i): | |
if i == 1: | |
return 0 | |
if i == 2: | |
return 1 | |
return fibo(i-1) + fibo(i-2) | |
for i in range(1, 31): | |
print(fibo(i)) |
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
sub fibo { | |
local($i) = $_[0]; | |
if ($i == 1) { return 0; } | |
if ($i == 2) { return 1; } | |
return &fibo($i-1) + &fibo($i-2); | |
} | |
for (local($i)=1; $i<31; $i++) { |
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
def fibo(i) | |
if i == 1 then | |
return 0 | |
end | |
if i == 2 then | |
return 1 | |
end | |
return fibo(i-1) + fibo(i-2) | |
end |
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 fibo(int i) { | |
if (i == 1) return 0; | |
if (i == 2) return 1; | |
return fibo(i-1) + fibo(i-2); | |
} | |
// int main(int argc, char *argv[]) { | |
int main(void) { |
OlderNewer