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
| <body> | |
| <div id="root"></div> | |
| <script src="https://unpkg.com/react@17.0.0/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom@17.0.0/umd/react-dom.development.js"></script> | |
| <!-- Needed for in-browser Babel transformation --> | |
| <script src="https://unpkg.com/@babel/standalone@7.12.4/babel.js"></script> | |
| <!--script src="https://unpkg.com/prop-types@15.7.2/prop-types.js"></script--> | |
| <!-- type here is 'text/babel' so that Babel compiles it in the Browser |
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 org.apache.http.client.HttpClient; | |
| import org.apache.http.client.config.CookieSpecs; | |
| import org.apache.http.client.config.RequestConfig; | |
| import org.apache.http.impl.client.CloseableHttpClient; | |
| import org.apache.http.impl.client.HttpClients; | |
| import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| import org.springframework.boot.web.client.RestTemplateCustomizer; |
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 org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.http.HttpHeaders; | |
| import org.springframework.http.HttpRequest; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.http.client.ClientHttpRequestExecution; | |
| import org.springframework.http.client.ClientHttpRequestInterceptor; | |
| import org.springframework.http.client.ClientHttpResponse; | |
| import org.springframework.util.StreamUtils; |
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
| [αΑβΒΓγΔδΕεζΖΗηΘθΙιΚκΛλΜμΝνΞξΟοΠπΡρΣσΤτΥυφΦΧχΨψΩωΆάΈέΉήΊίόΌύΎώΏ]+ |
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 demo; | |
| import static java.lang.reflect.Modifier.*; | |
| import java.util.Arrays; | |
| import java.util.Set; | |
| import org.springframework.beans.BeansException; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.beans.factory.config.BeanExpressionResolver; |
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
| @Configuration | |
| @EnableTransactionManagement | |
| @PropertySource("classpath:my/db.properties") | |
| @EnableJpaRepositories( | |
| entityManagerFactoryRef = "DB1EntityManagerFactory", | |
| transactionManagerRef = "DB1TransactionManager", | |
| basePackages = "package.to.db1.dao") | |
| public class DB1Config { | |
| @Autowired private Environment env; |
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
| //P01 | |
| def last(ls: List[Int]): Int = ls match { | |
| case le::Nil => le | |
| case _::tail => last(tail) | |
| case _ => throw new IllegalArgumentException | |
| } | |
| //P02 | |
| def penultimate(ls: List[Int]): Int = ls match { | |
| case pmate::_::Nil => pmate |
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 ScalaForexRatesDSL { | |
| implicit class ccy2money(ccy :Symbol) { | |
| def apply(amount: BigDecimal) = Money(amount, ccy) | |
| } | |
| } | |
| case class FromToCcy(ccyFrom: Symbol, ccyTo: Symbol) | |
| case class Money(amount:BigDecimal, ccy:Symbol) { |
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 data.analysis.tennis | |
| import scala.io.Source | |
| import java.util.Date | |
| import java.text.SimpleDateFormat | |
| object TennisDataAnalysis extends App{ | |
| def wrapStringInt(stringInt:String) = if(stringInt=="") None else Some(stringInt.toInt) |
NewerOlder