Translating texts via Youdao eco-freely in only one class

Related tags

Spring Boot Youdao4J
Overview

Youdao4J

Translating texts via Youdao Translator by one class.
Need GSON.

Usage

Youdao4J did lots of works in the background. DO NOT create morr Youdao4J Object.
Token expiration or cookie expiration are held automatically.

public class Showcase {
    {
        var yd = Youdao4J.fromDefault(); // lazy-loaded and cached. Recommended.
        var advancedYd = Youdao4J.from(HttpClient.newBuilder(), Duration.ofMinutes(30), "Firefox UA"); // If you need to specific User-Agent, HTTP Proxy, Cache-Control etc.
        yd.translate(Youdao4J.LanguageType.AUTO, Youdao4J.LanguageType.CHINESE, "Nullcat sb"); // Translate synchronously.
        yd.translateAsync(Youdao4J.LanguageType.AUTO, Youdao4J.LanguageType.CHINESE, translated -> { // Translate Asynchronously. Threads are held by Http Clients
            //...
        }, "Nullcat sb");
        Assertions.assertEquals(Youdao4J.fromDefault(), Youdao4J.fromDefault()); // They're equal.
    }
}
You might also like...

Rails like error pages for Spring Boot applications that are only active in development.

Rails like error pages for Spring Boot applications that are only active in development.

Better Error Pages Table of Contents Introduction Demo Quick Start Configuration Limitations License Introduction This is a Spring Boot Starter projec

Jan 2, 2022

Maven plugin to check if dependencies in CycloneDX BOM files use only allowed licenses.

license-checker-cyclonedx-maven-plugin Maven plugin to check if dependencies in CycloneDX BOM files use only allowed licenses. Quick start guide 1. Ad

Sep 17, 2022

Operating Systems - Concepts of computer operating systems including concurrency, memory management, file systems, multitasking, performance analysis, and security. Offered spring only.

Nachos for Java README Welcome to Nachos for Java. We believe that working in Java rather than C++ will greatly simplify the development process by p

Nov 28, 2021

Simulates FGO combat logic (only ally)

Simulates FGO combat logic (only ally)

FGO模拟器 制作自定义单位时,请主要依照FGO的逻辑来写。 虽然可以写出FGO没有的从者、礼装,但是除非符合逻辑否则程序会做什么我也不知道。 另外这个小程序没有任何联网功能,我也不准备录入所有东西的数据,所以请自己制作需要的部件~ 未来大概就只在github随缘更新,但是现有的制作器基本支持写出绝

Dec 19, 2022

lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game resources!

lazy-language-loader lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game re

Sep 7, 2022

First experiments to try to render the Doom WAD maps using only standard libraries. Test 004 - https://youtu.be/-6mePgg7gXE

JavaDoomWADMapRendererTests Test 001 (07/set/2022) - https://youtu.be/MpY0PICdcwM First experiments to try to render the Doom WAD maps using only stan

Oct 17, 2022

about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。

about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。

Spring Boot 学习示例 Spring Boot 使用的各种示例,以最简单、最实用为标准,此开源项目中的每个示例都以最小依赖,最简单为标准,帮助初学者快速掌握 Spring Boot 各组件的使用。 Spring Boot 中文索引 | Spring Cloud学习示例代码 | Spring

Jan 1, 2023

CVE-2021-2109 && Weblogic Server RCE via JNDI

CVE-2021-2109 && Weblogic Server RCE via JNDI

Description Vulnerability in the Oracle WebLogic Server product of Oracle Fusion Middleware (component: Console). Supported versions that are affected

Nov 21, 2022

Get notified with available vaccination centres via SMS

About A simple spring boot application that can track vaccine availability and automatically sends a SMS alert with the avilable centers Features Dose

Nov 16, 2022
Releases(0.0.4)
Owner
iceBear
Professional idiot all the day,
iceBear
Discourse-java is a platform where users can freely discuss on topics they want to, and like-minded people can join in and contribute

Discourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a: mailing list discussion forum long-form

Infosys Ltd 16 Oct 19, 2022
"Some" Utilities you can use for your Java projects "freely"! Files are compiled with Java-8 and above, but mostly Java-11.

✨ Java-SomeUtils ?? "Some" Utilities you can use for your Java projects "freely"! *"Freely"* forcing you to include the license into your program. Fil

JumperBot_ 2 Jan 6, 2023
Java agent that enables class reloading in a running JVM

Welcome to Spring-Loaded What is Spring Loaded? Spring Loaded is a JVM agent for reloading class file changes whilst a JVM is running. It transforms c

Spring 2.7k Dec 26, 2022
Android application made during an introduction class to mobile application development.

Reflex Revolution Android application made during an introduction class to mobile application development. Contributors Hailey Savoie Carter Moore Fre

Frederic Verret 3 Aug 27, 2022
The MeterRegistryHolder class is designed to hold MeterRegistry as a static field.

MeterRegistryHolder The MeterRegistryHolder class is designed to hold MeterRegistry as a static field. Goal The goal is to simplify using MeterRegistr

Tomasz Fijałkowski 4 Sep 20, 2022
1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds

BlockChanger 1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds Setup Just import the class to your project. Usage Playe

null 25 Dec 23, 2022
Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats.

Classpy Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats. Inspiration This t

null 1k Dec 17, 2022
Not only Spring Boot but also important knowledge of Spring(不只是SpringBoot还有Spring重要知识点)

在线阅读 : https://snailclimb.gitee.io/springboot-guide (上面的地址访问速度缓慢的建议使用这个路径访问) 重要知识点 基础 Spring Boot 介绍 第一个 Hello World 第一个 RestFul Web 服务 Spring 如何优雅读取配

Guide哥 4.7k Jan 3, 2023
Generate a dynamic PAC script that will route traffic to your Burp proxy only if it matches the scope defined in your Burp target.

Burp PAC Server This Burp Extension generates a dynamic Proxy Auto-Configuration (PAC) script that will route traffic to your Burp proxy only if it ma

null 30 Jun 13, 2022
Bring back Youtube Dislike for Android (View Only)

Show Youtube Dislikes Bring back Youtube Dislikes for Android This is a simple application, that parses the data from the "returnyoutubedislike.com" A

Jesper Bak Handskemager 21 Nov 17, 2022