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
| { | |
| "store": { | |
| "prefix": "store", | |
| "body": [ | |
| "const state = {", | |
| "", | |
| "}", | |
| "", | |
| "const actions = {", | |
| "", |
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
| module.exports = { | |
| // 指定每行代码的最大长度(默认值:80) | |
| printWidth: 80, | |
| // 指定每个缩进级别的空格数(默认值:2) | |
| tabWidth: 2, | |
| // 使用制表符而不是空格进行缩进(默认值:false) | |
| useTabs: false, | |
| // 在语句末尾添加分号(默认值:true) | |
| semi: true, | |
| // 使用单引号而不是双引号(默认值:false) |
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
| #!/home/autmaple/Tools/personal/kafka/.venv/bin/python | |
| from confluent_kafka import Consumer, KafkaError | |
| import argparse | |
| parser = argparse.ArgumentParser(description='Kafka Producer') | |
| parser.add_argument('--broker', required=True, help='Kafka broker address') | |
| parser.add_argument('--topic', required=True, help='Kafka topic to produce to') | |
| args = parser.parse_args() |
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.example; | |
| import org.apache.flink.api.common.eventtime.WatermarkStrategy; | |
| import org.apache.flink.api.common.serialization.SimpleStringSchema; | |
| import org.apache.flink.api.java.utils.ParameterTool; | |
| import org.apache.flink.connector.kafka.source.KafkaSource; | |
| import org.apache.flink.connector.kafka.source.enumerator.initializer.OffsetsInitializer; | |
| import org.apache.flink.streaming.api.datastream.DataStream; | |
| import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; | |
| import org.apache.flink.types.Row; |
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.example; | |
| import lombok.RequiredArgsConstructor; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; | |
| import org.eclipse.paho.client.mqttv3.MqttCallback; | |
| import org.eclipse.paho.client.mqttv3.MqttClient; | |
| import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
| import org.eclipse.paho.client.mqttv3.MqttException; | |
| import org.eclipse.paho.client.mqttv3.MqttMessage; |
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 EagerSingleton { | |
| private static EagerSingleton instance = new EagerSingleton(); | |
| private EagerSingleton(){} | |
| public static EagerSingleton getInstance(){ | |
| return instance; | |
| } | |
| } |
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
| @RequiredArgsConstructor | |
| public class AndExpression extends CompositeExpression { | |
| private final Expression left; | |
| private final Expression right; | |
| @Override | |
| public boolean compute(Map<String, Double> data) { | |
| return left.compute(data) && right.compute(data); | |
| } | |
| } |
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.autmaple.config; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.security.config.web.server.ServerHttpSecurity; | |
| import org.springframework.security.oauth2.jose.jws.SignatureAlgorithm; | |
| import org.springframework.security.oauth2.jwt.NimbusReactiveJwtDecoder; | |
| import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder; | |
| import org.springframework.security.web.server.SecurityWebFilterChain; |
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
| target/ | |
| !.mvn/wrapper/maven-wrapper.jar | |
| !**/src/main/**/target/ | |
| !**/src/test/**/target/ | |
| ### IntelliJ IDEA ### | |
| .idea/modules.xml | |
| .idea/jarRepositories.xml | |
| .idea/compiler.xml | |
| .idea/libraries/ |
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.autmaple.oauth.components.redis; | |
| import com.autmaple.oauth.common.utils.SpringUtil; | |
| import org.springframework.data.redis.core.RedisCallback; | |
| import org.springframework.data.redis.core.RedisTemplate; | |
| import java.util.Collection; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Set; |
NewerOlder