This file contains 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
spring.mail.host=smtp-mail.outlook.com | |
spring.mail.port=587 | |
spring.mail.username=***Kullanıcı Adınız*** | |
spring.mail.password=***Sifreniz*** | |
spring.mail.properties.mail.smtp.starttls.enable= true |
This file contains 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.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.mail.javamail.JavaMailSender; | |
import org.springframework.mail.javamail.MimeMessageHelper; | |
import org.springframework.stereotype.Service; | |
import javax.mail.MessagingException; | |
import javax.mail.internet.MimeMessage; |
This file contains 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
@Autowired | |
SpringTemplateEngine templateEngine; | |
@Async | |
public void htmlEpostaGonder(String kime, String konu) { | |
MimeMessage message = mailSender.createMimeMessage(); | |
MimeMessageHelper helper = new MimeMessageHelper(message); | |
This file contains 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
<!DOCTYPE html> | |
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hoş Geldiniz</title> | |
</head> | |
<body> | |
<h5 th:text="${metin}"></h5> | |
<ul> |
This file contains 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 com.mevlutsungur; | |
/** | |
* Bu program konsol üzerinden n*n boyutunda bir matrisi girdi olarak alır ve determinantını ekrana yazdırır. | |
* | |
* This program calculates determinant of a n*n matrix and display it on console. | |
*/ | |
import java.util.Scanner; | |
public class DeterminantCalculator { |
This file contains 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 static void main(String[] args) { | |
List<String> isimler = new ArrayList<>() {{ | |
add("Mevlüt"); | |
add("Sungur"); | |
add("Java"); | |
add("Angular"); | |
}}; | |
Iterator<String> iterator = isimler.iterator(); |
This file contains 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 static void main(String[] args) { | |
List<String> isimler = new ArrayList<>() {{ | |
add("Mevlüt"); | |
add("Sungur"); | |
add("Java"); | |
add("Angular"); | |
}}; | |
for(String s : isimler) { | |
if(s.startsWith("S")) isimler.remove(s); |
This file contains 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 static void main(String[] args) { | |
List<String> isimList = Arrays.asList("Sungur",null,"Mevlüt","Angular"); | |
isimList.sort(String::compareTo); | |
} |
This file contains 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 static void main(String[] args) { | |
List<String> isimList = Arrays.asList("Sungur",null,"Mevlüt","Angular"); | |
isimList = isimList.stream().filter(i -> i != null).sorted(String::compareTo) | |
.collect(Collectors.toList()); | |
isimList.forEach(System.out::println); | |
} |
This file contains 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 static void main(String[] args) { | |
List<String> isimList = Arrays.asList("Sungur",null,"Mevlüt"); | |
isimList.sort(Comparator.nullsFirst(String::compareTo)); | |
isimList.stream().forEach(System.out::println); | |
} |
OlderNewer