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
//jdk8.bat | |
@echo off | |
set JAVA_HOME=D:\Java\jdk1.8.0_111 | |
set PATH=%JAVA_HOME%\bin;%PATH% | |
echo Displaying Java Version | |
java -version | |
//jdk11.bat | |
@echo off | |
set JAVA_HOME=D:\Java\jdk-11.0.1 |
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
# https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html | |
# =================================================================== | |
# COMMON SPRING BOOT PROPERTIES | |
# | |
# This sample file is provided as a guideline. Do NOT copy it in its | |
# entirety to your own application. ^^^ | |
# =================================================================== | |
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
https://www.youtube.com/user/SpringSourceDev/playlists | |
Spring Boot | |
https://www.youtube.com/playlist?list=PLgGXSWYM2FpOa_FTla-x5Wd10dpmgrRC4 |
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.apache.log4j.*; | |
//below is the default conversion pattern | |
PatternLayout pl = new PatternLayout("%r [%t] %p %c %x - %m%n"); | |
Appender appender = new FileAppender(pl, "D:\\tmp\\hede.txt", false); | |
BasicConfigurator.configure(appender); | |
/* | |
// For direct output to console, use configure without appender | |
// it uses default pattern which mentioned up above |
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
https://en.wikipedia.org/wiki/NMEA_0183 | |
A sample file produced by a Tripmate 850 GPS logger. This file was produced in Leixlip, County Kildare, Ireland. The record lasts two seconds. | |
$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76 | |
$GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38*0A | |
$GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30*70 | |
$GPGSV,3,2,11,02,39,223,19,13,28,070,17,26,23,252,,04,14,186,14*79 | |
$GPGSV,3,3,11,29,09,301,24,16,09,020,,36,,,*76 | |
$GPRMC,092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A*43 | |
$GPGGA,092751.000,5321.6802,N,00630.3371,W,1,8,1.03,61.7,M,55.3,M,,*75 |
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
https://stackoverflow.com/questions/8088179/using-mockito-with-multiple-calls-to-the-same-method-with-the-same-arguments/8395685 |
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.cenkc.util; | |
import org.springframework.stereotype.Service; | |
import org.springframework.web.context.ContextLoader; | |
import org.springframework.web.context.WebApplicationContext; | |
/** | |
* Created by Cenk Canarslan on 2019-09-06 | |
*/ | |
@Service |
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
// BigDecimal iterator 1 thru 10 | |
Stream.iterate( | |
BigDecimal.ONE, | |
bigDecimal -> bigDecimal.add(BigDecimal.ONE) | |
) | |
.limit(10) | |
.forEach(System.out::println); | |
// Integer iterator 1 thru 10 | |
Stream.iterate(1,n -> n + 1).limit(10).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) { | |
// regex case-insensitive search (?i:SOME_STRING) | |
String hede = "http://127.0.0.1:8888/SomeWS/SomeWSEndpointService?wSdL"; | |
String hodo = hede.replaceFirst("(?i:\\?wsdl)", "?wsdl"); | |
System.out.println("hede = " + hede); | |
System.out.println("hodo = " + hodo); | |
} | |
//hede = http://127.0.0.1:8888/SomeWS/SomeWSEndpointService?wSdL | |
//hodo = http://127.0.0.1:8888/SomeWS/SomeWSEndpointService?wsdl |
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
/* | |
to run | |
/.../java/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4423 -jar /tmp/some-test-0.0.1-SNAPSHOT.jar --xip=192.168.1.1 --xport=11111 | |
*/ | |
@Component | |
public class SomeWorker implements ApplicationRunner { | |
public static final Logger logger = LoggerFactory.getLogger(SomeWorker.class); | |
@Value("${xip}") |
OlderNewer