install jre
$ brew tap caskroom/versions
$ brew cask install java8
create directory
$ mkdir ~/workshop/
$ cd ~/workshop/
install jre
$ brew tap caskroom/versions
$ brew cask install java8
create directory
$ mkdir ~/workshop/
$ cd ~/workshop/
| import java.util.Properties | |
| import org.apache.http.HttpHost | |
| import com.fasterxml.jackson.databind.JsonNode | |
| import org.apache.kafka.clients.consumer.ConsumerConfig | |
| import org.apache.kafka.clients.consumer.KafkaConsumer | |
| import org.apache.kafka.common.serialization.StringDeserializer | |
| import org.apache.kafka.connect.json.JsonDeserializer | |
| import org.elasticsearch.ElasticsearchException |
| buildscript { | |
| ext.kotlin_version = '1.2.50' | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
| } |
| package main | |
| import ( | |
| "log" | |
| "os" | |
| "fmt" | |
| "net/http" | |
| "encoding/json" | |
| "github.com/joho/godotenv" |
| package producer | |
| import ( | |
| "fmt" | |
| "os" | |
| "github.com/confluentinc/confluent-kafka-go/kafka" | |
| ) | |
| var producer *kafka.Producer |
| CHANNEL_SECRET=your_channel_secret | |
| CHANNEL_ACCESS_TOKEN=your_channel_access_token | |
| # BOOTSTRAP_SERVERS=localhost:9092 |
| package main | |
| import ( | |
| "log" | |
| "os" | |
| "net/http" | |
| "github.com/joho/godotenv" | |
| "github.com/labstack/echo" | |
| "github.com/line/line-bot-sdk-go/linebot" |
| success: function (res, status) { | |
| liff.getProfile() | |
| .catch(function (error) { | |
| window.alert('Error message from getProfile: ' + error.message); | |
| }.then(function (profile) { | |
| liff.sendMessages([ | |
| { | |
| type: 'image', | |
| originalContentUrl: 'https://' + document.domain + '/static/imgs/' + res + '.jpg', | |
| previewImageUrl: 'https://' + document.domain + '/static/imgs/' + res + '_240.jpg' |
| class Obj { | |
| var v1 | |
| def doSomething() { | |
| [1,2,3].forEach(i => { | |
| this.v1 = i | |
| this.v2 = random() | |
| this.validate_with_instance_variable() // (1) | |
| this.validate_with_passing_variable(i, this.v2) // (2) | |
| }) |
| <!-- main pom.xml --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>group1</groupId> | |
| <artifactId>multipleprojects</artifactId> | |
| <version>1.0-SNAPSHOT</version> |