Skip to content

Instantly share code, notes, and snippets.

View serivires's full-sized avatar
🏠
Working from home

serivires serivires

🏠
Working from home
View GitHub Profile
@jooyunghan
jooyunghan / monad-in-java.md
Last active November 17, 2023 04:54
한글번역 - Functor and monad examples in plain Java

Functor and monad examples in plain Java

이 글은 우리가 쓴 책, 'Reactive Programming with RxJava' 의 부록이었다. Reactive programming과 관련이 깊은 주제긴 하지만 모나드를 소개한다는 게 책과 썩 어울리지는 않았다. 그래서 나는 따로 블로그에 올리기로 했다. 프로그래밍을 다루는 블로그에서 *"반은 맞고 반은 틀릴 지 모르는 나만의 모나드 설명"*이란 것이 새로운 *"Hello World"*라는 점을 나도 잘 안다. 하지만 이 글은 펑터(functor)와 모나드(monad)를 자바 자료 구조와 라이브러리라는 각도에서 바라보고 있으며, 이는 공유할 정도의 가치는 있을거라 생각했다.

lg = log --graph --format=format:'%C(ul cyan)%h%C(reset) |%C(auto)%d%C(reset) %C(white)%ai%C(reset) (%ar)%n'' %C(white)%s%C(reset) %C(bold black)- %an%C(reset)' --all
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@banterCZ
banterCZ / MyController.java
Created February 11, 2013 12:45
Fix of java.lang.IndexOutOfBoundsException using Spring MVC.
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
/**
* @author banterCZ
*/
@Controller
public class MyController {
@chitan
chitan / WsChatServlet.java
Created July 7, 2012 01:44
How to use WebSocket of Tomcat
//This sample is how to use websocket of Tomcat.
package wsapp;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.ArrayList;
import org.apache.catalina.websocket.MessageInbound;
import org.apache.catalina.websocket.StreamInbound;
import org.apache.catalina.websocket.WebSocketServlet;
// my little html string builder
buildHTML = function(tag, html, attrs) {
// you can skip html param
if (typeof(html) != 'string') {
attrs = html;
html = null;
}
var h = '<' + tag;
for (attr in attrs) {
if(attrs[attr] === false) continue;