import * as Fingerprint2 from 'fingerprintjs2'
import * as UAParser from 'ua-parser-js'
function _getFingerprint () {
return new Promise((resolve, reject) => {
async function getHash () {
const options = {
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 | |
class EntityManagerConfiguration( | |
localContainerEntityManagerFactoryBean: LocalContainerEntityManagerFactoryBean | |
) { | |
init { | |
if (localContainerEntityManagerFactoryBean.jpaDialect is HibernateJpaDialect) { | |
(localContainerEntityManagerFactoryBean.jpaDialect as HibernateJpaDialect) | |
.setPrepareConnection(false) | |
} | |
} |
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 HeapSort { | |
// functional implementation of the HeapSort algorithm | |
def swap(arr: Array[Int], i1: Int, i2: Int): Array[Int] = { | |
val elem1 = arr(i1) | |
arr.updated(i1, arr(i2)).updated(i2, elem1) | |
} | |
def heapifyMax(arr: Array[Int], root: Int, heapSize: Int): Array[Int] = { |
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.mongodb.MongoClient; | |
import com.mongodb.MongoClientOptions; | |
import com.mongodb.MongoCredential; | |
import com.mongodb.ServerAddress; | |
import lombok.extern.log4j.Log4j2; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.data.mongodb.config.AbstractMongoConfiguration; |
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 json | |
import logging | |
import requests | |
import sys | |
import time | |
from base64 import b64encode | |
logging.basicConfig(filename='sumo-search-job.log', level='INFO', format='%(asctime)s %(levelname)s: %(message)s') | |
logging.info('*************STARTING REQUEST*************') |
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
# Base settings and GC logging | |
-server -XX:+AlwaysPreTouch # First should be default, but we make it explicit, second pre-zeroes memory mapped pages on JVM startup -- improves runtime performance | |
# -Xloggc:gc-%t.log # CUSTOMIZE LOCATION HERE - $path/gc-%t.log -- the %t in the gc log file path is so we get a new file with each JVM restart | |
-XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m # Limits the number of files, logs to folder | |
-XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause | |
-XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy # gather info on object age & reference GC time for further tuning if needed. | |
# G1 specific settings -- probably should be default for multi-core systems with >2 GB of heap (below that, default is probably fine) | |
-XX:+UseG1GC | |
-XX:+UseStringDeduplication |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
https://www.youtube.com/watch?v=d0yGdNEWdn0
Принципы:
- Фокусируйте внимание на контенте, имеющем для вас какое-то значение
- Используйте язык как средство для коммуникации начиная с первого дня
- Если вы сначала поймёте то, что вам хотели сказать, то вы начинаете овладевать языком бессознательно (comprehensive input)
- Изучение нового языка - это также тренировка тела (правильное произношение зависит от мышц)
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
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
_hashCode java/lang/Object.hashCode()I | |
_getClass java/lang/Object.getClass()Ljava/lang/Class; | |
_clone java/lang/Object.clone()Ljava/lang/Object; | |
_dabs java/lang/Math.abs(D)D | |
_dsin java/lang/Math.sin(D)D | |
_dcos java/lang/Math.cos(D)D | |
_dtan java/lang/Math.tan(D)D | |
_datan2 java/lang/Math.atan2(DD)D | |
_dsqrt java/lang/Math.sqrt(D)D | |
_dlog java/lang/Math.log(D)D |
NewerOlder