Skip to content

Instantly share code, notes, and snippets.

View MikhailMorozyk's full-sized avatar

MikhailMorozyk

View GitHub Profile
@MikhailMorozyk
MikhailMorozyk / AppConfig
Created February 6, 2018 19:03
URL Search
package com.gmail.exet.brother.TechTask;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
@MikhailMorozyk
MikhailMorozyk / Adress
Created August 20, 2017 20:28
XML/JSON
package com.gmail.exet.brother;
public class Address {
protected String city;
protected String country;
protected String street;
public Address() {}
public String getCountry() {
@MikhailMorozyk
MikhailMorozyk / JAXB
Created August 20, 2017 20:26
XML/JSON
package com.gmail.exet.brother;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import java.io.File;
public class JAXB {
public static void saveToXMLFile(TrainsList trains, File file) {
@MikhailMorozyk
MikhailMorozyk / MainAnnotation
Created August 4, 2017 18:34
First PRO HomeWork
package com.gmail.exet.brother;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Main {
public static void main(String[] args) {
try {
Class<?> cls = TestClass.class;
package ru.mail.exe.brother;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
@MikhailMorozyk
MikhailMorozyk / Coca-ColaPeople
Created June 26, 2017 19:12
Collection&Generics
package ru.mail.exe.brother;
import java.util.ArrayDeque;
public class MainCola {
public static void main(String[] args) {
ArrayDeque<String> colaPeople = new ArrayDeque<String>();
colaPeople.addLast("Sheldon");
@MikhailMorozyk
MikhailMorozyk / ArrayList
Created June 24, 2017 18:22
Collection&Generics
package ru.mail.exe.brother;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
createList();
@MikhailMorozyk
MikhailMorozyk / Group
Created June 21, 2017 19:23
Serializable
package ru.mail.exe.brother;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Arrays;
@MikhailMorozyk
MikhailMorozyk / Action
Created June 19, 2017 17:51
HomeworkOOP8
package ru.mail.exe.brother;
public class Action {
private byte[] file;
private long file_Amount;
private int n;
public Action() {
super();
package ru.mail.exe.brother;
import java.math.BigInteger;
public class ArraySumThread implements Runnable {
protected int pOne;
protected int pTwo;
protected int[] arr;