Skip to content

Instantly share code, notes, and snippets.

rm -rf
(define (askContinue)
(display "contunue? (Y/N)")
(define in (read))
(cond
((eq? in 'Y) #t)
((eq? in 'N) #f)
(else (askContinue))
)
)
@beomkm
beomkm / maxrects-ff.html
Last active June 5, 2019 02:28
maxrects-ff description: http://tibyte.kr/244
<!--
The MIT License (MIT)
Copyright (c) 2015 tibyte.kr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
function choo() {
return oChatRoom.valueOf()._oDoc._aMemberList[Math.floor(Math.random()*oChatRoom.valueOf()._oDoc._aMemberList.length)].nickname
}
oChatRoom._processNotiItem = function(h, f, b) {
if (g_sUserId !== f) {
return;
}
var c = b.cafeId;
269,265,275,513,244,739,273
@beomkm
beomkm / client
Last active March 29, 2016 02:45
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#define BUF_SIZE 1024
void err_h(char *msg);
@beomkm
beomkm / s.cpp
Created July 18, 2016 05:37
kut1010
#include <iostream>
using namespace std;
bool isPrime(int n)
{
//omit 1
for (int i = 2; i*i <= n; i++) {
if (n%i == 0) return false;
}
@beomkm
beomkm / example
Last active October 18, 2017 15:20
basic processing code
void setup()
{
size(400, 300); //window size
}
void draw()
{
background(255, 255, 255); //clear the window with background color (Red, Green, Blue)
strokeWeight(4); // the thickness of line
(In function)
defer func() {
log.Fatal("defer1")
if r := recover(); r != nil {
log.Fatal("ERROR")
}
}
rows, err := db.Query(sql)
if err != nil {