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
function getDocument(url){ fetch(url).then(function (response) { | |
// The API call was successful! | |
// console.log(response); | |
return response.text(); | |
}).then(function (html) { | |
// Convert the HTML string into a document object | |
var parser = new DOMParser(); | |
var doc = parser.parseFromString(html, 'text/html'); | |
if(doc.querySelector('.captcha')){ |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<template encoding-version="1.2"> | |
<description></description> | |
<groupId>02b37c2c-016e-1000-1c03-b5aa55d94a07</groupId> | |
<name>inner_comm_18_11_19</name> | |
<snippet> | |
<controllerServices> | |
<id>03784c3b-eb78-3673-0000-000000000000</id> | |
<parentGroupId>b6dcabca-5de0-3c4f-0000-000000000000</parentGroupId> | |
<bundle> |
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
{"requestId" : "353432", "indicator" : {"id": "M6_6_T1", "data" : [{"firstDayOfPeriod" : "2019-09-01", "periodСode" : "month", "orgId" : 4925, "error" : 0, "errorText" : "", "okved2" : "06", "region" : "87", "workers_average" : "4363.00", "workers_on_payroll_average" : "4363.00", "off_hour_workers_average" : "0.00", "civil_contract_workers_average" : "0.00", "salary_fund" : "421977.40", "on_payroll_salary_fund" : "421545.80", "off_hour_salary_fund" : "60.60", "civil_contracr_salary_fund" : "370.90"}, {"firstDayOfPeriod" : "2019-09-01", "periodСode" : "month", "orgId" : 4925, "error" : 0, "errorText" : "", "okved2" : "09.1", "region" : "87", "workers_average" : "1065.00", "workers_on_payroll_average" : "1064.00", "off_hour_workers_average" : "0.00", "civil_contract_workers_average" : "1.00", "salary_fund" : "142144.60", "on_payroll_salary_fund" : "137783.30", "off_hour_salary_fund" : "9.30", "civil_contracr_salary_fund" : "4352.10"}, {"firstDayOfPeriod" : "2019-09-01", "periodСode" : "month", "orgId" : 4925, " |
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
curl -H 'Content-type: application/json; utf-8' -X POST -d '{"requestId": "123e4567-e89b-12d3-a456-426655440000", "indicator": {"id": "keyf_code1", "data":[{"firstDayOfPeriod": "2019-10-01", "periodСode": "month", "orgId":1083, "attr1": 1, "attr2": "string"}, {"firstDayOfPeriod": "2019-10-01", "periodСode": "month", "orgId":1007, "attr1": 2, "attr2": "string2"}, {"firstDayOfPeriod": "2019-10-01", "periodСode": "month", "orgId":1007, "attr1": 3, "attr2": "string3"} ] } }' http://localhost:9090/integration/lukoil/saveIndicatorData |
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.math.BigDecimal; | |
import java.math.BigInteger; | |
public class Binomial { | |
public BigInteger binomialC(int n, int k){ | |
int m = Math.min(k,n-k); //Optimization based on C[n,k]==C[n,n-k] | |
BigDecimal res = BigDecimal.valueOf(1d); | |
for (int i=1; i<=m; ++i) | |
res = res.multiply(BigDecimal.valueOf(n-m+i)).divide(BigDecimal.valueOf(i)); //res = res * (n-k+i) / i; |
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.example.demotomee1; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.jms.annotation.EnableJms; | |
import org.springframework.jms.annotation.JmsListener; | |
@SpringBootApplication |
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.example.demotomee1; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class Demotomee1Application { | |
public static void main(String[] args) { |
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.example.demobootjms; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.jms.annotation.EnableJms; | |
import org.springframework.jms.annotation.JmsListener; | |
@SpringBootApplication | |
@EnableJms | |
public class DemoBootJmsApplication { |
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.example.demo; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import org.reactivestreams.Processor; | |
import org.reactivestreams.Publisher; | |
import org.reactivestreams.Subscriber; | |
import org.reactivestreams.Subscription; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; |
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.example.demo | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.stereotype.Service | |
import org.springframework.web.bind.annotation.* | |
@SpringBootApplication |
NewerOlder