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
/* | |
A single-file JavaScript class to draw candlestick charts. | |
Use at your own risk. | |
https://twitter.com/pingpoli | |
https://pingpoli.de | |
*/ | |
function pingpoliCandlestick( timestamp , open , close , high , low ) | |
{ | |
this.timestamp = parseInt(timestamp); | |
this.open = parseFloat(open); |
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
import static org.junit.Assert.assertThat; | |
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasKey; | |
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue; | |
import static org.springframework.kafka.test.utils.KafkaTestUtils.getSingleRecord; | |
import java.util.Map; | |
import org.apache.kafka.clients.consumer.Consumer; | |
import org.apache.kafka.clients.consumer.ConsumerConfig; | |
import org.apache.kafka.clients.consumer.ConsumerRecord; | |
import org.apache.kafka.common.serialization.Deserializer; |
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
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
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
function getTimezoneName() { | |
var timeSummer = new Date(Date.UTC(2005, 6, 30, 0, 0, 0, 0)); | |
var summerOffset = -1 * timeSummer.getTimezoneOffset(); | |
var timeWinter = new Date(Date.UTC(2005, 12, 30, 0, 0, 0, 0)); | |
var winterOffset = -1 * timeWinter.getTimezoneOffset(); | |
var timeZoneHiddenField; | |
if (-720 == summerOffset && -720 == winterOffset) { timeZoneHiddenField = 'Dateline Standard Time'; } | |
else if (-660 == summerOffset && -660 == winterOffset) { timeZoneHiddenField = 'UTC-11'; } | |
else if (-660 == summerOffset && -660 == winterOffset) { timeZoneHiddenField = 'Samoa Standard Time'; } |
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
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: *'); | |
header('Access-Control-Allow-Headers: *'); | |
dd(__FILE__); | |
// or use a function | |
function ddcors(...$args) { | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: *'); | |
header('Access-Control-Allow-Headers: *'); |
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
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' | |
alias branches="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" |
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 org.lokra.platform.user.configuration; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.lokra.platform.user.base.service.UserService; | |
import org.lokra.platform.user.oauth2.service.ClientService; | |
import org.lokra.platform.user.oauth2.service.TokenService; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Буртовой Ян skype: yanchik366</title> | |
</head> | |
<body> | |
<input type="text" id="expr" value="x*x"> | |
<input type="text" id="range-start" value="1"> | |
<input type="text" id="range-end" value="300"> |
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 dz.alfaSoft; | |
import java.util.*; | |
import java.util.stream.IntStream; | |
/* | |
найти строки состоящие из одинакового набора букв, например строки "aa" и "aaa" - разные | |
"abb" и "bba" и "bab" - одинаковые, исходный массив менять нельзя, | |
результат распечать в виде индексов элементов на консоль, строки без дубликатов - не выводить |
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 dz.cypix.ru; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.Random; | |
import java.util.concurrent.*; | |
/* | |
* <p> |
NewerOlder