Skip to content

Instantly share code, notes, and snippets.

View siisee11's full-sized avatar
🔴
The Climb

Jaeyoun Nam siisee11

🔴
The Climb
View GitHub Profile
@siisee11
siisee11 / lwnfs.c
Created August 15, 2019 08:31 — forked from RadNi/lwnfs.c
Updated lwnfs
/*
* Demonstrate a trivial filesystem using libfs.
*
* Copyright 2002, 2003 Jonathan Corbet <corbet@lwn.net>
* This file may be redistributed under the terms of the GNU GPL.
*
* Chances are that this code will crash your system, delete your
* nethack high scores, and set your disk drives on fire. You have
* been warned.
#include <cmath>
#include <stdio.h>
int findCase(int n, int nPlus);
// 전역 변수를 정의할 경우 함수 내에 초기화 코드를 꼭 작성해주세요.
int solution(int n) {
int answer = 0;
return findCase(n - 2, 2);
}
@siisee11
siisee11 / vimrc
Created December 1, 2019 15:08
myvimrc
"=========Vundel============
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
package main
import (
"fmt"
)
func Sqrt(x float64) float64 {
z := 1.0
for i := 0; i < 10; i++ {
z = z - (z*z-x)/(2*z)
@siisee11
siisee11 / exercise2.go
Created December 8, 2019 17:21
A tour of Go exercise2
package main
import (
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
image := make([][]uint8, dy)
for i := range(image) {
image[i] = make([]uint8, dx)
@siisee11
siisee11 / exercise3.go
Created December 9, 2019 03:14
word count with go
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
var m map[string]int
func WordCount(s string) map[string]int {
@siisee11
siisee11 / exercise4.go
Created December 9, 2019 03:42
Fibonacci
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
a, b := 1, 0
return func() int {
a, b = b, a+b
@siisee11
siisee11 / exercise5.go
Last active December 11, 2019 11:12
Complex cube roots
package main
import (
"fmt"
"math/cmplx"
)
func Cbrt(x complex128) complex128 {
var z complex128 = 1
for i := 0 ; i < 50 ; i++ {
@siisee11
siisee11 / exercise6.go
Last active December 11, 2019 11:12
Negative sqrt error
package main
import (
"fmt"
"math"
)
type ErrNegativeSqrt float64
func (e ErrNegativeSqrt) Error() string {
@siisee11
siisee11 / exercise7.go
Last active December 11, 2019 11:12
Http
package main
import (
"fmt"
"log"
"net/http"
)
type String string