Skip to content

Instantly share code, notes, and snippets.

View ivanursul's full-sized avatar

Ivan Ursul ivanursul

View GitHub Profile
FROM ubuntu:14.04
MAINTAINER javacodegeeks
RUN apt-get update && apt-get install -y python-software-properties software-properties-common
RUN add-apt-repository ppa:webupd8team/java
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 boolean true" | debconf-set-selections
RUN apt-get update && apt-get install -y oracle-java8-installer maven
Listening for transport dt_socket at address: 5005
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Strongbox: Parent
[INFO] Strongbox: Resources [Common]
[INFO] Strongbox: Resources [Storage API]
[INFO] Strongbox: Resources [Storage Indexing]
[INFO] Strongbox: Resources [Storage]
public static ImageStreamWrapper getStreamWrapper(Supplier<FormDataBodyPart> supplier) {
return Optional.ofNullable(supplier.get())
.map(field -> {
InputStream is = field.getValueAs(InputStream.class);
long contentLength = getContentLength(field);
return new ImageStreamWrapper(is, contentLength);
}).orElse(null);
}
Process: Cisco AnyConnect Secure Mobility Client [643]
Path: /Applications/Cisco AnyConnect Secure Mobility Client.app/Contents/MacOS/Cisco AnyConnect Secure Mobility Client
Identifier: com.cisco.Cisco-AnyConnect-Secure-Mobility-Client
Version: ???
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: Cisco AnyConnect Secure Mobility Client [643]
User ID: 501
Date/Time: 2016-04-02 00:04:39.439 +0300
Process: Cisco AnyConnect Secure Mobility Client [643]
Path: /Applications/Cisco AnyConnect Secure Mobility Client.app/Contents/MacOS/Cisco AnyConnect Secure Mobility Client
Identifier: com.cisco.Cisco-AnyConnect-Secure-Mobility-Client
Version: ???
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: Cisco AnyConnect Secure Mobility Client [643]
User ID: 501
Date/Time: 2016-04-02 00:04:39.439 +0300
package com.upwork.agora.tracker.common.util;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
public class ArrayUtilsTest {
public static long getRightSibling(long[] arr, long nr) {
long startTime = System.nanoTime();
long result = 0;
if (nr > arr[arr.length - 1]) {
long stopTime = System.nanoTime();
long elapsedTime = stopTime - startTime;
System.out.println(elapsedTime);
return nr;
}
SELECT
rating.enrolment_id,
rating.kb,
rating.priority,
e.person_id,
e.docseries,
e.docnum,
e.doctext,
e.isstate,
e.iscontract,
SELECT * FROM v_enrolment_mon
UNION
SELECT * FROM v_enrolment_destination_admission eda
WHERE eda.enrolment_id NOT IN (
SELECT
mon.enrolment_id
FROM v_enrolment_mon mon
SELECT
zno.zno_score_sum + certificate.certification_sum * s.weight_certification + mse.markexchange * s.weight_award AS kb,
e.id as enrolment_id
FROM q_dc_enrolment e
LEFT OUTER JOIN q_ob_specoffer s ON e.specoffer_id = s.id
LEFT OUTER JOIN (
-- бали за зно, посумовані
SELECT
SUM(mse.markexchange * ss.weightsubject) AS zno_score_sum,
ees.enrolment_id