Skip to content

Instantly share code, notes, and snippets.

View ivanursul's full-sized avatar

Ivan Ursul ivanursul

View GitHub Profile
SELECT
zno.zno_score_sum + certificate.certification_sum * s.weight_certification + other.other_sum * 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
SELECT COUNT(enrolment.id), au.name FROM q_dc_enrolment enrolment
INNER JOIN q_ob_person person ON person.id = enrolment.person_id
INNER JOIN q_od_personaddress person_address ON person_address.id =
(SELECT MAX(id) FROM q_od_personaddress pa WHERE pa.person_id = enrolment.person_id GROUP BY pa.person_id)
INNER JOIN (
WITH RECURSIVE recursetree(id, parent_id, path, name) AS (
SELECT
id,
parent_id,
array[id] AS path,
@Timed
@RequestMapping(value = "/inventory/products/outlet/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<AbstractInventoryProductsDTO>> getInventoryProductsByInventory(@PathVariable Long id, @RequestParam OrderBy orderBy) {
/*Outlet outlet = outletRepository.findOne(id);
Inventory inventory = inventoryRepository.findByOutlet(outlet);
long t1 = System.currentTimeMillis();
package com.company;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
public class Main {
public class Main {
public static void main(String[] args) {
Insurance insurance = new Insurance("insurance1");
Car car = new Car(Optional.of(insurance));
Person person = new Person(Optional.of(car));
Optional<String> s = person.getCar()
@ivanursul
ivanursul / gist:acf36fd94357fecf02e0
Created September 12, 2015 17:37
gist for ivanursul.com
public SomeClass(@Named("yourCustomProvider") Provider<GenericFromYourProvider> yourCustomProvider) {
...
}
@ivanursul
ivanursul / gist2.java
Created September 12, 2015 17:35
gist for ivanursul.com
bind(Provider.class).annotatedWith(Names.named("yourNamedProvider")).toInstance(new YourCoolProviderThatProvideSomething());
@ivanursul
ivanursul / gist:490cdbbd299b850591ee
Created September 12, 2015 17:34
gist for ivanursul.com
bind(GenericFromYourProvider.class).annotatedWith(Names.named("yourCustomProvider")).toProvider(YourCoolProviderThatProvideSomething.class);
/Users/ivanursul/development/Tools/apache-tomcat-8.0.24/bin/catalina.sh run
objc[4061]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Connected to the target VM, address: '127.0.0.1:53079', transport: 'socket'
[2015-08-27 02:49:55,452] Artifact Gradle : iu-sport-ui : iu-sport-ui.war (exploded): Server is not connected. Deploy is not available.
[2015-08-27 02:49:55,453] Artifact Gradle : iu-sport:iu-sport-rest-api : iu-sport-rest-api.war (exploded): Server is not connected. Deploy is not available.
27-Aug-2015 14:49:56.873 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.24
27-Aug-2015 14:49:56.876 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jul 1 2015 20:19:55 UTC
27-Aug-2015 14:49:56.876 INFO [
Exception in thread "main" org.apache.commons.configuration.ConversionException: 'graphite.port' doesn't map to an Integer object
at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:848)
at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809)
at com.odesk.agora.configuration.ConfigurationFactory.processConfiguration(ConfigurationFactory.java:275)
at com.odesk.agora.configuration.ConfigurationFactory.processConfiguration(ConfigurationFactory.java:400)
at com.odesk.agora.configuration.ConfigurationFactory.build(ConfigurationFactory.java:178)
at com.odesk.agora.command.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:75)
at com.odesk.agora.command.ConfiguredCommand.run(ConfiguredCommand.java:58)
at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
at com.yammer.dropwizard.Service.run(Service.java:61)