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
| public interface ContextAware<T> { | |
| void beforeMethod(AtomicReference<T> context); | |
| } |
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 redis.clients.jedis.Jedis; | |
| import redis.clients.jedis.JedisPool; | |
| public class RedisResource extends TryWithResource<Jedis> { | |
| private final JedisPool pool; | |
| public RedisResource(JedisPool pool) { | |
| this.pool = pool; | |
| } |
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
| registerStudent(student, new HandlerChain<RegistrationStep>() | |
| .on(RegistrationStep.NEW_STUDENT, new FlexibleHandler() { | |
| void handle(NewRegistrant registrant) { | |
| System.out.println(registrant.info()); | |
| } | |
| }) | |
| .on(RegistrationStep.USER_EXISTS, new FlexibleHandler() { | |
| void handle(NewRegistrant registrant, UserContainer existingUser) { | |
| System.out.println(registrant.info()); | |
| System.out.println(existingUser.info()); |
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
| git checkout $1 | |
| git pull origin $1 | |
| git tag $1.final | |
| git checkout master | |
| git branch -d $1 | |
| git push origin --tags :$1 |
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.sb.server.web; | |
| import org.springframework.core.annotation.AnnotationUtils; | |
| import org.springframework.http.HttpStatus; | |
| import org.springframework.web.servlet.View; | |
| import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition; | |
| import org.springframework.web.servlet.mvc.method.RequestMappingInfo; | |
| import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; | |
| import org.springframework.web.servlet.view.RedirectView; |
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
| public enum API { | |
| @Deprecated Version1, | |
| Version2( | |
| add(Feature.BLUE_ICONS) | |
| ), | |
| Version3( | |
| parent(Version2), |
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
| { | |
| name: "Object" | |
| version: "1" | |
| parents: [] | |
| properties: { | |
| name: "string" | |
| version: "string" | |
| parents: "string*" | |
| properties: "object" |
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.fasterxml.jackson.core.JsonParser; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.core.Version; | |
| import com.fasterxml.jackson.databind.*; | |
| import com.fasterxml.jackson.databind.deser.Deserializers; | |
| import com.fasterxml.jackson.databind.node.ObjectNode; | |
| import java.io.IOException; | |
| import java.util.Iterator; |
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
| var B = require('./B'); | |
| console.log("hello"); |
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
| valueOrCopy = (obj) -> | |
| if not obj | |
| return undefined | |
| else if obj instanceof Array | |
| newObj = [] | |
| newObj.push(x) for x in obj | |
| return newObj | |
| else if (typeof obj).toLowerCase() is 'object' |