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
final int numBlocksCols = 5, numBlocksRows = 10; | |
final int numBlocks = numBlocksCols * numBlocksRows; | |
final int blockWidth = 30, blockHeight = 10, space = 2; | |
final int padWidth = 40, padHeight = 10; | |
final color std_colors[] = {color(255, 0, 0) // red | |
, color(255, 0, 255) // magenta | |
, color(255, 255, 0) // yellow | |
, color(0, 255, 255) // cyan | |
, color(0, 255, 0) // green | |
}; |
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
// 🇸🇬 | |
size(120, 120); | |
background(255); | |
noStroke(); | |
fill(152, 251, 152); | |
int a[] = {1,4,2,5,3}; | |
int b; | |
float x; | |
float y; |
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
size(60, 60); | |
background(255); | |
noStroke(); | |
fill(152, 251, 152); | |
int b; | |
int a[] = {1,4,2,5,3}; | |
beginShape(); | |
for (int i = 0; i < 5; 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
#include <stdio.h> | |
int main(void) | |
{ | |
int i = 0; | |
// 今は入力値は101を与えてあげる。出力は1が文字列中に2つなので2になる | |
char *str = "101"; | |
int counter = 0; // strに1が何回あるか数える変数 | |
while (※strの文字列の長さの回数繰り返す) | |
{ |
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 main() | |
{ | |
int a, b, c; | |
a = 1; | |
b = 2; | |
c = 3; | |
char s[101]; | |
s = 'test'; | |
// 整数の入力 |
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
remove Lock = Caps_Lock | |
keysym Caps_Lock = Control_L | |
add Control = Control_L |
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
load A | |
sub B | |
ifp ABig | |
ifn BBig | |
ABig:load A | |
store Z | |
jump CompC | |
BBig:load B | |
store Z | |
jump CompC |
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
# [Dokku - The smallest PaaS implementation you've ever seen](http://dokku.viewdocs.io/dokku/deployment/application-deployment/#deploying-to-dokku) | |
# login root user. | |
dokku apps:create ruby-rails-sample | |
# install the postgres plugin | |
# plugin installation requires root, hence the user change | |
dokku plugin:install https://github.com/dokku/dokku-postgres.git | |
# create a postgres service with the name rails-database |
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
# [Dokku - The smallest PaaS implementation you've ever seen](http://dokku.viewdocs.io/dokku/getting-started/installation/) | |
# for debian systems, installs Dokku via apt-get | |
cd ~/ | |
wget https://raw.githubusercontent.com/dokku/dokku/v0.11.6/bootstrap.sh | |
sudo DOKKU_TAG=v0.11.6 bash bootstrap.sh |
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
# example(it)内でローカル変数を宣言する | |
describe 'convert_hash_syntax' do | |
it '=>が:に置き換わる' do | |
old_syntax = <<~TEXT | |
{ | |
:name => 'Alice', | |
:age => 20, | |
:gender => :female | |
} | |
TEXT |
NewerOlder