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
| @Override | |
| protected void configure(HttpSecurity http) throws Exception { | |
| http | |
| .authorizeRequests() | |
| .antMatchers("/", "/favicon.ico", "/resources/**", "/signup", | |
| "/register", "/public") | |
| .permitAll() | |
| .anyRequest().authenticated() | |
| .and() | |
| .formLogin() |
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.github.simbo1905.trex.internals | |
| import java.nio.ByteBuffer | |
| import akka.util.ByteString | |
| object Pickle { | |
| import scala.pickling.Defaults._ |
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
| // test case | |
| import scala.pickling.Defaults._ | |
| import scala.pickling.shareNothing._ | |
| import scala.pickling.binary._ | |
| val p = PrepareAck(Identifier(1, ProposalNumber(2, 3), 4L), 5, Progress(ProposalNumber(6,7),Identifier(8,ProposalNumber(9,10),11L)), 12, 13, None) | |
| val b = p.pickle.value | |
| val pp = b.unpickle[PrepareAck] |
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.security.Key; | |
| import java.util.Properties; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import javax.persistence.AttributeConverter; | |
| import javax.persistence.Converter; | |
| import org.slf4j.Logger; |
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 class Runner01 { | |
| static class Array1 { | |
| private Object delegate; | |
| private Object allocate(Object delegate, int[] is, int pos) { | |
| if (pos < is.length) { | |
| delegate = new Object[is[pos]]; |
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 SessionDemo { | |
| def main(args: Array[String]) { | |
| import scala.concurrent.duration._ | |
| val timeoutSeconds = 10 | |
| def usage() { | |
| System.out.println(s"|timoutSeconds: ${timeoutSeconds}") | |
| System.out.println(s"|commands:") | |
| System.out.println(s"|+ <key> <value> // add a value under a key") |
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 dumbconsumer; | |
| import java.io.IOException; | |
| import java.util.List; | |
| import java.util.Map; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import javax.servlet.http.HttpSession; |
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.github.simbo1905.chronicle; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import com.higherfrequencytrading.chronicle.Chronicle; | |
| import com.higherfrequencytrading.chronicle.datamodel.DataStore; | |
| import com.higherfrequencytrading.chronicle.datamodel.ListWrapper; | |
| import com.higherfrequencytrading.chronicle.datamodel.ModelMode; | |
| import com.higherfrequencytrading.chronicle.impl.IndexedChronicle; |
NewerOlder