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
// | |
// LinkedList.cpp | |
// Assignment2 | |
// | |
// Created by Nima Boscarino on 2014-09-29. | |
// Copyright (c) 2014 NimaBoscarino. All rights reserved. | |
// | |
#ifdef __Assignment2__LinkedList__ |
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 kafka.consumer.ConsumerConfig; | |
import kafka.consumer.ConsumerIterator; | |
import kafka.consumer.KafkaStream; | |
import kafka.javaapi.consumer.ConsumerConnector; | |
import kafka.message.MessageAndMetadata; | |
import org.apache.avro.Schema; | |
import org.apache.avro.generic.GenericDatumReader; | |
import org.apache.avro.generic.GenericRecord; | |
import org.apache.avro.io.Decoder; | |
import org.apache.avro.io.DecoderFactory; |
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 org.reflections.Reflections; | |
import tr.com.dev.haliYikama.server.persist.models.Personel; | |
import tr.com.dev.haliYikama.server.persist.models.User; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.util.*; |
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 org.apache.camel.builder.RouteBuilder; | |
/** | |
* Created by ramazancesur on 7/14/18. | |
*/ | |
public class DataRoute extends RouteBuilder { | |
@Override | |
public void configure() throws Exception { | |
from("vm:commingQueue") | |
.routeId("fromCommingQueueToSendingQueue") |
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.util.Date; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.EntityListeners; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.Id; | |
import javax.persistence.Table; | |
import javax.persistence.Temporal; | |
import javax.persistence.TemporalType; |
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 project.auth; | |
import com.fasterxml.jackson.core.JsonGenerationException; | |
import com.fasterxml.jackson.databind.JsonMappingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.google.gson.Gson; | |
import com.sun.jersey.api.client.Client; | |
import com.sun.jersey.api.client.ClientResponse; | |
import com.sun.jersey.api.client.WebResource; | |
import com.sun.jersey.core.util.MultivaluedMapImpl; |
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
public class ServiceClient<T> { | |
private static String json; | |
public List<T> findService(String url, String parametres, Class clazz) { | |
try { | |
json = UrlData.readUrlNonCookie(url + parametres.replace(" ", "")); | |
return getList(clazz, json); | |
} catch (Exception ex) { | |
try { |
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.io.IOException; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.ApplicationArguments; | |
import org.springframework.boot.ApplicationRunner; | |
import org.springframework.stereotype.Component; | |
import com.stok.ramazan.entity.Role; | |
import com.stok.ramazan.entity.User; |
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
public int getJavaVersion() { | |
return Integer.parseInt(System.getProperty("java.version").split("\\.")[1]); | |
} | |
public String convertBase64OutputStream(ByteArrayOutputStream outputStream) { | |
byte[] exporterDataByte = outputStream.toByteArray(); | |
if (getJavaVersion() <= 8) { | |
return BaseEncoding.base64().encode(exporterDataByte); | |
} else { | |
// Java8 ile birlikte gelen bir tane özellik |
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
private String getFile(String fileName) { | |
StringBuilder result = new StringBuilder(""); | |
//Get file from resources folder | |
ClassLoader classLoader = getClass().getClassLoader(); | |
File file = new File(classLoader.getResource(fileName).getFile()); | |
try (Scanner scanner = new Scanner(file)) { |