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 org.aljacinto.multipledatasources; | |
| import org.springframework.beans.factory.annotation.Qualifier; | |
| import org.springframework.boot.context.properties.ConfigurationProperties; | |
| import org.springframework.boot.jdbc.DataSourceBuilder; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.jdbc.core.JdbcTemplate; | |
| import javax.sql.DataSource; |
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 com.aj.samplemessaging.receiver; | |
| import org.springframework.amqp.AmqpRejectAndDontRequeueException; | |
| import org.springframework.amqp.rabbit.annotation.RabbitListener; | |
| import org.springframework.messaging.handler.annotation.Header; | |
| import org.springframework.messaging.handler.annotation.Payload; | |
| import org.springframework.stereotype.Component; | |
| import java.util.List; | |
| import java.util.Map; |
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 main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "strings" | |
| ) | |
| type IPAddr [4]byte |
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 main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| current := 0 | |
| next := 1 | |
| return func() int { |
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 main | |
| import ( | |
| "golang.org/x/tour/wc" | |
| "strings" | |
| ) | |
| func WordCount(s string) map[string]int { | |
| result := make(map[string]int) | |
| for _, v := range strings.Fields(s) { |
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 main | |
| import ( | |
| "golang.org/x/tour/pic" | |
| ) | |
| func Pic(dx, dy int) [][]uint8 { | |
| ret := make([][]uint8, dy) | |
| for i := range ret { | |
| ret[i] = make([]uint8, dx) |