Skip to content

Instantly share code, notes, and snippets.

View ufo22940268's full-sized avatar
🎯
Focusing

Chao Cheng ufo22940268

🎯
Focusing
View GitHub Profile
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
class Scratch {
public static void main(String[] args) {
List<String> newFormIds = Arrays.asList("1", "2", "3", "5");
List<String> results = Arrays.asList("1", "2", "3");
List<String> restFormIds = newFormIds.stream()
.filter(s -> !results.contains(s)).collect(Collectors.toList());
graph TD;
    A[GetActiveAutoSplitProcessStatusesByDmsFolderId1] --> B{cache exists ?}
    B --> |Yes| F{cache expired ?}
    F --> |No| D[return]
    B --> |No| C[request dms service]
    F --> |Yes| C
    C --> E[store result into cache]
    E --> D

Data flow

flowchart TD;
    A[GetActiveAutoSplitProcessStatusesByDmsFolderId] --> B{cache exists ?}
    B --> |Yes| F{cache expired ?}
    F --> |No| D[return]
    B --> |No| C[request dms service]
    F --> |Yes| C
    C --> E[store result into cache]
 E --&gt; D
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
events {}
http {
proxy_max_temp_file_size 0;
proxy_buffering off;
error_log /tmp/nginx_error.log;
access_log /tmp/nginx_access.log;
upstream frontend {
server 127.0.0.1:8080;
---
## Default Elasticsearch configuration from Elasticsearch base image.
## https://github.com/elastic/elasticsearch/blob/7.11/distribution/docker/src/docker/config/elasticsearch.yml
#
cluster.name: "docker-cluster"
network.host: 0.0.0.0
## X-Pack settings
## see https://www.elastic.co/guide/en/elasticsearch/reference/7.11/setup-xpack.html
xpack.license.self_generated.type: basic
import pymysql
from openpyxl import load_workbook
def write_to_db(conn, id, src_type, run_args):
src_type = 1 if src_type == '云更新' else 0
cursor = conn.cursor()
sql = "update game_infos set src_type = %s, run_args = %s where id = %s;"
cursor.execute(sql, (src_type, run_args, id))
//Given two strings s1, s2, find the lowest ASCII sum of deleted characters to m
//ake two strings equal.
//
// Example 1:
//
//Input: s1 = "sea", s2 = "eat"
//Output: 231
//Explanation: Deleting "s" from "sea" adds the ASCII value of "s" (115) to the
//sum.
//Deleting "t" from "eat" adds 116 to the sum.
//Solve a given equation and return the value of 'x' in the form of a string "x=
//#value". The equation contains only '+', '-' operation, the variable 'x' and its
// coefficient. You should return "No solution" if there is no solution for the eq
//uation, or "Infinite solutions" if there are infinite solutions for the equation
//.
//
// If there is exactly one solution for the equation, we ensure that the value o
//f 'x' is an integer.
//
//
const obj = [{
pid: 'p1',
bid: 'b1',
qid: 'q1',
}, {
pid: 'p1',
bid: 'b2',
qid: 'q2',
}, {
pid: 'p1',