Skip to content

Instantly share code, notes, and snippets.

@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@yomusu
yomusu / csvblob.go
Created October 31, 2014 08:01
Go appengine : csv upload(blob) & parse
package stuxy
import (
"html/template"
"io"
"net/http"
"encoding/csv"
"strings"
@hleonps
hleonps / Makefile
Created January 21, 2017 18:20
Makefile NASM
AS=nasm #Assembly compiler
ASFLAGS=-f elf -g #Assembly flags
LD=ld #Linker
LDFLAGS=-m elf_i386 #Linker flags
SOURCES=$(wildcard ./src/*.c) #Sources
OBJECTS=$(SOURCES:.asm=.o) #Object files
EXECUTABLE=test #Program name
#Check version
all: $(SOURCES) $(EXECUTABLE)
@beesandbombs
beesandbombs / rainbowDonut.pde
Created September 8, 2017 12:23
rainbow donut
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@scova0731
scova0731 / awesome-clojure-ja.md
Last active February 20, 2018 01:06
オゥサムなClojureリソースたち (2017年秋)
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
@fonix232
fonix232 / BindingAdapters.kt
Last active August 16, 2021 07:43
AutoCompleteTextView databinding
@BindingAdapter("valueAttrChanged")
fun AutoCompleteTextView.setListener(listener: InverseBindingListener?) {
this.onItemSelectedListener = if (listener != null) {
object : AdapterView.OnItemSelectedListener {
override fun onNothingSelected(parent: AdapterView<*>?) {
listener.onChange()
}
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
listener.onChange()