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
SAS2S3S4S5S6S7S8S9S0SJSQSK | |
SAS2S3S4S5S6S7S8S9S0SJSQSK | |
HAH2H3H4H5H6H7H8H9H0HJHQHK | |
HAH2H3H4H5H6H7H8H9H0HJHQHK | |
DAD2D3D4D5D6D7D8D9D0DJDQDK | |
DAD2D3D4D5D6D7D8D9D0DJDQDK | |
CAC2C3C4C5C6C7C8C9C0CJCQCK | |
CAC2C3C4C5C6C7C8C9C0CJCQCK |
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
#!/bin/bash | |
brightness=`cat /sys/class/backlight/intel_backlight/brightness` | |
maxbrightness=`cat /sys/class/backlight/intel_backlight/max_brightness` | |
if [ $# = 0 ]; then | |
echo $(($brightness / (${maxbrightness} / 15))) | |
exit 0 | |
elif [ $# = 1 ]; then | |
if [ $1 = up ]; then | |
brightness=$((${brightness} + $((${maxbrightness} / 15)))) | |
elif [ $1 = down ]; then |
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 trifun; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.canvas.Canvas; | |
import javafx.scene.canvas.GraphicsContext; | |
import javafx.scene.layout.StackPane; | |
import javafx.scene.paint.Color; | |
import javafx.stage.Stage; |
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
hpi = 1.0 | |
n = 0.0 | |
loop do | |
hpi *= ((n += 1) % 2 == 1) ? (n + 1) / n : n / (n + 1) | |
puts hpi * 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
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "TapButton1" "1" | |
Option "TapButton2" "3" | |
Option "TapButton3" "2" | |
Option "VertEdgeScroll" "off" | |
Option "VertTwoFingerScroll" "on" | |
Option "VertScrollDelta" "-100" |
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
/* | |
* sizeof 演算子を用いて、現在演習に使用している環境における char, int, | |
* short int, long int, long long int, float, double, long double 型のバイト数を | |
* 求め、表示せよ。 | |
*/ | |
#include <stdio.h> | |
int main(){ | |
printf("char 型のバイト数: %2d バイト\n", (int)sizeof(char)); |
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
#define COMMAND_EXEC_PROGRAM TRUE | |
#define COMMAND_SHOW_OPTIONS TRUE | |
#define COMMAND_SHOW_VERSION TRUE | |
#define CURSOR_BLINKS TRUE | |
#define CURSOR_SHAPE UNDERLINE | |
#define FONT "Ricty 11" | |
#define SCROLL_LINES -1 | |
#define WINDOW_TITLE_DYNAMIC TRUE | |
#define WORD_CHARS "-A-Za-z0-9_$.+!*(),;:@&=?/~#%" |
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
code = File.read(ARGV[0]).chomp.split('') | |
i = p = 0 | |
mem = [] | |
while i < code.size | |
mem[p] ||= 0 | |
case code[i] | |
when '>' | |
p += 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
require 'uri' | |
require 'socket' | |
# URIの入力 | |
$stderr.print 'uri: ' | |
uri = URI.parse(gets) | |
# HTTPリクエスト | |
req = '' | |
$stderr.print 'req: ' |
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
require 'prime' | |
# ユークリッドの互除法 | |
def egcd(a, b) | |
if (a % b).zero? | |
[0, 1] | |
else | |
x, y = egcd(b, a % b) | |
[y, x - y * (a / b)] | |
end |
OlderNewer