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 lombok.RequiredArgsConstructor; | |
import lombok.extern.slf4j.Slf4j; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.aspectj.lang.reflect.MethodSignature; | |
import org.springframework.core.Ordered; | |
import org.springframework.core.annotation.Order; | |
import org.springframework.stereotype.Component; | |
import org.springframework.transaction.PlatformTransactionManager; |
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 com.nealford.ft.patterns | |
import org.junit.Test | |
import static groovy.util.GroovyTestCase.assertEquals | |
// BEGIN groovy_calc | |
interface Calc { | |
def product(n, m) | |
} |
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 templates; | |
abstract class Customer { | |
def plan | |
def Customer() { | |
plan = [] | |
} | |
def abstract checkCredit() |
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.List; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
import static java.lang.Math.sqrt; | |
import static java.util.stream.Collectors.toList; | |
import static java.util.stream.IntStream.range; | |
public class NumberClassifier { |
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
object 부분적용 { | |
def price(product: String): Double = | |
product match { | |
case "apples" => 140 | |
case "oranges" => 223 | |
} | |
def withTax(cost: Double, state: String): Double = | |
state match { |
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
object curringTest extends App { | |
def filter(xs: List[Int], p: Int => Boolean): List[Int] = | |
if (xs.isEmpty) xs | |
else if (p(xs.head)) xs.head :: filter(xs.tail, p) | |
else filter(xs.tail, p) | |
def modN(n: Int)(x: Int) = (x % n) == 0 | |
val nums = List(1,2,3,4,5,6,7,8) | |
println(filter(nums, modN(2))) |
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
// BEGIN imp_classifier | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
public class ImpNumberClassifierSimple { | |
private int _number; //<1> | |
private Map<Integer, Integer> _cache; //<2> |
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
# -*- coding: utf-8 -*- | |
# !/usr/bin/env python3 | |
import re | |
from random import choice | |
import os.path | |
import requests | |
from lxml import etree | |
from bs4 import BeautifulSoup |
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
class Geek: | |
def __init__(self, bb, cc, dd) -> None: | |
super().__init__() | |
self.bb = bb | |
self.cc = cc | |
self.dd = dd | |
self.input = "" | |
self.print_go(bb, cc, dd) |
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 com.google.gson.JsonArray; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonParser; | |
import com.sun.media.jfxmediaimpl.MediaDisposer; | |
import io.reactivex.Observable; | |
import io.reactivex.disposables.Disposable; | |
import io.reactivex.functions.Function; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
import okhttp3.Response; |
NewerOlder