This file contains 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
import java.util.Arrays; | |
public class SudokuTest { | |
private static int[][] sudoku = new int[9][9]; | |
private static int step = 0; | |
private static void init() { | |
String src = "" + | |
"009002400" + |
This file contains 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
// https://www.metacritic.com/browse/games/release-date/available/ps4/metascore | |
Jsoup.parse(new BufferedReader(new FileReader(new File("C:/Files/ps4.html"))) | |
.lines() | |
.reduce(Jsoup.parse(new BufferedReader(new FileReader(new File("C:/Files/ByUser.html"))) | |
.lines() | |
.reduce("", (acc, item) -> acc + item)).toString(), (acc, item) -> acc + item)) | |
.select(".product_wrap") | |
.stream() | |
.sorted(Comparator.comparing(e -> ((Element) e).select(".textscore").text()).reversed()) | |
.map(item -> "\033[106m " |
This file contains 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
Jsoup.parse(new BufferedReader(new FileReader(new File("C:/Files/ps4.html"))).lines().reduce(Jsoup.parse(new BufferedReader(new FileReader(new File("C:/Files/ByUser.html"))).lines().reduce("", (acc, item) -> acc + item)).toString(), (acc, item) -> acc + item)).select(".product_wrap").stream().sorted(Comparator.comparing(e -> ((Element) e).select(".textscore").text()).reversed()).map(item -> "\033[106m ".concat(item.select(".textscore").text()).concat(" \033[102m ").concat(String.format("%3s", item.select(".metascore_w").text())).concat(" \033[91m ").concat(item.select("a").text())).distinct().forEach(System.out::println); |
This file contains 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 message; | |
import java.io.*; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.util.List; | |
import java.util.UUID; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.stream.Collectors; |
This file contains 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
/** | |
* 生成小程序二维码并存入本地 | |
* | |
* @param pathAndParams 路径及自定义参数: /page/index?id=123 | |
* @param filePathAndName 文件路径及名称: C:/Files/qrcode/123.jpg | |
*/ | |
private static void generic(String pathAndParams, String filePathAndName) { | |
RestTemplate rest = new RestTemplate(); | |
InputStream inputStream = null; | |
OutputStream outputStream = null; |
This file contains 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
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> | |
<classpathPrefix>lib/</classpathPrefix> | |
<!--此处修改为你的应用入口类全路径--> | |
<mainClass>com.xxx.xxxxx.Application</mainClass> |
This file contains 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
// ==UserScript== | |
// @name * 搜狗/百度/谷歌翻译 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author OnySakura | |
// @include * | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
This file contains 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
static { | |
String proxyHost = "127.0.0.1"; | |
String proxyPort = "1080"; | |
System.setProperty("http.proxyHost", proxyHost); | |
System.setProperty("http.proxyPort", proxyPort); | |
System.setProperty("https.proxyHost", proxyHost); | |
System.setProperty("https.proxyPort", proxyPort); | |
} |
This file contains 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
/** | |
* http form 请求工具类 | |
*/ | |
public class HttpFormUtil { | |
private static final Logger LOGGER = LoggerFactory.getLogger(HttpFormUtil.class); | |
/** | |
* multipart/form-data 格式发送数据时各个部分分隔符的前缀,必须为 -- | |
*/ | |
private static final String BOUNDARY_PREFIX = "--"; |
This file contains 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 | |
public class GlobalCorsConfig { | |
@Bean | |
public FilterRegistrationBean corsFilter() { | |
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); | |
CorsConfiguration config = new CorsConfiguration(); | |
config.setAllowCredentials(true); | |
// 设置你要允许的网站域名,如果全允许则设为 * | |
config.addAllowedOrigin("*"); | |
// 如果要限制 HEADER 或 METHOD 请自行更改 |
OlderNewer