This file contains hidden or 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 net.trpfrog.frogrobo.mini_tools; | |
import java.util.ArrayList; | |
import java.util.function.IntBinaryOperator; | |
import net.trpfrog.frogrobo.streaming.MentionListenerPlus; | |
import twitter4j.Status; | |
public class TransposeListener extends MentionListenerPlus { |
This file contains hidden or 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
public class Twitter { | |
import twitter4j.Twitter; | |
import twitter4j.TwitterFactory; | |
import twitter4j.TwitterStream; | |
import twitter4j.TwitterStreamFactory; | |
import twitter4j.conf.ConfigurationBuilder; | |
protected TwitterStream stream; | |
protected final ConfigurationBuilder getBuilder(){ //ConfigurationBuilderの設定 |
This file contains hidden or 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
public class MakePicture { | |
public static void main(String[] args){ | |
final int WIDTH = 255; | |
final int HEIGHT = 255; | |
RGB rgb = new RGB(); | |
System.out.println("P3 255 "+WIDTH+" "+HEIGHT); | |
printRedBlueGradation(rgb,WIDTH,HEIGHT); | |
} | |
private static void printRedBlueGradation(RGB rgb, int width, int height){ |
This file contains hidden or 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
public class PictureMaker { | |
public static void main(String[] args){ | |
Canvas canvas = new Canvas(10,10,255); //この時10×10pxの画像を出力します | |
RGB rgb = new RGB(0,0,0,255); | |
canvas.printHeader(); | |
for (int y=0; y<canvas.getHeight(); y++) { | |
System.out.println(); |
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="shortcut icon" href="favicon.ico"> | |
<script type="text/javascript" src="./InverseMatrix.js"></script> | |
<style> | |
body{ margin: 2em; font-size: 3em;} | |
input{ font-size: 1em; text-align: center; width: 3em;} |
This file contains hidden or 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
import java.util.ArrayList; | |
import java.util.List; | |
public class PrimeSearch { | |
public static List<Integer> primeList; | |
public static int maxSearchIdx = 0; | |
public static void main(String[] args){ | |
int number = 2019; | |
int numberOfPrime = 6*number/(int)(Math.round(Math.log(number)*5)); |
This file contains hidden or 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
WIDTH = 500 | |
HEIGHT = 500 | |
Pixel = Struct.new(:r,:g,:b) | |
$img = Array.new(HEIGHT) do | |
Array.new(WIDTH) do Pixel.new(255,255,255) end | |
end | |
def clear | |
$img = Array.new(HEIGHT) do |
This file contains hidden or 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 net.trpfrog.latex_table_generator; | |
import java.awt.*; | |
import java.awt.datatransfer.Clipboard; | |
import java.awt.datatransfer.StringSelection; | |
import java.util.Scanner; | |
public class LaTeXTableMaker { | |
public static final String INDENT = " "; |
This file contains hidden or 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
PVector A, B; | |
void halfStraightLine(float x1, float y1, float x2, float y2) { | |
final int INF = 10000; | |
line(x1, y1, x1 + (x2 - x1) * INF, y1 + (y2 - y1) * INF); | |
} | |
PVector calcQ(float x, float y) { | |
float theta = atan2(B.y - A.y, B.x - A.x); | |
float d = dist(A.x, A.y, B.x, B.y); |
This file contains hidden or 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
:root { | |
--google-margin-left: calc((100vw - 600px) / 2); | |
} | |
@media (min-width:1600px) { | |
.A8SBwf { | |
margin-left: calc(var(--google-margin-left) - 37px); | |
} | |
.MUFPAc { |
OlderNewer