I hereby claim:
- I am makiftutuncu on github.
- I am makiftutuncu (https://keybase.io/makiftutuncu) on keybase.
- I have a public key whose fingerprint is E83C 323C 34DA DD70 97FB AB7A 3F26 DC07 5227 C356
To claim this, I am signing this object:
import java.util.Optional; | |
import java.util.function.Consumer; | |
import java.util.function.Function; | |
import java.util.function.Supplier; | |
public abstract class Either<L, R> { | |
public static final class Left<L, R> extends Either<L, R> { | |
public Left(L left) { | |
super(left, null); | |
} |
<!DOCTYPE html><html><body><h2>Privacy Policy</h2><p>Mehmet Akif Tütüncü built the Text Instead? app as an open source app. This SERVICE is provided by Mehmet Akif Tütüncü at no cost and is intended for use as is.</p><p>This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.</p><p>If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect are used for providing and improving the Service.I will not use or share your information with anyone except as described in this Privacy Policy.</p> <p>The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Text Instead?, unless otherwise defined in this Privacy Policy.</p><p><strong>Information Collection and Use</strong></p><p>For a better experience, while using our Service, I may require you to provide |
import javax.inject.Singleton | |
import com.mehmetakiftutuncu.errors.{Errors, Maybe} | |
trait Model { | |
val id: String | |
} | |
trait ModelSingleton[M <: Model] { | |
def get(id: String): Maybe[Option[M]] |
/* If the distance between location point and line is less than this, point is considered to be on the line */ | |
public static final double POINT_DISTANCE_TO_LINE_THRESHOLD = 0.01; | |
/* Calculates the distance of a location point to the line constructed by other 2 location points */ | |
public double distanceOfPointToTheLine(Location location, Location point1, Location point2) { | |
double x0 = location.getLatitude(); | |
double y0 = location.getLongitude(); | |
double x1 = point1.getLatitude(); | |
double y1 = point1.getLongitude(); |
import java.time.{Duration, Instant} | |
import java.util.UUID | |
import java.util.concurrent.atomic.AtomicReference | |
import java.util.function.UnaryOperator | |
object Timer { | |
private val map: AtomicReference[Map[String, Instant]] = new AtomicReference[Map[String, Instant]](Map.empty[String, Instant]) | |
def start(key: String): Instant = { | |
val now: Instant = Instant.now |
def test: Action[AnyContent] = { | |
def countriesToCities(countries: List[Country]): Future[Maybe[Map[Country, List[City]]]] = { | |
val idToCountryMap: Map[Int, Country] = countries.map { | |
country: Country => | |
country.id -> country | |
}.toMap | |
val futureMaybeCitiesList: List[Future[Maybe[List[City]]]] = countries.map { | |
country: Country => | |
Thread.sleep(20) |
sealed trait NotificationType { | |
val regex: Regex | |
} | |
object NotificationTypes { | |
case object EntryLike extends NotificationType {override val regex: Regex = """.+gönderini.+beğendi.*""".r} | |
case object CommentLike extends NotificationType {override val regex: Regex = """.+yorumunu.+beğendi.*""".r} | |
case object Comment extends NotificationType {override val regex: Regex = """.+yorum.+yaptı.*""".r} | |
case object Mention extends NotificationType {override val regex: Regex = """.+senden.+bahsetti.*""".r} | |
case object Message extends NotificationType {override val regex: Regex = """.+sana.+gönderdi.*""".r} |
I hereby claim:
To claim this, I am signing this object:
import scala.io._ | |
case class Route(httpMethod: String, url: String, endpoint: Endpoint) { | |
def toJson = s"""{"httpMethod":"$httpMethod","url":"$url","endpoint":$endpoint}""" | |
override def toString = toJson | |
} | |
case class Endpoint(controllerPackage: String, controller: String, method: String, parameters: List[String]) { | |
def toJson = s"""{"controllerPackage":"$controllerPackage","controller":"$controller","method":"$method","parameters":${parameters.map(p => "\"" + p + "\"").mkString("[",",","]")}}""" |
// Java | |
String[] isimler = new String[] {"Ali", "Veli", "Ahmet", "Hüseyin", "Akif"}; | |
String[] secilenIsimler = new String[isimler.length]; | |
int i = 0; | |
for (String isim : isimler) { | |
if (isim.startsWith("A") && isim.length > 3) { | |
System.out.println("Seçilen isim: " + isim); | |
secilenİsimler[i] = isim; | |
i++; |