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 test | |
| import Employee | |
| import HelseKey | |
| import org.springframework.beans.factory.annotation.Autowired | |
| import org.springframework.beans.factory.getBean | |
| import org.springframework.boot.CommandLineRunner | |
| import org.springframework.boot.SpringApplication | |
| import org.springframework.boot.autoconfigure.SpringBootApplication | |
| import org.springframework.context.ApplicationContext |
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
| @Configuration | |
| open class RadisCacheConfig { | |
| @Bean | |
| open fun jedisConnectionFactory(): JedisConnectionFactory { | |
| val redisStandaloneConfiguration = RedisStandaloneConfiguration() | |
| redisStandaloneConfiguration.hostName = "localhost" | |
| redisStandaloneConfiguration.port = 6379 | |
| val jedisClientConfiguration = JedisClientConfiguration.builder() |
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
| fun fetchDeparturesAndLiveTimes(max: Int): List<DepartureWithLiveTime> = runBlocking{ | |
| timetableService.departures(max).map { | |
| async(CoroutineName("${it.gate}") + Dispatchers.IO) { | |
| println("#### ${coroutineContext[CoroutineName.Key]} is executing on thread : ${Thread.currentThread().name}") | |
| val liveTime = try { | |
| realTimeService.liveDepartureTime(it.id) | |
| } catch (e: TimeoutException) { | |
| null |
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
| data class Test(val name: String, val myfun: ( Int) -> Int ) | |
| val test = Test("Ankur", { i: Int -> i + 3 } ) | |
| println(test) | |
| println(test.copy()) | |
| println(test.component1()) | |
| println(test.hashCode()) | |
| println(test.myfun(1)) |
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
| jobs: | |
| release: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: "Git checkout" | |
| uses: "actions/checkout@v2" | |
| - name: "Set up JDK 17" | |
| uses: actions/setup-java@v2 | |
| with: |
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 no.nav.sbl.dialogarena.modiabrukerdialog.consumer.service.saker.mediation | |
| import com.fasterxml.jackson.annotation.JsonSetter | |
| import com.fasterxml.jackson.annotation.Nulls | |
| import com.fasterxml.jackson.core.JsonParser | |
| import com.fasterxml.jackson.core.JsonProcessingException | |
| import com.fasterxml.jackson.databind.DeserializationContext | |
| import com.fasterxml.jackson.databind.ObjectMapper | |
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize | |
| import com.fasterxml.jackson.databind.deser.std.StdDeserializer |
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
| name: Build, push, and deploy Branch | |
| on: [push] | |
| env: | |
| IMAGE: docker.pkg.github.com/${{ github.repository }}/<application-name>:${{ github.sha }} | |
| TZ: Europe/Oslo | |
| isDeploy: true | |
| deploy_namespace: q0 |
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 NonRepeatingCharacterFinder { | |
| public static void main(String[] args) { | |
| System.out.println("First Nonrepeating Charater is:" + findFirstNonRepeatingCharacter("aabcdb")); | |
| System.out.println("First Nonrepeating Charater is:" + findFirstNonRepeatingCharacter("abcde")); | |
| System.out.println("First Nonrepeating Charater is:" + findFirstNonRepeatingCharacter("aamzbccddb")); | |
| System.out.println("First Nonrepeating Charater is:" + findFirstNonRepeatingCharacter("aammzzbcXssfdsfsasdfdfcddbG")); | |
| } |
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
| #!/bin/bash | |
| filename=$1 | |
| while read line; do | |
| # reading each line | |
| echo $line | |
| echo ----------------------------------------------------------------- | |
| ./node_modules/.bin/ts-unused-exports tsconfig.json $line --showLineNumber | |
| echo ----------------------------------------------------------------- | |
| done < $filename |