This file contains 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 intercept; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target(ElementType.METHOD) | |
public @interface LocalCache { |
This file contains 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
/* | |
* (c) nuboat.net 2012 | |
*/ | |
package net.nuboat.currency; | |
/** | |
* | |
* @author nuboat | |
*/ | |
import java.util.StringTokenizer; |
This file contains 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
// scalastyle:off | |
package services.slick | |
import javax.inject.Singleton | |
import define.JobLevel | |
import intercept.Logging | |
import models.{GroupJobLevel, Subscriber} | |
import org.postgresql.util.PSQLException | |
import play.api.Logger |
This file contains 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 TwoSum { | |
def sum(n: Int, sorted: ArrayBuffer[Int]): Boolean = sorted.par.find(x => isMatch(x, n, sorted)).isDefined | |
def isMatch(x: Int, n: Int, sorted: ArrayBuffer[Int]): Boolean = sorted.find( y => (x + y) == n).isDefined | |
} |
This file contains 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
case class HIndex(publishs: List[Int]) { | |
val checklist = 0.to(publishs.max).sortWith(_ > _) | |
def calc(): Int = checklist.find(c => rule1(c) && rule2(c)).get | |
private def refer(c: Int): List[Int] = publishs.filter(_ >= c).toList | |
private def rule1(c: Int): Boolean = refer(c).size >= c |
This file contains 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.thjug.tools.sslcert; | |
import javax.net.ssl.*; | |
import java.io.*; | |
import java.security.KeyStore; | |
import java.security.MessageDigest; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
/** |
This file contains 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
{1=>[1,1], | |
3=>[1,1,1,1], | |
5=>[1,1,1] | |
7=>[1,1], | |
2=>[1,1,1]} |
NewerOlder