Skip to content

Instantly share code, notes, and snippets.

View cemdrman's full-sized avatar
🇹🇷
Focusing

Cem cemdrman

🇹🇷
Focusing
View GitHub Profile
@cemdrman
cemdrman / RealtyService.java
Created October 17, 2023 22:36
Unit test örnek kodlar
package emlakcepte.service;
import java.time.LocalDateTime;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.HttpStatus;
package model;
import java.util.List;
public class User {
private String name;
private String email;
private String password;
private String profilePhoto;
package model;
import java.time.LocalDateTime;
public class Blog {
private String title;
private String photoUrl;
private String content;
private LocalDateTime publishDate;
import model.Blog;
import model.User;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
#!/bin/bash
team1=("repo1" "repo2")
team2=("repo3" "repo4")
echo 'Enter your git user name:'
read user_name
@cemdrman
cemdrman / test.sh
Created October 3, 2022 16:09
Shell Script
#!/bin/bash
#special variables
echo $0
echo $n
echo $#
echo $*
echo $@
echo $?
package streams;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Main {
@cemdrman
cemdrman / RestAPIServer.scala
Created December 24, 2021 02:34
Scala with Akka Http
import ProductDB.{AddProduct, AddedProduct, FindAllProducts, FindProduct}
import akka.actor.{Actor, ActorLogging, ActorSystem, Props}
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpMethods, HttpRequest, HttpResponse, StatusCodes, Uri}
import akka.pattern.ask
import akka.stream.ActorMaterializer
import akka.util.Timeout
import spray.json._
import scala.concurrent.{Future, duration}
@cemdrman
cemdrman / scalaCollections.scala
Created December 14, 2021 00:34
scala collections
import java.util
import scala.::
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
object Collections {
def main(args: Array[String]): Unit ={
val nameList: Array[String] = new Array[String](3)
@cemdrman
cemdrman / scalaBasics.scala
Created December 12, 2021 21:15
scala basics
object BasicsMain {
def main(args: Array[String]): Unit = {
var number = 100
number += 1
println(number)
var number1 : Int = 100
number1 += 1
println(number1)