full_name
stringlengths
7
104
description
stringlengths
4
725
topics
stringlengths
3
468
readme
stringlengths
13
565k
label
int64
0
1
krahets/hello-algo
《Hello 算法》:动画图解、一键运行的数据结构与算法教程,支持 Python, C++, Java, C#, Go, Swift, JS, TS, Dart, Rust, C, Zig 等语言。English edition ongoing
algo algorithm algorithms book data-structure data-structures data-structures-and-algorithms dsa education leetcode programming
<p align="center"> <a href="https://www.hello-algo.com/"> <img src="https://www.hello-algo.com/index.assets/hello_algo_header.png" width="450"></a> </p> <p align="center"> <img style="height: 60px;" src="https://readme-typing-svg.demolab.com?font=Noto+Sans+SC&weight=400&duration=3500&pause=2000&color=21C8B8&center=true&vCenter=true&random=false&width=200&lines=Hello%2C+%E7%AE%97%E6%B3%95+!" alt="hello-algo-typing-svg" /> </br> 动画图解、一键运行的数据结构与算法教程 </p> <p align="center"> <a href="https://www.hello-algo.com/"> <img src="https://www.hello-algo.com/index.assets/btn_read_online_dark.svg" width="145"></a> <a href="https://github.com/krahets/hello-algo/releases"> <img src="https://www.hello-algo.com/index.assets/btn_download_pdf_dark.svg" width="145"></a> </p> <p align="center"> <img src="https://www.hello-algo.com/index.assets/animation.gif" width="389"> <img src="https://www.hello-algo.com/index.assets/running_code.gif" width="389"> </p> <p align="center"> <img src="https://img.shields.io/badge/Python-snow?logo=python&logoColor=3776AB"> <img src="https://img.shields.io/badge/C%2B%2B-snow?logo=c%2B%2B&logoColor=00599C"> <img src="https://img.shields.io/badge/Java-snow?logo=coffeescript&logoColor=FC4C02"> <img src="https://img.shields.io/badge/C%23-snow?logo=csharp&logoColor=512BD4"> <img src="https://img.shields.io/badge/Go-snow?logo=go&logoColor=00ADD8"> <img src="https://img.shields.io/badge/Swift-snow?logo=swift&logoColor=F05138"> <img src="https://img.shields.io/badge/JavaScript-snow?logo=javascript&logoColor=E9CE30"> <img src="https://img.shields.io/badge/TypeScript-snow?logo=typescript&logoColor=3178C6"> <img src="https://img.shields.io/badge/Dart-snow?logo=dart&logoColor=0175C2"> <img src="https://img.shields.io/badge/Rust-snow?logo=rust&logoColor=000000"> <img src="https://img.shields.io/badge/C-snow?logo=c&logoColor=A8B9CC"> <img src="https://img.shields.io/badge/Kotlin-snow?logo=kotlin&logoColor=7F52FF"> <img src="https://img.shields.io/badge/Zig-snow?logo=zig&logoColor=F7A41D"> </p> <p align="center"> 简体中文 | <a href="https://github.com/krahets/hello-algo/blob/main/zh-hant/README.md">繁體中文</a> | <a href="https://github.com/krahets/hello-algo/blob/main/en/README.md">English</a> </p> ## 关于本书 本项目旨在打造一本开源免费、新手友好的数据结构与算法入门教程。 - 全书采用动画图解,内容清晰易懂、学习曲线平滑,引导初学者探索数据结构与算法的知识地图。 - 源代码可一键运行,帮助读者在练习中提升编程技能,了解算法工作原理和数据结构底层实现。 - 鼓励读者互助学习,提问与评论通常可在两日内得到回复。 若本书对您有所帮助,请在页面右上角点个 Star :star: 支持一下,谢谢! ## 推荐语 > “一本通俗易懂的数据结构与算法入门书,引导读者手脑并用地学习,强烈推荐算法初学者阅读。” > > **—— 邓俊辉,清华大学计算机系教授** > “如果我当年学数据结构与算法的时候有《Hello 算法》,学起来应该会简单 10 倍!” > > **—— 李沐,亚马逊资深首席科学家** ## 贡献 本开源书仍在持续更新之中,欢迎您参与本项目,一同为读者提供更优质的学习内容。 - [内容修正](https://www.hello-algo.com/chapter_appendix/contribution/):请您协助修正或在评论区指出语法错误、内容缺失、文字歧义、无效链接或代码 bug 等问题。 - [代码转译](https://github.com/krahets/hello-algo/issues/15):期待您贡献各种语言代码,已支持 Python、Java、C++、Go、JavaScript 等 12 门编程语言。 - [中译英](https://github.com/krahets/hello-algo/issues/914):诚邀您加入我们的翻译小组,成员主要来自计算机相关专业、英语专业和英文母语者。 欢迎您提出宝贵意见和建议,如有任何问题请提交 Issues 或微信联系 `krahets-jyd` 。 感谢本开源书的每一位撰稿人,是他们的无私奉献让这本书变得更好,他们是: <p align="left"> <a href="https://github.com/krahets/hello-algo/graphs/contributors"> <img width="770" src="https://contrib.rocks/image?repo=krahets/hello-algo&max=300&columns=16" /> </a> </p> ## License The texts, code, images, photos, and videos in this repository are licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
0
runelite/runelite
Open source Old School RuneScape client
oldschool-runescape osrs runescape
![](https://runelite.net/img/logo.png) # runelite [![CI](https://github.com/runelite/runelite/workflows/CI/badge.svg)](https://github.com/runelite/runelite/actions?query=workflow%3ACI+branch%3Amaster) [![Discord](https://img.shields.io/discord/301497432909414422.svg)](https://discord.gg/ArdAhnN) RuneLite is a free, open source OldSchool RuneScape client. If you have any questions, please join our IRC channel on [irc.rizon.net #runelite](http://qchat.rizon.net/?channels=runelite&uio=d4) or alternatively our [Discord](https://discord.gg/ArdAhnN) server. ## Project Layout - [cache](cache/src/main/java/net/runelite/cache) - Libraries used for reading/writing cache files, as well as the data in it - [runelite-api](runelite-api/src/main/java/net/runelite/api) - RuneLite API, interfaces for accessing the client - [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins ## Usage Open the project in your IDE as a Maven project, build the root module and then run the RuneLite class in runelite-client. For more information visit the [RuneLite Wiki](https://github.com/runelite/runelite/wiki). ### License RuneLite is licensed under the BSD 2-clause license. See the license header in the respective file to be sure. ## Contribute and Develop We've set up a separate document for our [contribution guidelines](https://github.com/runelite/runelite/blob/master/.github/CONTRIBUTING.md).
0
smithy-lang/smithy
Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
smithy smithy-models
# <img alt="Smithy" src="docs/_static/favicon.png" width="28"> Smithy [![Build Status](https://github.com/smithy-lang/smithy/workflows/ci/badge.svg)](https://github.com/smithy-lang/smithy/actions/workflows/ci.yml) Smithy defines and generates clients, services, and documentation for any protocol. * [Smithy Homepage][docs] * [Specifications][specs] * [Java API documentation][javadocs] * [Smithy Gradle Plugin][Smithy Gradle Plugin] * [Awesome Smithy][awesome-smithy] # Smithy IDL Smithy models define a service as a collection of resources, operations, and shapes. ```smithy $version: "2" namespace example.weather service Weather { version: "2006-03-01" resources: [City] operations: [GetCurrentTime] } resource City { identifiers: { cityId: CityId } read: GetCity list: ListCities resources: [Forecast] } // See the full example at https://smithy.io/2.0/quickstart.html#complete-example ``` Find out more about modeling a service with Smithy in the [Quick Start guide][quickstart]. # Building Smithy models > [!IMPORTANT] > Before you proceed, make sure you have the [Smithy CLI installed](https://smithy.io/2.0/guides/smithy-cli/cli_installation.html#cli-installation). The [Smithy CLI] is the easiest way to get started with building Smithy models. First, create a [`smithy-build.json`] file: ```json { "version": "1.0", "sources": ["model"] } ``` Next, create your first model `model/main.smithy`: ```smithy $version: "2" namespace com.example service ExampleService { version: "2020-05-27" } ``` Finally, run `smithy build` to build the model with the [Smithy CLI]. Find out more about building artifacts of your Smithy model in the [Building Smithy Models][building] guide. For more examples, see the [examples repository](https://github.com/smithy-lang/smithy-examples) # License This library is licensed under the Apache 2.0 License. [docs]: https://smithy.io/ [specs]: https://smithy.io/2.0/spec/ [javadocs]: https://smithy.io/javadoc/latest/ [quickstart]: https://smithy.io/2.0/quickstart.html [Smithy Gradle Plugin]: https://github.com/awslabs/smithy-gradle-plugin/ [Smithy CLI]: https://smithy.io/2.0/guides/smithy-cli/index.html [`smithy-build.json`]: https://smithy.io/2.0/guides/building-models/build-config.html#using-smithy-build-json [building]: https://smithy.io/2.0/guides/building-models/index.html [awesome-smithy]: https://github.com/smithy-lang/awesome-smithy
0
jiang111/IndexRecyclerView
[DEPRECATED] a Contact list implements by RecyclerView
recyclerview
[![](https://jitpack.io/v/jiang111/IndexRecyclerView.svg)](https://jitpack.io/#jiang111/IndexRecyclerView) ### a Contact list implements by Recyclerview ### usage: Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: ``` allprojects { repositories { ... maven { url "https://jitpack.io" } } } ``` Step 2. Add the dependency ``` dependencies { compile 'com.android.support:recyclerview-v7:23+' compile 'com.github.jiang111:IndexRecyclerView:v1.1' } ``` step 3. go to [DEMO](https://github.com/jiang111/IndexRecyclerView/blob/master/app/src/main/java/com/jiang/android/indexrecyclerview/adapter/ContactAdapter.java) ### art: ![](https://raw.githubusercontent.com/jiang111/IndexRecyclerView/master/art/art.gif) <br /> <img src="https://raw.githubusercontent.com/jiang111/IndexRecyclerView/master/art/z.png" width="500" /> <br /> <br /> <br /> there is a recyclerview with head, in head_recyclerview branch <br /> ![](https://raw.githubusercontent.com/jiang111/IndexRecyclerView/master/art/head.gif) ### reference:<br /> https://github.com/timehop/sticky-headers-recyclerview <br /> https://github.com/bingoogolapple/BGASwipeItemLayout-Android ### Other If you found this library helpful or you learned something today and want to thank me, [buying me a cup of ☕️ with paypal](https://www.paypal.me/jyuesong) <br /><br /> ![](https://raw.githubusercontent.com/jiang111/RxJavaApp/master/qrcode/wechat_alipay.png) ### License Copyright 2016 NewTab Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
Kelin-Hong/ScrollablePanel
A flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView. It different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location.
null
# ScrollablePanel --- A flexible view for providing a limited rect window into a large data set,just like a two-dimensional RecyclerView. It different from RecyclerView is that it's two-dimensional(just like a Panel) and it pin the itemView of first row and first column in their original location. ![ScrollablePanel Demo](art/ScrollablePanelDemo.gif) ## Demo ## Apk Download:[ScrollablePanelDemo.apk](art/ScrollablePanelDemo.apk) ## Download ## ```groovy compile 'com.kelin.scrollablepanel:library:1.2.0' ``` ## Usage ## ScrollablePanel is very similar to the RecyclerView and we can use them in the same way. ####1、Initialize ScrollablePanel ```xml <com.kelin.scrollablepanel.library.ScrollablePanel android:id="@+id/scrollable_panel" android:layout_width="match_parent" android:layout_height="match_parent" /> ``` ####2、Adapter This adapter must extend a class called PanelAdapter,We now have to override following methods so that we can implement our logic. ```java public class TestPanelAdapter extends PanelAdapter { private List<List<String>> data; @Override public int getRowCount() { return data.size(); } @Override public int getColumnCount() { return data.get(0).size(); } @Override public int getItemViewType(int row, int column) { return super.getItemViewType(row, column); } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int row, int column) { String title = data.get(row).get(column); TitleViewHolder titleViewHolder = (TitleViewHolder) holder; titleViewHolder.titleTextView.setText(title); } @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new TestPanelAdapter.TitleViewHolder(LayoutInflater.from(parent.getContext()) .inflate(R.layout.listitem_title, parent, false)); } private static class TitleViewHolder extends RecyclerView.ViewHolder { public TextView titleTextView; public TitleViewHolder(View view) { super(view); this.titleTextView = (TextView) view.findViewById(R.id.title); } } } ``` ####3、Set Adapter ```java @Override protected void onCreate(Bundle savedInstanceState) { ... ... TestPanelAdapter testPanelAdapter = new TestPanelAdapter(); ScrollablePanel scrollablePanel = (ScrollablePanel) findViewById(R.id.scrollable_panel); scrollablePanel.setPanelAdapter(testPanelAdapter); ... ... } ``` ## ChangeLog ## - V1.0.1 (2016-12-01) fix header scroll bug - V1.1.0 (2016-12-21) fix desynchronisation between RV’s & fix dislocation of first column in every row! - V1.2.0 (2016-12-26) Add notifyDataSetChanged & Fix auto reset to original position when first time scroll down! ## License ``` Copyright 2016 Kelin Hong Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```
0
SimonVT/schematic
Automatically generate ContentProviders
null
Schematic ========= Automatically generate a ContentProvider backed by an SQLite database. Usage ===== First create a class that contains the columns of a database table. ```java public interface ListColumns { @DataType(INTEGER) @PrimaryKey @AutoIncrement String _ID = "_id"; @DataType(TEXT) @NotNull String TITLE = "title"; } ``` Then create a database that uses this column ```java @Database(version = NotesDatabase.VERSION) public final class NotesDatabase { public static final int VERSION = 1; @Table(ListColumns.class) public static final String LISTS = "lists"; } ``` And finally define a ContentProvider ```java @ContentProvider(authority = NotesProvider.AUTHORITY, database = NotesDatabase.class) public final class NotesProvider { public static final String AUTHORITY = "net.simonvt.schematic.sample.NotesProvider"; @TableEndpoint(table = NotesDatabase.LISTS) public static class Lists { @ContentUri( path = "lists", type = "vnd.android.cursor.dir/list", defaultSort = ListColumns.TITLE + " ASC") public static final Uri LISTS = Uri.parse("content://" + AUTHORITY + "/lists"); } ``` Table column annotations ------------------------ ```java @AutoIncrement @DataType @DefaultValue @NotNull @PrimaryKey @References @Unique ``` Defining an Uri --------------- The ```@ContentUri``` annotation is used when the ```Uri``` does not change. ```java @ContentUri( path = "lists", type = "vnd.android.cursor.dir/list", defaultSort = ListColumns.TITLE + " ASC") public static final Uri LISTS = Uri.parse("content://" + AUTHORITY + "/lists"); ``` If the ```Uri``` is created based on some value, e.g. an id, ```@InexactContentUri``` is used. ```java @InexactContentUri( path = Path.LISTS + "/#", name = "LIST_ID", type = "vnd.android.cursor.item/list", whereColumn = ListColumns._ID, pathSegment = 1) public static Uri withId(long id) { return Uri.parse("content://" + AUTHORITY + "/lists/" + id); } ``` Including in your project ========================= ```groovy dependencies { annotationProcessor 'net.simonvt.schematic:schematic-compiler:{latest-version}' compile 'net.simonvt.schematic:schematic:{latest-version}' } ``` License ======= Copyright 2014 Simon Vig Therkildsen Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
hongyangAndroid/Highlight
一个用于app指向性功能高亮的库
null
# Highlight [ ![Download](https://api.bintray.com/packages/isanwenyu/maven/Highlight/images/download.svg) ](https://bintray.com/isanwenyu/maven/Highlight/_latestVersion) 一个用于app指向性功能高亮的库。 有任何意见,欢迎提issue。新建dev分支,欢迎pull request。 ## 效果图 竖屏: <img src="gif/high_light_demo.gif" width="320px"/> 横屏: <img src="gif/highlight3.png" width="320px"/> ## 引入 下载代码,然后: ```xml dependencies { compile project(':highlight') } ``` 或者 ``` compile 'com.isanwenyu.highlight:highlight:1.8.0' ``` 再或者 ``` <dependency> <groupId>com.isanwenyu.highlight</groupId> <artifactId>highlight</artifactId> <version>1.8.0</version> <type>pom</type> </dependency> ``` ## 用法 > 最新用法详情:[https://isanwenyu.github.io/2016/11/23/HighLight-latest-usage/ ](https://isanwenyu.github.io/2016/11/23/HighLight-latest-usage/) ### Next Mode 下一步模式 > Enable next mode and invoke show() method then invoke next() method in HighLight to display tip view in order till remove itself > 调用`enableNext()`开启next模式并显示,然后调用next()方法显示下一个提示布局 直到删除自己 #### 1. 开启next模式并显示 ``` /** * 显示 next模式 我知道了提示高亮布局 * @param view id为R.id.iv_known的控件 * @author isanwenyu@163.com */ public void showNextKnownTipView(View view) { mHightLight = new HighLight(MainActivity.this)// .autoRemove(false)//设置背景点击高亮布局自动移除为false 默认为true // .intercept(false)//设置拦截属性为false 高亮布局不影响后面布局的滑动效果 .intercept(true)//拦截属性默认为true 使下方ClickCallback生效 .enableNext()//开启next模式并通过show方法显示 然后通过调用next()方法切换到下一个提示布局,直到移除自身 // .setClickCallback(new HighLight.OnClickCallback() { // @Override // public void onClick() { // Toast.makeText(MainActivity.this, "clicked and remove HightLight view by yourself", Toast.LENGTH_SHORT).show(); // remove(null); // } // }) .anchor(findViewById(R.id.id_container))//如果是Activity上增加引导层,不需要设置anchor .addHighLight(R.id.btn_rightLight,R.layout.info_known,new OnLeftPosCallback(45),new RectLightShape(0,0,15,0,0))//矩形去除圆角 .addHighLight(R.id.btn_light,R.layout.info_known,new OnRightPosCallback(5),new BaseLightShape(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,5,getResources().getDisplayMetrics()), TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,5,getResources().getDisplayMetrics()),0) { @Override protected void resetRectF4Shape(RectF viewPosInfoRectF, float dx, float dy) { //缩小高亮控件范围 viewPosInfoRectF.inset(dx,dy); } @Override protected void drawShape(Bitmap bitmap, HighLight.ViewPosInfo viewPosInfo) { //custom your hight light shape 自定义高亮形状 Canvas canvas = new Canvas(bitmap); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setDither(true); paint.setAntiAlias(true); //blurRadius必须大于0 if(blurRadius>0){ paint.setMaskFilter(new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.SOLID)); } RectF rectF = viewPosInfo.rectF; canvas.drawOval(rectF, paint); } }) .addHighLight(R.id.btn_bottomLight,R.layout.info_known,new OnTopPosCallback(),new CircleLightShape()) .addHighLight(view,R.layout.info_known,new OnBottomPosCallback(10),new OvalLightShape(5,5,20)) .setOnRemoveCallback(new HighLightInterface.OnRemoveCallback() {//监听移除回调 @Override public void onRemove() { Toast.makeText(MainActivity.this, "The HightLight view has been removed", Toast.LENGTH_SHORT).show(); } }) .setOnShowCallback(new HighLightInterface.OnShowCallback() {//监听显示回调 @Override public void onShow(HightLightView hightLightView) { Toast.makeText(MainActivity.this, "The HightLight view has been shown", Toast.LENGTH_SHORT).show(); } }).setOnNextCallback(new HighLightInterface.OnNextCallback() { @Override public void onNext(HightLightView hightLightView, View targetView, View tipView) { // targetView 目标按钮 tipView添加的提示布局 可以直接找到'我知道了'按钮添加监听事件等处理 Toast.makeText(MainActivity.this, "The HightLight show next TipView,targetViewID:"+(targetView==null?null:targetView.getId())+",tipViewID:"+(tipView==null?null:tipView.getId()), Toast.LENGTH_SHORT).show(); } }); mHightLight.show(); } ``` #### 2. 调用next()方法依次显示之前添加到提示布局 最后自动移除 ``` /** * 响应所有R.id.iv_known的控件的点击事件 * <p> * 移除高亮布局 * </p> * * @param view */ public void clickKnown(View view) { if(mHightLight.isShowing() && mHightLight.isNext())//如果开启next模式 { mHightLight.next(); }else { remove(null); } } ``` #### 3. 下一步回调监听 ``` /** * 下一个回调监听 只有Next模式下生效 */ public static interface OnNextCallback { /** * 监听下一步动作 * * @param hightLightView 高亮布局控件 * @param targetView 高亮目标控件 * @param tipView 高亮提示控件 */ void onNext(HightLightView hightLightView, View targetView, View tipView); } ``` #### 4. mAnchor根布局完成回调监听(页面加载完成,自动显示) > 针对下方问题4的优化方案 在Activity或Fragment onCreated方法中构造HighLight > 通过mAnchor.getViewTreeObserver().addOnGlobalLayoutListener(this)实现 ``` /** * 当界面布局完成显示next模式提示布局 * 显示方法必须在onLayouted中调用 * 适用于Activity及Fragment中使用 * 可以直接在onCreated方法中调用 * @author isanwenyu@163.com */ public void showNextTipViewOnCreated(){ mHightLight = new HighLight(MainActivity.this)// .anchor(findViewById(R.id.id_container))//如果是Activity上增加引导层,不需要设置anchor .autoRemove(false) .enableNext() .setOnLayoutCallback(new HighLightInterface.OnLayoutCallback() { @Override public void onLayouted() { //mAnchor界面布局完成添加tipview mHightLight.addHighLight(R.id.btn_rightLight,R.layout.info_gravity_left_down,new OnLeftPosCallback(45),new RectLightShape()) .addHighLight(R.id.btn_light,R.layout.info_gravity_left_down,new OnRightPosCallback(5),new CircleLightShape()) .addHighLight(R.id.btn_bottomLight,R.layout.info_gravity_left_down,new OnTopPosCallback(),new CircleLightShape()); //然后显示高亮布局 mHightLight.show(); } }) .setClickCallback(new HighLight.OnClickCallback() { @Override public void onClick() { Toast.makeText(MainActivity.this, "clicked and show next tip view by yourself", Toast.LENGTH_SHORT).show(); mHightLight.next(); } }); } ``` ### Nomarl Mode 普通模式 对于上面效果图中的一个需要高亮的View,需要通过下面的代码 ``` /** * 显示我知道了提示高亮布局 * @param view id为R.id.iv_known的控件 * @author isanwenyu@163.com */ public void showKnownTipView(View view) { mHightLight = new HighLight(MainActivity.this)// .autoRemove(false)//设置背景点击高亮布局自动移除为false 默认为true .intercept(false)//设置拦截属性为false 高亮布局不影响后面布局的滑动效果 而且使下方点击回调失效 .setClickCallback(new HighLight.OnClickCallback() { @Override public void onClick() { Toast.makeText(MainActivity.this, "clicked and remove HightLight view by yourself", Toast.LENGTH_SHORT).show(); remove(null); } }) .anchor(findViewById(R.id.id_container))//如果是Activity上增加引导层,不需要设置anchor .addHighLight(R.id.btn_rightLight,R.layout.info_known,new OnLeftPosCallback(45),new RectLightShape()) .addHighLight(R.id.btn_light,R.layout.info_known,new OnRightPosCallback(5),new CircleLightShape(0,0,0)) .addHighLight(R.id.btn_bottomLight,R.layout.info_known,new OnTopPosCallback(),new CircleLightShape()) .addHighLight(view,R.layout.info_known,new OnBottomPosCallback(10),new OvalLightShape(5,5,20)); mHightLight.show(); // //added by isanwenyu@163.com 设置监听器只有最后一个添加到HightLightView的knownView响应了事件 // //优化在布局中声明onClick方法 {@link #clickKnown(view)}响应所有R.id.iv_known的控件的点击事件 // View decorLayout = mHightLight.getHightLightView(); // ImageView knownView = (ImageView) decorLayout.findViewById(R.id.iv_known); // knownView.setOnClickListener(new View.OnClickListener() // { // @Override // public void onClick(View view) { // remove(null); // } // }); } ``` anchor()指你需要在哪个view上加一层透明的蒙版,如果不设置,默认为android.R.id.content。也就是说,该库支持局部范围内去高亮某些View. addHighLight包含3个参数: * 参数1:需要高亮view的id,这个没什么说的 * 参数2:你的tip布局的layoutId,也就是箭头和文字,你自己编写个布局,参考demo即可。 * 参数3:是个接口,接口包含一系列的位置信息,如下 ```xml /** * @param rightMargin 高亮view在anchor中的右边距 * @param bottomMargin 高亮view在anchor中的下边距 * @param rectF 高亮view的l,t,r,b,w,h都有 * @param marginInfo 设置你的布局的位置,一般设置l,t或者r,b */ ``` 哈,提供了一堆的位置信息,但是你要做的,只是去设置leftMargin和topMargin;或者rightMargin和bottomMargin。 目前看起来,我觉得位置信息够了,当然如果你有想法欢迎提出。 哈,是不是参数比较多,看着烦,如果你图省事,可以提供一个枚举,提供4个或者8个默认的位置,这个事呢,dota1群`@李志云`已经完成~认识的话可以去找他。 * 参数4:高亮形状 抽象类BaseLightShape(dx,dy,blurRadius) ```xml /** * @param dx 水平方向偏移 * @param dy 垂直方向偏移 * @param blurRadius 模糊半径 默认15px 0不模糊 */ ``` 两个抽象方法: ``` /** * reset RectF for Shape by dx and dy. 根据dx,dy重置viewPosInfoRectF大小 * @param viewPosInfoRectF * @param dx * @param dy */ protected abstract void resetRectF4Shape(RectF viewPosInfoRectF, float dx, float dy); /** * draw shape into bitmap. 绘制高亮形状到传递过来的图片画布上 * @param bitmap * @param viewPosInfo * @see zhy.com.highlight.view.HightLightView#addViewForEveryTip(HighLight.ViewPosInfo) * @see HightLightView#buildMask() */ protected abstract void drawShape(Bitmap bitmap, HighLight.ViewPosInfo viewPosInfo); ``` BaseLightShape的实现类:RectLightShape(矩形)、CircleLightShape(圆形)、OvalLightShape(椭圆),具体实现请查看代码 ## Question 问题 1. 添加的提示布局怎么在屏幕中水平居中显示(垂直居中类似) > 提示布局根布局`android:layout_width="match_parent"` `android:gravity="center_horizontal"` > 自定义定位参数`rightMargin=0` 2. 怎么针对同一个高亮控件添加多个提示布局 > `addHighLight` 多次添加 第一个参数使用同一个控件id即可 3. 高亮布局显示后 底层布局有变化 怎么更新高亮布局 > `mHighLight.getHightLightView().requestLayout()` 掉用后高亮布局会重新布局及绘制 4. ~~页面加载完成,自动显示,应该放在哪里调用?~~ **v1.8.0及以后版本建议使用`setOnLayoutCallback`方式 老版本使用下面方案** ``` @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); //界面初始化后显示高亮布局 mHightLight.show(); } 或者: getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { getWindow().getDecorView().getViewTreeObserver() .removeOnGlobalLayoutListener(this); } //界面初始化后显示高亮布局 initHightLight(); mHightLight.show(); } }); ``` 5. ~~如果使用viewpager非第一页高亮布局 有可能定位到屏幕外~~ **v1.7.2版本已修复 具体方案参考#21** > 感谢 @liyanxi 提供的方案 会更新到 [README.md](https://github.com/isanwenyu/Highlight/blob/master/README.md) ``` //自定义高亮形状 final HighLight.LightShape mLightShape = new BaseLightShape() { @Override protected void resetRectF4Shape(RectF viewPosInfoRectF, float dx, float dy) { //重置viewPosInfoRectF 模掉屏幕宽度 得到真实的left viewPosInfoRectF.offsetTo(viewPosInfoRectF.left % DeviceUtil.getScreenDispaly(getActivity())[0], viewPosInfoRectF.top); } ...... ``` ## Changelog 更改历史 See details in [CHANGELOG.md](CHANGELOG.md) file. ## 致谢 - 感谢android day day dota1群,苏苏,提供的图片资源。 - thx for `李志云@dota1`的测试、修改、提议。 - thx for [@zj593743143](https://github.com/zj593743143)的测试和建议
0
flavienlaurent/datetimepicker
DateTimePicker is a library which contains the beautiful DatePicker that can be seen in the new Google Agenda app.
null
Official source: https://android.googlesource.com/platform/frameworks/opt/datetimepicker/ (Android 4.3+) #DateTimePicker DateTimePicker is a library which contains the beautiful DatePicker and TimePicker that can be seen in the new Google Agenda app. **This picker is available for 2.1+** You have a recurrence picker in the same style [here](https://github.com/Shusshu/Android-RecurrencePicker). ## WARNING * Requires android-support-v4 and [NineOldAndroids][5] * Accessibility is missing for DatePicker on all devices and Below ICS devices for TimePicker. * Scroll adjustment is missing below ICS devices for TimePicker and DatePicker. ## Description This library reproduces as much as possible the original picker contained in the new Google Agenda app. ![Example Image][1] Try out the sample APK [here][2] Or browse the [source code of the sample application][3] for a complete example of use. ## Including in your project Last version is 0.0.2 Just add the following statement in your build.gradle compile 'com.github.flavienlaurent.datetimepicker:library:VERSION' ## Usage Using the library is simple, just look at the source code of the provided sample [here][4] ## Acknowledgements * Thanks to Google for this beautiful picker ## License Copyright 2013 Flavien Laurent (DatePicker) edisonw (TimePicker) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. [1]: https://raw.github.com/biboune/datetimepicker/master/graphics/img1.png [2]: https://raw.github.com/biboune/datetimepicker/master/datetimepicker-sample.apk [3]: https://github.com/biboune/datetimepicker/tree/master/datetimepicker-sample [4]: https://github.com/biboune/datetimepicker/blob/master/datetimepicker-sample/src/com/fourmob/datetimepicker/sample/MainActivity.java [5]: http://nineoldandroids.com/
0
shuleisanshi/myblog
I think myblog is a very good project, which is divided into front-end module and back-end module. I have used the most popular SSM architecture to design the main frame and added many functions to my personal blog, such as: authority, comment, reply and recommend. these functions can also be used in the enterprise. We can practice this project to get more skills about SSM Structure.
null
### Project name: myblog ### Introduction: I think myblog is a very good project, which is divided into front-end module and back-end module. I have used the most popular SSM architecture to design the main frame and added many functions to my personal blog, such as: authority, comment, reply and recommend. these functions can also be used in the enterprise. We can practice this project to get more skills about SSM Structure. I bought a Tencent cloud server and deployed my project on the server. You can visit my website and show your suggestions. ### Structure: SSM+layui ### Skills: MySQL, javascript, jQuery, ajax, redis, Linux, Tencent Cloud ### Function: User registration and login Custom paging display prompt information Set permission for articles Comment and reply Tip if you like the article Classify and tag different articles Cloud serve ### Author: shulei Front-end display
0
MostafaGazar/CustomShapeImageView
A library for supporting custom shaped ImageView(s) using SVGs and paint shapes
null
CustomShapeImageView Demo ([Play Store Demo][1]) ------------------------- A library for supporting custom shaped ImageView(s) using SVGs and paint shapes You can also use this gist https://gist.github.com/MostafaGazar/ee345987fa6c8924d61b if you do not want to add this library project to your codebase. [![Build Status](https://travis-ci.org/MostafaGazar/CustomShapeImageView.svg)](https://travis-ci.org/MostafaGazar/CustomShapeImageView) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-CustomShapeImageView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1197) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%2381-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-81) [![PayPal Donations](https://img.shields.io/badge/paypal-donate-yellow.svg?style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mmegazar%40gmail%2ecom&lc=NZ&item_name=Mostafa%20Gazar&item_number=GitHub&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) [![Coverage Status](https://coveralls.io/repos/github/MostafaGazar/CustomShapeImageView/badge.svg?branch=master)](https://coveralls.io/github/MostafaGazar/CustomShapeImageView?branch=master) Usage ----- ```xml <com.meg7.widget.CustomShapeImageView android:layout_width="64dp" android:layout_height="64dp" android:src="@drawable/sample" app:shape="circle" android:scaleType="centerCrop" /> <com.meg7.widget.CircleImageView android:layout_width="64dp" android:layout_height="64dp" android:src="@drawable/sample" android:scaleType="centerCrop" /> <com.meg7.widget.RectangleImageView android:layout_width="64dp" android:layout_height="64dp" android:src="@drawable/sample" android:scaleType="centerCrop" /> <com.meg7.widget.SvgImageView android:layout_width="64dp" android:layout_height="64dp" android:src="@drawable/sample" app:svg_raw_resource="@raw/shape_star" android:scaleType="centerCrop" /> ``` Download ------------ Add the `customshapeimageview` dependency to your `build.gradle` file: [![Maven Central](https://img.shields.io/maven-central/v/com.mostafagazar/customshapeimageview.svg)](http://search.maven.org/#search%7Cga%7C1%7Ccustomshapeimageview) ```groovy dependencies { ... compile 'com.mostafagazar:customshapeimageview:1.0.4' ... } ``` Proguard ------------ If you're using proguard for code shrinking and obfuscation, make sure to add the following: ```proguard -keep class com.meg7.widget.** { *; } ``` Screenshots ------------ ![main](https://raw.githubusercontent.com/MostafaGazar/CustomShapeImageView/master/Screenshot_2016-01-19-09-17-37.png) Libraries used --------------- * https://github.com/latemic/svg-android Developed by ------------ * Mostafa Gazar - <mmegazar@gmail.com> License ------------ Copyright 2013-2016 Mostafa Gazar Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Donations ------------ If you'd like to support this library, you could make a donation here: [![PayPal Donation](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mmegazar%40gmail%2ecom&lc=NZ&item_name=Mostafa%20Gazar&item_number=GitHub&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) [1]: https://play.google.com/store/apps/details?id=com.meg7.samples
0
kaz-Anova/StackNet
StackNet is a computational, scalable and analytical Meta modelling framework
null
# StackNet This repository contains StackNet Meta modelling methodology (and software) which is part of my work as a PhD Student in the computer science department at [UCL](http://www.cs.ucl.ac.uk/home/). My PhD was sponsored by [dunnhumby](http://www.dunnhumby.com/). StackNet is empowered by [H2O](https://github.com/h2oai/h2o-3)'s [agorithms](http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science.html) (**NEW**) There is a [Python implementation of StackNet](https://github.com/h2oai/pystacknet) StackNet and other topics can now be discussed on [FaceBook](https://www.facebook.com/StackNet/) too : ## Contents - [What is StackNet](#what-is-stacknet) - [How does it work](#how-does-it-work) - [The Modes](#the-modes) - [Some Notes about StackNet](#some-notes-about-stacknet) - [Algorithms contained](#algorithms-contained) - [Algorithm's Tuning parameters](#algorithms-tuning-parameters) - [Run StackNet](#run-stacknet) - [Installations](#installations) - [Command Line Parameters](#command-line-parameters) - [Data Format](#data-format) - [Commandline Train Statement](#commandline-train-statement) - [Commandline predict Statement](#commandline-predict-statement) - [Examples](#examples) - [Run StackNet from within Java code](#run-stacknet-from-within-java-code) - [Potential Next Steps](#potential-next-steps) - [Reference](#reference) - [News](#news) - [Special Thanks](#special-thanks) ![Alt text](/images/StackNet_Logo.png?raw=true "StackNet Logo") ## What is StackNet StackNet is a computational, scalable and analytical framework implemented with a software implementation in Java that resembles a feedforward neural network and uses Wolpert's stacked generalization [1] in multiple levels to improve accuracy in machine learning problems. In contrast to feedforward neural networks, rather than being trained through back propagation, the network is built iteratively one layer at a time (using stacked generalization), each of which uses the final target as its target. The Sofware is made available under MIT licence. [1] Wolpert, D. H. (1992). Stacked generalization. *Neural networks*, 5(2), 241-259. ## How does it work Given some input data, a neural network normally applies a perceptron along with a transformation function like relu, sigmoid, tanh or others. The StackNet model assumes that this function can take the form of any supervised machine learning algorithm Logically the outputs of each neuron, can be fed onto next layers. The algorithms can be classifiers or regressors or any estimator that produces an output.. For classification problems, to create an output prediction score for any number of unique categories of the response variable, all selected algorithms in the last layer need to have outputs dimensionality equal to the number those unique classes. In case where there are many such classifiers, the results is the scaled average of all these output predictions and can be written as: ## The Modes The stacking element of the StackNet model could be run with two different modes. ### Normal stacking mode The first mode (e.g. the default) is the one already mentioned and assumes that in each layer uses the predictions (or output scores) of the direct previous one similar with a typical feedforward neural network or equivalently: ### Restacking mode The second mode (also called restacking) assumes that each layer uses previous neurons activations as well as all previous layers neurons (including the input layer). Therefore the previous formula can be re-written as: The intuition behind this mode is derived from the fact that the higher level algorithm has extracted information from the input data, but rescanning the input space may yield new information not obvious from the first passes. This is also driven from the forward training methodology discussed below and assumes that convergence needs to happen within one model iteration. The modes may also be viewed bellow: ![Alt text](/images/stacknet_modes.png?raw=true "StackNet's Mode") ## K-fold Training The typical neural networks are most commonly trained with a form of backpropagation, however, stacked generalization requires a forward training methodology that splits the data into two parts – one of which is used for training and the other for predictions. The reason this split is necessary is to avoid overfitting . However splitting the data into just two parts would mean that in each new layer the second part needs to be further dichotomized increasing the bias as each algorithm will have to be trained and validated on increasingly fewer data. To overcome this drawback, the algorithm utilises a k-fold cross validation (where k is a hyperparameter) so that all the original training data is scored in different k batches thereby outputting n shape training predictions where n is the size of the samples in the training data. Therefore the training process consists of two parts: 1. Split the data k times and run k models to output predictions for each k part and then bring the k parts back together to the original order so that the output predictions can be used in later stages of the model. 2. Rerun the algorithm on the whole training data to be used later on for scoring the external test data. There is no reason to limit the ability of the model to learn using 100% of the training data since the output scoring is already unbiased (given that it is always scored as a holdout set). The K-fold train/predict process is illustrated below: ![Alt text](/images/kfold_training.png?raw=true "Training StackNet with K-fold") It should be noted that (1) is only applied during training to create unbiased predictions for the second layers model to fit one. During the scoring time (and after model training is complete) only (2) is in effect. All models must be run sequentially based on the layers, but the order of the models within the layer does not matter. In other words, all models of layer one need to be trained to proceed to layer two but all models within the layer can be run asynchronously and in parallel to save time. The k-fold may also be viewed as a form of regularization where a smaller number of folds (but higher than 1) ensure that the validation data is big enough to demonstrate how well a single model could generalize. On the other hand higher k means that the models come closer to running with 100% of the training and may yield more unexplained information. The best values could be found through cross-validation. Another possible way to implement this could be to save all the k models and use the average of their predicting to score the unobserved test data, but this has all the models never trained with 100% of the training data and may be suboptimal. ## Some Notes about StackNet StackNet is (commonly) **better than the best single model it contains in each first layer** however, its ability to perform well still relies on a mix of strong and diverse single models in order to get the best out of this Meta modelling methodology. StackNet (methodology - not the software) was also used to win the [Truly Native](http://blog.kaggle.com/2015/12/03/dato-winners-interview-1st-place-mad-professors/ ) data modelling competition hosted by the popular data science platform Kaggle in 2015 StackNet in simple terms is also explained in [kaggle's blog](http://blog.kaggle.com/2017/06/15/stacking-made-easy-an-introduction-to-stacknet-by-competitions-grandmaster-marios-michailidis-kazanova/) Network's example: ![Alt text](/images/mad_prof_winning.png?raw=true "Winning Truly Native competitions Using STackNet Methodology") StackNet is made available now with a handful of classifiers and regressors. The implementations are based on the original papers and software. However, most have some personal tweaks in them. ## Algorithms contained ### Native - [AdaboostForestRegressor](/parameters/PARAMETERS.MD#adaboostforestregressor) - [AdaboostRandomForestClassifier](/parameters/PARAMETERS.MD#adaboostrandomforestclassifier) - [DecisionTreeClassifier](/parameters/PARAMETERS.MD#decisiontreeclassifier) - [DecisionTreeRegressor](/parameters/PARAMETERS.MD#decisiontreeregressor) - [GradientBoostingForestClassifier](/parameters/PARAMETERS.MD#gradientboostingforestclassifier) - [GradientBoostingForestRegressor](/parameters/PARAMETERS.MD#gradientboostingforestregressor) - [RandomForestClassifier](/parameters/PARAMETERS.MD#randomforestclassifier) - [RandomForestRegressor](/parameters/PARAMETERS.MD#randomforestregressor) - [Vanilla2hnnregressor](/parameters/PARAMETERS.MD#vanilla2hnnregressor) - [Vanilla2hnnclassifier](/parameters/PARAMETERS.MD#vanilla2hnnclassifier) - [Softmaxnnclassifier](/parameters/PARAMETERS.MD#softmaxnnclassifier) - [Multinnregressor](/parameters/PARAMETERS.MD#multinnregressor) - [NaiveBayesClassifier](/parameters/PARAMETERS.MD#naivebayesclassifier) - [LSVR](/parameters/PARAMETERS.MD#lsvr) - [LSVC](/parameters/PARAMETERS.MD#lsvc) - [LogisticRegression](/parameters/PARAMETERS.MD#logisticregression) - [LinearRegression](/parameters/PARAMETERS.MD#linearregression) - [LibFmRegressor](/parameters/PARAMETERS.MD#libfmregressor) - [LibFmClassifier](/parameters/PARAMETERS.MD#libfmclassifier) ### Native - Not fully developed - knnClassifier - knnRegressor - KernelmodelClassifier - KernelmodelRegressor ### Wrappers - [XgboostRegressor](/parameters/PARAMETERS.MD#xgboostregressor) - [XgboostClassifier](/parameters/PARAMETERS.MD#xgboostclassifier) - [LightgbmRegressor](/parameters/PARAMETERS.MD#lightgbmregressor) - [LightgbmClassifier](/parameters/PARAMETERS.MD#lightgbmclassifier) - [FRGFRegressor](/parameters/PARAMETERS.MD#frgfegressor) - [FRGFClassifier](/parameters/PARAMETERS.MD#frgfClassifier) - [OriginalLibFMClassifier](/parameters/PARAMETERS.MD#originallibfmclassifier)(**New**) - [OriginalLibFMRegressor](/parameters/PARAMETERS.MD#originallibfmregressor)(**New**) - [VowpaLWabbitClassifier](/parameters/PARAMETERS.MD#vowpalwabbitclassifier)(**New**) - [VowpaLWabbitRegressor](/parameters/PARAMETERS.MD#vowpalwabbitregressor)(**New**) - [libffmClassifier](/parameters/PARAMETERS.MD#libffmclassifier)(**New**) ### H2O - [H2ODeepLearningClassifier](/parameters/PARAMETERS.MD#h2odeeplearningclassifier) - [H2ODeepLearningRegressor](/parameters/PARAMETERS.MD#h2odeeplearningregressor) - [H2ODrfClassifier](/parameters/PARAMETERS.MD#h2odrfclassifier) - [H2ODrfRegressor](/parameters/PARAMETERS.MD#h2odrfregressor) - [H2OGbmClassifier](/parameters/PARAMETERS.MD#h2ogbmclassifier) - [H2OGbmRegressor](/parameters/PARAMETERS.MD#h2ogbmregressor) - [H2OGlmClassifier](/parameters/PARAMETERS.MD#h2oglmclassifier) - [H2OGlmRegressor](/parameters/PARAMETERS.MD#h2oglmregressor) - [H2ONaiveBayesClassifier](/parameters/PARAMETERS.MD#h2onaivebayesclassifier) ### Python #### Sklearn(**New**) - [SklearnAdaBoostClassifier](/parameters/PARAMETERS.MD#sklearnadaboostclassifier) - [SklearnAdaBoostRegressor](/parameters/PARAMETERS.MD#sklearnadaboostregressor) - [SklearnDecisionTreeClassifier](/parameters/PARAMETERS.MD#sklearndecisiontreeclassifier) - [SklearnDecisionTreeRegressor](/parameters/PARAMETERS.MD#sklearndecisiontreeregressor) - [SklearnExtraTreesClassifier](/parameters/PARAMETERS.MD#sklearnextratreesclassifier) - [SklearnExtraTreesRegressor](/parameters/PARAMETERS.MD#sklearnextratreesregressor) - [SklearnknnClassifier](/parameters/PARAMETERS.MD#sklearnknnclassifier) - [SklearnknnRegressor](/parameters/PARAMETERS.MD#sklearnknnregressor) - [SklearnMLPClassifier](/parameters/PARAMETERS.MD#sklearnmlpclassifier) - [SklearnMLPRegressor](/parameters/PARAMETERS.MD#sklearnmlpregressor) - [SklearnRandomForestClassifier](/parameters/PARAMETERS.MD#sklearnrandomforestclassifier) - [SklearnRandomForestRegressor](/parameters/PARAMETERS.MD#sklearnrandomforestregressor) - [SklearnSGDClassifier](/parameters/PARAMETERS.MD#sklearnsgdclassifier) - [SklearnSGDRegressor](/parameters/PARAMETERS.MD#sklearnsgdregressor) - [SklearnsvmClassifier](/parameters/PARAMETERS.MD#sklearnsvmclassifier) - [SklearnsvmRegressor](/parameters/PARAMETERS.MD#sklearnsvmregressor) #### Keras - [KerasnnClassifier](/parameters/PARAMETERS.MD#kerasnnclassifier) - [KerasnnRegressor](/parameters/PARAMETERS.MD#kerasnnregressor) #### Generic for user defined scripts (**New**) - [PythonGenericClassifier](/parameters/PARAMETERS.MD#pythongenericclassifier) - [PythonGenericRegressor](/parameters/PARAMETERS.MD#pythongenericregressor) ## Algorithm's Tuning parameters For the common models, have a look at: [parameters](/parameters/PARAMETERS.MD) ## Run StackNet You can do so directly from the jar file, using Java higher than 1.6. You need to add Java as an environmental variable (e.g., add it to PATH). The basic format is: ``` Java –jar stacknet.jar [train or predict] [task=regression or classification] [parameter = value] ``` ## Installations This sections explains how to install the different external tools StackNet uses in its ensemble. ### Install Xgboost Awesome xgboost can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64), mac and linux. **verify that the 'lib' folder os in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd xg/ chmod +x xgboost ``` You can test that it works with : `./xgboost` It should print : `Usage: <config>` In windows and mac the behaviour should be similar. After executing `xgboost` from inside the `lib/your_operation_system/xg/` you should see the: `Usage: <config>` If you don't see this, then you need to compile it manually and drop the executables inside `lib/your_operation_system/xg/` . You may find the follwing sources usefull: - [mac](https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_on_Mac_OSX?lang=en) - [windows1](https://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform) ,[windows2](https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en) - [linux](https://gist.github.com/DanielBeckstein/932087ee116cc2f72bfc6e3e078e899d) Small Note: The user would need to delete the '.mod' files from inside the `model/` folder when no longer need them. StackNet does not do that automatically as it is not possible to determine when they are not needed anymore. **IMPORTANT NOTE:** This implementation does not include all Xgboost's features and the user is advised to use it directly from source to exploit its full potential. Also the version included is 6.0 and it is not certain whether it will be updated in the future as it required manual work to find all libraries and files required that need to be included for it to run. The performance and memory consumption will also be worse than running it directly from source. Additionally the descritpion of the parameters may not match the one in the offcial website, hence it is advised to use [xgboost's online parameter thread in github](https://github.com/dmlc/xgboost/blob/master/doc/parameter.md) for more information about them. ### Install lightGBM [lightGBM](https://github.com/Microsoft/LightGBM) can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64), mac and linux. **Verify that the 'lib' folder is in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd lightgbm/ chmod +x lightgbm ``` You can test that it works with : `./lightgbm` It should print something in the form of: ``` [LightGBM] [Info] Finished loading parameters [LightGBM] [Fatal] No training/prediction data, application quit Met Exceptions: No training/prediction data, application quit ``` In windows and mac the behaviour should be similar. After executing `lightgbm` from inside the `lib/your_operation_system/lightgbm/` you should see the: `[LightGBM] [Info] Finished loading parameters...` If you don't see this, then you need to compile it manually and drop the executables inside `lib/your_operation_system/lightgbm/` . You may find the follwing sources usefull: [Install LightGBM](https://github.com/Microsoft/LightGBM/wiki/Installation-Guide) Small Note: The user would need to delete the '.mod' files from inside the `model/` folder when no longer need them. StackNet does not do that automatically as it is not possible to determine when they are not needed anymore. **IMPORTANT NOTE:** This implementation does not include all LightGBM's features and the user is advised to use it directly from source to exploit its full potential. it is not certain whether it will be updated in the future as it required manual work to find all libraries and files required that need to be included for it to run. The performance and memory consumption will also be worse than running it directly from source. Additionally the descritpion of the parameters may not match the one in the offcial website, hence it is advised to use [LightGBM's online parameter thread in github](https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.md) for more information about them. ### Install H2O Algorithms All the required jars are already packaged within the StackNet jar, however the user may find them inside the repo too. No special installation is required , but experimentally system protection might be blocking it , therefore make certain that the StackNet.jar is in the exceptions (firewall). Additionally the first time StackNet uses an H2o Algorithm within the ensemble it takes more time (in comparison to every other time) because it sets up a cluster . ### Install Fast_rgf [fast_rgf](https://github.com/baidu/fast_rgf) can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64), mac and linux. **Verify that the 'lib' folder is in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd frgf/ chmod +x forest_train chmod +x forest_predict ``` You can test that it works with : `./forest_train` It should print something in the form of: ``` using up to x threads ``` In windows and mac the behaviour should be similar. After executing `forest_train` from inside the `lib/your_operation_system/frgf/` you should see the: `using up to x threads...` If you don't see this, then you need to compile it manually and drop the executables inside `lib/your_operation_system/frgf/` . If you need to make the compilling manually for windows, you may find useful to download cmake fom : [Install cmake](https://cmake.org/download/) and use **mingw32-make.exe** as a compiler. Small Note: The user would need to delete the '.mod' files from inside the `model/` folder when no longer need them. StackNet does not do that automatically as it is not possible to determine when they are not needed anymore. **IMPORTANT NOTE:** This implementation does not include all fast_rgf's features and the user is advised to use it directly from source to exploit its full potential. it is not certain whether it will be updated in the future as it required manual work to find all libraries and files required that need to be included for it to run. The performance and memory consumption will also be worse than running it directly from source. Additionally the descritpion of the parameters may not match the one in the offcial website, hence it is advised to use [fast_rgf's online parameter thread in github](https://github.com/baidu/fast_rgf/tree/master/examples) for more information about them. ### Install Sklearn Algorithms To install [Sklearn](http://scikit-learn.org/stable/) in StackNet you need **python higher-equal-to 2.7**. Python needs to be found in **PATH** as StackNet makes subprocesses in the command line. This would require privileges to save and change files where the .jar is executed. **verify that the 'lib' folder is in the same directory where the StackNet.jar file is** Once Python is installed and can be found on PATH, the user needs to isnstall **sklearn version 0.18.2** . The following should do the trick in linux and mac. ``` pip install scipy pip install sklearn ``` For an easier installation in windows, the user could download [Anaconda](https://www.continuum.io/downloads) and make certain to check the **Add Anaconda's python to PATH** when it shows up during the installation. All sklearn python scripts executed by StackNet are put in `lib/python/` ### Install Python Generic Algorithms This a new feature that allows the user to run his/her own models as long as all libraries required can be found in his/her system when calling python. Assuming python is installed as explained in sklearn version above, the user may have a look inside **lib/python/**. The scripts **PythonGenericRegressor0.py** and **PythonGenericClassifier0.py** are sample scripts that show how to format these models. The '0' is the main hyper parameter (called index) of the model PythonGenericRegressor (or PythonGenericClassifier). The data gets loaded in sparse format, but after this the user could add whetver he/she wants. One could make many scritps and name them PythonGenericRegressor1,PythonGenericRegressor2...PythonGenericRegressorN and call them as: ``` PythonGenericRegressor index:1 seed:1 verbose:False PythonGenericRegressor index:2 seed:1 verbose:False PythonGenericRegressor index:N seed:1 verbose:False ``` Once again **Verify that the 'lib' folder in the same directory where the StackNet.jar file is**. ### Install original libfm [libFM](https://github.com/srendle/libfm) can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64), mac and linux. Note for windows libfm is compiled with [cygwin](https://www.cygwin.com/) **Verify that the 'lib' folder is in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd libfm/ chmod +x libfm ``` You can test that it works with : `./libfm` It should print something in the form of: ``` libFM Version: 1.4.2 ... ... ``` In windows and mac the behaviour should be similar. After executing `libfm` from inside the `lib/your_operation_system/libfm/` you should see the same. If you don't see this, **then you need to compile it manually** and drop the executables inside `lib/your_operation_system/libfm/`. You may find the follwing sources usefull: [libfm manual](http://www.libfm.org/libfm-1.42.manual.pdf) **IMPORTANT NOTE:** This implementation may not include all libFM features plus it actually uses a version of it **that had a bug** on purpose. You can find more information about why this was chosen in the following [python wrapper for libFM](https://github.com/jfloff/pywFM). It basically had this bug that was allowing you to get the parameters of the trained models for all training methods. These parameters are now extracted once a model has been trained and the scoring uses only these parameters (e.g. not the libFM executable). Also, multiclass problems are formed as binary 1-vs-all. Bear in mind the [licence of libfm](https://github.com/srendle/libfm/blob/master/license.txt). If you find it useful, cite the following paper : Rendle, S. (2012). Factorization machines with libfm. *ACM Transactions on Intelligent Systems and Technology (TIST)*, 3(3), 57.Chicago . [Link](http://www.csie.ntu.edu.tw/~b97053/paper/Factorization%20Machines%20with%20libFM.pdf) ### Install vowpal wabbit [vowpal wabbit](https://github.com/JohnLangford/vowpal_wabbit) can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64) and linux. **Mac** was more difficult than expected and generally there is a lack of expertise working with Mac. If someone could help here, please email me at kazanovassoftware@gmail.com. For mac, you have to install vowpal wabbit from source and drop the executable in `lib/mac/vw/`. Consider [the following link](https://github.com/JohnLangford/vowpal_wabbit#mac-os-x-specific-info). `brew install vowpal-wabbit` will most probably do the trick. If that does not work, you may execute the`lib/mac/vw/script.sh`. This is not advised though as it will override some files you may have already installed - use it as a last resort. **Verify that the 'lib' folder is in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd vw/ chmod +x vw ``` You can test that it works with : `./vw` It should print something in the form of: ``` Num weight bits = 18 learning rate = 0.5 initial_t = 0 ... ``` In windows and mac the behaviour should be similar. After executing `vw` from inside the `lib/your_operation_system/vw/` you should see the same. If you don't see this, **then you need to compile it manually** and drop the executables inside `lib/your_operation_system/vw/`. You may find the follwing sources usefull: [Download suggestions](https://github.com/JohnLangford/vowpal_wabbit/wiki/Download) **IMPORTANT NOTE:** This implementation may not include all Vowpal Wabbit features and the user is advised to use it directly from the source. Also the version may not be the final and it is not certain whether it will be updated in the future as it required manual work to find all libraries and files required that need to be included for it to run. The performance and memory consumption will also be worse than running directly. Additionally the descritpion of the parameters may not match the one in the website, hence it is advised to use [VW's online parameter thread in github](https://github.com/JohnLangford/vowpal_wabbit/wiki/Command-line-arguments) for more information about them. ### Install libffm [libffm](https://github.com/guestwalk/libffm) can be used as a subprocess now in StackNet. This would require privileges to save and change files where the .jar is executed. It is already pre-compiled for windows(64), mac and linux. **Verify that the 'lib' folder is in the same directory where the StackNet.jar file is**. By default it should be there when you do `git clone` for linux and mac you most probably need to change privileges for the executable : ``` cd lib/ cd linux/ cd libffm/ chmod +x ffm-train chmod +x ffm-predict ``` You can test that it works with : `./ffm-train` It should print something in the form of: ``` usage: ffm-train [options] training_set_file [model_file] options: -l <lambda>: set regularization parameter (default 0.00002) -k <factor>: set number of latent factors (default 4) -t <iteration>: set number of iterations (default 15) ``` You should also test that it works with : `./ffm-predict` It should print: ``` usage: ffm-predict test_file model_file output_file ``` In windows and mac the behaviour should be similar. After executing `ffm-train` or `ffm-predict` from inside the `lib/your_operation_system/libffm/` you should see the same results. If you don't see this, then you need to compile it manually and drop the executables inside `lib/your_operation_system/libffm/` . You may find the follwing sources usefull: [Install libffm](https://github.com/guestwalk/libffm) . Search for `Installation ...` and `OpenMP and SSE ...` Small Note: The user would need to delete the '.mod' files from inside the `model/` folder when no longer need them. StackNet does not do that automatically as it is not possible to determine when they are not needed anymore. **IMPORTANT NOTE:** This implementation may not include all libffm features and the user is advised to use it directly from the source. Also the version may not be the final and it is not certain whether it will be updated in the future as it required manual work to find all libraries and files required that need to be included for it to run. The performance and memory consumption will also be worse than running directly . Additionally the descritpion of the parameters may not match the one in the website, hence it is advised to use libffm online parameter thread in github for more information about them. Also, multiclass problems are formed as binary 1-vs-all. ## Command Line Parameters Command | Explanation --- | --- task | could be either **regression** or **classification**.</li> sparse | True if the data to be imported are in sparse format (libsvm) or dense (false) has_head | True if train_file and test_file have headers else false model | Name of the output model file. pred_file | Name of the output prediction file. train_file | Name of the training file. test_file | Name of the test file. output_name | Prefix of the models to be printed per iteration. This is to allow the Meta features of each iteration to be printed. Defaults to nothing. data_prefix | prefix to be used when the user supplies own pairs of [X_train,X_cv] datasets for each fold as well as an X file for the whole training data. This is particularly useful for when likelihood features are needed or generally features than must be computed within cv. Each train/valid pair is identified by prefix_train[fold_index_starting_from_zero].txt/prefix_cv[fold_index_starting_from_zero].txt and prefix_train.txt for the final set. For example if prefix=mystack and folds=2 then stacknet is expecting 2 pairs of train/cv files. e.g [[mystack_train0.txt,mystack_cv0.txt],[mystack_train1.txt,mystack_cv1.txt]]. It also expects a [mystack_train.txt] for the final train set. These files can be either dense or sparse ( when 'sparse=True') and need to have the target variable in the beginning. If you use **output_name** to extract the predictions, these will be stacked vertically in the same order as the cv files. indices_name | A prefix. When given any value it prints a .csv file for each fold with the corresponding train(0) and valiation(1) indices stacked vertically .The format is “row_index,[0 if train else 1 for validation]”. First it prints the train indices and then the validation indices in exactly the same order as they appear when modelling inside StackNet. input_index (**New**) | Name of file to load in order to form the train and cv indices during kfold cross validation. This overrides the internal process for generating kfolds and ignores the given folds. Each row needs to contain an integer in that file. Row size of the file needs to be the same as the `train_file`. It should not contain headers. one line=one integer - the indice of the validation fold the case belongs to.[There is an example](/example/manual_index/EXAMPLE.MD) include_target (**New**) | True to enable printing the target column in the output file for train holdout predictions (when `output_name` is not empty). test_target | True if the test file has a target variable in the beginning (left) else false (only predictors in the file). params | Parameter file where each line is a model. empty lines correspond to the creation of new levels verbose | True if we need StackNet to output its progress else false threads | Number of models to run in parallel. This is independent of any extra threads allocated from the selected algorithms. e.g. it is possible to run 4 models in parallel where one is a randomforest that runs on 10 threads (it selected). metric | Metric to output in cross validation for each model-neuron. can be logloss, accuracy or auc (for binary only) for classification and rmse ,rsquared or mae for regerssion .defaults to 'logloss' for classification and 'rmse' for regression. stackdata | True for restacking else false seed | Integer for randomised procedures bins | A parameter that allows classifiers to be used in regression problems. It first bins (digitises) the target variable and then runs classifiers on the transformed variable. Defaults to 2</li>. folds | Number of folds for re-usable kfold ### Parameters' File In The parameter file, each line is a model. When there is an empty line then any new algorithm is used in the next level. This is a sample format. Note this file accepts comments (`#`). Anything on the right of the `#` symbol is ignored.(**New**) ``` LogisticRegression C:1 Type:Liblinear maxim_Iteration:100 scale:true verbose:false RandomForestClassifier bootsrap:false estimators:100 threads:5 logit.offset:0.00001 verbose:false cut_off_subsample:1.0 feature_subselection:1.0 gamma:0.00001 max_depth:8 max_features:0.25 max_tree_size:-1 min_leaf:2.0 min_split:5.0 Objective:ENTROPY row_subsample:0.95 seed:1 GradientBoostingForestClassifier estimators:100 threads: offset:0.00001 verbose:false trees:1 rounding:2 shrinkage:0.05 cut_off_subsample:1.0 feature_subselection:0.8 gamma:0.00001 max_depth:8 max_features:1.0 max_tree_size:-1 min_leaf:2.0 min_split:5.0 Objective:RMSE row_subsample:0.9 seed:1 Vanilla2hnnclassifier UseConstant:true usescale:true seed:1 Type:SGD maxim_Iteration:50 C:0.000001 learn_rate:0.009 smooth:0.02 h1:30 h2:20 connection_nonlinearity:Relu init_values:0.02 LSVC Type:Liblinear threads:1 C:1.0 maxim_Iteration:100 seed:1 LibFmClassifier lfeatures:3 init_values:0.035 smooth:0.05 learn_rate:0.1 threads:1 C:0.00001 maxim_Iteration:15 seed:1 NaiveBayesClassifier usescale:true threads:1 Shrinkage:0.1 seed:1 verbose:false XgboostRegressor booster:gbtree objective:reg:linear num_round:100 eta:0.015 threads:1 gamma:2.0 max_depth:4 subsample:0.8 colsample_bytree:0.4 seed:1 verbose:false XgboostRegressor booster:gblinear objective:reg:gamma num_round:500 eta:0.5 threads:1 lambda:1 alpha:1 seed:1 verbose:false RandomForestClassifier estimators=1000 rounding:3 threads:4 max_depth:6 max_features:0.6 min_leaf:2.0 Objective:ENTROPY gamma:0.000001 row_subsample:1.0 verbose:false copy=false ``` **Tip**: To tune a single model, one may choose an algorithm for the first layer and a dummy one for the second layer. StackNet expects at least two algorithms, so with this format the user can visualize the performance of single algorithm inside the K-fold. For example, if I wanted to tune a Random Forest Classifier, I would put it in the first line (layer) and also put any model (lets say Logistic Regression) in the second layer and could break the process immediately after the first layer kfold is done: ``` RandomForestClassifier bootsrap:false estimators:100 threads:5 logit.offset:0.00001 verbose:false cut_off_subsample:1.0 feature_subselection:1.0 gamma:0.00001 max_depth:8 max_features:0.25 max_tree_size:-1 min_leaf:2.0 min_split:5.0 Objective:ENTROPY row_subsample:0.95 seed:1 LogisticRegression verbose:false ``` ## Data Format For **dense** input data, the file needs to start with the target variable followed by a comma, separated variables like: 1,0,0,2,3,2.4 0,1,1,0,0,12 For **sparse** format , it is the same as libsvm (same example as above) : 1 2:2 3:3 4:2.4 0 0:1 1:1 4:12 **warning**: Some algorithms (mostly tree-based) may not be very fast with this format) If test_target is false, then the test data may not have a target and start directly from the variables. A **train** method needs at least a **train_file** and a **params_file**. It also needs at least two algorithms, and the and last layer must not contain a regressor unless the metric is auc and the problem is binary. A **predict** method needs at least a **test_file** and a **model_file**. ## Commandline Train Statement Java –jar stacknet.jar **_train_** **task=classification** **sparse**=false **has_head**=true **model**=model **pred_file**=pred.csv **train_file**=sample_train.csv **test_file**= sample_test.csv **test_target**=true **params**=params.txt **verbose**=true **threads**=7 **metric**=logloss **stackdata**=false **seed**=1 **folds**=5 **bins**=3 Note that you can have train and test at the same time. In that case after training, it scores the test data. ## Commandline predict Statement Java -jar stacknet.jar **_predict_** **sparse**=false **has_head**=true **model**=model **pred_file**=pred.csv **test_file**=sample_test.csv **test_target**=true **verbose**=true **metric**=logloss ## Examples - [Kaggle-Quora-sparse](/example/Quora_kaggle_sparse/README.MD) - [Kaggle-TwoSigma](/example/twosigma_kaggle/EXAMPLE.MD) - [Kaggle-TwoSigma Random Forest using the Library](/example/twosigma_kaggle_java_rf/EXAMPLE.MD) - [Kaggle-Amazon Classification challenge and use of data_prefix](/example/example_amazon/EXAMPLE.MD) - [Kaggle-Zillow regerssion example](/example/zillow_regression_sparse/README.MD) - [Example_with_index](/example/manual_index/EXAMPLE.MD) - [Example_H2OWorld](/example/H2OWorld_StackNet_Example/EXAMPLE.MD) ## Run StackNet from within Java code If we wanted to build a 3-level stacknet on a binary target with desne data, we start with initializing a _StackNetClassifier_ Object: ```java StackNetClassifier StackNet = new StackNetClassifier (); // Initialise a StackNet ``` Which is then followed by a 2-dimensional String array with the list of models in each layer along with their hyperparameters in the form of as in "_estimator [space delimited hyper parameters]_" ```java String models_per_level[][]=new String[][]; {//First Level {"LogisticRegression C:0.5 maxim_Iteration:100 verbose:true", "RandomForestClassifier bootsrap:false estimators:100 threads:25 offset:0.00001 cut_off_subsample:1.0 feature_subselection:1.0 max_depth:15 max_features:0.3 max_tree_size:-1 min_leaf:2.0 min_split:5.0 Objective:ENTROPY row_subsample:0.95", "LSVC C:3 maxim_Iteration:50", "LibFmClassifier maxim_Iteration:16 C:0.000001 lfeatures:3 init_values:0.9 learn_rate:0.9 smooth:0.1", "NaiveBayesClassifier Shrinkage:0.01", "Vanilla2hnnclassifier maxim_Iteration:20 C:0.000001 tolerance:0.01 learn_rate:0.009 smooth:0.02 h1:30 h2:20 connection_nonlinearity:Relu init_values:0.02", "GradientBoostingForestClassifier estimators:100 threads:25 verbose:false trees:1 rounding:2 shrinkage:0.1 feature_subselection:0.5 max_depth:8 max_features:1.0 min_leaf:2.0 min_split:5.0 row_subsample:0.9", "LinearRegression C:0.00001", "AdaboostRandomForestClassifier estimators:100 threads:3 verbose:true trees:1 rounding:2 weight_thresold:0.4 feature_subselection:0.5 max_depth:8 max_features:1.0 min_leaf:2.0 min_split:5.0 row_subsample:0.9", "GradientBoostingForestRegressor estimators:100 threads:3 trees:1 rounding:2 shrinkage:0.1 feature_subselection:0.5 max_depth:9 max_features:1.0 min_leaf:2.0 min_split:5.0 row_subsample:0.9", "RandomForestRegressor estimators:100 internal_threads:1 threads:25 offset:0.00001 verbose:true cut_off_subsample:1.0 feature_subselection:1.0 max_depth:14 max_features:0.25 max_tree_size:-1 min_leaf:2.0 min_split:5.0 Objective:RMSE row_subsample:1.0", "LSVR C:3 maxim_Iteration:50 P:0.2" }, //Second Level {"RandomForestClassifier estimators:1000 threads:25 offset:0.0000000001 verbose=false cut_off_subsample:0.1 feature_subselection:1.0 max_depth:7 max_features:0.4 max_tree_size:-1 min_leaf:1.0 min_split:2.0 Objective:ENTROPY row_subsample:1.0", "GradientBoostingForestClassifier estimators:1000 threads:25 verbose:false trees:1 rounding:4 shrinkage:0.01 feature_subselection:0.5 max_depth:5 max_features:1.0 min_leaf:1.0 min_split:2.0 row_subsample:0.9", "Vanilla2hnnclassifier maxim_Iteration:20 C:0.000001 tolerance:0.01 learn_rate:0.009 smooth:0.02 h1:30 h2:20 connection_nonlinearity:Relu init_values:0.02", "LogisticRegression C:0.5 maxim_Iteration:100 verbose:false" }, //Third Level {"RandomForestClassifier estimators:1000 threads:25 offset:0.0000000001 verbose=false cut_off_subsample:0.1 feature_subselection:1.0 max_depth:6 max_features:0.7 max_tree_size:-1 min_leaf:1.0 min_split:2.0 Objective:ENTROPY row_subsample:1.0" } }; Alternatively, we could load directly from a file : String modellings[][]=io.input.StackNet_Configuration("params.txt"); StackNet.parameters=models_per_level; // adding the models' specifications ``` The remaining parameters to be specified include the cross validation training schema, the Restacking mode option, setting a random state as well as some other miscellaneous options: ```java StackNet.threads=4; // models to be run in parallel StackNet.folds=5; // size of K-Fold StackNet.stackdata=true; // use Restacking StackNet.print=true; // this helps to avoid rerunning should the model fail StackNet.output_name="restack";// prefix for each layer's output. StackNet.verbose=true; // it outputs StackNet.seed=1; // random state StackNet.metric="logloss" ``` Ultimately given a data object X and a 1-dimensional vector y, the model can be trained using: ```java StackNet.target=y; // the target variable StackNet.fit(X); // fitting the model on the training data ``` Predictions are made with : ```java double preds [][]=StackNet.predict_proba(X_test); ``` ## Potential Next Steps - ~~Add StackNetRegressor~~ Done. - ~Add [H<sub>2</sub>O](http://h2o-release.s3.amazonaws.com/h2o/master/3908/index.html)~ - ~increase coverage in general with well-known and well-performing ml tools (original libfm, libffm, vowpal wabbit)~ - Add data pre-processing steps - Make a python wrapper ## Reference For now, you may use this: Marios Michailidis (2017), StackNet, StackNet Meta Modelling Framework, url https://github.com/kaz-Anova/StackNet ## News - StackNet model was presented at [infiniteconf 2017](https://skillsmatter.com/conferences/7983-infiniteconf-2017-the-conference-on-big-data-data-science-and-engineering#program ) [6th-7th July] and the video is available there if you sign up - New [facebook page](https://www.facebook.com/StackNet/) to discuss StackNet and other open source data science topics. - StackNet and Sracking was explained in [kaggle's blog](http://blog.kaggle.com/2017/06/15/stacking-made-easy-an-introduction-to-stacknet-by-competitions-grandmaster-marios-michailidis-kazanova/) - The is an Ask Me Anything (AMA) [thread in kaggle](https://www.kaggle.com/general/34802) with useful material about stacking and StackNet. - A workshop with StackNet will take place in [ODSC in London](https://www.odsc.com/london/speakers) October 12-14 . ## Special Thanks To my co-supervisors: - [Giles Pavey](https://www.linkedin.com/in/giles-pavey-924426/) - [Prof. Philip Treleaven](http://www0.cs.ucl.ac.uk/staff/P.Treleaven/)
0
Cleveroad/FanLayoutManager
Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
null
#FanLayoutManager [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) <img src="https://www.cleveroad.com/public/comercial/label-android.svg" height="20"> <a href="https://www.cleveroad.com/?utm_source=github&utm_medium=label&utm_campaign=contacts"><img src="https://www.cleveroad.com/public/comercial/label-cleveroad.svg" height="20"></a> ![Header image](/images/header.jpg) ## Welcome to Fan Layout Manager for Android by Cleveroad Fan Layout Manager is a new library created at Cleveroad. Our ideas don’t come from nowhere, everything we invent results from the difficulties we overcome. This exactly what happened — we were fighting uniformity! Since traditional view of the simple horizontal list isn’t impressive anymore, we decided to suggest our vision adding some colours and a completely new motion path. ![Demo image](/images/demo_.gif) #####Check out the animation <strong><a target="_blank" href="https://www.youtube.com/watch?v=P0r37_tXeMc">Fan Layout Manager for Android on YouTube</a></strong> in HD quality. Cleveroad gladly shares its creation with everyone who wants to add some visual spice to their Android apps. Take Fan Layout Manager and create! Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades (in a circular way of a radius to your choice). To give a slightly chaotical effect to the motion, it’s possible to set an angle for the list items. So, every implementation of the library can be unique. [![Awesome](/images/logo-footer.png)](https://www.cleveroad.com/?utm_source=github&utm_medium=label&utm_campaign=contacts) ### Installation ### by Gradle: ```groovy compile 'com.cleveroad:fan-layout-manager:1.0.5' ``` ### Setup and usage ### Use default FanLayoutManager in code: ```JAVA fanLayoutManager = new FanLayoutManager(getContext()); recyclerView.setLayoutManager(fanLayoutManager); ``` You can **select/deselect** item using: ```JAVA fanLayoutManager.switchItem(recyclerView, itemPosition); // select/deselect fanLayoutManager.deselectItem(); // just deselect ``` **Get selected item position**: ```JAVA fanLayoutManager.getSelectedItemPosition(); // return selected item position fanLayoutManager.isItemSelected(); // true if item was selected ``` To customize ***FanLayoutManager*** we provide settings: ```JAVA FanLayoutManagerSettings fanLayoutManagerSettings = FanLayoutManagerSettings .newBuilder(getContext()) .withFanRadius(true) .withAngleItemBounce(5) .withViewWidthDp(120) .withViewHeightDp(160) .build(); fanLayoutManager = new FanLayoutManager(getContext(), fanLayoutManagerSettings); recyclerView.setLayoutManager(fanLayoutManager); ``` `.withFanRadius(boolean isFanRadiusEnable)` - you can enable displaying items in fan style.</p> `.withAngleItemBounce(float angleItemBounce)` - added rendom bounce angle to items from [0.. angleItemBounce).</p> `.withViewWidthDp(float viewWidthDp)` - custom item width. default 120dp.</p> `.withViewHeightDp(float viewHeightDp)` - custom item height. default 160dp.</p> You can *remove bounce angle* effect for selected item: ```JAVA public void straightenSelectedItem(Animator.AnimatorListener listener); ``` and you can *restore bounce angle* effect for selected item: ```JAVA public void restoreBaseRotationSelectedItem(Animator.AnimatorListener listener) ``` You can collapse views using: ```JAVA public void collapseViews(); ``` ## Changelog See [changelog history]. ## Support If you have any questions regarding the use of this tutorial, please contact us for support at info@cleveroad.com (email subject: «FanLayoutManager for Android. Support request.») <br>or <br>Use our contacts: <br><a href="https://www.cleveroad.com/?utm_source=github&utm_medium=link&utm_campaign=contacts">Cleveroad.com</a> <br><a href="https://www.facebook.com/cleveroadinc">Facebook account</a> <br><a href="https://twitter.com/CleveroadInc">Twitter account</a> <br><a href="https://plus.google.com/+CleveroadInc/">Google+ account</a> ## License The MIT License (MIT) Copyright (c) 2015-2016 Cleveroad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [changelog history]: /CHANGELOG.md
0
spring-cloud/spring-cloud-config
External configuration (server and client) for Spring Cloud
cloud-native git java microservices spring spring-boot spring-cloud spring-cloud-core vault
null
0
takahirom/PreLollipopTransition
Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices.
null
# PreLollipopTransition ![build status](https://circleci.com/gh/takahirom/PreLollipopTransition/tree/master.svg?style=shield&circle-token=1759143e61c73eeca59280337c8c95ab9f8dbafb) [![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14) Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices. ![prelollipopanimation](https://cloud.githubusercontent.com/assets/1386930/7614211/53ca12d8-f9d0-11e4-8b98-b6d98272f67d.gif) ## Download In your app build.gradle add ```groovy dependencies { compile 'com.kogitune:pre-lollipop-activity-transition:1.x.x' } ``` [ ![Download](https://api.bintray.com/packages/takahirom/maven/PreLollipopTransition/images/download.svg) ](https://bintray.com/takahirom/maven/PreLollipopTransition/_latestVersion) ## Code ### Activity Start Activity in first activity. ```java findViewById(R.id.imageView).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final Intent intent = new Intent(MainActivity.this, SubActivity.class); ActivityTransitionLauncher.with(MainActivity.this).from(v).launch(intent); } }); ``` Receive intent in second activity. ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sub); ActivityTransition.with(getIntent()).to(findViewById(R.id.sub_imageView)).start(savedInstanceState); } ``` #### If you want the exit animation, you can do like this. ```java private ExitActivityTransition exitTransition; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sub2); exitTransition = ActivityTransition.with(getIntent()).to(findViewById(R.id.sub_imageView)).start(savedInstanceState); } @Override public void onBackPressed() { exitTransition.exit(this); } ``` #### If you want to use `startActivityForResult`, you should do below. 1. Use `createBundle()`. 2. Put Extra to intent. 3. Call overridePendingTransition after `startActivityForResult`. ```java Bundle transitionBundle = ActivityTransitionLauncher.with(MainActivity.this).from(v).createBundle(); intent.putExtras(transitionBundle); startActivityForResult(intent, REQUEST_CODE); // you should prevent default activity transition animation overridePendingTransition(0, 0); ``` ### Fragment Start fragment transition in first fragment. ```java @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.support_fragment_start, container, false); v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { final EndFragment toFragment = new EndFragment(); FragmentTransitionLauncher .with(view.getContext()) .image(BitmapFactory.decodeResource(getResources(), R.drawable.photo)) .from(view.findViewById(R.id.imageView)).prepare(toFragment); getFragmentManager().beginTransaction().replace(R.id.content, toFragment).addToBackStack(null).commit(); } }); return v; } ``` Start animation in second fragment. ```java @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.support_fragment_end, container, false); final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this).to(v.findViewById(R.id.fragment_imageView)).start(savedInstanceState); exitFragmentTransition.startExitListening(); return v; } ``` If you want to pass argument to second fragment, you should use `Fragment#getArguments()` after call prepare(). ```java final EndFragment toFragment = new EndFragment(); FragmentTransitionLauncher .with(view.getContext()) .image(BitmapFactory.decodeResource(getResources(), R.drawable.photo)) .from(view.findViewById(R.id.imageView)).prepare(toFragment); toFragment.getArguments().putString("stringArgKey", "this is value"); getFragmentManager().beginTransaction().replace(R.id.content, toFragment).addToBackStack(null).commit(); ``` ## Sample ![image](https://cloud.githubusercontent.com/assets/1386930/7668974/019262a0-fc95-11e4-906a-84a2b744a12c.gif) ## Contributors * [shiraji](http://www.github.com/shiraji) * [lovejjfg](https://github.com/lovejjfg) ## Thanks Sample Photo Luke Ma https://www.flickr.com/photos/lukema/12499338274/in/photostream/ DevBytes: Custom Activity Animations https://www.youtube.com/watch?v=CPxkoe2MraA ## License This project is released under the Apache License, Version 2.0. * [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
0
spring-projects/spring-loaded
Java agent that enables class reloading in a running JVM
null
# 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 classes at loadtime to make them amenable to later reloading. Unlike 'hot code replace' which only allows simple changes once a JVM is running (e.g. changes to method bodies), Spring Loaded allows you to add/modify/delete methods/fields/constructors. The annotations on types/methods/fields/constructors can also be modified and it is possible to add/remove/change values in enum types. Spring Loaded is usable on any bytecode that may run on a JVM, and is actually the reloading system used in Grails 2,3,4 (on java 8). # Installation 1.3.0 has now been released! 1.3.0 Enables support for Grails 4.0.4+ Running on Java 8 (Java 11 is not yet supported and is in Development) 1.2.6 snapshots are in this repo area (grab the most recently built .jar): <a href="https://repo.spring.io/webapp/#/artifacts/browse/tree/General/libs-snapshot-local/org/springframework/springloaded/1.2.6.BUILD-SNAPSHOT">repo.spring.io</a> The download is the agent jar and needs no further unpacking before use. # Running with reloading java -javaagent:<pathTo>/springloaded-{VERSION}.jar -noverify SomeJavaClass The verifier is being turned off because some of the bytecode rewriting stretches the meaning of some of the bytecodes - in ways the JVM doesn't mind but the verifier doesn't like. Once up and running what effectively happens is that any classes loaded from jar files (dependencies) are not treated as reloadable, whilst anything loaded from .class files on disk is made reloadable. Once loaded the .class file will be watched (once a second) and should a new version appear SpringLoaded will pick it up. Any live instances of that class will immediately see the new form of the object, the instances do not need to be discarded and recreated. No doubt that raises a lot of questions and hopefully a proper FAQ will appear here shortly! But in the meantime, here are some basic Qs and As: Q. Does it reload anything that might change in a class file? A. No, you can't change the hierarchy of a type. Also there are certain constructor patterns of usage it can't actually handle right now. Q. With objects changing shape, what happens with respect to reflection? A. Reflection results change over time as the objects are reloaded. For example, modifying a class with a new method and calling `getDeclaredMethods()` after reloading has occurred will mean you see the new method in the results. *But* this does mean if you have existing caches in your system that stash reflective information assuming it never changes, those will need to be cleared after a reload. Q. How do I know when a reload has occurred so I can clear my state? A. You can write a plugin that is called when reloads occur and you can then take the appropriate action. Create an implementation of `ReloadEventProcessorPlugin` and then register it via `SpringLoadedPreProcessor.registerGlobalPlugin(plugin)`. (There are other ways to register plugins, which will hopefully get some documentation!) Q. What's the state of the codebase? A. The technology is successfully being used by Grails for reloading. It does need some performance work and a few smacks with a refactoring hammer. It needs upgrading here and there to tolerate the invokedynamic instruction and associated new constant pool entries that arrived in Java 7. # Working with the code git clone https://github.com/spring-projects/spring-loaded Once cloned there will be some projects suitable for import into eclipse. The main project and some test projects. One of the test projects is an AspectJ project (containing both Java and AspectJ code), and one is a Groovy project. To compile these test projects in Eclipse you will need the relevant eclipse plugins: AJDT: update site: `https://download.eclipse.org/tools/ajdt/42/dev/update` Groovy-Eclipse: update site: `https://dist.springsource.org/snapshot/GRECLIPSE/e4.2/` After importing them you can run the tests. There are two kinds of tests, hand crafted and generated. Running all the tests including the generated ones can take a while. To run just the hand crafted ones supply this to the JVM when launching the tests: -Dspringloaded.tests.generatedTests=false NOTE: When running the tests you need to pass `-noverify` to the JVM also. Two launch configurations are already included if you are importing these projects into eclipse, which run with or without the generated tests. A gradle build script is included, run './gradlew build' to rebuild the agent - it will be created as something like: `springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT.jar` # Can I contribute? Sure! This is based on the original Spring Source Project work done by Andy Clement. As Spring was moving away from spring-loaded in favor of spring-dev-tools (a more basic alternative), Community efforts were made to update spring-loaded to work in more recent builds of Grails.
0
waynell/VideoListPlayer
Play video in ListView or RecyclerView
listview recyclerview video-player
[![Build Status](https://semaphoreapp.com/api/v1/projects/d4cca506-99be-44d2-b19e-176f36ec8cf1/128505/shields_badge.svg)](https://github.com/waynell/VideoListPlayer) [![](https://jitpack.io/v/waynell/VideoListPlayer.svg)](https://jitpack.io/#waynell/VideoListPlayer) # VideoListPlayer VideoListPlayer实现了在列表控件(ListView, RecyclerView)中加载并播放视频,并支持滑动时自动播放/暂停的功能 利用该项目,可以轻松实现类似Instagram的视频播放功能 **注意:最低支持API 14以上** #效果预览 ![](./art/preview.gif) ![](./art/Screenshot_20160716.png) #Changelogs **v.14** 1. 支持更多类型的scaleType,详见 [Android-ScalableVideoView](https://github.com/yqritc/Android-ScalableVideoView) 2. 加入 `getCurrentPosition()` 和 `getDuration()` 接口 **v1.3** 1. fix在多类型列表元素中出现视频无法正常播放的bug **Demo 更新** 1. 增加在ListView中播放视频的示例 2. ListView和RecyclerView中支持多类型view type展示 **v1.2** 1. fix NPE bugs **v1.1** 1. 自动播放/停止功能性能优化 2. 视频播放加入声音开关控制,默认播放视频关闭声音,点击视频开启声音 3. fix在4.1.1以下无法播放视频的bug #基本用法 添加gradle依赖 repositories { maven { url "https://jitpack.io" } } dependencies { compile 'com.github.waynell:VideoListPlayer:1.4' } 在xml布局中加入以下代码 <com.waynell.videolist.widget.TextureVideoView android:id="@+id/video_view" android:layout_width="match_parent" android:layout_height="300dp" /> 然后设置视频路径地址,最后调用start()方法开始播放视频 videoView.setVideoPath(mVideoPath); videoView.start(); 视频播放是异步的,可以通过设置MediaPlayerCallback回调监听播放事件 view.setMediaPlayerCallback(this); 监听事件如下 void onPrepared(MediaPlayer mp); void onCompletion(MediaPlayer mp); void onBufferingUpdate(MediaPlayer mp, int percent); void onVideoSizeChanged(MediaPlayer mp, int width, int height); boolean onInfo(MediaPlayer mp, int what, int extra); boolean onError(MediaPlayer mp, int what, int extra); #滑动时自动播放/停止的功能 首先,你必须实现ListItem接口来获取item被激活或取消激活的事件回调 public interface ListItem { // 当前item被激活 void setActive(View newActiveView, int newActiveViewPosition); // 当前item被取消 void deactivate(View currentView, int position); } 其次,实现ItemsProvider接口返回当前列表总数和列表中某一位置的ListItem实例 public interface ItemsProvider { ListItem getListItem(int position); int listItemSize(); } 最后添加以下代码实现可见比的计算,以RecyclerView为例 ItemsProvider itemProvider; ListItemsVisibilityCalculator calculator = new SingleListViewItemActiveCalculator(itemProvider, new RecyclerViewItemPositionGetter(layoutManager, mRecyclerView);); mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { mScrollState = newState; if(newState == RecyclerView.SCROLL_STATE_IDLE && !mListItems.isEmpty()){ mCalculator.onScrollStateIdle(); } } @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { mCalculator.onScrolled(mScrollState); } }); # 网络视频的本地缓存 请参考demo工程的实现 #实现原理 请参见我的博客 [视频在滑动列表中的异步缓存和播放](http://blog.waynell.com/2016/03/21/video-loader/) #Thanks [VideoPlayerManager](https://github.com/danylovolokh/VideoPlayerManager) 滑动自动播放/暂停的功能基于项目优化而来
0
eleme/UETool
Show/edit any view's attributions on the screen.
null
UETool [![GitHub release](https://img.shields.io/github/release/eleme/UETool.svg?style=social)](https://github.com/eleme/UETool/releases) [![platform](https://img.shields.io/badge/platform-android-brightgreen.svg)](https://developer.android.com/index.html) [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/eleme/UETool/blob/master/LICENSE) ====== ![](https://github.com/eleme/UETool/blob/master/art/uet_banner.jpeg) ## INTRODUCTION [中文版](https://github.com/eleme/UETool/blob/master/README_zh.md) UETool is a debug tool for anyone who needs to show and edit the attributes of user interface views on mobile devices. It works on Activity/Fragment/Dialog/PopupWindow or any other view. Presently, UETool provides the following functionalities: - Move any view on the screen (selecting view repeatedly will select its parent's view) - Show/edit normal view's attributes such as TextView's text, textSize, textColor etc. - Show two view's relative positions - Show grid for checking view alignment - Support Android P - Show view's current Fragment - Show activity's Fragment tree - Show view's view holder name if it exist - Easily customize any view's attributes you want simply, such as business parameters - If you are using Fresco's DraweeView, UETool shows more properties like ImageURI, PlaceHolderImage, CornerRadius etc. - If the view selected by UETool isn’t what you want, you can check ValidViews to choose which target view you want ## UETool's Effects: <div> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/move_view.gif"/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/show_image_uri.gif"/> <br/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/relative_position.gif"/> <img width="270" height="480" src="https://github.com/eleme/UETool/blob/master/art/show_gridding.png"/> </div> ## ATTRIBUTE LIST | Attribute | Value Sample | Editable | | --- | --- | --- | | Move | if you checked it, you can move view easily | | | ValidViews | sometimes target view which UETool offered isn’t you want, you can check it and choose which you want | | | Class | android.widget.LinearLayout | | | Id | 0x7f0d009c | | | ResName | btn | | | Clickble | TRUE | | | Focoused | FALSE | | | Width(dp) | 107 | YES | | Height(dp) | 19 | YES | | Alpha | 1.0 | | | PaddingLeft(dp) | 10 | YES | | PaddingRight(dp) | 10 | YES | | PaddingTop(dp) | 10 | YES | | PaddingBottom(dp) | 10 | YES | | Background | #90000000 <br/> #FF8F8F8F -> #FF688FDB <br/> [PICTURE] 300px*300px | | | **TextView** | | | | Text | Hello World | YES | | TextSize(sp) | 14 | YES | | TextColor | #DE000000 | YES | | IsBold | TRUE | YES | | SpanBitmap | [PICTURE] 72px*39px | | | DrawableLeft | [PICTURE] 51px*51px | | | DrawableRight | [PICTURE] 36px*36px | | | DrawableTop | [PICTURE] 36px*36px | | | DrawableBottom | [PICTURE] 36px*36px | | | **ImageView** | | | | Bitmap | [PICTURE] 144px*144px | | | ScaleType | CENTER_CROP | | | **DraweeView** | | | | CornerRadius | 2dp | | | ImageURI | https://avatars2.githubusercontent.com/u/1201438?s=200&v=4 | | | ActualScaleType | CENTER_CROP | | | IsSupportAnimation | TRUE | | | PlaceHolderImage | [PICTURE] 300px*300px | | | | | | ## HOW TO USE ### Installation ```gradle allprojects { repositories { ... maven { url 'https://jitpack.io' } } } dependencies { debugImplementation 'com.github.eleme.UETool:uetool:1.3.4' debugImplementation 'com.github.eleme.UETool:uetool-base:1.3.4' releaseImplementation 'com.github.eleme.UETool:uetool-no-op:1.3.4' // if you want to show more attrs about Fresco's DraweeView debugImplementation 'com.github.eleme.UETool:uetool-fresco:1.3.4' } ``` ### Usage #### Show floating window ```java UETool.showUETMenu(); UETool.showUETMenu(int y); ``` #### Dismiss floating window ```java UETool.dismissUETMenu(); ``` #### Filter out unwanted views from selection ```java UETool.putFilterClass(Class viewClazz); UETool.putFilterClass(String viewClassName); ``` #### Customize your view ```java // step 1, implement IAttrs public class UETFresco implements IAttrs { @Override public List<Item> getAttrs(Element element) { } } // step 2, put in UETool UETool.putAttrsProviderClass(Class customizeClazz); UETool.putAttrsProviderClass(String customizeClassName); ``` ## License [MIT](http://opensource.org/licenses/MIT)
0
videlalvaro/gifsockets
Real Time communication library using Animated Gifs as a transport™
null
# gifsockets "This library is the websockets of the '90s" - Somebody at Hacker News. This library shows how to achieve realtime text communication using GIF images as transport. ![Mind Blown](https://raw.github.com/videlalvaro/gifsockets/master/doc/mybrain.gif) The interesting part is that you can even use IE6 with this library and get the data in Real Time (TM). Of course this should have been delivered as an April's Fools joke but sadly we are in mid September here in the northern hemisphere. See it in action in this video: [https://vimeo.com/49447841](https://vimeo.com/49447841). ## How does it work The idea is pretty simple. We use Animated Gif images to stream data in real time to the browser. Since a gif image doesn't specify how many frames it has, once the browser opens it, it will keep waiting for new frames until you send the bits indicating that there's no more image to fetch. Pretty simple uh! And yes. It works in IE6. ## Usage The usage now is a bit rudimentary and manual. Feel free to improve it and send a PR. ```bash $ git clone git://github.com/videlalvaro/gifsockets.git $ cd gifsockets $ lein deps % lein repl ``` Then perform the following commands on the Clojure REPL. ```clojure ;; in the repl do the following to import the libs (use 'gifsockets.core) (use 'gifsockets.server) ;; ;;Then we declare the tcp server (def server (tcp-server :port 8081 :handler gif-handler)) (start2 server) ;; wait for a browser connection on port 8081 ;; go and open http://localhost:8081/ in Safari or IE6 ;; In Chrome it works a bit laggy and in Firefox it doesn't work at all ;; ;; Now let's create the gif encoder that we use to write messages to the browser. (def encoder (create-gif (.getOutputStream client))) ;; ;;Now we are ready to send messages to that browser client (add-message encoder "Hello gif-sockets") ;; now you should see a GIF image with the new message on it. (add-message encoder "Zup zup zup") (add-message encoder "And so forth") ;; ;; Now let's clean up and close the connection (.finish encoder) (.close client) ``` As you can see from the code this handles only one connection in what is called an UPoC (Uber Proof Of Concept). ## Possible uses: All joking aside I think this is a very low tech way to have say, a website where you could tail logs for instance and you need to do it with a browser that have zero websockets support or something like that. Or what about progress bars for stuff that your server is doing in the background, say, while it resizes an image? Yes. You need _gifsockets_. ## NOTE: If you need a good library for real time communications on the web then I would recommend using [sockjs](https://github.com/sockjs). ## License Copyright © 2012 Alvaro Videla The following classes: - AnimatedGifEncoder.java - GifDecoder.java - LZWEncoder.java - NeuQuant.java Were taken from this website: [http://www.fmsware.com/stuff/gif.html](http://www.fmsware.com/stuff/gif.html). And the server code was taken from here [https://github.com/weavejester/tcp-server](https://github.com/weavejester/tcp-server) The awesome image that illustrates this page was given by the internet. Distributed under the Eclipse Public License, the same as Clojure. ## CREDITS I've stole this idea (ehem, took inspiration) from a [chat](http://zesty.ca/chat/) a colleague showed me like three years ago. It wasn't open source back then and I was always wondering how to implement something like that. So kudos to Ka-Ping Yee, who had the original idea. Thanks [simonw](http://news.ycombinator.com/user?id=simonw) for posting the link to the original chat. - [@old_sound](https://twitter.com/old_sound).
0
razerdp/FriendCircle
// 一起来撸个朋友圈吧
friendcircle wechat
FriendCircle --- ### 一起来撸个朋友圈吧(重构版) 如您所见,现在的工程运行起来将会是一片空白,原因很简单——我正在进行第三次重构。 本次重构将会引起如下改动: - 项目整体全面替换,旧有代码完全删除 - 所有控件将会重写 - 组件化将会采取全新的一套(这里组件化参考AppJoint的思想,但会自行写出apt代码) - 尽可能少的依赖第三方 - 抛弃MVP,回归最原始的MVC,原因不再阐述 - 直播撸代码,本次重构会直播写代码哦~如果有人在直播中提问我会回答,否则的话应该只会看到我在静静的撸代码,如果没时间看直播可以看回放~ - 直播地址:[https://live.bilibili.com/724896](https://live.bilibili.com/724896) - 直播时间:一般周末白天 ### 进度: * 2019/08/14 * apt初步搭建完毕 * 2019/08/12 * apt初步搭建,processor编写 * 组件化优化 * 略微优化BaseRecyclerViewAdapter~ ### 朋友圈QQ群将会在19/08/13解散,所有讨论将会转移到微信。如果有兴趣进微信群可以打赏一下然后找我拉您进去~ |微信 | 支付宝 | | ------------- |:-------------:| | ![](https://github.com/razerdp/FriendCircle/blob/master/wechat.png) | ![](https://github.com/razerdp/FriendCircle/blob/master/alipay.png) | LICENSE --- [GPL3.0](https://github.com/razerdp/FriendCircle/blob/master/LICENSE)
0
5hmlA/Jgraph
:fire: 一个视觉效果还不错的图表控件(停止维护了,不建议直接用到项目)
animations chart customview
## Star History [![Star History Chart](https://api.star-history.com/svg?repos=5hmlA/Jgraph&type=Date)](https://star-history.com/#5hmlA/Jgraph&Date) # Jgraph [![License](https://img.shields.io/badge/license-Apache%202-green.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0) [![](https://img.shields.io/badge/Jgraph-download-brightgreen.svg?style=flat-square)](http://fir.im/y57x?release_id=57b1c789ca87a87b36000f2b) [![](https://jitpack.io/v/mychoices/Jgraph.svg)](https://jitpack.io/#mychoices/Jgraph) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/2.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/4.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/6.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/13.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/15.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/22.gif) ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/101.gif) 2. [Gradle](https://github.com/mychoices/Jgraph/blob/master/README.md#gradle) 3. [Demo](https://github.com/mychoices/Jgraph/blob/master/README.md#demo) 4. [Use Guide](https://github.com/mychoices/Jgraph/blob/master/README.md#use-guide) 1. [图表风格](https://github.com/mychoices/Jgraph/blob/master/README.md#graphstyle) 2. [滚动](https://github.com/mychoices/Jgraph/blob/master/README.md#scrollable) 2. [纵轴](https://github.com/mychoices/Jgraph/blob/master/README.md#纵轴) 3. [柱-动画](https://github.com/mychoices/Jgraph/blob/master/README.md#barshowstyle) 4. [柱-颜色](https://github.com/mychoices/Jgraph/blob/master/README.md#barcolor) 4. [线-动画](https://github.com/mychoices/Jgraph/blob/master/README.md#lineshowstyle) 4. [线-风格](https://github.com/mychoices/Jgraph/blob/master/README.md#linestyle) 5. [线-断0](https://github.com/mychoices/Jgraph/blob/master/README.md#linemode) 7. [线-颜色](https://github.com/mychoices/Jgraph/blob/master/README.md#linecolor) 8. [选中](https://github.com/mychoices/Jgraph/blob/master/README.md#select) 9. [切换数据](https://github.com/mychoices/Jgraph/blob/master/README.md#datachange) 5. [Versions](https://github.com/mychoices/Jgraph/blob/master/README.md#versions) 6. [Todo](https://github.com/mychoices/Jgraph/blob/master/README.md#todo) 7. [License](https://github.com/mychoices/Jgraph/blob/master/README.md#license) #Gradle allprojects { repositories { ... maven { url "https://jitpack.io" } } } dependencies { compile 'com.github.mychoices:Jgraph:v1.2' } #DEMO demo下载地址 [![](http://firicon.fir.im/2413a7e605e2ee423e8ca8f38e180320eba0cddc)](http://fir.im/y57x?release_id=57b1c789ca87a87b36000f2b) #User Guide --- ###*自定义属性* ``` <attr name="graphstyle" format="enum"> <enum name="bar" value="0"/> <enum name="line" value="1"/> </attr> <attr name="scrollable" format="boolean"/> <attr name="visiblenums" format="integer"/> <attr name="showymsg" format="boolean"/> <attr name="normolcolor" format="color"/> <attr name="activationcolor" format="color"/> <attr name="linestyle" format="enum"> <!--折线--> <enum name="broken" value="0"/> <!--曲线--> <enum name="curve" value="1"/> </attr> <attr name="linemode" format="enum"> <!--链接每一个点--> <enum name="everypoint" value="1"/> <!--跳过0的点--> <enum name="jump0" value="2"/> <!--跳过的0点用虚线链接--> <enum name="dash0" value="3"/> </attr> <attr name="linewidth" format="dimension"/> <attr name="lineshowstyle" format="enum"> <enum name="drawing" value="0"/> <enum name="section" value="1"/> <enum name="fromline" value="2"/> <enum name="fromcorner" value="3"/> <enum name="aswave" value="4"/> </attr> ``` ## GraphStyle ``` setGraphStyle(@GraphStyle int graphStyle) //柱状图 和 折线图 ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/01.gif) ## Scrollable ``` setScrollAble(boolean ) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/02.gif) ## 纵轴 ``` setYaxisValues(@NonNull String... showMsg) setYaxisValues(int max, int showYnum) setYaxisValues(int min, int max, int showYnum) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/03.gif) ## BarShowStyle ``` setBarShowStyle(@BarShowStyle int barShowStyle) /** * 水波 方式生长 */ int BARSHOW_ASWAVE /** * 线条 一从直线慢慢变成折线/曲线 */ int BARSHOW_FROMLINE /** * 柱形条 由某个往外扩散 */ int BARSHOW_EXPAND /** * 一段一段显示 */ int BARSHOW_SECTION ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/04.gif) ## barcolor ``` setNormalColor(@ColorInt int normalColor) setPaintShaderColors(@ColorInt int... colors) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/05.gif) ## LineStyle ``` setLineStyle(@LineStyle int lineStyle) /** * 折线 */ int LINE_BROKEN = 0; /** * 曲线 */ int LINE_CURVE = 1; ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/06.gif) ## LineShowStyle ``` setLineShowStyle(@LineShowStyle int lineShowStyle) /** * 线条从无到有 慢慢出现 */ int LINESHOW_DRAWING /** * 线条 一段一段显示 */ int LINESHOW_SECTION /** * 线条 一从直线慢慢变成折线/曲线 */ int LINESHOW_FROMLINE /** * 从左上角 放大 */ int LINESHOW_FROMCORNER /** * 水波 方式展开 */ int LINESHOW_ASWAVE ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/07.gif) ## LineMode ``` setLineMode(@LineMode int lineMode) /** * 连接每一个点 */ int LINE_EVERYPOINT /** * 跳过0 断开 */ int LINE_JUMP0 /** * 跳过0 用虚线链接 */ int LINE_DASH_0 ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/08.gif) ## linecolor ``` setNormalColor(@ColorInt int normalColor) setPaintShaderColors(@ColorInt int... colors) setShaderAreaColors(@ColorInt int... colors) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/09.gif) ## select ``` setSelected(int selected) setSelectedMode(@SelectedMode int selectedMode) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/010.gif) # datachange ``` aniChangeData(List<Jchart> jchartList) ``` ![](https://raw.githubusercontent.com/mychoices/Jgraph/master/gif/011.gif) # Versions # Todo Todo # License Copyright 2016 Yun Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
mzule/FantasySlide
Another sliding menu base on DrawerLayout
drawerlayout menubar sidebar
# FantasySlide [![DOWNLOAD](https://api.bintray.com/packages/mzule/maven/fantasy-slide/images/download.svg)](https://bintray.com/mzule/maven/fantasy-slide/_latestVersion) [![API](https://img.shields.io/badge/API-15%2B-orange.svg?style=flat)](https://android-arsenal.com/api?level=15) <a href="http://www.methodscount.com/?lib=com.github.mzule.fantasyslide%3Alibrary%3A1.0.4"><img src="https://img.shields.io/badge/Methods and size-core: 142 | deps: 15054 | 24 KB-e91e63.svg"/></a> [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FantasySlide-green.svg?style=flat)](http://android-arsenal.com/details/1/4309) 一个 DrawerLayout 的扩展,具有帅气的动画与创新的交互。一次手势完成滑出侧边栏与选择菜单。欢迎下载 demo 体验。 <https://raw.githubusercontent.com/mzule/FantasySlide/master/demo.apk> ## 效果 ![](https://raw.githubusercontent.com/mzule/FantasySlide/master/sample.gif) ## 使用方法 ### 添加依赖 ``` groovy compile 'com.github.mzule.fantasyslide:library:1.0.5' ``` ### 调用 调用方法基本与 DrawerLayout 一致. 本项目支持左右 (start left end right) 侧边栏同时定义。 ``` xml <com.github.mzule.fantasyslide.FantasyDrawerLayout xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawerLayout" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" android:src="@drawable/fake" /> <com.github.mzule.fantasyslide.SideBar android:id="@+id/leftSideBar" android:layout_width="200dp" android:layout_height="match_parent" android:layout_gravity="start" android:background="@color/colorPrimary" app:maxTranslationX="66dp"> <!-- 这里是 SideBar 的子视图--> </com.github.mzule.fantasyslide.SideBar> <!-- 如果需要的话,可以添加右侧边栏--> </com.github.mzule.fantasyslide.FantasyDrawerLayout> ``` 1. 最外层的 FantasyDrawerLayout 的使用与官方的 DrawerLayout 完全一致。 2. SideBar 用来包装每一个菜单项,SideBar 本质上可以当做一个 vertical 的 LinearLayout 来使用。 3. 效果图上的文字变色是表示该菜单处于 hover 状态, hover 状态默认会设定 view 的 pressed 状态为 true。可以通过 Listener 来改写, 下文会有详细说明。 4. 详细参考 <https://github.com/mzule/FantasySlide/blob/master/app/src/main/res/layout/activity_main.xml> ## 进阶 ### maxTranslationX 通过设置 maxTranslationX 可以设置菜单项动画的最大位移。仅有在采用默认 Transformer 时才有效。 ``` xml <com.github.mzule.fantasyslide.SideBar ... app:maxTranslationX="88dp"> ``` 一般情况下,左边的侧边栏 maxTranslationX 为正数,右边的侧边栏 maxTranslationX 为负数。 ### Listener 支持设置 Listener 来监听侧边栏菜单的状态。 ``` java SideBar leftSideBar = (SideBar) findViewById(R.id.leftSideBar); leftSideBar.setFantasyListener(new SimpleFantasyListener() { @Override public boolean onHover(@Nullable View view) { return false; } @Override public boolean onSelect(View view) { return false; } @Override public void onCancel() { } }); ``` 1. Hover 是指上面效果图中,高亮的状态,此时手指仍在屏幕上 move. 默认的 hover 处理逻辑是设置 view 的 pressed 状态为 true. 重写 onHover(View) 方法返回 true 可以改写默认逻辑。 2. Select 是指 hover 状态时手指离开屏幕,触发 select 状态。默认的处理逻辑是调用 view 的 onClick 事件。重写 onSelect(View) 方法返回 true 可以改写默认逻辑。 3. Cancel 是指手指离开屏幕时,没有任何 view 触发 select 状态,则为 cancel,无默认处理逻辑。 ### Transformer 项目设计了一个 Transformer 接口,供调用者自定义菜单项的动画效果。使用方法类似于 ViewPager 的 PageTransformer. ``` java class DefaultTransformer implements Transformer { private float maxTranslationX; DefaultTransformer(float maxTranslationX) { this.maxTranslationX = maxTranslationX; } @Override public void apply(ViewGroup sideBar, View itemView, float touchY, float slideOffset, boolean isLeft) { float translationX; int centerY = itemView.getTop() + itemView.getHeight() / 2; float distance = Math.abs(touchY - centerY); float scale = distance / sideBar.getHeight() * 3; // 距离中心点距离与 sideBar 的 1/3 对比 if (isLeft) { translationX = Math.max(0, maxTranslationX - scale * maxTranslationX); } else { translationX = Math.min(0, maxTranslationX - scale * maxTranslationX); } itemView.setTranslationX(translationX * slideOffset); } } ``` ## 感谢 动画效果参考自 dribbble. <https://dribbble.com/shots/2269140-Force-Touch-Slide-Menu> 在此感谢。 另外,demo 里面 MainActivity 的右边栏实现了类似原作的菜单动画效果。具体可以参考相关代码。 ## 许可 Apache License 2.0 ## 联系我 任何相关问题都可以通过以下方式联系我。 1. 提 issue 1. 新浪微博 http://weibo.com/mzule 1. 个人博客 https://mzule.github.io/ 1. 邮件 "mzule".concat("4j").concat("@").concat("gmail.com")
0
xmuSistone/DragRankSquare
edit personal information which enables users to drag and rank image order
drag grid image-rank tantan viewgroup
# android-drag-square edit personal data which enables users to drag and rank image order 编辑个人资料,图片可拖拽排序。有点像可拖拽的gridView,但是会更流畅。这个demo是探探的个人资料编辑页面,受网上一位朋友的委托,该库模仿了其拖动效果。<br><br> 探探的安卓工程师,应该特别牛逼吧。因为最初时,这种拖拽效果真的无从下手。反编译探探的源代码,发现它做了很严肃的混淆处理。然后用Hierarchy Viewer看了View的层级,这才有了一点点的思路。<br><br> 在代码撰写的过程中,我也踩了不少坑。细看代码深处,或许你会有一丝丝的收获吧。<br><br> 当然,在最初的最初,我搜了不少的draggable gridview的仓库,可惜用起来的时候发现不够流畅、不够灵活。 ### 截图 ![PREVIEW](capture1.gif) ![PREVIEW](capture3.gif) ### Apk下载 [apk download](app-release.apk) (就在该工程之中)
0
jfree/jfreechart
A 2D chart library for Java applications (JavaFX, Swing or server-side).
charts data-visualization java2d javafx swing
JFreeChart ========== Version 2.0.0, not yet released. [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jfree/jfreechart/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.jfree/jfreechart) Overview -------- JFreeChart is a comprehensive free chart library for the Java&#8482; platform that can be used on the client-side (JavaFX and Swing) or the server side, with export to multiple formats including SVG, PNG and PDF. ![JFreeChart sample](http://jfree.org/jfreechart/images/coffee_prices.png) The home page for the project is: http://www.jfree.org/jfreechart JFreeChart requires JDK 11 or later. For Java 8 support, check the `v1.5.x` branch. The library is licensed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 or later. JavaFX ------ JFreeChart can be used with JavaFX via the `JFreeChart-FX` extensions: https://github.com/jfree/jfreechart-fx Demos ----- A small set of demo applications can be found in the following projects here at GitHub: * [JFree-Demos](https://github.com/jfree/jfree-demos "JFree-Demos Project Page at GitHub") * [JFree-FXDemos](https://github.com/jfree/jfree-fxdemos "JFree-FXDemos Project Page at GitHub") A more comprehensive set of demos, plus the JFreeChart Developer Guide, is a reward at most tiers of the [JFree sponsorship](https://github.com/sponsors/jfree) program. Thanks for supporting the JFree projects! For Developers -------------- ### Using JFreeChart To use JFreeChart in your projects, add the following dependency to your build tool: <dependency> <groupId>org.jfree</groupId> <artifactId>jfreechart</artifactId> <version>1.5.3</version> </dependency> ### Building JFreeChart You can build JFreeChart using Maven by issuing the following command from the root directory of the project: mvn clean install The build requires JDK 11 or later. ### Migration When migrating from JFreeChart 1.0.x to JFreeChart 1.5.0, please be aware of the following API changes: * all the classes from JCommon that are used by JFreeChart have integrated within the JFreeChart jar file within a different package than before (you will need to change your imports); * many methods `getBaseXXX()/setBaseXXX()` have been renamed `setDefaultXXX()/getDefaultXXX()`; * the `ChartUtilities` class has been renamed `ChartUtils`; * all the classes relating to pseudo-3D charts have been removed, as much better 3D charts are offered by [Orson Charts](https://github.com/jfree/orson-charts) so we prefer not to maintain the pseudo-3D chart code within JFreeChart; * the `SegmentedTimeline` class has been removed due to being (a) complex, (b) not always being correct and, as a result, generating too many support requests; * the `org.jfree.chart.utils.ParamChecks` class has been renamed `org.jfree.chart.utils.Args`. Please refer to [Issue 66](https://github.com/jfree/jfreechart/issues/66) for additional info. History ------- ##### Version 2.0 (not yet released) - use `ThreadLocal` for calendars in time series datasets ([#171](https://github.com/jfree/jfreechart/pull/171)); - added `valueVisible` flag to `MeterPlot` ([#231](https://github.com/jfree/jfreechart/pull/231)); - modify buffer in `ChartPanel` to handle high DPI displays ([#170](https://github.com/jfree/jfreechart/issues/170)); - add options to control pan vs zoom in `ChartPanel` ([#172](https://github.com/jfree/jfreechart/pull/172)); - observe series visibility flags in `ClusteredXYBarRenderer` ([#89](https://github.com/jfree/jfreechart/pull/89)); - observe axis visibility flag in `PeriodAxis` ([#198](https://github.com/jfree/jfreechart/issues/198)); - fix for exception on extreme zoom on `NumberAxis` (bug #64); - fix tick label font for `LogAxis` with number format override ([#98](https://github.com/jfree/jfreechart/issues/98)); - remove alpha channel from copy-to-clipboard (fixes bug #182); - apply rendering hints to overlays - fixes bug #187; - modify `TextTitle` to throw `IllegalArgumentException` rather than `NullPointerException` ([#205](https://github.com/jfree/jfreechart/issues/205)); - fix bugs on crosshair labels ([#189](https://github.com/jfree/jfreechart/pull/189), [#194](https://github.com/jfree/jfreechart/pull/194)); - removed `ObjectUtils` class ([#163](https://github.com/jfree/jfreechart/pull/163)); - removed unused `URLUtilities` class ([#162](https://github.com/jfree/jfreechart/pull/162)) - fixed `LayeredBarRenderer` (bugs [#169](https://github.com/jfree/jfreechart/issues/169) and [#175](https://github.com/jfree/jfreechart/issues/175)); - minor fix for `DefaultPieDataset` (bugs [#212](https://github.com/jfree/jfreechart/issues/212)) - fix `isJFreeSVGAvailable()` method (bugs [#207](https://github.com/jfree/jfreechart/issues/207)) - add new methods to access maps for datasets, renderers and axes in plots ([#201](https://github.com/jfree/jfreechart/issues/201)); - update French translations (bug #186); - fix "Save_as" entries in localisation files (bug #184); - add flags for visibility of outliers in `BoxAndWhiskerRenderer` ([#79](https://github.com/jfree/jfreechart/pull/79)); - added generics; - `DefaultIntervalCategoryDataset` no longer allows null keys in constructor (this is a consequence of introducing generics); - update required JDK to version 11. ##### Version 1.5.0 (5 November 2017) - all JavaFX classes moved to a separate project; - added cleaner method to create histograms in `ChartFactory`; - JCommon removed as a dependency, and required classes incorporated directly (including package rename); - pull request #4 improvements to `XYStepRenderer`; - bug #36 fix for crosshairs with multiple datasets / axes; - bug #25 fix for `DateAxis.previousStandardDate()` method; - bug #19 fix for default time zone in `SegmentedDateAxis`; - SourceForge #1147 improve performance of `CategoryPlot` mapping datasets to axes; - moved SWT code out into separate projects; - moved demo programs to a separate project; - dropped the Ant build; ##### Version 1.0.19 (31-Jul-2014) - fixed clipping issues for combined plots in JavaFX; - fixed a memory leak in the new JavaFX `ChartCanvas` class; - `CombinedDomainXYPlot` and `CombinedRangeXYPlot` now take into account the pannable flags in the subplots; - `FastScatterPlot` panning direction is corrected; - added rendering hints to sharpen gridlines and borders in most output formats; - JFreeSVG updated to version 2.0; - included a preview of JSFreeChart, a 2D chart library written in JavaScript that is conceptually similar to JFreeChart but runs directly in a web browser. ##### Version 1.0.18 (3-Jul-2014) - added JavaFX support via `FXGraphics2D`; - improved `LogAxis` labelling; - improved numeric tick labelling; - center text support in `RingPlot`; - `stepPoint` attribute in the `XYStepAreaRenderer`; - other minor improvements and bug fixes. ##### Version 1.0.17 (22-Nov-2013) - Enhanced `XYSplineRenderer` with new area fill (contributed by Klaus Rheinwald); - added a notify flag to all datasets that extend `AbstractDataset`; - extended `TimeSeriesCollection` to validate `TimeSeries` keys for uniqueness; - added a new `DirectionalGradientPaintTransformer` (by Peter Kolb); - updated `OHLCSeries`; - added `HMSNumberFormat`; - updated JCommon to version 1.0.21 (includes rotated text improvements) and fixed some minor bugs. ###### Bug Fixes - 977 : Multithreading issue with `DateAxis`; - 1084 : `BorderArrangement.add()` possible `ClassCastException`; - 1099 : `XYSeriesCollection.removeSeries(int)` does not deregister listener; - 1109 : `WaterfallBarRenderer` uses wrong color for diff 0. ##### Version 1.0.16 (13-Sep-2013) *** THIS RELEASE REQUIRES JDK/JRE 1.6.0 OR LATER. *** - Provided subscript/superscript support for axis labels (via `AttributedString`); - new axis label positioning options; - simplified `ChartFactory` methods; - added new methods to `DatasetUtilities` to interpolate y-values in `XYDatasets`; - added URLs to labels on `CategoryAxis`; - seamless integration with JFreeSVG (http://www.jfree.org/jfreesvg/) and OrsonPDF (http://www.object-refinery.com/pdf/); - improved the consistency of the `SWTGraphics2D` implementation; All the JUnit tests have been upgraded to JUnit 4. ###### Bug Fixes - 1107 : Fixed TimeZone issue in `PeriodAxis`; Also fixed a line drawing issue with the `StackedXYAreaRenderer`, and a memory leak in the SWT `ChartComposite` class. ##### Version 1.0.15 (4-Jul-2013) - Added support for non-visible series in `XYBarRenderer`; - minor gridlines in `PolarPlot`; - legend item ordering; - chart editor enhancements; - updates to `StandardDialScale`; - localisation files for Japanese; - refactored parameter checks. This release also fixes a minor security flaw in the `DisplayChart` class, detected and reported by OSI Security: http://www.osisecurity.com.au/advisories/jfreechart-path-disclosure ###### Patches - 3500621 : `LegendTitle` order attribute (by Simon Kaczor); - 3463807 : `ChartComposite` does not dispose popup (by Sebastiao Correia); - 3204823 : `PaintAlpha` for 3D effects (by Dave Law); ###### Bug Fixes - 3561093 : Rendering anomaly for `XYPlots`; - 3555275 : `ValueAxis.reserveSpace()` problem for axes with fixed dimension; - 3521736 : `DeviationRenderer` optimisation (by Milan Ramaiya); - 3514487 : `SWTGraphics2D` `get/setStroke()` problem; - 3508799 : `DefaultPolarItemRenderer` does not populate `seriesKey` in `LegendItem`; - 3482106 : Missing text in `SWTGraphics2D` (by Kevin Xu); - 3484408 : Maven fixes (Martin Hoeller); - 3484403 : `DateAxis` endless loop (by Martin Hoeller); - 3446965 : `TimeSeries` calculates range incorrectly in `addOrUpdate()`; - 3445507 : `TimeSeriesCollection.findRangeBounds()` regression; - 3425881 : `XYDifferenceRenderer` fix (by Patrick Schlott/Christoph Schroeder); - 2963199 : SWT print job (by Jonas Rüttimann); - 2879650 : Path disclosure vulnerability in `DisplayChart` servlet; Also fixed a rendering issue for polar charts using an inverted axis. ##### Version 1.0.14 (20-Nov-2011) This release contains: - support for multiple and logarithmic axes with `PolarPlot`; - optional drop-shadows in plot rendering; - fitting polynomial functions to a data series; - some performance improvements in the `TimeSeriesCollection` class; - mouse wheel rotation of pie charts; - improved Maven support. ###### Patches - 3435734 : Fix lines overlapping item labels (by Martin Hoeller); - 3421088 : Bugfix for misalignment in `BoxAndWhiskerRenderer`; - 2952086 : Enhancement for finding bounds in `XYZDatasets`; - 2954302 : `CategoryPointerAnnotation` line calculation; - 2902842 : `HistogramDataset.addSeries()` fires change change event (by Thomas A Caswell); - 2868608 : Whisker width attribute for `BoxAndWhiskerRenderer` (by Peter Becker); - 2868585 : Added `useOutlinePaint` flag for `BoxAndWhiskerRenderer` (by Peter Becker); - 2850344 : `PolarPlot` enhancements (by Martin Hoeller); - 2795746 : Support for polynomial regression; - 2791407 : Fixes for `findRangeBounds()` in various renderers. ###### Bug Fixes - 3440237 : Shadows always visible; - 3432721 : `PolarPlot` doesn't work with logarithmic axis; - 3433405 : `LineChart3D` - Problem with Item Labels; - 3429707 : `LogAxis` endless loop; - 3428870 : Missing argument check in `TextAnnotation`; - 3418287 : `RelativeDateFormatTest.java` is locale dependent; - 3353913 : Localisation fixes for `ChartPanel`, `CompassPlot` and `PiePlot3D`; - 3237879 : `RingPlot` should respect `getSectionOutlineVisible()`; - 3190615 : Added missing `clear()` method in `CategoryTableXYDataset`; - 3165708 : `PolarChartPanel` localisation fix; - 3072674 : Bad handling of `NaN` in `DefaultStatisticalCategoryDataset`; - 3035289 : `StackedXYBarRenderer` should respect series/item visible flags; - 3026341 : Check for null in `getDomain/RangeBounds()` for `XYShapeRenderer`; - 2947660 : `AbstractCategoryRenderer` fix null check in `getLegendItems()`; - 2946521 : `StandardDialScale` check `majorTickIncrement` argument; - 2876406 : `TimeTableXYDataset` should support `Comparable` for series keys; - 2868557 : `BoxAndWhiskerRenderer` should fire change event in `setMedianVisible()`; - 2849731 : For `IntervalCategoryDataset` and `IntervalXYDataset`, fix `iterateRangeBounds()` in `DatasetUtilities`; - 2840132 : `AbstractXYItemRenderer` `drawAnnotations` doesn't set renderer index; - 2810220 : Offset problem in `StatisticalBarRenderer`; - 2802014 : Dial value border too small; - 2781844 : `XYPointerAnnotation` arrow drawing; - 1937486 : `AreaRenderer` doesn't respect `AreaRendererEndType.LEVEL`; Also fixed: - use of simple label offset in `PiePlot`; - cached `minY` and `maxY` in `TimeSeries.createCopy()`; - scaling issues for charts copied to the clipboard; - use of timezone in `TimeTableXYDataset` constructor; - duplicate series names in `XYSeriesCollection`; - `HistogramDataset` fires a change event in `addSeries()`; - check visibility of main chart title before drawing it; - fixed serialization of `PowerFunction2D`, `NormalDistributionFunction2D`, and `LineFunction2D`; - item label positioning for the `AreaRenderer` class when the plot has an horizontal orientation. ##### Version 1.0.13 (17-Apr-2009) > SPECIAL NOTICE: There will be a birds-of-a-feather session for JFreeChart at this year's JavaOne conference in San Francisco. The session is scheduled for 6.45pm to 7.35pm on Wednesday 3 June. This release contains: - updates to the `ChartPanel` class to support copying charts to the clipboard, panning and mouse-wheel zooming, and an overlay mechanism that supports crosshairs; - enhancements to the auto-range calculation for axes, providing the ability to use subranges only and also to skip hidden series; - updates for many of the `CategoryItemRenderer` implementations to ensure that they respect the `seriesVisible` flags; - an improvement to the `TimeSeries` class so that it is no longer necessary to specify the time period type in the constructor; - a new `SamplingXYLineRenderer` for improving the performance of time series charts with large datasets; - the `XYSeries/XYSeriesCollection` classes now cache the minimum and maximum data values to improve the performance of charts with large datasets; - entities are now created for the chart, data area and axes, allowing mouse clicks to be detected for these regions; - added a bar alignment factor to the `XYBarRenderer` class; - a new `errorIndicatorStroke` field for the `StatisticalLineAndShapeRenderer` and `XYErrorRenderer` classes; - added a new `HeatMapDataset` interface, `DefaultHeatMapDataset` implementation, and a `HeatMapUtilities` class to make it easier to create heat map charts; - there is a new flag to allow an `XYDataImageAnnotation` to be included in the automatic range calculation for the axes; - additional attributes in the `XYTextAnnotation` class; - added a `sampleFunction2DToSeries()` method to the `DatasetUtilities` class; - some changes to the `ChartPanel` class that help to work around a regression in JRE 1.6.0_10 relating to drawing in XOR mode. Regarding this final point: * the default value for the `useBuffer` flag has changed to true, which means that all charts will, by default, be rendered into an off-screen image before being displayed in the `ChartPanel`; * the zoom rectangle is drawn using XOR mode *only* when the `useBuffer` flag has been set to false. For most usage, this should improve performance (but at the cost of using more memory for each `ChartPanel` used in your application); ###### Bug Fixes - 2690293 : Problem with Javascript escape characters; - 2617557 : `StandardDialScale` ignored `tickLabelPaint`; - 2612649 : `Stroke` selection in plot property editor; - 2583891 : `SWTGraphics2D.fillPolygon()` not implemented; - 2564636 : `Month` constructor ignores Locale; - 2502355 : `ChartPanel` sending multiple events; - 2490803 : `PeriodAxis.setRange()` method doesn't take into account that the axis displays whole periods; In addition, a bug in the `SlidingCategoryDataset` class has been fixed, the correct outline paint is now used by `GradientXYBarPainter`, a new method has been added to the `ImageMapUtilities` class to escape special characters in Javascript strings to avoid problems with the OverLIB and DynamicDrive tooltips, and there are some important fixes in the `LogAxis` class. This release passes 2110 JUnit tests (0 failures) on JRE 1.6.0_12. ##### Version 1.0.12 (31-Dec-2008) This release adds - support for minor tick marks; - mapping datasets to more than one axis; - an important fix for the `XYSeries` class (relating to the `addOrUpdate()` method); - plus numerous other bug fixes. This release passes 1996 JUnit test (0 failures) on JRE 1.6.0_10. ###### API Adjustments - `CategoryPlot` : added `mapDatasetToDomainAxes()` and `mapDatasetToRangeAxes()` methods; - `Month` : added a new constructor `Month(Date, TimeZone, Locale)` and deprecated `Month(Date, TimeZone)`; - `Quarter` : added a new constructor `Quarter(Date, TimeZone, Locale)` and deprecated `Quarter(Date, TimeZone)`; - `XYPlot` : added `mapDatasetToDomainAxes()` and `mapDatasetToRangeAxes()` methods; - `Year` : added a new constructor `Year(Date, TimeZone, Locale)` and deprecated `Year(Date, TimeZone)`; ###### Bug Fixes - 2471906 : `XYAreaRenderer` with dashed outline - performance problem; - 2452078 : `StackedAreaChart` has gaps; - 2275695 : `NullPointerException` for `SubCategoryAxis` on plot with null dataset; - 2221495 : `XYLineAnnotation` with dashed stroke; - 2216511 : `SWTBarChartDemo1` throws `RuntimeException`; - 2201869 : `DateAxis` tick label position error; - 2121818 : Label link lines for very thin `RingPlot`; - 2113627 : `XYStepRenderer` item labels; - 1955483 : `XYSeries.addOrUpdate()` problem. Also fixed `StackedXYBarRenderer` which was ignoring the `shadowsVisible` attribute. ##### Version 1.0.11 (18-Sep-2008) This release features: - a new chart theming mechanism to allow charts to be restyled conveniently; - a new `BarPainter` mechanism to enhance the appearance of bar charts; - a new `XYShapeRenderer` class; - a scaling facility for the `XYDrawableAnnotation` for drawing images within specific data coordinates; - some new classes (`XYTaskDataset`, `XYDataImageAnnotation` and `XYTitleAnnotation`); - a modification to the `Year` class to support an extended range; - various bug fixes and API improvements. There is an important bug fix for the `StackedBarRenderer3D` class (see bug 2031407). This release passes 1,961 JUnit tests (0 failures) on JRE 1.6.0_07. ###### API Adjustments - `AbstractRenderer` - added `clearSeriesPaints()` and `clearSeriesStrokes()` methods; - `BarRenderer` - added `shadowPaint` attribute; - `CategoryAxis` - added `getCategoryMiddle()` method; - `CategoryPlot` - added `getRendererCount()` method; - `ChartFactory` - added `get/setChartTheme()` methods; - `ChartPanel` - increased default maximum drawing width and height; - `ChartTheme` - new interface; - `ChartUtilities` - added `applyCurrentTheme()` method; - `CompositeTitle` - added `backgroundPaint` attribute; - `GradientBarPainter` - new class; - `LegendTitle` - added `getWrapper()` method; - `OHLCSeriesCollection` - added `xPosition` attribute; - `PaintScaleLegend` - new subdivisions field; - `PiePlot` - added `autoPopulate` flags, and methods to clear section attributes; - `Plot` - added `setDrawingSupplier()` method; - `RegularTimePeriod` - the `DEFAULT_TIME_ZONE` field has been deprecated in this release; - `RelativeDateFormat` - added methods to control formatting of hours and minutes - see patch 2033092; - `StandardChartTheme` - new class; - `XYItemRendererState` - new methods; - `XYPlot` - added `getRendererCount()` method; - `XYShapeRenderer` - new class; - `XYTaskDataset` - new class. ###### Patches - 1997549 : Status calls to `XYItemRendererState` [Ulrich Voigt]; - 2006826 : `CompositeTitle` drawing fix; - 2033092 : Additional formatters for `RelativeDateFormat` [Cole Markham]; ###### Bug Fixes - 1994355 : `ChartComposite` listener type; - 2031407 : Incorrect rendering in `StackedBarRenderer3D`; - 2033721 : `WaferMapRenderer`; - 2051168 : No key in `LegendItemEntity` for pie charts; Also fixed drawing of alternate grid bands in `SymbolAxis`, the `totalWeight` calculation in the `CombinedXXXPlot` classes, a `NullPointerException` in the `XYPlot` class when drawing quadrants, outline visibility in the `CategoryPlot` class, and auto-range calculations with `XYBarRenderer`. ##### Version 1.0.10 (8-Jun-2008) This release contains various bug fixes and minor enhancements to JFreeChart. - PiePlot labelling has been enhanced (new curve options, and more robust bounds checking); - The BoxAndWhiskerRenderer now has a maximumBarWidth attribute; - the XYStepRenderer has a new stepPoint attribute; - The RelativeDateFormat class has new options; - There are new dataset classes (SlidingCategoryDataset and SlidingGanttDataset) that permit a subset of categories to be plotted, and allow charts based on these datasets to simulate scrolling. - There is a new ShortTextTitle class. This release passes 1,929 JUnit tests (0 failures) on JRE 1.6.0_03. ###### API Adjustments: - BoxAndWhiskerRenderer - added maximumBarWidth attribute (see patch 1866446); - ChartPanel - the zoomPoint attribute has been changed from Point to Point2D; - DatasetUtilities - iterateCategoryRangeBounds() is deprecated, the method has been renamed iterateRangeBounds(CategoryDataset) for consistency; - DefaultKeyedValue - the constructor now prevents a null key; - LogFormat - now has a 'powerLabel' attribute; - ShortTextTitle - a new title class; - SlidingCategoryDataset - new class; - SlidingGanttDataset - new class; - TimeSeriesCollection - getSeries(String) changed to getSeries(Comparable); - XIntervalSeriesCollection - added series removal methods; - YIntervalSeriesCollection - added series removal methods; - XYIntervalSeriesCollection - added series removal methods; `PublicCloneable` is now implemented by a number of classes that didn't previously implement the interface - this should improve the reliability of chart cloning. ###### Patches - 1943021 : Fix for MultiplePiePlot [Brian Cabana]; - 1925366 : Speed improvement for DatasetUtilities [Rafal Skalny]; - 1918209 : LogAxis createTickLabel() changed from private to protected [Andrew Mickish]; - 1914411 : Simplification of plot event notification [Richard West]; - 1913751 : XYPlot and CategoryPlot addMarker() methods with optional notification [Richard West]; - 1902418 : Bug fix for LogAxis vertical labels [Andrew Mickish]; - 1901599 : Fixes for XYTitleAnnotation [Andrew Mickish]; - 1891849 : New curve option for pie chart label links [Martin Hilpert]; - 1874890 : Added step point to XYStepRenderer [Ulrich Voigt]; - 1873328 : Enhancements to RelativeDateFormat [Michael Siemer]; - 1871902 : PolarPlot now has angleTickUnit attribute [Martin Hoeller]; - 1868745 : Fix label anchor points on LogAxis [Andrew Mickish]; - 1866446 : Added maximumBarWidth to BoxAndWhiskerRenderer [Rob Van der Sanden]; ###### Bug Fixes - 1932146 - PeriodAxis.setRange() doesn't notify listeners; - 1927239 - Fix calculation of cumulative range; - 1926517 - Bugs in data range calculation for combined plots; - 1920854 - PiePlot3D labels drawn multiple times; - 1897580 - Fix for DefaultIntervalCategoryDataset; - 1892419 - Wrong default for minor tick count in LogAxis; - 1880114 - VectorRenderer doesn't work for horizontal plot orientation; - 1873160 - DialPlot clipping issues; - 1868521 - Problem saving charts to JPEG format; - 1864222 - Error on TimeSeries createCopy() method; The `DatasetUtilities.sampleFunction2D()` has been changed to sample the correct number of points - you should check any code that calls this method. The `XYBlockRenderer` class now generates entities. Bugs in the `removeDomainMarker()` and `removeRangeMarker()` methods in the `CategoryPlot` and `XYPlot` classes have been fixed. A bug in the `TimePeriodValues` range calculation has been fixed. Fixes were applied to the `clone()` methods in the `TaskSeries` and `TaskSeriesCollection` classes. ###### New Experimental Features Two new classes `CombinedCategoryPlot` and `CombinedXYPlot` have been added to the 'experimental' source tree - these were contributed by Richard West (see patch 1924543). ##### Version 1.0.9 (4-Jan-2008) This release contains an important security patch as well as various bug fixes and minor enhancements. Regarding the security patch, please see the following advisory: http://www.rapid7.com/advisories/R7-0031.jsp Note that the fix incorporated in the special JFreeChart 1.0.8a release was flawed in that it broke the URLs in the HTML image maps generated by JFreeChart. Further amendments have been made in this release to fix this problem. ###### API Adjustments A number of classes have new methods. Nothing has been removed or deprecated: - HashUtilities - added hashCode() methods for BooleanList, PaintList and StrokeList; - ImageMapUtilities - added htmlEscape(String); - IntervalMarker - added new constructor; - Range - added intersects(Range) and scale(Range, double); - TextTitle - added protected methods arrangeNN(), arrangeFN() and arrangeRN(); - XYDataItem - added getXValue() and getYValue() methods; - XYPlot - added setFixedDomainAxisSpace(AxisSpace, boolean) and setFixedRangeAxisSpace(AxisSpace, boolean); - XYSeriesCollection - added getSeries(Comparable) method. ###### Bug Fixes - 1852525 - CandlestickChart.getCategoryPlot() - ClassCastException; - 1851416 - testGetFirstMillisecondWithTimeZone fails in 1.0.8a; - 1849333 - 1.0.8a breaks URLs in HTML image maps; - 1848961 - GroupedStackedBarRenderer works only for primary dataset; - 1846063 - Endless loop in paint of XYPlot; - 1840139 - Cross-site scripting vulnerabilities in image map code; - 1837979 - Background image not shown with SWT; - 1460195 - ChartEntity.getImageMapAreaTag() needs nohref; - 1400917 - OverLIBToolTipTagFragmentGenerator not escaping single quote; - 1363043 - Escape Image Map Data; - 1178601 - AbstractRenderer.hashcode() method returns the same value; In addition, a bug in the constructor for the Week class has been fixed. ##### Version 1.0.8 (23-Nov-2007) This release is primarily a bug fix release: - a problem with pie chart labeling; - a regression in the `DefaultCategoryDataset` class (and underlying `KeyedValues2D` class); - a cloning bug in the `TimeSeries` class. In addition: - the `StatisticalBarRenderer` class has a new `errorIndicatorStroke` field and has been updated to support gradients; - the `StandardDialScale` has had some missing accessor methods implemented; - an override field in the `StandardXYItemRenderer` class has been deprecated; - some warnings reported by FindBugs 1.3.0 have been addressed. ##### Version 1.0.7 (14-Nov-2007) This release features - new classes `DialPlot` and `LogAxis` (previously in experimental); - initial support for minor tick units; - a new anchored zooming option for the `ChartPanel` class; - optional simple labeling on pie charts; - improvements to the "statistical" datasets and underlying data structures; - and numerous bug fixes. ###### API Adjustments - `CategoryAxis` - added `getCategorySeriesMiddle()` method; - `CategoryPlot` - added methods to remove markers; - `ChartPanel` - added `defaultDirectoryForSaveAs` attribute; - `DialPlot` - new class, an alternative to `MeterPlot`; - `LogAxis` - new class, an alternative to `LogarithmicAxis`; - `NumberTick` - new constructor that allows specification of the tick type; - `NumberTickUnit` - new constructor to specify the minor tick count; - `SymbolAxis` - new methods `get/setGridBandAlternatePaint()`; - `TickType` - new class; - `TickUnit` - added `minorTickCount` attribute; - `ValueTick` - added `tickType` attribute; - `StandardPieSectionLabelGenerator` - new constructors accepting a Locale; - `StandardPieToolTipGenerator` - likewise; - `CategoryPlot` - added `getRangeAxisIndex()`, `zoomDomainAxes()` and `zoomRangeAxes()` methods; - `FastScatterPlot` - added new zooming methods; - `PiePlot` - new attributes to support simple labeling; - `PlotUtilities` - new class; - `PolarPlot` - added new zooming methods; - `ThermometerPlot` - likewise; - `XYPlot` - added methods to remove markers (patch 1823697--same as for `CategoryPlot`), and added new zooming methods; - `Zoomable` - added new zooming methods to this interface; - `LineAndShapeRenderer` - added `useSeriesOffset` and `itemMargin` attributes; - `MinMaxCategoryRenderer` - implemented `equals()`; - `XYSplineAndShapeRenderer` - new class; - `LogFormat` - new class; - `ChartFactory` - new pie and ring chart creation methods that accept a `Locale`; - `ChartPanel` - added `zoomAroundAnchor` attribute; - `Series` - added `isEmpty()` method; - `BoxAndWhiskerItem` - new convenience constructor; - `DefaultBoxAndWhiskerCategoryDataset` - new remove methods; - `DefaultStatisticalCategoryDataset` - likewise; - `MeanAndStandardDeviation` - added new value accessor methods; - `TimeTableXYDataset` - added `clear()` method; - `Week` - added new constructor; - `KeyedObjects` - added `insertValue()` and `clear()` methods; - `KeyedObjects2D` - added `clear()` method. ###### Patches - 1823724 - updated `XYDifferenceRenderer` to support item labels; - 1827829 - fixed possible `NullPointerException` in `XYBarRenderer`; ###### Bug Fixes - 1767315 - `GrayPaintScale.getPaint()` uses wrong value; - 1775452 - Inverted `XYBarRenderer` does not render margins correctly; - 1802195 - `Marker.listenerList` serializable; - 1779941 - `StatisticalBarRenderer` NPE; - 1766646 - `XYBlockRenderer` can't handle empty datasets; - 1763413 - `PeriodAxis` labels fail to display with setInverted; - 1737953 - Zoom doesn't work on `LogAxis` (Demo1); - 1749124 - `JFreeChart` not added as `TitleChangeListener`; ##### Version 1.0.6 (15-Jun-2007) This release features: - a new `VectorRenderer` (previously in experimental); - a generalised `XYDifferenceRenderer`; - better support for hotspots on legend items; - improved performance for time series charts displaying subsets of data; - support for `GradientPaint` in plot backgrounds; - plus the usual slew of bug fixes and minor feature additions. ###### API Adjustments - `CategoryItemEntity` - replaced row and column index attributes with row and column key attributes; - `CategoryItemRenderer` - numerous series override settings have been deprecated; - `DefaultPieDataset` - added `insertValues()` method; - `HexNumberFormat` - new class; - `LegendItem` - added dataset and seriesKey attributes; - `Plot` - added new `fillBackground()` method to support `GradientPaint`, and added `is/setOutlineVisible()` methods; - `QuarterDateFormat` - added `GREEK_QUARTERS` field plus a new constructor; - `SimpleHistogramDataset` - added `clearObservations()` and `removeAllBins()` methods; - `TimeSeriesCollection` - added `indexOf()` method; - `URLUtilities` - new class; - `XYItemRenderer` - numerous series override settings have been deprecated; - `XYSeriesCollection` - added indexOf() method. ###### Bug Fixes - 1735508 - `ClusteredXYBarRenderer` fails with inverted x-axis; - 1726404 - `ChartComposite` tooltips; - 1713474 - `StackedBarRenderer3D` doesn't fill shadows; - 1713401 - `StackedBarRenderer3D` doesn't check `drawBarOutline` flag; - 1701822 - `DefaultBoxAndWhiskerCategoryDataset` doesn't follow contracts; - 1698965 - NPE in `CombinedDomainXYPlot`; - 1690994 - `HideSeriesDemo1` does not work; - 1690654 - Bug in `removeValue()` of `DefaultKeyedValues2D`; - 1562701 - `LegendItemEntity` needs dataset index; - 1486299 - Use `URLEncoder.encode()` for URL generators; Plus the following bugs that didn't have entries in the database: - `BarRenderer` - check for series visibility in `getLegendItem()`; - `ChartPanel` - use correct insets for painting chart buffer to screen, update UI for popup menu if LookAndFeel changes; - `DateAxis` - fixed boundary cases for `previousStandardDate()` method; - `LineBorder` - only draw border if area has positive dimensions; - `JFreeChart` - should register as a listener with the default legend; - `StandardXYItemRenderer` - fixed a problem where chart entities are created for non-visible items; - `TimePeriodValuesCollection.getDomainBounds()` now computes the bounds correctly; - `XYLineAndShapeRenderer` - fixed a problem where chart entities are created for non-visible items; - `XYLine3DRenderer` - `equals()` implemented, and serialization fixed; - `XYTitleAnnotation` - fixed `equals()` method; - various resource usage bugs in the experimental `ChartComposite` class; ##### Version 1.0.5 (23-Mar-2007) This release features: - a new `DeviationRenderer` class; - support for item labels in `StackedXYBarRenderer`; - tooltips and URLs in the `CategoryStepRenderer`; and - many bug fixes. ###### API Adjustments - `AbstractCategoryItemRenderer` - added `createState()` method; - `StackedXYBarRenderer` - added `get/setRenderAsPercentages()` methods; - `XYIntervalSeries` - added `getXLowValue()`, `getXHighValue()`, `getYLowValue()` and `getYHighValue()`; - `YIntervalSeries` - added `getYLowValue()` and `getYHighValue()` methods; ###### Bug Fixes - 1681777 - `DefaultCategoryDataset` does not clone data; - 1672552 - Zoom rectangle is lost when the chart is repainted; - 1671645 - `Crosshair` incorrectly positioned in horizontal orientation; - 1669302 - Tick labels in vertical symbol axis; - 1669218 - `CategoryPlot.setDomainAxisLocation()` ignores parameter; - 1667750 - Clip region not restored in `Spider` and `MeterPlot`; - 1663380 - OutputStream not closed; - 1659627 - `IntervalMarker` with `Double.POSITIVE_INFINITY` bound; - 1647269 - `IntervalMarker` with `Double.MAX_VALUE as upper` bound; - 1594477 - `XYBarRenderer` does not render bars on `LogarithmicAxis`; - 1459958 - Log axis zoom function problem; - 880597 - Zooming `ChartPanel` with log axes; - 764561 - Dynamic chart zoom buggy. Also fixed numerous bugs in equals(), cloning and serialization implementations. ##### Version 1.0.4 (9-Feb-2007) This release features: - a new `XYBlockRenderer` class; - URLs for pie chart labels in HTML image maps; - a new dataset implementation for open-high-low-close charts; - support for gradient paint in `ClusteredXYBarRenderer`, `StackedXYBarRenderer` and legend graphics; - a new anchor attribute for `XYImageAnnotation`; - improvements to the experimental SWT support; plus - a number of additions to the API for usability; and - many bug fixes. ###### API Adjustments - `DateAxis` - added `get/setTimeZone()` methods; - `DefaultXYDataset` - now implements `PublicCloneable`; - `StackedXYAreaRenderer2` - added `get/setRoundXValues()` methods; - `StandardXYItemLabelGenerator` - added new constructor; - `StandardXYToolTipGenerator` - added new constructor; - `XYBarDataset` - added `getUnderlyingDataset()` and `get/setBarWidth()` methods; - `XYDifferenceRenderer` - added `roundXCoordinates` attribute; - `XYImageAnnotation` - added an image anchor attribute, a new constructor, and several accessor methods; - `XYSeries` - added `toArray()` method; ###### Bug Fixes - 1654215 - `XYPlot` renderer with no corresponding dataset; - 1652640 - `RangeMarkers` do not update properly; - 1649686 - `Crosshairs` for `StackedXYAreaRenderer`; - 1647749 - `IllegalArgumentException` in `SWTAxisEditor`; - 1644877 - Replacing series data in `DefaultXYDataset`; - 1644010 - `DateAxis.nextStandardDate()` ignores timezone; - 1638678 - `DateAxis` code uses the default calendar; - 1629382 - Tests fail for jfreechart-1.0.3; - 1624067 - `StandardXYToolTipGenerator` missing constructor; - 1616583 - Serialize `ChartDeleter`; - 1612770 - Popup menu in wrong position for SWT `ChartComposite`; - 1611872 - `Minute.previous()` returns null for minute == 0; - 1608371 - Tick labels overlap with custom `NumberFormat`; - 1606205 - Draw shared axis last on combined plots; - 1605207 - `IntervalMarker` exceeds bounds of data area; - 1605202 - `SpiderWebPlot` method access; - 1599652 - Inverted `StackedBar3D` problem; - 1598394 - `XYBarDataset` hiding its proxied object; - 1564967 - Crosshairs on `XYDifferenceRenderer`; - 1245305 - `NullPointerException` in `writeImageMap()`; - 1086307 - Crosshairs on plots with multiple axes. Also fixed numerous bugs in `equals()` and `clone()` methods throughout the API. ##### Version 1.0.3 (17-Nov-2006) This release features: - several new `IntervalXYDataset` implementations; - some significant refactoring of the time period classes (to improve performance and correctness); - modifications to the `PiePlot` class to support reordering of dataset items; - a new event mechanism to allow updating of markers, plus - many other enhancements, bug fixes and documentation updates. A new `DialPlot` implementation has been added to the 'experimental' sources. We are looking for people to test this code and provide feedback, so that we can stabilize the API and add this code to the main JFreeChart API. ###### API adjustments The following adjustments have been made to the API: - `CategoryLabelEntity` - new class; - `CategoryPointerAnnotation` - new class; - `ChartPanel`: added new public method `doEditChartProperties()`; - `ComparableObjectItem`, `ComparableObjectSeries` - new classes; - `CrosshairState`: added several new accessor methods; - `DefaultPieDataset`: added `sortByKeys()` and `sortByValues()` methods; - `Markers`: a change event mechanism has been added to the `Marker` class and its subclasses; - `StackedAreaRenderer`: added `get/setRenderAsPercentages()` methods; - `XIntervalDataItem`, `XIntervalSeries` and `XIntervalSeriesCollection` - new classes; - `XYErrorRenderer`: new class; - `XYInterval`, `XYIntervalDataItem`, `XYIntervalSeries` and `XYIntervalSeriesCollection` - new classes; - `YInterval`, `YIntervalDataItem`, `YIntervalSeries`, `YIntervalSeriesCollection` and `YWithXInterval` - new classes. ###### Bug Fixes - 1578293 - Unused methods in `JDBCXYDataset`; - 1572478 - `BoxAndWhiskerRenderer` potential `NullPointerException`; - 1569094 - `XYStepRenderer` with horizontal orientation; - 1565168 - Crosshair position incorrect; - 1564977 - `DateAxis` missing initial tick label; - 1562759 - `StatisticalLineAndShapeRenderer` constructor ignores arguments; - 1557141 - Bad locale in `ServletUtilities`; - 1550045 - `TimeSeries.removeAgedItems()` method problems; - 1549218 - Chart not displaying when all data values are the same and large; - 1450447 - `Marker.setAlpha()` ignored; Also fixed URL generation for legend items, tick mark positioning on the `DateAxis`, the `equals()` method in the `AreaRenderer` class, hardcoded outline attributes in the `XYBubbleRenderer`, and potential `NullPointerExceptions` in the `ChartPanel` class. ##### Version 1.0.2 (25-Aug-2006) ###### API adjustments The following adjustments have been made to the API (there should be no breakage of applications coded to the 1.0.0 or 1.0.1 API): - `CategoryToPieDataset`: added accessor methods for underlying dataset, extract type and index (feature request 1477915); - `DefaultXYDataset`: New dataset implementation that uses double[] arrays; - `DefaultXYZDataset`: New dataset implementation that uses double[] arrays; - `LegendItemBlockContainer`: New container used in legends (enables legend item entities again); - `MultiplePiePlot`: Added new fields `aggregatedItemsKey` and `aggregatedItemsPaint`, plus accessor methods - see bug 1190647; - `SpiderWebPlot`: Added new fields `toolTipGenerator` and `urlGenerator`, plus accessor methods (see patch 1463455); - `StackedBarRenderer3D`: Added new flag (`renderAsPercentages`), plus accessor methods, that controls whether the data items are displayed as values or percentages. Two new constructors are also added (see patch 1459313); - `XYPolygonAnnotation`: Added new accessor methods. ###### Patches - 1459313 - Add `renderAsPercentages` option to `StackedBarRenderer3D`; - 1462727 - Modify `SpiderWebPlot` to support zero values; - 1463455 - Modify `SpiderWebPlot` to support mouse clicks, tool tips and URLs; ###### Bug Fixes - 1514904 - Background image alpha in `Plot` class; - 1499140 - `ClusteredXYBarRenderer` with margin not drawing correctly; - 1494936 - `LineAndShapeRenderer` generates entity for non-visible item; - 1493199 - NPE drawing `SpiderWebPlot` with null info; - 1480978 - `AbstractPieItemLabelGenerator.clone()` doesn't clone `percentFormat`; - 1472942 - `DateAxis.equals()` broken; - 1468794 - `StatisticalLineAndShapeRenderer` doesn't draw error bars correctly when the plot has a horizontal orientation; - `AbstractCategoryItemRenderer` doesn't check `seriesVisibleInLegend` flag before creating new item; - 1440415 - Bad distribution of pie chart section labels; - 1440346 - Bad manifest entry for JCommon in JFreeChart jar file; - 1435461 - `NumberAxis.equals()` ignores `rangeType` field; - 1435160 - `XYPointerAnnotation.equals()` ignores x and y fields; - 1398672 - `LegendItemEntities` not working; - 1380480 - `StandardXYItemRenderer` problems with `Double.NaN`; - 1190647 - Legend and section color mismatch for `MultiplePiePlot`. ###### Miscellaneous Changes - Updated `CandlestickRenderer`, `CyclicXYItemRenderer`, `HighLowRenderer`, `XYStepAreaRenderer` and `TimeSeriesURLGenerator` to call dataset methods that return double primitive only; - Updated `XYPolygonAnnotation`, adding new accessor methods and fixing problems in the `equals()/hashCode()` methods; - `ChartFactory.createStackedXYAreaChart()` now uses `StackedXYAreaRenderer2`, for better handling of negative values; - Added crosshair support for `XYBarRenderer`. ###### Experimental Code In this release, some new (incomplete) classes have been included in the `org.jfree.experimental.*` namespace. These classes are not part of the standard API, but are included for developers to experiment with and provide feedback on. Hopefully in the future, refined versions of these classes will be incorporated into the main library. PLEASE NOTE THAT THE API FOR THESE CLASSES IS SUBJECT TO CHANGE. ##### Version 1.0.1 (27-Jan-2006) This is primarily a bug fix release. In addition, there are some API adjustments (there should be no breakage of applications coded to the 1.0.0 API). ###### API adjustments - `BarRenderer`: added a new flag (`includeBaseInRange`), plus accessor methods, that controls whether or not the base value for the bar is included in the range calculated by the `findRangeBounds()` method; - `BubbleXYItemLabelGenerator`: new class; - `Range`: added a new method `expandToInclude(Range, double)`, this is used by the `BarRenderer` class; - `TaskSeriesCollection`: added two new methods, `getSeries(int)` and `getSeries(Comparable)`; - `TimeSeriesCollection`: the `domainIsPointsInTime` flag has been deprecated. The flag serves no function now that renderers are used to calculate the domain bounds, so you can safely delete any calls to the `setDomainIsPointsInTime()` method; - `XYPlot`: added a new `getAnnotations()` method; - `XYSeries`: the `update(int, Number)` method has been deprecated and a new method `updateByIndex(int, Number)` has been added; ###### Bug fixes - 1243050 - `XYBarRenderer` doesn't show entire range of values for a `TimeSeriesCollection`; - 1373371 - `XYBubbleRenderer` doesn't support item labels; - 1374222 - `BarRenderer` contains JDK 1.4 specific code; - 1374328 - `LegendItem` serialization problem; - 1377239 - Bad argument checking in `Quarter` constructor; - 1379331 - Incorrect drawing of `TextTitle` at LEFT or RIGHT position; - 1386328 - `RingPlot` entity incorrect; - 1400442 - Inconsistent treatment of null and zero values in `PiePlot`; - 1401856 - Bad rendering for non-zero base values in `BarRenderer`; - 1403043 - `NullPointerException` in `CategoryAxis`; - 1408904 - `NumberAxis3D` assumes `CategoryPlot`; - 1415480 - `XYTextAnnotation` equals() method doesn't check (x, y); ##### Version 1.0.0 (2-Dec-2005) - the first stable release of the JFreeChart class library, all future releases in the 1.0.x series will aim to maintain backward compatibility with this release; ##### Version 1.0.0-rc3 (28-Nov-2005) - the third "release candidate" for version 1.0.0, this release fixes some issues with the 1.0.0-rc2 release (mainly concerning packaging of resource bundles for localisation). - if no significant problems are reported in the next few days, the 1.0.0 "final" release will be posted on 2-Dec-2005. ##### Version 1.0.0-rc2 (25-Nov-2005) - the second "release candidate" for version 1.0.0. If no problems are reported, 1.0.0 "final" will be released on 2-Dec-2005. ##### Version 1.0.0-rc1 (2-Jun-2005) - this is a "release candidate" for version 1.0.0. If no significant API problems are reported, this release will be re-released as version 1.0.0. ##### Version 1.0.0-pre2 (10-Mar-2005) ##### Version 1.0.0-pre1 (29-Nov-2004) ##### Version 0.9.21 (9-Sep-2004) - added new axes: `PeriodAxis` and `ModuloAxis`. - split `org.jfree.data` and `org.jfree.chart.renderer` into subpackages for 'category' and 'xy' charts. - Sun PNG encoder is now used, if available. - a new demo application makes it easier to preview the chart types that JFreeChart can create. - added a new series visibility flag to the `AbstractRenderer` class. - added support for `GradientPaint` in interval markers. ##### Version 0.9.20 (7-Jun-2004) - primarily bug fixes. ##### Version 0.9.19 (28-May-2004) - added methods to `XYDataset` that return double primitives; - removed distinction between "primary" and "secondary" datasets, renderers and axes; - added fixed legend item options to `CategoryPlot` and `XYPlot`; - legend changes by Barek Naveh; - removed Log4j dependency; - many, many bug fixes; ##### Version 0.9.18 (15-Apr-2004) - new legend anchor options; - fixed broken JPEG export; - fixed title size problems; - various other bug fixes; ##### Version 0.9.17 (26-Mar-2004) - pie chart enhancements for labelling, shading and multiple pie charts (2D or 3D) on a single plot; - new `PolarPlot` class added; - `XYSeries` can now be sorted or unsorted; - `createBufferedImage()` method can now scale charts; - domain and range markers now support intervals; - item labels are now supported by some `XYItemRenderers`; - tooltip and item label generators now use `MessageFormat` class; - added new `XYBarDataset` class; - added transparency support to PNG export; - numerous other small enhancements and bug fixes; ##### Version 0.9.16 (09-Jan-2004) - this release contains bug fixes and some minor feature enhancements (title and category label wrapping, legend shape scaling, enhanced performance for the `DefaultTableXYDataset` class); - added Spanish localisation files; ##### Version 0.9.15 (28-Nov-2003) - the focus of this release is bug fixes - quite a number of issues have been resolved, please check the bug database for details; - added a new Wafer Map chart type; - added a cyclic axis; - added localisation files for _ru; ##### Version 0.9.14 (17-Nov-2003) - implemented zooming for the `FastScatterPlot` class; - added item label support for stacked bar charts, and new fall back options for item labels that don't fit within bars; - modified the `CategoryAxis` class to allow additional options for the alignment and rotation of category labels; - addition of the `AxisState` class, used in the drawing of axes to eliminate a bug when multiple threads draw the same axis simultaneously; - provided additional attributes in the `DateTickUnit` class to improve labelling on a segmented `DateAxis`; - added support for `GradientPaint` in bar charts; - updated the `PNGEncoder`; - fixes for tick label positioning on axes; - various Javadoc updates; - numerous bug fixes; ##### Version 0.9.13 (26-Sep-2003) - various enhancements to the stacked area XY charts; - added a completion indicator for the Gantt chart; - range and domain markers can now be placed in the foreground or the background; - more fixes for cloning and serialization; - fixed mouse event bug for combined charts; - fixed bugs in the PngEncoder class; - incorporated .properties files that were missing from the 0.9.12 distribution; ##### Version 0.9.12 (11-Sep-2003) - extended box-and-whisker plots to work with the CategoryPlot class as well as the XYPlot class (based on work by David Browning); - added a new LayeredBarRenderer (by Arnaud Lelievre); - added support for stacked area charts with the XYPlot class (thanks to Richard Atkinson); - improved HTML image map support (thanks to Richard Atkinson); - added localized resources for the chart property editors (thanks to Arnaud Lelievre). Current translations include French and Portugese (thanks to Eduardo Ramalho); - added facility for setting all rendering hints; - improved support for cloning and serialization; - fixed a bug in the XYSeries class that prevented the TableXYDataset from functioning correctly; - improved date axis labelling with segmented time lines; - fixed several bugs in the secondary dataset/axis/renderer code; - fixed bugs in the JDBCCategoryDataset class; - numerous other bug fixes; ##### Version 0.9.11 (8-Aug-2003) - added support for box-and-whisker plots, thanks to David Browning; - lots of bug fixes; ##### Version 0.9.10 (25-Jul-2003) - added support for multiple secondary axes, datasets and renderers; - minor feature enhancements and bug fixes; ##### Version 0.9.9 (10-Jul-2003) PLEASE NOTE THAT MAJOR CHANGES HAVE BEEN MADE IN THIS RELEASE AND ONE OR TWO FEATURES MAY BE BROKEN. PLEASE REPORT BUGS SO THEY CAN BE FIXED FOR THE NEXT RELEASE. - merged the HorizontalCategoryPlot and VerticalCategoryPlot classes, into the CategoryPlot class; - merged the horizontal and vertical axis classes; - merged the horizontal and vertical renderer classes; - CategoryPlot and XYPlot now support both horizontal and vertical orientation via the setOrientation(...) method; - merged horizontal and vertical methods in the ChartFactory class; - created new combined plot classes: CombinedDomainCategoryPlot, CombinedRangeCategoryPlot, CombinedDomainXYPlot and CombinedRangeXYPlot (these can all be drawn with a horizontal or vertical orientation); - Bill Kelemen has enhanced the DateAxis class to handle segmented timelines. This can be used, for example, to skip weekends for daily stock price charts; - Richard Atkinson has updated the ServletUtilities class; - Bryan Scott has added an XYDatasetTableModel class for presenting datasets in a JTable; - modified XYPlot to allow renderers to use multiple passes through the dataset; - added new XYDifferenceRenderer; - added support for colored bands between gridlines in XYPlot; - added new XYDrawableAnnotation class; - added a new attribute to control the order of dataset rendering in a CategoryPlot; - extended the value label mechanism for the renderers, to allow better (per series) control over label generation, positioning and visibility; - CategoryItemTooltipGenerator has been renamed CategoryItemLabelGenerator, since it is now being used to generated item labels as well as tooltips; - there is now support for horizontal stacked 3D bar charts; - added support for range markers against secondary axis in a CategoryPlot; - added labels to domain and range markers; - added a new HistogramDataset class (contributed by Jelai Wang) to make it easier to create histograms with JFreeChart; - moved the DrawingSupplier into the plot class, renderers now reference the supplier from the plot (parent plot for combined and overlaid charts). This means that renderers now share a single DrawingSupplier by default, which simplifies the creation of combined charts; - changed the ColorBarAxis classes that extended the NumberAxis class, to a single ColorBar class that wraps a ValueAxis (may have broken one or two things in the process); - Barak Naveh has contributed new classes MatrixSeries and MatrixSeriesCollection, along with demos: BubblyBubblesDemo.java and BubblyBubblesDemo2.java; - the TextTitle class now has a background paint attribute; - the StandardLegend class now generates LegendEntity objects if a ChartRenderingInfo instance is supplied to the draw(...) method; - extended the CategoryTextAnnotation class to take into account a category anchor point. See the SurveyResultsDemo.java application for an example; - included numerous bug fixes; ##### Version 0.9.8 (24-Apr-2003) - changed package naming from com.jrefinery.* to org.jfree.*; - added new TimePeriodValuesCollection class; - added MIME type code to ServletUtilities class; - reversed the order of PieDataset and KeyedValuesDataset in the class hierarchy; - reversed the order of CategoryDataset and KeyedValues2DDataset in the class hierarchy; - minor bug fixes; ##### Version 0.9.7 (11-Apr-2003) - added a new ValueDataset interface and DefaultValueDataset class, and changed the CompassPlot class to use this instead of MeterDataset; - added DataUtilities class, to support creation of Pareto charts (new demo included); - updated writeImageMap method as suggested by Xavier Poinsard (see Feature Request 688079); - implemented Serializable for most classes (this is likely to require further testing); - incorporated contour plot updates from David M. O'Donnell; - added new CategoryTextAnnotation and XYLineAnnotation classes; - added new HorizontalCategoryAxis3D class contributed by Klaus Rheinwald; Bug fixes: - added a workaround for JVM crash (a JDK bug) in pie charts with small sections (see bug report 620031); - fixed minor bug in HorizontalCategoryPlot constructor (see bug report 702248); - added code to ensure HorizontalNumberAxis3D is not drawn if it is not visible (see bug report 702466); - added small fix for suppressed chart change events (see bug report 690865); - added pieIndex parameter to tooltip and URL generators for pie charts; - fixed bug in getLastMillisecond() method for the Second class and the getFirstMillisecond() method for the Year class (picked up in JUnit tests); - in TextTitle, changed width used for relative spacing to fix bug 703050; ##### Version 0.9.6 (17-Feb-2003) Bug fixes: - fixed null pointer exception in DefaultCategoryDataset; - fixed update problem for PaintTable, StrokeTable and ShapeTable objects; - added methods to control colors in PiePlot (these were inadvertantly removed in the changes made for 0.9.5); - fixed auto-range update problem for secondary axis; - fixed missing category labels in the overlaid category plot; - fixed constructors for symbolic axes; - corrected error in Javadoc generation (Ant script); ##### Version 0.9.5 (6-Feb-2003) PLEASE NOTE THAT MAJOR CHANGES TO THE JFREECHART API HAVE BEEN MADE IN THIS RELEASE! - added support for secondary axes, datasets and renderers; - added new data interfaces (Value, Values, Values2D, KeyedValues and KeyedValues2D) and incorporated these into the existing PieDataset and CategoryDataset interfaces. - modified the CategoryDataset interface to be more symmetrical, data is organised in rows and columns (as before) but can now be accessed by row/column index or row/column key. - added support for reading PieDatasets and CategoryDatasets from XML files. - created separate packages for the axes (com.jrefinery.chart.axis), plots (com.jrefinery.chart.plot) and renderers (com.jrefinery.chart.renderer). - series attributes (paint, outline paint, stroke and shape) are now controlled by the renderer classes using lookup tables. Introduced the DrawingSupplier interface (and DefaultDrawingSupplier class) which is used to populate the lookup tables from a common source (necessary to coordinate complex combined charts). - the chart legend can now display shapes corresponding to series. - moved responsibility for category distribution to the CategoryAxis class, which tidies up the code in the CategoryPlot classes. - gridlines are now controlled by the CategoryPlot and XYPlot classes, not the axes (included in this change is the addition of gridlines for the CategoryPlot domain values). - changed the list of titles in the JFreeChart class to a title and a list of subtitles. - added new renderers for XYPlot (XYBubbleRenderer and YIntervalRenderer). - modified Gantt chart to display sub-tasks. - added ContourPlot class (still experimental) by David M. O'Donnell. - introduced new MovingAverage class. - ChartMouseEvent now includes source chart. - numerous bug fixes. - lots of Javadoc updates. ##### Version 0.9.4 (18-Oct-2002) Added a new stacked area chart (contributed by Dan Rivett) and a compass plot (contributed by Bryan Scott). Updated the ThermometerPlot class. Added a new XYDotRenderer for scatter plots. Modified combined and overlaid plots to use the series colors specified in the sub plot rather than the parent plot (this makes it easier to align the colors in the legend). Added Regression class for linear and power regressions. BasicTimeSeries can now automatically drop "old" data. Some clean-up work in the code for tooltips and the event listener mechanism. Richard Atkinson has incorporated some useful extensions for servlets/JSP developers. Ran Checkstyle and corrected issues reported for most classes. Checkstyle is a free utility that you can download from: http://checkstyle.sourceforge.net Fixed bugs and updated documentation. API changes include: - added tickMarkPaint to Axis constructor (also affects subclasses); - added getLegendItems() to Plot, and deprecated getLegendItemLabels(); - added getLegendItem(int) to XYItemRenderer and CategoryItemRenderer. - most 'protected' member variables have been changed to 'private'. ##### Version 0.9.3 (4-Sep-2002) - Added multiple pie charts based on `CategoryDataset`; - Updated logarithmic axes; - Improved URL support for image map generation; - Moved the `com.jrefinery.data` package from JCommon to JFreeChart. - Added simple framework for chart annotations; - Improved control over renderers; - Duplicate x-values now allowed in `XYSeries`; - Optional category label skipping in category axes; - Added `CategoriesPaint` attribute to `AbstractCategoryItemRenderer`; - Added new attributes to `MeterPlot` class; - Updated 3D pie chart to observe start angle and direction, and also foreground alpha < 1.0; - Improved Javadoc comments; - New demo applications, including: `AnnotationDemo1`, `EventFrequencyDemo`, `JDBCCategoryChartDemo`, `JDBCPieChartDemo`, `JDBCXYChartDemo` and `MinMaxCategoryPlotDemo`. Bug fixes: - negative percentages on `PiePlot`; - added listener notification to `setXXXAxis(...)` methods; - fixed `DomainInfo` method name clash; - added `DomainIsPointsInTime` flag to `TimeSeriesCollection` to give better control over auto range on axis for time series charts; - axis margins for date axes are no longer hard-coded; - fix for ordering of categories in `JdbcCategoryDataset`; - added check for `null` axis in mouse click handler. The CVS repository at SourceForge has also been restructured to match the distribution directory layout. ##### Version 0.9.2 (28-Jun-2002) - `PiePlot` now has `startAngle` and `direction` attributes; - added support for image map generation; - added a new `Pie3DPlot` class; - added label drawing code to bar renderers; - added optional range markers to horizontal number axis; - added bar clipping to avoid PRExceptions in bar charts; - `JFreeChartDemo` has been modified and now includes examples of the dial and thermometer plots. ######Bug fixes - auto range for `VerticalNumberAxis` when zero is forced to be included in the range; - fixed null pointer exception in `StackedVerticalBarRenderer3D`; - added get/set methods for min/max chart drawing dimensions in `ChartPanel`; - `HorizontalIntervalBarRenderer` now handles single category; - `verticalTickLabels` now possible in `HorizontalNumberAxis3D`; - removed unnecessary imports; ##### Version 0.9.1 (14-Jun-2002) Bug fixes and Javadoc updates. - fixed auto range calculation for category plots; - fixed event notification for `XYPlot`; - fixed auto axis range for Gantt charts; - check for null popup menu in `ChartPanel.mouseDragged`; - new checks for null info in renderers; - range markers now drawn only if in visible axis range; ##### Version 0.9.0 (7-Jun-2002) - new plots including an area chart, a horizontal 3D bar chart, a Gantt chart and a thermometer chart; - combination plots have been reworked to provide a simpler framework, and extends to allow category plots to be combined; - there is now a facility to add a `ChartMouseListener` to the `ChartPanel` (formerly `JFreeChartPanel`); - an interactive zooming feature (experimental at this point) is now available for `XYPlots`; - a new Polish translation has been added; - several fixes have been applied to the default tool tip generators; - a workaround has been added to fix the alignment between time series charts and the date axis; - there are some improvements to the `VerticalLogarithmicAxis` class, and now a corresponding `HorizontalLogarithmicAxis` class; - additional demonstration applications have been added; - fixed the popup menu bug. ##### Version 0.8.1 (5-Apr-2002) - Localised resource bundles for French, German and Spanish languages (thanks to Anthony Boulestreau, Thomas Meier and Hans-Jurgen Greiner for the translations); - an area XY plot and meter chart contributed by Hari; - symbol charts contributed by Anthony Boulestreau; - an improved `CandleStickRenderer` class from Sylvain Vieujot; - updated servlet code from Bryan Scott; - `XYItemRenderers` now have a change listener mechanism and therefore do not have to be immutable; - additional demonstration applications for individual chart types; - minor bug fixes. ##### Version 0.8.0 (22-Mar-2002) - all the category plots are now controlled through the one class (`CategoryPlot`) with plug-in renderers; - added a `ResourceBundle` for user interface items that require localisation; - added a logarithmic axis class contributed by Mike Duffy and some new JDBC and servlet code contributed by Bryan Scott; - updated the JCommon class library to improve handling of time periods in different time zones. ##### Version 0.7.4 (6-Mar-2002) - bug fixes in the JCommon Class Library; - various Javadoc comment updates; - some minor changes to the code; - added new domain name (http://www.object-refinery.com) in the source headers. ##### Version 0.7.3 (14-Feb-2002) Bug fixes. ##### Version 0.7.2 (8-Feb-2002) - integrated the `WindPlot` code from Achilleus Mantzios; - added an optional background image for the `JFreeChart` class; - added an optional background image for the `Plot` class; - added alpha-transparency for the plot foreground and background; - added new pie chart label types that show values; - fixed a bug with the legend that results in a loop at small chart sizes; - added some tooltip methods that were missing from the previous version; - changed the `Insets` class on chart titles to a new `Spacer` class that will allow for relative or absolute insets (the plan is to eventually replace all `Insets` in the `JFreeChart` classes); - fixed a bug in the `setAutoRangeIncludesZero` method of the `NumberAxis` class; - added the instructions that were missing from the copies of the GNU Lesser General Public Licence included with JFreeChart. ##### Version 0.7.1 (25-Jan-2002) - added tooltips, crosshairs and zooming functions, thanks to Jonathan Nash and Hans-Jurgen Greiner for contributing the code that these features are based on; - moved the combination charts into the package `com.jrefinery.chart.combination`; - made a number of other small API changes and fixed some bugs; - removed the Javadoc HTML from the download to save space (you can regenerate it from the source code if you need it). ##### Version 0.7.0 (11-Dec-2001) - new combination plots developed by Bill Kelemen; - added Wolfgang Irler's servlet demo to the standard download; - the About window in the demo application now includes a list of developers that have contributed to the project. ##### Version 0.6.0 (27-Nov-2001) - new plots including scatter plot, stacked bar charts and 3D bar charts; - improved pie chart; - data interfaces and classes moved to the JCommon class library; - new properties to control spacing on bar charts; - new auto-tick mechanism; - `JFreeChartPanel` now incorporates buffering, and popup menu; - Javadocs revised; - fixed numerous bugs from version 0.5.6; - demo application updated. CONTRIBUTORS ------------ JFreeChart wouldn't be half the library that it is today without the contributions (large and small) that have been made by the developers listed below: - Eric Alexander - Richard Atkinson - David Basten - David Berry - Chris Boek - Zoheb Borbora - Anthony Boulestreau - Jeremy Bowman - Nicolas Brodu - Jody Brownell - David Browning - Soren Caspersen - Thomas A Caswell - Chuanhao Chiu - Brian Cole - Pascal Collet - Martin Cordova - Paolo Cova - Greg Darke - Mike Duffy - Don Elliott - Rune Fauske - Jonathan Gabbai - Serge V. Grachov - Daniel Gredler - Joao Guilherme Del Valle - Hans-Jurgen Greiner - Nick Guenther - Aiman Han - Cameron Hayne - Martin Hoeller (xS+S) - Jon Iles - Wolfgang Irler - Sergei Ivanov - Nina Jeliazkova - Adriaan Joubert - Darren Jung - Xun Kang - Bill Kelemen - Norbert Kiesel - Petr Kopac - Gideon Krause - Dave Law; - Pierre-Marie Le Biot - Simon Legner - Arnaud Lelievre - Wolfgang Lenhard - Leo Leung - David Li - Yan Liu - Tin Luu - Craig MacFarlane - Achilleus Mantzios - John Matthews - Thomas Meier - Jim Moore - Jonathan Nash - Barak Naveh - David M. O'Donnell - Krzysztof Paz - Eric Penfold - Tomer Peretz - Xavier Poinsard - Andrzej Porebski - Viktor Rajewski - Eduardo Ramalho - Michael Rauch - Klaus Rheinwald - Cameron Riley - Dan Rivett - Lukasz Rzeszotarski - Scott Sams - Michel Santos - Thierry Saura - Patrick Schlott - Andreas Schneider - Christoph Schroeder - Jean-Luc SCHWAB - Bryan Scott - Tobias Selb - Darshan Shah - Mofeed Shahin - Michael Siemer - Pady Srinivasan - Greg Steckman - Roger Studner - Gerald Struck - Irv Thomae - Eric Thomas - Rich Unger - Daniel van Enckevort - Laurence Vanhelsuwe - Sylvain Vieujot - Jelai Wang - Mark Watson - Alex Weber - Richard West - Matthew Wright - Benoit Xhenseval - Christian W. Zuckschwerdt - Hari - Sam (oldman) It is possible that I have missed someone on this list, if that applies to you, please e-mail me. Dave Gilbert (david.gilbert@object-refinery.com) JFreeChart Project Leader
0
udacity/ud851-Exercises
null
ud851
# Toy App Exercise Repo This is a exercise repository for Developing Android Apps. You can learn more about how to use this repository [here](https://classroom.udacity.com/courses/ud851/lessons/93affc67-3f0b-4f9b-b3a4-a7a26f241a86/concepts/115d08bb-f114-46fa-b693-5c6ce1445c07)
0
threedr3am/learnjavabug
Java安全相关的漏洞和技术demo,原生Java、Fastjson、Jackson、Hessian2、XML反序列化漏洞利用和Spring、Dubbo、Shiro、CAS、Tomcat、RMI、Nexus等框架\中间件\功能的exploits以及Java Security Manager绕过、Dubbo-Hessian2安全加固等等实践代码。
null
*本项目仅用于安全研究,禁止使用本项目发起非法攻击,造成的后果使用者负责* 这是一个个人用于复现、公开一些感兴趣、或者影响稍大的漏洞的项目,没有多少技术含量,权当个人技术笔记。 --- ### fastjson 该模块主要记录一些fastjson的利用gadget,不过很多gadget并没有记录在案。 ##### RCE相关 package:com.threedr3am.bug.fastjson.rce 1. com.threedr3am.bug.fastjson.rce.FastjsonSerialize(TemplatesImpl) 利用条件:fastjson <= 1.2.24 + Feature.SupportNonPublicField 2. com.threedr3am.bug.fastjson.rce.NoNeedAutoTypePoc 利用条件:fastjson < 1.2.48 不需要任何配置,默认配置通杀RCE 3. com.threedr3am.bug.fastjson.rce.HikariConfigPoc(HikariConfig) 利用条件:fastjson <= 1.2.59 RCE,需要开启AutoType 4. com.threedr3am.bug.fastjson.rce.CommonsProxyPoc(SessionBeanProvider) 利用条件:fastjson <= 1.2.61 RCE,需要开启AutoType 5. com.threedr3am.bug.fastjson.rce.JndiConverterPoc(JndiConverter) 利用条件:fastjson <= 1.2.62 RCE,需要开启AutoType 6. com.threedr3am.bug.fastjson.rce.HadoopHikariPoc(HikariConfig) 利用条件:fastjson <= 1.2.62 RCE,需要开启AutoType 7. com.threedr3am.bug.fastjson.rce.IbatisSqlmapPoc(JtaTransactionConfig) 利用条件:fastjson <= 1.2.62 RCE,需要开启AutoType 8. com.threedr3am.bug.fastjson.rce.ShiroPoc(shiro-core) 利用条件:fastjson <= 1.2.66 RCE,需要开启AutoType ...省略若干 ##### SSRF相关 package:com.threedr3am.bug.fastjson.ssrf 1. com.threedr3am.bug.fastjson.ssrf.ApacheCxfSSRFPoc(WadlGenerator) 利用条件:fastjson <= 1.2.66 SSRF,需要开启AutoType 2. com.threedr3am.bug.fastjson.ssrf.ApacheCxfSSRFPoc2(SchemaHandler) 利用条件:fastjson <= 1.2.66 SSRF,需要开启AutoType 3. com.threedr3am.bug.fastjson.ssrf.CommonsJellySSRFPoc(Embedded) 利用条件:fastjson <= 1.2.66 SSRF,需要开启AutoType 4. com.threedr3am.bug.fastjson.ssrf.JREJeditorPaneSSRFPoc(JEditorPane) 利用条件:fastjson <= 1.2.66 SSRF,需要开启AutoType ...省略若干 ##### DNS域名解析相关 package:com.threedr3am.bug.fastjson.dns ##### Dos拒绝服务相关 package:com.threedr3am.bug.fastjson.dos ##### leak信息泄露相关 package:com.threedr3am.bug.fastjson.leak --- ### jackson ##### RCE相关 package:com.threedr3am.bug.jackson.rce 1. com.threedr3am.bug.jackson.rce.AnterosPoc 2. com.threedr3am.bug.jackson.rce.EhcacheJndi 3. com.threedr3am.bug.jackson.rce.H2Rce 4. com.threedr3am.bug.jackson.rce.HadoopHikariConfigPoc 5. com.threedr3am.bug.jackson.rce.HikariConfigPoc 6. com.threedr3am.bug.jackson.rce.IbatisSqlmapPoc 7. com.threedr3am.bug.jackson.rce.JndiConverterPoc 8. com.threedr3am.bug.jackson.rce.LogbackJndi ...省略若干 ##### SSRF package:com.threedr3am.bug.jackson.ssrf ...省略若干 --- ### dubbo 该模块主要记录dubbo相关的漏洞利用、安全加固等 1. com.threedr3am.bug.dubbo.RomePoc 利用条件:存在rome依赖 2. com.threedr3am.bug.dubbo.ResinPoc 利用条件:存在com.caucho:quercus依赖 3. com.threedr3am.bug.dubbo.XBeanPoc 利用条件:存在org.apache.xbean:xbean-naming依赖 4. com.threedr3am.bug.dubbo.SpringAbstractBeanFactoryPointcutAdvisorPoc 利用条件:存在org.springframework:spring-aop依赖 ##### dubbo-hessian2-safe-reinforcement dubbo hessian2安全加固demo,使用黑名单方式禁止部分gadget --- ### padding-oracle-cbc 用Java实现padding-oracle-cbc攻击的一些实验代码记录 1. com.threedr3am.bug.paddingoraclecbc.PaddingOracle ```padding oracle java实现(多组密文实现)``` 2. com.threedr3am.bug.paddingoraclecbc.PaddingOracleCBC ```padding oracle cbc java实现(单组 <= 16bytes 密文实现)``` 3. com.threedr3am.bug.paddingoraclecbc.PaddingOracleCBC2 ```padding oracle cbc java实现(多组密文实现)``` 4. com.threedr3am.bug.paddingoraclecbc.PaddingOracleCBCForShiro ```shiro padding oracle cbc java实现``` --- ### xxe 各种XML解析组件导致XXE的复现,以及其fix代码记录 --- ### commons-collections 好几年前学习反序列化的时候瞎写的东西 --- ### security-manager java security manager的一些绕过实验代码 --- ### rmi rmi相关服务,以及其利用等 --- ### tomcat tomcat相关漏洞 #### ajp-bug tomcat ajp协议相关漏洞 1. com.threedr3am.bug.tomcat.ajp 任意文件读取和jsp渲染RCE CVE-2020-1938 --- ### cas cas相关漏洞 1. cas-4.1.x~4.1.6 反序列化漏洞(利用默认密钥) 2. cas-4.1.7~4.2.x 反序列化漏洞(需要知道加密key和签名key) --- ### spring 一些Spring漏洞的复现实验代码记录 1. spring-actuator(jolokia、snake-yaml、h2-hikariCP、eureka) 2. spring-cloud-config-server(CVE-2019-3799) 3. spring-cloud-config-server(CVE-2020-5405) 4. spring-cloud-config-server(CVE-2020-5410) 5. spring-session-data-redis RCE ### apache-poi apache-poi excel解析漏洞相关记录 ### feature 一些攻击的数据特征,本来想法是看看正则等能不能都检测到 ### java-compile java动态编译、操纵字节码的实现代码 ### nexus maven nexus的一些RCE、Auth Bypass漏洞的复现记录 ### ShardingSphere-UI ShardingSphere-UI的一些漏洞记录 1. CVE-2020-1947 (YAML反序列化RCE漏洞) ### shiro 记录了最近shiro被发现的一些认证bypass漏洞 1. bypass shiro <= 1.4.1 2. bypass shiro <= 1.5.2 (CVE-2020-1957) 3. bypass shiro <= 1.5.3 (CVE-2020-11989)
0
google/data-transfer-project
The Data Transfer Project makes it easy for people to transfer their data between online service providers. We are establishing a common framework, including data models and protocols, to enable direct transfer of data both into and out of participating online service providers.
data data-portability portability transfer
# Data Transfer Project ## Overview The Data Transfer Project makes it easy for people to transfer their data between online services. We provide a common framework and ecosystem to accept contributions from service providers to enable seamless transfer of data into and out of their service. ## Who We Are Data Transfer Project (DTP) is a collaboration of organizations committed to building a common framework with open-source code that can connect any two online service providers, enabling a seamless, direct transfer of data. We want all individuals across the web to be in control of their data. ## More info * [Repository master branch](https://github.com/google/data-transfer-project) * [Developer documentation](Documentation/Developer.md) * [Contributing](CONTRIBUTING.md) * [Code of Conduct](CODE_OF_CONDUCT.md) ## Current State Data Transfer Project is in its early stages, and we are actively looking for partner organizations and individuals to contribute to the project. We are continuing to define the architecture and implementation. Since the code is in active development, please do thorough testing and verification before implementing. ## Contact Info Please contact [dtp-discuss@googlegroups.com](mailto:dtp-discuss@googlegroups.com) with any questions or comments. ## About Us The Data Transfer Project was formed in 2017 to create an open-source, service-to-service portability platform so that all individuals across the web could easily move their data between online service providers. The partners in the Data Transfer Project believe portability and interoperability are central to innovation. Making it easier for individuals to choose among services facilitates competition, empowers individuals to try new services and enables them to choose the offering that best suits their needs. We anticipate the Data Transfer Project solution will make a particularly big impact in global markets where downloading or uploading data is expensive and/or slow. The Data Transfer Project eliminates the need to download data at all. Instead, data is transferred directly between service providers. #### DTP is early-stage open source code that is built and maintained entirely by DTP community members.
0
h2oai/h2o-2
Please visit https://github.com/h2oai/h2o-3 for latest H2O
null
# Caution: H2O-3 is now the current H2O! # Please visit <https://github.com/h2oai/h2o-3> --- --- H2O ======== H2O makes Hadoop do math! H2O scales statistics, machine learning and math over BigData. H2O is extensible and users can build blocks using simple math legos in the core. H2O keeps familiar interfaces like R, Excel & JSON so that BigData enthusiasts & experts can explore, munge, model and score datasets using a range of simple to advanced algorithms. Data collection is easy. Decision making is hard. H2O makes it fast and easy to derive insights from your data through faster and better predictive modeling. H2O has a vision of online scoring and modeling in a single platform. Product Vision for first cut ------------------------------ H2O product, the Analytics Engine will scale Classification and Regression. - RandomForest, Generalized Linear Modeling (GLM), logistic regression, k-Means, available over R / REST / JSON-API - Basic Linear Algebra as building blocks for custom algorithms - High predictive power of the models - High speed and scale for modeling and scoring over BigData Data Sources - We read and write from/to HDFS, S3, NoSQL, SQL - We ingest data in CSV format from local and distributed filesystems (nfs) - A JDBC driver for SQL and DataAdapters for NoSQL datasources is in the roadmap. (v2) Console provides Adhoc Data Analytics at scale via R-like Parser on BigData - Able to pass and evaluate R-like expressions, slicing and filters make this the most powerful web calculator on BigData Users -------------------------------- Primary users are Data Analysts looking to wield a powerful tool for Data Modeling in the Real-Time. Microsoft Excel, R, SAS wielding Data Analysts and Statisticians. Hadoop users with data in HDFS will have a first class citizen for doing Math in Hadoop ecosystem. Java and Math engineers can extend core functionality by using and extending legos in a simple java that reads like math. See package hex. Extensibility can also come from writing R expressions that capture your domain. Design -------------------------------- We use the best execution framework for the algorithm at hand. For first cut parallel algorithms: Map Reduce over distributed fork/join framework brings fine grain parallelism to distributed algorithms. Our algorithms are cache oblivious and fit into the heterogeneous datacenter and laptops to bring best performance. Distributed Arraylets & Data Partitioning to preserve locality. Move code, not data, not people. Extensions --------------------------------- One of our first powerful extension will be a small tool belt of stats and math legos for Fraud Detection. Dealing with Unbalanced Datasets is a key focus for this. Users will use JSON/REST-api via H2O.R through connects the Analytics Engine into R-IDE/RStudio. Community --------------------------------- We will build & sustain a vibrant community with the focus of taking software engineering approaches to data science and empowering everyone interested in data to be able to hack data using math and algorithms. Join us on google groups [h2ostream](https://groups.google.com/forum/#!forum/h2ostream). Team ``` SriSatish Ambati Cliff Click Tom Kraljevic Earl Hathaway Tomas Nykodym Michal Malohlava Kevin Normoyle Irene Lang Spencer Aiello Anqi Fu Nidhi Mehta Arno Candel Nikole Sanchez Josephine Wang Amy Wang Max Schloemer Ray Peck Anand Avati Sebastian Vidrio ``` Open Source ``` Jan Vitek Mr.Jenkins Petr Maj Matt Fowles ``` Advisors -------------------------------- Scientific Advisory Council ``` Stephen Boyd Rob Tibshirani Trevor Hastie ``` Systems, Data, FileSystems and Hadoop ``` Doug Lea Chris Pouliot Dhruba Borthakur Charles Zedlewski ``` Investors -------------------------------- ``` Jishnu Bhattacharjee, Nexus Venture Partners Anand Babu Periasamy Anand Rajaraman Dipchand Nishar ```
0
zmxv/react-native-sound
React Native module for playing sound clips
null
# react-native-sound [![](https://img.shields.io/npm/v/react-native-sound.svg?style=flat-square)][npm] [![](https://img.shields.io/npm/l/react-native-sound.svg?style=flat-square)][npm] [![](https://img.shields.io/npm/dm/react-native-sound.svg?style=flat-square)][npm] [npm]: https://www.npmjs.com/package/react-native-sound React Native module for playing sound clips on iOS, Android, and Windows. Be warned, this software is alpha quality and may have bugs. Test on your own and use at your own risk! ## Feature matrix React-native-sound does not support streaming. See [#353][] for more info. Of course, we would welcome a PR if someone wants to take this on. In iOS, the library uses [AVAudioPlayer][], not [AVPlayer][]. [#353]: https://github.com/zmxv/react-native-sound/issues/353 [AVAudioPlayer]: https://developer.apple.com/documentation/avfoundation/avaudioplayer [AVPlayer]: https://developer.apple.com/documentation/avfoundation/avplayer Feature | iOS | Android | Windows ---|---|---|--- Load sound from the app bundle | ✓ | ✓ | ✓ Load sound from other directories | ✓ | ✓ | ✓ Load sound from the network | ✓ | ✓ | Play sound | ✓ | ✓ | ✓ Playback completion callback | ✓ | ✓ | ✓ Pause | ✓ | ✓ | ✓ Resume | ✓ | ✓ | ✓ Stop | ✓ | ✓ | ✓ Reset | | ✓ | Release resource | ✓ | ✓ | ✓ Get duration | ✓ | ✓ | ✓ Get number of channels | ✓ | | Get/set volume | ✓ | ✓ | ✓ Get system volume | ✓ | ✓ | Set system volume | | ✓ | Get/set pan | ✓ | | Get/set loops | ✓ | ✓ | ✓ Get/set exact loop count | ✓ | | Get/set current time | ✓ | ✓ | ✓ Set speed | ✓ | ✓ | ## Installation First install the npm package from your app directory: ```javascript npm install react-native-sound --save ``` Note: If your react-native version is >= 0.60 then linking is done automatically. If your react-native version is < 0.60 then link it using: ```javascript react-native link react-native-sound ``` **If you encounter this error** ``` undefined is not an object (evaluating 'RNSound.IsAndroid') ``` you may additionally need to fully clear your build caches for Android. You can do this using ```bash cd android ./gradlew cleanBuildCache ``` After clearing your build cache, you should execute a new `react-native` build. If you still experience issues, **know that this is the most common build issue.** See [#592][] and the several issues linked from it for possible resolution. A pull request with improved documentation on this would be welcome! [#592]: https://github.com/zmxv/react-native-sound/issues/592 ### Manual Installation Notes Please see the Wiki for these details https://github.com/zmxv/react-native-sound/wiki/Installation ## Help with React-Native-Sound * For react-native-sound developers [![][gitter badge]](https://gitter.im/react-native-sound/developers) * For help using react-native-sound [![][gitter badge]](https://gitter.im/react-native-sound/Help) [gitter badge]: https://img.shields.io/gitter/room/react-native-sound/developers.svg?format=flat-square ## Demo project https://github.com/zmxv/react-native-sound-demo ## Player <img src="https://github.com/benevbright/react-native-sound-playerview/blob/master/docs/demo.gif?raw=true"> https://github.com/benevbright/react-native-sound-playerview ## Basic usage First you'll need to add audio files to your project. - Android: Save your sound clip files under the directory `android/app/src/main/res/raw`. Note that files in this directory must be lowercase and underscored (e.g. my_file_name.mp3) and that subdirectories are not supported by Android. - iOS: Open Xcode and add your sound files to the project (Right-click the project and select `Add Files to [PROJECTNAME]`) ```js // Import the react-native-sound module var Sound = require('react-native-sound'); // Enable playback in silence mode Sound.setCategory('Playback'); // Load the sound file 'whoosh.mp3' from the app bundle // See notes below about preloading sounds within initialization code below. var whoosh = new Sound('whoosh.mp3', Sound.MAIN_BUNDLE, (error) => { if (error) { console.log('failed to load the sound', error); return; } // loaded successfully console.log('duration in seconds: ' + whoosh.getDuration() + 'number of channels: ' + whoosh.getNumberOfChannels()); // Play the sound with an onEnd callback whoosh.play((success) => { if (success) { console.log('successfully finished playing'); } else { console.log('playback failed due to audio decoding errors'); } }); }); // Reduce the volume by half whoosh.setVolume(0.5); // Position the sound to the full right in a stereo field whoosh.setPan(1); // Loop indefinitely until stop() is called whoosh.setNumberOfLoops(-1); // Get properties of the player instance console.log('volume: ' + whoosh.getVolume()); console.log('pan: ' + whoosh.getPan()); console.log('loops: ' + whoosh.getNumberOfLoops()); // Seek to a specific point in seconds whoosh.setCurrentTime(2.5); // Get the current playback point in seconds whoosh.getCurrentTime((seconds) => console.log('at ' + seconds)); // Pause the sound whoosh.pause(); // Stop the sound and rewind to the beginning whoosh.stop(() => { // Note: If you want to play a sound after stopping and rewinding it, // it is important to call play() in a callback. whoosh.play(); }); // Release the audio player resource whoosh.release(); ``` ## Notes - To minimize playback delay, you may want to preload a sound file without calling `play()` (e.g. `var s = new Sound(...);`) during app initialization. This also helps avoid a race condition where `play()` may be called before loading of the sound is complete, which results in no sound but no error because loading is still being processed. - You can play multiple sound files at the same time. Under the hood, this module uses `AVAudioSessionCategoryAmbient` to mix sounds on iOS. - You may reuse a `Sound` instance for multiple playbacks. - On iOS, the module wraps `AVAudioPlayer` that supports aac, aiff, mp3, wav etc. The full list of supported formats can be found at https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsMacOSX.html - On Android, the module wraps `android.media.MediaPlayer`. The full list of supported formats can be found at https://developer.android.com/guide/topics/media/media-formats.html - On Android, the absolute path can start with '/sdcard/'. So, if you want to access a sound called "my_sound.mp3" on Downloads folder, the absolute path will be: '/sdcard/Downloads/my_sound.mp3'. - You may chain non-getter calls, for example, `sound.setVolume(.5).setPan(.5).play()`. ## Audio on React Native - [The State of Audio Libraries in React Native (Oct. 2018)][medium] - [react-native-audio-toolkit][] - [react-native-video][] (also plays audio) - [Expo Audio SDK][] - [#media on awesome-react-native][#media] [medium]: https://medium.com/@emmettharper/the-state-of-audio-libraries-in-react-native-7e542f57b3b4 [react-native-audio-toolkit]: https://github.com/react-native-community/react-native-audio-toolkit [react-native-video]: https://github.com/react-native-community/react-native-video [expo audio sdk]: https://docs.expo.io/versions/latest/sdk/audio/ [#media]: http://www.awesome-react-native.com/#media ## Contributing Pull requests welcome with bug fixes, documentation improvements, and enhancements. When making big changes, please open an issue first to discuss. ## License This project is licensed under the MIT License.
0
VoltDB/voltdb
Volt Active Data
null
What is Volt Active Data? ==================== Thank you for your interest in Volt Active Data! Volt Active Data provides reliable data services for today's demanding applications. A distributed, horizontally-scalable, ACID-compliant database that provides streaming, storage, and real-time analytics for applications that benefit from strong consistency, high throughput and low, predictable latency. Volt Active Data and Open Source ==================== 2023: Volt Active Data’s Open Source version is now frozen -------------------- At the end of 2022 we stopped updating this Github repo. While this code exists, and can be used, it is not an ‘official’ version of Volt. It does not receive updates. We will not provide any form of support for it, and if you end up buying Volt you will need to move to the official version. Evaluating Volt using this version -------------------- This version is provided for students, hobbyists, and researchers interested in testing an ultra-fast, scalable ACID database. But all new and production-ready features are available through the commercial product from https://www.voltactivedata.com. If you are looking at using Volt in a real-world business context, then we would strongly recommend that you speak to us directly. We have lots of experience helping people evaluate data platforms, and can set you up with demonstration clusters on AWS running representative workloads. We know from experience that this drastically cuts down the time needed to get to a ‘Go/No Go’ decision. Bear in mind that a lot of our customers are doing complicated things like cross center data replication, kubernetes or very high transactions per second, and we can help you see these features in action without you having to build a deployment from scratch. Different Versions -------------------- Volt Active Data offers the fully open source, AGPL3-licensed Community Edition of Volt Active Data through GitHub here: https://github.com/voltdb/voltdb/ Trials of the enterprise edition of Volt Active Data are available from the Volt Active Data website at the following URL: https://www.voltactivedata.com The Community Edition has full application compatibility and provides everything needed to run a real-time, in-memory SQL database with datacenter-local redundancy and snapshot-based disk persistence. The commercial editions add operational features to support industrial-strength durability, manageability, and availability, including per-transaction disk-based persistence, multi-datacenter replication, elastic online expansion, live online upgrade, etc. For more information, please visit the Volt Active Data website. https://voltactivedata.com VoltDB Branches and Tags ==================== The latest development branch is _master_. We develop features on branches and merge to _master_ when stable. While _master_ is usually stable, it should not be considered production-ready and may also have partially implemented features. Code that corresponds to released versions of Volt Active Data are tagged "voltdb-X.X" or "voltdb-X.X.X". To build corresponding OSS VoltDB versions, use these tags. Building Volt Active Data ==================== Information on building Volt Active Data from this source repository is maintained in a GitHub wiki page available here: https://github.com/VoltDB/voltdb/wiki/Building-VoltDB First Steps ==================== From the directory where you installed Volt Active Data, you can either use bin/{command} or add the bin folder to your path so you can use the Volt Active Data commands anywhere. For example: PATH="$PATH:$(pwd)/bin/" voltdb --version Then, initialize a root directory and start a single-server database. By default the root directory is created in your current working directory. Or you can use the --dir option to specify a location: voltdb init [--dir ~/mydb] voltdb start [--dir ~/mydb] [--background] To start a SQL console to enter SQL DDL, DML or DQL: sqlcmd To launch the web-based Volt Management Console (VMC), open a web browser and connect to localhost on port 8080 (unless there is a port conflict): http://localhost:8080. To stop the running Volt Active Data cluster, use the shutdown command. For commercial customers, the database contents are saved automatically by default. For open-source users, add the --save argument to manually save the contents of your database: voltadmin shutdown [--save] Then you can simply use the start command to restart the database: voltdb start [--dir ~/mydb] [--background] Further guidance can be found in the tutorial: https://docs.voltactivedata.com/tutorial/. For more on the CLI, see the documentation: https://docs.voltactivedata.com/UsingVoltDB/clivoltdb.php. Next Steps ==================== ### Examples You can find application examples in the "examples" directory inside this Volt Active Data kit. The Voter app ("examples/voter") is a great example to start with. See the README to learn what it does and how to get it running. The "examples" directory provides additional examples and a README explaining how to run them. ### Tutorial The Volt Active Data Tutorial walks you through building and running your first Volt Active Data application. https://docs.voltactivedata.com/tutorial/ ### Documentation The _Using VoltDB_ guide and supporting documentation is comprehensive and easy to use. It's a great place for broad understanding or to look up something specific. https://docs.voltactivedata.com/ ### Go Full Cloud For information on using VoltDB in the Cloud, see the _Volt Kubernetes Administrator's Guide_. https://docs.voltactivedata.com/KubernetesAdmin/ What's Included ==================== If you have installed Volt Active Data from the distribution kit, you now have a directory containing this README file and several subdirectories, including: - **bin** - Scripts for starting Volt Active Data, bulk loading data, as well as interacting with and managing the running database. Including: - bin/voltdb - Start a Volt Active Data process. - bin/voltadmin - CLI to manage a running cluster. - bin/sqlcmd - SQL console. - **doc** - Documentation, tutorials, and java-doc - **examples** - Sample programs demonstrating the use of Volt Active Data - **lib** - Third party libraries - **tools** - XML schemas, monitoring plugins, and other tools - **voltdb** - the Volt Active Data binary software itself including: - log4j files - Logging configuration. - voltdbclient-version.jar - Java/JVM client for connecting to VoltDB, including native Volt Active Data client and JDBC driver. - voltdb-version.jar - The full Volt Active Data binary, including platform-specific native libraries embedded within the jar. This is a superset of the client code and can be used as a native client driver or JDBC driver. Commercial Volt Active Data Differences ==================== Volt Active Data offers sandboxes and a pre-built trial version of Volt Active Data for application developers who want to try out the product. See the Volt Active Data website for more information. https://voltactivedata.com/ Getting Help & Providing Feedback ==================== If you have any questions or comments about Volt Active Data, we encourage you to reach out to the Volt Active Data team and community through stack overflow: https://stackoverflow.com/questions/tagged/voltdb. Licensing ==================== This program is free software distributed under the terms of the GNU Affero General Public License Version 3. See the accompanying LICENSE file for details on your rights and responsibilities with regards to the use and redistribution of Volt Active Data software.
0
normanmaurer/netty-in-action
null
null
This Repository contains the source-code for all chapters of the book [Netty in Action](http://manning.com/maurer) by Norman Maurer and Marvin Allen Wolfthal. Latest version: https://github.com/normanmaurer/netty-in-action/tree/2.0-SNAPSHOT Enjoy! Feedback and PR's welcome! Prerequisites JDK 1.7.0u71 or better Maven 3.3.9 or better If you want to build everything at once, from the top directory run mvn install If you want to build only single projects then from the top directory first run mvn install -pl utils This will make the utils jar available to all the projects.
0
redhat-scholars/istio-tutorial
Istio Tutorial for https://dn.dev/master
envoy istio kubernetes microservices openshift tracing
null
1
PorkStudios/FarPlaneTwo
Level-of-Detail renderer in Minecraft. Allows for render distances of millions of blocks. (Cubic Chunks-compatible) (WIP)
cubic-chunks cubicchunks forge minecraft
# FarPlaneTwo [![Build Status](https://jenkins.daporkchop.net/job/PorkStudios/job/FarPlaneTwo/job/master/badge/icon)](https://jenkins.daporkchop.net/job/PorkStudios/job/FarPlaneTwo/) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/PorkStudios/FarPlaneTwo) ![Lines of code](https://img.shields.io/tokei/lines/github/PorkStudios/FarPlaneTwo) [![Discord](https://img.shields.io/discord/428813657816956929?color=7289DA&label=discord)](https://discord.gg/FrBHHCk) [![Patreon badge](https://img.shields.io/badge/dynamic/json?color=e64413&label=patreon&query=data.attributes.patron_count&suffix=%20patrons&url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F727078)](https://www.patreon.com/DaPorkchop_) This is a Minecraft mod which implements a Level-of-Detail (LoD) terrain renderer into the game. The name is in reference to [Foghrye4's CWGFarPlaneView](https://www.curseforge.com/minecraft/mc-mods/cwg-far-plane-view), which is an addon for CubicWorldGen (which, in turn, is an addon for Cubic Chunks) which renders a plane at sea level with block and biome colors, and served as the original inspiration for me to make this. **This mod is a work in progress! If you do decide to download this, don't expect stuff to work correctly because it probably won't.** **Remember to [Read the FAQ first](https://github.com/PorkStudios/FarPlaneTwo/wiki/FAQ)**! ## Installation *This is a Forge mod for Minecraft 1.12.2. Other versions WILL be supported in the future.* 1) Install [Minecraft Forge](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.12.2.html) for Minecraft 1.12.2. 2) [Download](https://jenkins.daporkchop.net/job/PorkStudios/job/FarPlaneTwo/job/master/) the mod. 3) Download these dependencies too: - [ForgeRocks](https://www.curseforge.com/minecraft/mc-mods/forgerocks) - [Mixin](https://www.curseforge.com/minecraft/mc-mods/mixin-0-7-0-8-compatibility) For best results use cubic chunks and cubic world gen and set the world type to custom cubic. (Cubic Chunks bundles Mixin inside it, so don't use both cubic chunks and mixin together.) - [Cubic Chunks](https://jenkins.daporkchop.net/job/OpenCubicChunks/job/CubicChunks/) - [Cubic World Gen](https://jenkins.daporkchop.net/job/OpenCubicChunks/job/CubicWorldGen/) Some of the above pages should look a lot like this: ![download1](https://user-images.githubusercontent.com/25571687/119328744-49aa7e00-bc39-11eb-827f-f44611c8ae4e.png) There can be a lot of links on these pages. Click on the first one underneath "Last Successful Artifacts". ## Goals and Motivations My end goal is to achieve the following: - be able to use render distances of *at least* 100 thousand blocks - cause at most a 25% decrease in performance when using my i5-2520M's integrated graphics - be compatible with [Cubic Chunks](https://github.com/OpenCubicChunks/CubicChunks) - be as compatible as reasonably possible with other mods I have exactly zero concern with doing stuff that is unsafe: for instance, [the client-side render tree](https://github.com/PorkStudios/FarPlaneTwo/blob/master/src/main/java/net/daporkchop/fp2/mode/common/client/FarRenderTree.java), which the renderer traverses when deciding which tiles to render each frame, is implemented entirely using off-heap memory. At some point (once the internals of the mod are more polished) I'll probably write up a big section here describing exactly how a lot of the stuff works.
0
FuZhucheng/SSM
J2EE项目系列(四)–SSM框架构建积分系统和基本商品检索系统(Spring+SpringMVC+MyBatis+Lucene+Redis+MAVEN)
java lucene redis spring springmvc ssm
### J2EE项目系列(四)–SSM框架构建积分系统和基本商品检索系统(Spring+SpringMVC+MyBatis+Lucene+Redis+MAVEN) ### 喜欢就给个star吧!!!谢谢! #### 并附带一系列的博客文章: #### (一)[项目框架整合构建](http://blog.csdn.net/Jack__Frost/article/details/68932117) #### (二)[建立商品数据库和Lucene的搭建](http://blog.csdn.net/jack__frost/article/details/68947868) #### (三)[ Redis系列(一)--安装、helloworld以及读懂配置文件](http://blog.csdn.net/jack__frost/article/details/67633975) #### (四)[Redis系列(二)--缓存设计(整表缓存以及排行榜缓存方案实现)](http://blog.csdn.net/jack__frost/article/details/69568610) #### (五)[ Lucene总结系列(一)--认识、helloworld以及基本的api操作。](http://blog.csdn.net/Jack__Frost/article/details/70156391) #### (六)[Lucene总结系列(二)--商品检索系统的文字检索业务(lucene项目使用)](http://blog.csdn.net/Jack__Frost/article/details/70176553) #### (七)[Lucene总结系列(三)--总述优化方案和呈现实时内存索引实现(结合RAMDirectory源码解析)](http://blog.csdn.net/jack__frost/article/details/70215598) #### (八)[JavaWeb--Servlet过滤器Filter和SpringMVC的HandlerInterceptor(Session和Cookie登录认证)](http://blog.csdn.net/jack__frost/article/details/71158139) #### (九)[Redis系列(三)--过期策略](http://blog.csdn.net/jack__frost/article/details/71216098) #### (十)[Redis系列(四)--内存淘汰机制(含单机版内存优化建议)](http://blog.csdn.net/jack__frost/article/details/72478400) #### (十一)[Ajax使用详解(级联列表)以及企业级报表Excel导入导出实现](http://blog.csdn.net/jack__frost/article/details/72743057) #### (十二)[ WEB后台--邮件和短信业务实现(包括Java一键实现、封装和异步)以及原理详解](http://blog.csdn.net/jack__frost/article/details/73780106) *** ### 使用姿势:请阅读使用demo必读文件《使用前必读!》 #### 另外,本项目提供了很多方便的工具类,大家喜欢的话,可以直接拿来用。 *** ### 联系方式: #### 邮箱:jackfrost@fuzhufuzhu.com
0
w3c/epubcheck
The conformance checker for EPUB publications
digital-publishing epub epub-publications epub3 epubcheck publishing
[![Current Release](https://img.shields.io/github/release/w3c/epubcheck.svg)](https://github.com/w3c/epubcheck/releases/latest) [![Github All Releases Downloads](https://img.shields.io/github/downloads/w3c/epubcheck/total.svg?colorB=A9A9A9)](https://github.com/w3c/epubcheck/releases/) [![CI build with Maven](https://github.com/w3c/epubcheck/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/w3c/epubcheck/actions/workflows/maven-ci.yml?query=branch%3Amain) EPUBCheck ========= EPUBCheck is the official conformance checker for EPUB publications. EPUBCheck can be run as a standalone command-line tool or used as a Java library. EPUBCheck is open source software, maintained by the [DAISY Consortium](http://www.daisy.org) on behalf of [W3C](https://www.w3.org/publishing/epubcheck_fundraising). **We Need Your Support!!** Financial support is critical to the development of EPUBCheck, the tool we all use to validate EPUB files. We need to make sure that the resources are adequate to both update the tool and provide for its continued maintenance over the next two years; please [help us fund and support EPUBCheck](https://www.w3.org/publishing/epubcheck_fundraising), and join the [list of donators](#donators)! ## Downloads Check the [releases page](https://github.com/w3c/epubcheck/releases) to get the latest distribution. [EPUBCheck v5.1.0](https://github.com/w3c/epubcheck/releases/tag/v5.1.0) is the latest production-ready release, to be used to validate both EPUB 2 and 3 files. EPUB 3 publications are checked against the [EPUB 3.3](https://www.w3.org/TR/epub-33/) specification. ## Documentation Documentation on how to **use** EPUBCheck, to **contribute** to the project or to **translate** messages is available on the [EPUBCheck wiki](https://github.com/w3c/epubcheck/wiki). Technical discussions are held on our public [mailing list](https://lists.w3.org/Archives/Public/public-epubcheck/). To subscribe to the mailing list, send an email with subject `subscribe` to [public-epubcheck-request@w3.org](mailto:public-epubcheck-request@w3.org?subject=subscribe). To participate in the discussion, simply send an email to [public-epubcheck@w3.org](mailto:public-epubcheck-request@w3.org). Historical archives of discussions prior to October 2017 are stored at the old [EPUBCheck Google Group](https://groups.google.com/forum/#!forum/epubcheck). ## Building EPUBCheck ### Build from sources To build epubcheck from the sources you need Java Development Kit (JDK) 1.7 or above and [Apache Maven](http://maven.apache.org/) 3.0 or above installed. Build and run tests: ``` $ mvn clean install ``` Will copy `*.jar` files and packages to `target/` folder... ### Build using docker To build the epubcheck using docker, use the build command below: ```bash $ docker build . -t epubcheck ``` To run the epubcheck image as container, use example command below: ```bash # one directory in the host need to be mapped (using docker volume) to /data path # within container. the particular path will be used as a bridge to enable access # over the epub file or the generated output file between host and container. $ docker run -it --rm -v <directory>:/data epubcheck --help $ docker run -it --rm -v <directory>:/data epubcheck <epub-file> [OPTIONS] # example 1: # execute an epub check over a file located in /home/username/file.epub on the host. # the output will be printed to the console $ docker run -it --rm -v /home/username:/data epubcheck file.epub # example 2: # execute an epub check over a file, and then generate an output file # in /data/output.json within container. # since /data is mapped via volume, then the generated file will be accessible # from /home/username/output.json in the host $ docker run - --rm -v /home/username:/data epubcheck file.epub --json output.json ``` ## Credits EPUBCheck v5.1.0 was developed by [the DAISY Consortium](https://www.daisy.org/), on behalf of W3C. Initial EPUBCheck development was largely done at [Adobe](https://www.adobe.com/). A significant part of EPUBCheck functionality comes from the schema validation tool [Jing](https://relaxng.org/jclark/jing.html), used with schemas from the [Nu HTML Checker](https://validator.github.io/validator/), [IDPF](https://idpf.org), and [DAISY](https://www.daisy.org/). Past and present EPUBCheck developers include: Romain Deltour, Matt Garrish, Tobias Fischer, Markus Gylling, Steve Antoch, Peter Sorotokin, Thomas Ledoux, Masayoshi Takahashi, Paul Norton, Piotr Kula, Arwen Pond, Liza Daly, Garth Conboy, and [several others](https://github.com/w3c/epubcheck/graphs/contributors). Many thanks to the numerous people who have contributed to the evolution of EPUBCheck through bug reports, pull requests, and translations! ## Donators The following organizations are supporting the development of EPUBCheck by their contribution to the [fundraising initiative](https://www.w3.org/publishing/epubcheck_fundraising): <p float="left"> <a href="https://www.macmillanlearning.com"><img alt="MacMillan Learning" src="https://www.w3.org/publishing/donators_logos/MacLearn_logo_cmyk.png" width="200" hspace="20" align="middle"/></a> <a href="https://www.google.com"><img alt="Google" src="https://www.w3.org/publishing/donators_logos/Google.png" width="400" hspace="20" align="middle"/></a> <a href="http://daisy.org"><img alt="DAISY" src="https://www.w3.org/publishing/donators_logos/daisy_high.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://pubhub.dk"><img alt="Publizon A/S" src="https://www.w3.org/publishing/donators_logos/publizon-logo.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://www.wiley.com"><img alt="Wiley" src="https://www.w3.org/publishing/donators_logos/Wiley_Wordmark_black.png" width="200" hspace="20" align="middle"/></a> <a href="https://www.hachette.com"><img alt="Hachette Livre" src="https://www.w3.org/publishing/donators_logos/Hachette%20Livre.jpg" width="300" hspace="20" align="middle"/></a> <a href="https://www.learningmate.com"><img alt="LearningMate Solutions Inc" src="https://www.w3.org/publishing/donators_logos/LearningMate%20Logo.png" width="100" hspace="20" align="middle"/></a> <a href="https://www.voyager.co.jp"><img alt="Voyager Japan, Inc." src="https://www.w3.org/publishing/donators_logos/rectangle_VJstar_logo_512.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://qainfotech.com"><img alt="QA Info Tech" src="https://www.w3.org/publishing/donators_logos/QA%20InfoTech%20Logo%20PNG%20Format.png" width="200" hspace="20" align="middle"/></a> <a href="https://wwnorton.com"><img alt="W. W. Norton" src="https://www.w3.org/publishing/donators_logos/NortonLogo_notagline.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://luminadatamatics.com"><img alt="Lumina Datamatics, Inc." src="https://www.w3.org/publishing/donators_logos/Datamatics_logo.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://www.harpercollins.com"><img alt="Harper Collins" src="https://www.w3.org/publishing/donators_logos/HarperCollins.png" width="200" hspace="20" align="middle"/></a> <a href="https://www.vitalsource.com"><img alt="Vital Source" src="https://www.w3.org/publishing/donators_logos/VS_Logo_HOR_Ingram_Tag(RGB).jpg" width="300" hspace="20" align="middle"/></a> <a href="https://www.beck.de/"><img alt="Verlag C.H. Beck oHG" src="https://www.w3.org/publishing/donators_logos/Beck_LogoVektor_sw.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://info.libreka.de"><img alt="Libreka" src="https://www.w3.org/publishing/donators_logos/logo_libreka.png" width="100" hspace="20" align="middle"/></a> <a href="https://zeilenwert.de"><img alt="Zeilenwert" src="https://www.w3.org/publishing/donators_logos/logo_zeilenwert.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://www.cenveopublisherservices.com"><img alt="Cenveo Publisher Services" src="https://www.w3.org/publishing/donators_logos/CVO%20Pub%20Serv_Logo.jpg" width="100" hspace="20" align="middle"/></a> <a href="https://www.booknetcanada.ca"><img alt="BookNet Canada" src="https://www.w3.org/publishing/donators_logos/BNC_Logo_Horizontal_RGB_1000px.png" width="100" hspace="20" align="middle"/></a> </p> ## License EPUBCheck is made available under the terms of the [3-Clause BSD License](http://opensource.org/licenses/BSD-3-Clause)
0
vaticle/typedb
TypeDB: the polymorphic database powered by types
database inference knowledge-base knowledge-representation logic polymorphic polymorphism reasoning strongly-typed type-system typedb typeql
[![TypeDB](./docs/banner.png)](https://typedb.com/introduction) [![Factory](https://factory.vaticle.com/api/status/vaticle/typedb/badge.svg)](https://factory.vaticle.com/vaticle/typedb) [![CircleCI](https://circleci.com/gh/vaticle/typedb/tree/master.svg?style=shield)](https://circleci.com/gh/vaticle/typedb/tree/master) [![GitHub release](https://img.shields.io/github/release/vaticle/typedb.svg)](https://github.com/vaticle/typedb/releases/latest) [![Discord](https://img.shields.io/discord/665254494820368395?color=7389D8&label=chat&logo=discord&logoColor=ffffff)](https://typedb.com/discord) [![Discussion Forum](https://img.shields.io/badge/discourse-forum-blue.svg)](https://forum.typedb.com) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-typedb-796de3.svg)](https://stackoverflow.com/questions/tagged/typedb) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-typeql-3dce8c.svg)](https://stackoverflow.com/questions/tagged/typeql) [![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat)](https://cloudsmith.com) # Introducing TypeDB TypeDB is a [polymorphic](https://typedb.com/features#polymorphic-queries) database with a [conceptual](https://typedb.com/features#conceptual-modeling) data model, a strong [subtyping](https://typedb.com/features#strong-type-system) system, a symbolic [reasoning](https://typedb.com/features#symbolic-reasoning) engine, and a beautiful and elegant [type-theoretic](https://typedb.com/features#modern-language) language [TypeQL](https://github.com/vaticle/typeql). > **IMPORTANT NOTE:** > > TypeDB & TypeQL are in the process of being rewritten in [Rust](https://www.rust-lang.org). There will be significant refinement to the language, and minor breaks in backwards compatibility. Learn about the changes on our [roadmap issue on GitHub](https://github.com/vaticle/typedb/issues/6764). The biggest change to TypeDB 3.0 will be our storage data structure and architecture that significantly boosts performance. We’re aiming to release 3.0 in the summer this year, along with preliminary benchmarks of TypeDB. ## Polymorphic databases ### Why TypeDB was built Data frequently exhibits polymorphic features in the form of inheritance hierarchies and interface dependencies. TypeDB was crafted to solve the inability of current database paradigms to natively express these polymorphic features. - Relational schemas have [no native capability for modeling polymorphic data](https://typedb.com/philosophy#why-do-we-need-a-polymorphic-database). - Unstructured databases eliminate the schemas entirely, but this [prevents declarative data retrieval](https://typedb.com/philosophy#why-do-we-need-a-polymorphic-database). - [ORMs work around the fundamental problem](https://typedb.com/philosophy#why-do-we-need-a-polymorphic-database) by trading off performance. ### Providing full support for polymorphism <!-- Polymorphism in programming languages and data modeling comes in the form of [interface](https://typedb.com/philosophy#what-defines-a-polymorphic-database), [inheritance](https://typedb.com/philosophy#what-defines-a-polymorphic-database), and [parametric polymorphism](https://typedb.com/philosophy#what-defines-a-polymorphic-database). --> In order to fully support polymorphism, a database needs to implement three key components: - Support for [**polymorphic** **schemas**](https://typedb.com/features#conceptual-modeling) that can express inheritance hierarchies and interface implementations. - Implementation of a fully [**variablizable** **query language**](https://typedb.com/features#polymorphic-queries) to support powerful [parametric](https://typedb.com/philosophy#what-defines-a-polymorphic-database) database operations. - Integration of an [**inference engine**](https://typedb.com/features#strong-type-system) to interpret variables in the semantic context given by the schema. ## The TypeDB database ### The schema TypeDB schemas are based on a modern type system that natively supports inheritance and interfaces, and follows a [conceptual data modeling](https://typedb.com/features#conceptual-modeling) approach, in which user-defined types subtype (based on their function) three root types: [entities](https://typedb.com/features#conceptual-modeling), [relations](https://typedb.com/features#expressive-relations), and [attributes](https://typedb.com/features#intuitive-attributes). - *Entities* are independent objects, - *Relations* depend on their *role* interfaces played by either entities or relations, - *Attributes* are properties with a value that can be *owned* by entities or relations. Interface and inheritance for these types can be combined in many ways, resulting in highly expressive ways of modeling data. ```php define full-name sub attribute, value string; id sub attribute, value string; email sub id; employee-id sub id; user sub entity, owns full-name, owns email @unique, plays mentorship:trainee; employee sub user, owns employee-id @key, plays mentorship:mentor; mentorship sub relation, relates mentor, relates trainee; ``` ### The query language The query language of TypeDB is [TypeQL](https://typedb.com/docs/typeql/overview). The syntax of TypeQL is fully variablizable and provides native support for polymorphic queries. The language is based on [fully declarative and composable](https://typedb.com/features#modern-language) patterns, mirroring the structure of natural language. ```php match $user isa user, has full-name $name, has email $email; # This returns all users of any type match $user isa employee, has full-name $name, has email $email, has employee-id $id; # This returns only users who are employees match $user-type sub user; $user isa $user-type, has full-name $name, has email $email; # This returns all users and their type ``` ### The inference engine Any query in TypeDB is [semantically validated](https://typedb.com/features#strong-type-system) by TypeDB’s inference engine for consistency with the database schema. This prevents invalid schema updates and data inserts before they can affect the integrity of the database. TypeDB can also work with data that is not physically stored in the database, but instead logically inferred based on user-specified [rules](https://typedb.com/features#symbolic-reasoning). This enables developers to cleanly separate their source data from their application logic, often allowing for complex systems to be described by combinations of simple rules. ```php define rule transitive-team-membership: when { (team: $team-1, member: $team-2) isa team-membership; (team: $team-2, member: $member) isa team-membership; } then { (team: $team-1, member: $member) isa team-membership; }; insert $john isa user, has email "john@vaticle.com"; $eng isa team, has name "Engineering "; $cloud isa team, has name "Cloud"; (team: $eng, member: $cloud) isa team-membership; (team: $cloud, member: $john) isa team-membership; match $john isa user, has email "john@vaticle.com"; (team: $team, member: $john) isa team-membership; # This will return both Cloud and Engineering for $team due to the defined rule ``` ## Effective database engineering TypeDB breaks down the patchwork of existing database paradigms into three fundamental ingredients: [types](https://typedb.com/features#strong-type-system), [inheritance](https://typedb.com/features#conceptual-modeling), and [interfaces](https://typedb.com/features#polymorphic-queries). This provides a unified way of working with data across all database applications, that directly impacts development: - Make use of full [object model parity](https://typedb.com/#solve-object-relational-mismatch-entirely-within-the-database) when working with OOP - Ensure [continuous extensibility](https://typedb.com/features#conceptual-modeling) of your data model - Work with high-level [logical abstractions](https://typedb.com/features#conceptual-modeling) eliminating the need for physical data modeling - Let TypeDB's inference engine guarantee [data-consistency](https://typedb.com/#avoid-data-redundancy-and-ensure-data-consistency-in-real-time) at all times - Write high-clarity code with TypeQL's [near-natural](https://typedb.com/features#modern-language) queries even for the most complex databases - Unleash the power of [fully declarative and composable](https://typedb.com/features#modern-language) patterns onto your data ## Installation and editions ### TypeDB editions * [TypeDB Cloud](https://cloud.typedb.com) — multi-cloud DBaaS * [TypeDB Cloud self-hosted](mailto://sales@vaticle.com) — allows you to deploy TypeDB Cloud in your own environment * **TypeDB Core** — Open-source edition of TypeDB ← _This repository_ For a comparison of all three editions, see the [Deploy](https://typedb.com/deploy) page on our website. ### Download and run TypeDB Core You can download TypeDB from the [GitHub Releases](https://github.com/vaticle/typedb/releases). Check our [Installation guide](https://typedb.com/docs/typedb/2.x/installation) to get started. ### Compiling TypeDB Core from source > Note: You DO NOT NEED to compile TypeDB from the source if you just want to use TypeDB. See the _"Download and Run > TypeDB Core"_ section above. 1. Make sure you have the following dependencies installed on your machine: - Java JDK 11 or higher - [Bazel 6 or higher](https://bazel.build/install). 2. You can build TypeDB with either one of the following commands, depending on the targeted architecture and Operation system: ```sh $ bazel build //:assemble-linux-x86_64-targz $ bazel build //:assemble-linux-arm64-targz $ bazel build //:assemble-mac-x86_64-zip $ bazel build //:assemble-mac-arm64-zip $ bazel build //:assemble-windows-x86_64-zip ``` Outputs to: `bazel-bin/`. 3. If you're on a Mac and would like to run any `bazel test` commands, you will need to install: - snappy: `brew install snappy` - jemalloc: `brew install jemalloc` ## Resources ### Developer resources - Documentation: https://typedb.com/docs - Discussion Forum: https://forum.typedb.com/ - Discord Chat Server: https://typedb.com/discord - Community Projects: https://github.com/typedb-osi ### Useful links If you want to begin your journey with TypeDB, you can explore the following resources: * More on TypeDB's [features](https://typedb.com/features) * In-depth dive into TypeDB's [philosophy](https://typedb.com/philosophy) * Our [TypeDB quickstart](https://typedb.com/docs/home/quickstart) * [TypeDB in 25 queries](https://typedb.com/docs/home/25-queries) * **[TypeQL](https://github.com/vaticle/typeql)** * **[TypeDB Studio](https://github.com/vaticle/typedb-studio)** ## Contributions TypeDB and TypeQL are built using various open-source frameworks and technologies throughout its evolution. Today TypeDB and TypeQL use [Speedb](https://www.speedb.io/), [pest](https://pest.rs/), [SCIP](https://www.scipopt.org), [Bazel](https://bazel.build), [gRPC](https://grpc.io), [ZeroMQ](https://zeromq.org), and [Caffeine](https://github.com/ben-manes/caffeine). Thank you! In the past, TypeDB was enabled by various open-source products and communities that we are hugely thankful to: [RocksDB](https://rocksdb.org), [ANTLR](https://www.antlr.org), [Apache Cassandra](http://cassandra.apache.org), [Apache Hadoop](https://hadoop.apache.org), [Apache Spark](http://spark.apache.org), [Apache TinkerPop](http://tinkerpop.apache.org), and [JanusGraph](http://janusgraph.org). ### Package hosting Package repository hosting is graciously provided by [Cloudsmith](https://cloudsmith.com). Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence. ## Licensing This software is developed by [Vaticle](https://vaticle.com/). It's released under the Mozilla Public License 2.0 (MPL 2.0). For license information, please see [LICENSE](https://github.com/vaticle/typedb/blob/master/LICENSE). Vaticle also provides a commercial license for TypeDB Cloud self-hosted - get in touch with our team at [commercial@vaticle.com](emailto://sales@vaticle.com). Copyright (C) 2023 Vaticle.
0
tinkerpop/gremlin
A Graph Traversal Language (no longer active - see Apache TinkerPop)
null
null
0
fabric8io/docker-maven-plugin
Maven plugin for running and creating Docker images
docker fabric8 java maven
# docker-maven-plugin [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.fabric8/docker-maven-plugin/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/io.fabric8/docker-maven-plugin/) [![Circle CI](https://circleci.com/gh/fabric8io/docker-maven-plugin/tree/master.svg?style=shield)](https://circleci.com/gh/fabric8io/docker-maven-plugin/tree/master) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fabric8io_docker-maven-plugin&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fabric8io_docker-maven-plugin) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=fabric8io_docker-maven-plugin&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=fabric8io_docker-maven-plugin) This is a Maven plugin for building Docker images and managing containers for integration tests. It works with Maven 3.0.5 and Docker 1.6.0 or later. #### Goals | Goal | Description | Default Lifecycle Phase | | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------- | | [`docker:start`](https://fabric8io.github.io/docker-maven-plugin/#docker:start) | Create and start containers | pre-integration-test | | [`docker:stop`](https://fabric8io.github.io/docker-maven-plugin/#docker:stop) | Stop and destroy containers | post-integration-test | | [`docker:build`](https://fabric8io.github.io/docker-maven-plugin/#docker:build) | Build images | install | | [`docker:watch`](https://fabric8io.github.io/docker-maven-plugin/#docker:watch) | Watch for doing rebuilds and restarts | | | [`docker:push`](https://fabric8io.github.io/docker-maven-plugin/#docker:push) | Push images to a registry | deploy | | [`docker:remove`](https://fabric8io.github.io/docker-maven-plugin/#docker:remove) | Remove images from local docker host | post-integration-test | | [`docker:logs`](https://fabric8io.github.io/docker-maven-plugin/#docker:logs) | Show container logs | | | [`docker:source`](https://fabric8io.github.io/docker-maven-plugin/#docker:source) | Attach docker build archive to Maven project | package | | [`docker:save`](https://fabric8io.github.io/docker-maven-plugin/#docker:save) | Save image to a file | | | [`docker:volume-create`](https://fabric8io.github.io/docker-maven-plugin/#docker:volume-create) | Create a volume to share data between containers | pre-integration-test | | [`docker:volume-remove`](https://fabric8io.github.io/docker-maven-plugin/#docker:volume-remove) | Remove a created volume | post-integration-test | | [`docker:copy`](https://fabric8io.github.io/docker-maven-plugin/#docker:copy) | Copy files and directories from a container | post-integration-test | #### Documentation * The **[User Manual](https://fabric8io.github.io/docker-maven-plugin)** [[PDF](https://fabric8io.github.io/docker-maven-plugin/docker-maven-plugin.pdf)] has a detailed reference for all and everything. * The [Introduction](doc/intro.md) is a high-level overview of this plugin's features and provides a usage example. provided goals and possible configuration parameters. * [Examples](doc/examples.md) are below `samples/` and contain example setups that you can use as blueprints for your projects. * [ChangeLog](doc/changelog.md) has the release history of this plugin. * [Contributing](CONTRIBUTING.md) explains how you can contribute to this project. Pull requests are highly appreciated! * We publish nightly builds on maven central. Read How to use [Docker Maven Plugin Snapshot artifacts](./doc/HowToUseDockerMavenPluginSnapshotArtifacts.md). #### Docker API Support * Docker 1.6 (**v1.18**) is the minimal required version * Docker 1.8.1 (**v1.20**) is required for `docker:watch` * Docker 1.9 (**v1.21**) is required for using custom networks and build args.
0
pagehelper/pagehelper-spring-boot
pagehelper-spring-boot
null
# PageHelper integration with Spring Boot PageHelper-Spring-Boot-Starter 帮助你集成分页插件到 Spring Boot。 PageHelper-Spring-Boot-Starter will help you use PageHelper with Spring Boot. Support PageHelper 6.x ## How to use 在 pom.xml 中添加如下依赖: Add the following dependency to your pom.xml: ```xml <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>2.1.0</version> </dependency> ``` ## 微信公众号 <img src="wx_mybatis.jpg" height="300"/> ## v2.1.0 - 2023-12-17 - 升级 PageHelper 到 6.1.0,支持异步 count 等功能,详细查看 [6.1.0](https://github.com/pagehelper/Mybatis-PageHelper/releases/tag/v6.1.0) - 升级 MyBatis 到 3.5.15 - 升级 springboot 到 2.7.18 - 新增参数 `orderBySqlParser`,`OrderBySqlParser`改为接口,允许通过`orderBySqlParser`参数替换为自己的实现 - 新增参数 `sqlServerSqlParser`,`SqlServerSqlParser`改为接口,允许通过`sqlServerSqlParser`参数替换为自己的实现 - 接口 `CountSqlParser`,`OrderBySqlParser`,`SqlServerSqlParser` 还支持SPI方式覆盖默认实现,优先级低于参数指定 ## v2.0.0 - 2023-11-05 - 升级 PageHelper 到 6.0.0,支持异步 count 等功能,详细查看 [6.0](https://github.com/pagehelper/Mybatis-PageHelper/releases/tag/v6.0.0) - 升级 MyBatis 到 3.5.15 - 升级 springboot 到 2.7.17 - 新增参数 `asyncCount`,增加异步count支持,默认`false`,单次设置:`PageHelper.startPage(1, 10).enableAsyncCount()`; - 新增参数 `countSqlParser`,`CountSqlParser`改为接口,允许通过`countSqlParser`参数替换为自己的实现 参数示例: ```properties pagehelper.async-count=true ``` ## v1.4.7 - 2023-06-03 - 升级 PageHelper 到 5.3.3 - 升级 MyBatis 到 3.5.13 - 升级 MyBatis Starter 到 2.3.1 - 升级 springboot 到 2.7.12 ## v1.4.6 - 2022-11-28 - 兼容 Spring Boot 3.0 by [pky920216344](https://github.com/pky920216344) - 功能完善:存在PageInterceptor及其子类就不再添加过滤器 by [jingheee](https://github.com/jingheee) ## v1.4.5 - 2022-09-18 - 升级 PageHelper 到 5.3.2 ## v1.4.4 - 2022-09-16 - 修复配置文件中kebab-case风格的配置项失效的问题 pr#138, by ShoWen - 兼容性支持,demo配置修改 - 升级 springboot 到 2.7.3 - ## v1.4.3 - 2022-06-18 - 升级 PageHelper 到 5.3.1 - 升级 MyBatis 到 3.5.10 - 升级 springboot 到 2.7.0 ## v1.4.2 - 2022-04-06 - 升级 MyBatis 到 3.5.9 - 升级 MyBatis Starter 到 2.2.2 - 升级 springboot 到 2.6.6 ## v1.4.1 - 2021-11-24 - 升级 springboot 到 2.6.0,兼容性修复,解决循环依赖 ## v1.4.0 - 2021-10-07 - 升级 PageHelper 到 5.3.0 - 升级 springboot 到 2.5.5 - 增加 `autoDialectClass` 参数,详情看 PageHelper 更新日志 ## v1.3.1 - 2021-06-20 - 升级 PageHelper 到 5.2.1 - 升级 MyBatis 到 3.5.7 - 升级 MyBatis Starter 到 2.2.0 - 升级 springboot 到 2.5.1 - `PageHelperAutoConfiguration` 使用 `InitializingBean` 接口代替 `@PostConstruct` 注解 ## v1.3.0 - 2020-07-26 - 升级 PageHelper 到 5.2.0,包含大量改动,详细内容参考:[PageHelper 更新日志](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/Changelog.md) - 升级 MyBatis 到 3.5.5 - 升级 MyBatis Starter 到 2.1.3 - 升级 springboot 到 2.3.1.RELEASE - `PageHelperAutoConfiguration` 增加 `@Lazy(false)` 注解,当配置延迟加载时,避免分页插件出错 - 添加分页插件时判断是否已经配置过同一个实例(不同的配置是不同的实例) ## v1.2.13 - 2019-11-26 - 升级 PageHelper 到 5.1.11 - 升级 MyBatis 到 3.5.3 - 升级 MyBatis Starter 到 2.1.1 - 升级 springboot 到 2.2.1.RELEASE ## v1.2.12 - 2019-06-05 - 升级 PageHelper 到 5.1.10 ## v1.2.11 - 2019-05-29 - 升级 PageHelper 到 5.1.9 - 升级 MyBatis 到 3.5.1 - 升级 MyBatis Starter 到 2.0.1 - 升级 springboot 到 2.1.5.RELEASE ## v1.2.10 - 2018-11-11 - 升级 PageHelper 到 5.1.8 - 升级 springboot 到 2.1.0.RELEASE ## v1.2.9 - 2018-10-11 - 升级 PageHelper 到 5.1.7 >v1.2.8 由于未修改版本,仍然和 v1.2.7 相同。 ## v1.2.7 - 2018-09-04 - 升级 PageHelper 到 5.1.6 ## v1.2.6 - 2018-09-04 - 升级 PageHelper 到 5.1.5 ## v1.2.5 - 2018-04-22 - 升级 PageHelper 到 5.1.4(默认增加对达梦数据库的支持) - 升级 MyBatis 到 3.4.6 ## v1.2.4 - 2018-04-07 - 升级 PageHelper 到 5.1.3 - 升级 springboot 到 2.0.1.RELEASE - 增加 dialectAlias 参数,允许配置自定义实现的 别名,可以用于根据JDBCURL自动获取对应实现,允许通过此种方式覆盖已有的实现,配置示例如(多个配置用分号`;`隔开): ```properties pagehelper.dialect-alias=oracle=com.github.pagehelper.dialect.helper.OracleDialect ``` - 增加 defaultCount 参数,用于控制默认不带 count 查询的方法中,是否执行 count 查询,默认 true 会执行 count 查询,这是一个全局生效的参数,多数据源时也是统一的行为。配置示例如: ```properties pagehelper.default-count=false ``` ## v1.2.3 - 2017-09-25 - 修改属性获取方式,兼容 Spring Boot 1.x 和 2.x - 第三方扩展分页插件时使用到额外属性时,配置属性要和属性名完全匹配 - 升级 springboot 到 1.5.7.RELEASE - 升级 MyBatis-Starter 版本到 1.3.1 ## v1.2.2 - 2017-09-18 - 升级 pagehelper 到 5.1.2 ## v1.2.1 - 2017-08-30 - 升级 pagehelper 到 5.1.1 ## v1.2.0 - 2017-08-28 - 升级 pagehelper 到 5.1.0 ## v1.1.3 - 2017-08-01 - 升级 pagehelper 到 5.0.4 - 升级 springboot 到 1.5.6.RELEASE ## v1.1.2 - 2017-06-28 by [drtrang](https://github.com/drtrang) - 升级 pagehelper 到 5.0.3 - 升级 springboot 到 1.5.4.RELEASE - 将 maven-compiler-plugin 和 maven-source-plugin 从 release profile 中提出来作为全局插件,并且增加继承属性,解决 `PageHelperAutoConfiguration` 类中的 `@Override` 报错问题。 ## v1.1.1 - 2017-04-25 - 增加多数据源支持 [#pr6](https://github.com/pagehelper/pagehelper-spring-boot/pull/6) by [yangBin666](https://github.com/yangBin666) - 升级分页插件 PageHelper 版本到 5.0.1 - 升级 MyBatis 版本到 3.4.4 - 升级 Spring Boot 版本到 1.5.3.RELEASE - 升级 MyBatis-Starter 版本到 1.3.0 ## v1.1.0 - 2017-02-04 - 解决可能会注册两次分页插件的问题。 - 增加 PageHelperProperties 注入,常用属性可以通过 IDE 自动提示 ![IDE 自动提示](properties.png) ## Example >https://github.com/abel533/MyBatis-Spring-Boot ## PageHelper >https://github.com/pagehelper/Mybatis-PageHelper ## Special Configurations 一般情况下,你不需要做任何配置。 Normally, you don't need to do any configuration. 如果需要配置,可以使用如下方式进行配置: You can config PageHelper as the following: application.properties: ```properties pagehelper.propertyName=propertyValue ``` 注意 pagehelper 配置,因为分页插件根据自己的扩展不同,支持的参数也不同,所以不能用固定的对象接收参数,所以这里使用的 `Map<String,String>`,因此参数名是什么这里就写什么,IDE 也不会有自动提示。 关于可配置的属性请参考 [如何使用分页插件](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md)。 You can configure the properties of the reference here [How to use the PageHelper](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/en/HowToUse.md). ## Interceptor Order 如果你想要控制 拦截器插件的顺序,可以通过下面注解控制: If you want to control the order in which the interceptor plug-in, you can use the following annotation control: ```java @AutoConfigureAfter(PageHelperAutoConfiguration.class) //Or @AutoConfigureBefore(PageHelperAutoConfiguration.class) ``` ## 感谢所有项目贡献者! <a href="https://github.com/pagehelper/pagehelper-spring-boot/graphs/contributors"> <img src="https://contributors-img.web.app/image?repo=pagehelper/pagehelper-spring-boot" /> </a>
0
angryip/ipscan
Angry IP Scanner - fast and friendly network scanner
null
# Angry IP Scanner This is the source code of Angry IP Scanner, licensed with GPL v2. [Official site](https://angryip.org/) The code is written mostly in Java (currently, source level 11). [SWT library from Eclipse project](https://eclipse.org/swt/) is used for GUI that provides native components for each supported platform. The project runs on Linux, Windows and macOS. ## Helping / Contributing As there are millions of different networks, configurations and devices, please help with submitting a **Pull Request** if something doesn't work as you expect (especially macOS users). Any problem is easy to fix if you have an environment to reproduce it 😀 For that, download [Intellij IDEA community edition](https://www.jetbrains.com/idea/download/) and open the cloned project. Then, you can run Angry IP Scanner in Debug mode and put a breakpoint into the [desired Fetcher class](src/net/azib/ipscan/fetchers). ## Building [![Actions Status](https://github.com/angryip/ipscan/workflows/CI/badge.svg)](https://github.com/angryip/ipscan/actions) Use Gradle for building a package for your desired platform: `./gradlew` or `make` in the project dir for the list of available targets. `./gradlew current` would build the app for your current platform The resulting binaries will be put into the `build/libs` directory. Run jar files with `java -jar <jar-file>`. Deb and rpm packages can be built only on Linux (tested on Ubuntu). Windows installer can be built on Windows only. `./gradlew all` will build packages for all OS (tested on Ubuntu only, see dependencies below). ### Dependencies On Ubuntu install the following packages: ``` sudo apt install openjdk-11-jdk rpm fakeroot ``` Install OpenJDK on other platforms as you usually do it.
0
scalad/Note
常规Java工具,算法,加密,数据库,面试题,源代码分析,解决方案
java linux mysql security utils
### 常规Java工具,算法,加密,数据库,面试题,源代码分析,解决方案 <br> 有家杂志曾对全国60岁以上的老人进行了这样一次问卷调查:你最后悔什么? 列出10项人们生活中容易后悔的事情,供被调查者选择,回收有效问卷并进行统计分析后,竟得出了这样的结果。 **第一名:年轻时不够努力,导致一事无成(75%)** ![](https://github.com/silence940109/Java/blob/master/image/desktop1.jpg) 所谓少壮不努力,老大徒伤悲。青春岁月里,又常常碰到那么多的诱惑甚至陷阱,当你猛然醒悟时,也许白发早生,竟然一事无成。 趁着你还有时间、有精力、有体力,赶快制定一个切实可行的计划,然后开始百折不挠一路向前,老来回忆,少些遗憾。 **第二名:年轻的时候选错了职业(70%)** ![](https://github.com/silence940109/Java/blob/master/image/desktop2.jpg) 三个大学生被同时分配到某机关工作,一年后,其中一个由于不甘心整天看主管脸色,跳槽到另一家企业去了,另外两位依旧安稳地过着朝九晚五的日子。又一年后,另外一个学生决定辞职下海,剩下那个依然没有动心。 若干年后,三人相聚,到企业去的那位同学成了高管,下海的那位成了千万富翁,而留在机关的那位却依旧在领导的呵斥声中消磨着自己所剩无几的“大好时光”。 许多人在选择职业时考虑的第一因素就是稳定的收入和安稳舒适的生活,而不太愿意去面对那些具有挑战性的机会。没有了压力,自然就缺乏了动力,没有了动力,也就埋没了潜力。 **第三名:对子女教育不当(62%)** ![](https://github.com/silence940109/Java/blob/master/image/desktop13.jpg) 孩子是自己生命、希望的延续,许多人为了孩子可以倾尽所有,但望子成龙、盼女成凤可能只是父母单方面的良好愿望。对于儿女而言,他们也许只是想做一个简单快乐的平凡人。 许多父母采取了强制、监督甚至棍棒等方式来逼迫孩子按照自己设计的线路发展。可到最后,多数父母却不得不在对现实感到失望,只有极少数所谓的“成功者”例外。他们也不由地感叹孩子这些年过得太苦,没有享受到应有的快乐与阳光。 **第四名:没好好珍惜自己的伴侣(57%)** ![](https://github.com/silence940109/Java/blob/master/image/desktop4.jpg) 醉过方知酒浓,爱过方知情重。感情,总是拥有时不懂得珍惜,失去后才知道珍贵。人类永远发明不出的两种物质,一是忘情水,二是后悔药。年轻的时候不去珍惜、体谅和理解,待到年老时,后悔已经来不及。 **第五名:没有善待自己的身体(49%)** ![](https://github.com/silence940109/Java/blob/master/image/desktop5.jpg) “身体是革命的本钱”,这句话永远都不会过时,许多人在60岁前用身体去换取一切,在60岁以后又用一切去换取身体的健康。 世界上没有什么东西比自己的健康更加重要,没有一个好的身体,纵有千万家产又如何?
0
kaitoy/pcap4j
A Java library for capturing, crafting, and sending packets.
capture-packets java java-library jna libpcap npcap pcap-library sending-packets winpcap
[Japanese](/README_ja.md) <img alt="Pcap4J" title="Pcap4J" src="https://github.com/kaitoy/pcap4j/raw/v1/www/images/logos/pcap4j-logo-color.png" width="70%" style="margin: 0px auto; display: block;" /> [Logos](https://github.com/kaitoy/pcap4j/blob/v1/www/logos.md) [![Slack](http://pcap4j-slackin.herokuapp.com/badge.svg)](https://pcap4j-slackin.herokuapp.com/) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.pcap4j/pcap4j-distribution/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.pcap4j/pcap4j-distribution) [![Build Status](https://travis-ci.org/kaitoy/pcap4j.svg?branch=v1)](https://travis-ci.org/kaitoy/pcap4j) [![CircleCI](https://circleci.com/gh/kaitoy/pcap4j/tree/v1.svg?style=svg)](https://circleci.com/gh/kaitoy/pcap4j/tree/v1) [![Build status](https://ci.appveyor.com/api/projects/status/github/kaitoy/pcap4j?branch=v1&svg=true)](https://ci.appveyor.com/project/kaitoy/pcap4j/branch/v1) [![Coverage Status](https://coveralls.io/repos/kaitoy/pcap4j/badge.svg)](https://coveralls.io/r/kaitoy/pcap4j) [![Code Quality: Java](https://img.shields.io/lgtm/grade/java/g/kaitoy/pcap4j.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kaitoy/pcap4j/context:java) [![Total Alerts](https://img.shields.io/lgtm/alerts/g/kaitoy/pcap4j.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kaitoy/pcap4j/alerts) Pcap4J ====== Pcap4J is a Java library for capturing, crafting and sending packets. Pcap4J wraps a native packet capture library ([libpcap](http://www.tcpdump.org/), [WinPcap](http://www.winpcap.org/), or [Npcap](https://github.com/nmap/npcap)) via [JNA](https://github.com/twall/jna) and provides you Java-Oriented APIs. Contents -------- * [Download](#download) * [Why Pcap4J was born](#why-pcap4j-was-born) * [Features](#features) * [How to use](#how-to-use) * [System requirements](#system-requirements) * [Dependencies](#dependencies) * [Platforms](#platforms) * [Others](#others) * [Documents](#documents) * [How to run samples](#how-to-run-samples) * [How to use in Maven project](#how-to-use-in-maven-project) * [About native library loading](#about-native-library-loading) * [WinPcap or Npcap](#winpcap-or-npcap) * [Docker](#docker) * [How to build](#how-to-build) * [Contributing Code](#contributing-code) * [License](#license) * [Contacts](#contacts) Download -------- Pcap4J is available on the Maven Central Repository. * Pcap4J 1.8.2 * without source: [pcap4j-distribution-1.8.2-bin.zip](http://search.maven.org/remotecontent?filepath=org/pcap4j/pcap4j-distribution/1.8.2/pcap4j-distribution-1.8.2-bin.zip) * with source: [pcap4j-distribution-1.8.2-src.zip](http://search.maven.org/remotecontent?filepath=org/pcap4j/pcap4j-distribution/1.8.2/pcap4j-distribution-1.8.2-src.zip) * Snapshot builds * https://oss.sonatype.org/content/repositories/snapshots/org/pcap4j/pcap4j-distribution/ Why Pcap4J was born ------------------- I have been developing an SNMP network simulator (SNeO, available at the link below) by Java, which needed to capture packets and I found the [pcap](http://en.wikipedia.org/wiki/Pcap) was useful for it. Although there are some implementations of the pcap such as libpcap (for UNIX) and WinPcap (for Windows), because they are both native libraries, a Java wrapper library was necessary in order to use them for SNeO. I researched it and found three Java wrapper libraries for pcap: [jpcap](http://jpcap.sourceforge.net/), [jNetPcap](http://jnetpcap.com/), and [Jpcap](http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/). But both jpcap and jNetPcap were unsuitable for SNeO because they seemed to be designed for mainly capturing packets and not to be useful for making and sending packets so much. On the other hand, Jpcap looked useful for making and sending packets. But it had a defect in capturing ICMP packets and its development seemed to be stopped long ago. That's why I started developing Pcap4j. Features -------- * Capturing packets via a network interface and converting them into Java objects. You can get/set each field of a packet header via the Java object converted from the packet. You can also craft a packet object from scratch. * Sending packet objects to a real network. * Supported protocols: * Ethernet, Linux SLL, raw IP, PPP (RFC1661, RFC1662), BSD (Mac OS X) loopback encapsulation, and Radiotap * IEEE 802.11 * Probe Request * LLC and SNAP * IEEE802.1Q * ARP * IPv4 (RFC791 and RFC1349) and IPv6 (RFC2460) * ICMPv4 (RFC792) and ICMPv6 (RFC4443, RFC4861, and RFC6275) * TCP (RFC793, RFC2018, and draft-ietf-tcpm-1323bis-21), UDP, and SCTP (only common header) * GTPv1 (only GTP-U and GTP-C header) * DNS (RFC1035, RFC3596, and RFC6844) * All built-in packet classes are serializable and thread-safe (practically immutable). * You can add a protocol support without modifying Pcap4J library itself. * Dumping and reading pcap-formatted files (e.g. a capture file of Wireshark). How to use ---------- #### System requirements #### ##### Dependencies ##### Pcap4j 1.1.0 or older needs Java 5.0+. Pcap4j 1.2.0 or newer needs Java 6.0+. And also a pcap native library (libpcap 1.0.0+, WinPcap 3.0+, or Npcap), jna, slf4j-api, and an implementation of logger for slf4j are required. I'm using the following libraries for the test. * libpcap 1.1.1 * WinPcap 4.1.2 * jna 5.1.0 * slf4j-api 1.7.25 * logback-core 1.0.0 * logback-classic 1.0.0 ##### Platforms ##### I tested Pcap4j on the following OSes with x86 or x64 processors. * Windows: XP, Vista, 7, [10](http://tbd.kaitoy.xyz/2016/01/12/pcap4j-with-four-native-libraries-on-windows10/), 2003 R2, 2008, 2008 R2, and 2012 * Linux * RHEL: 5, 6, and 7 * CentOS: 5, 6, and 7 * Ubuntu: 13 * UNIX * Solaris: 10 * FreeBSD: 10 And tomute tested Pcap4j on Mac OS X. The report is [here](http://tomute.hateblo.jp/entry/2013/01/27/003209). Thank you, tomute! I hope Pcap4j can run on the other OSes supported by both JNA and libpcap. ##### Others ##### Pcap4J needs administrator/root privileges. Or, if on Linux, you can run Pcap4J with a non-root user by granting capabilities `CAP_NET_RAW` and `CAP_NET_ADMIN` to your java command by the following command: `setcap cap_net_raw,cap_net_admin=eip /path/to/java` #### Documents #### The latest JavaDoc is [here](https://www.javadoc.io/doc/org.pcap4j/pcap4j-distribution/1.8.2). Each version's JavaDoc is on the [Maven Central Repository](http://search.maven.org/#search|ga|1|g%3A%22org.pcap4j%22). Refer to [here](https://github.com/kaitoy/pcap4j/blob/v1/www/pcap4j_modules.md) for information about Pcap4J modules. Because Pcap4J is a wrapper of a pcap native library, the following documents help you to understand how to use Pcap4J. * [Programming with pcap](http://www.tcpdump.org/pcap.html) * [WinPcap Manuals](http://www.winpcap.org/docs/default.htm) * [Mapping between pcap API and Pcap4J API](https://github.com/kaitoy/pcap4j/blob/v1/www/api_mappings.md) You can learn how to write Pcap4J programs from [samples](https://github.com/kaitoy/pcap4j/tree/v1/pcap4j-sample/src/main/java/org/pcap4j/sample). Learn more about Pcap4j from the following documents: * [Learn about packet class](https://github.com/kaitoy/pcap4j/blob/v1/www/Packet.md) * [Learn about Packet Factory](https://github.com/kaitoy/pcap4j/blob/v1/www/PacketFactory.md) * [How to add protocol support](https://github.com/kaitoy/pcap4j/blob/v1/www/HowToAddProtocolSupport.md) * [kaitoy's blog](http://tbd.kaitoy.xyz/tags/pcap4j/) #### How to run samples #### See the following examples: * [org.pcap4j.sample.Loop](https://github.com/kaitoy/pcap4j/blob/v1/www/sample_Loop.md) * [org.pcap4j.sample.SendArpRequest](https://github.com/kaitoy/pcap4j/blob/v1/www/sample_SendArpRequest.md) If you want to run a sample in pcap4j-sample on Eclipse, add pcap4j-packetfactory-static or pcap4j-packetfactory-propertiesbased project to the top of User Entries in Classpath tab of the Run Configuration for the sample. #### How to use in Maven project #### Add a dependency to the pom.xml as like below: ```xml <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"> ... <dependencies> <dependency> <groupId>org.pcap4j</groupId> <artifactId>pcap4j-core</artifactId> <version>1.8.2</version> </dependency> <dependency> <groupId>org.pcap4j</groupId> <artifactId>pcap4j-packetfactory-static</artifactId> <version>1.8.2</version> </dependency> ... </dependencies> ... </project> ``` #### About native library loading #### By default, Pcap4j loads the native libraries on the following conditions: * Windows * search path: The paths in the `PATH` environment variable, etc. (See [MSDN](https://msdn.microsoft.com/en-us/library/7d83bc18.aspx) for the details.) * file name: wpcap.dll and Packet.dll * Linux/UNIX * search path: The search paths of shared libraries configured on the OS. (e.g. The paths in the `LD_LIBRARY_PATH` environment variable) * file name: libpcap.so * Mac OS X * search path: The search paths of shared libraries configured on the OS. (e.g. The paths in the `DYLD_LIBRARY_PATH` environment variable) * file name: libpcap.dylib You can use the following Java system properties to change the default behavior. * jna.library.path: The search path * org.pcap4j.core.pcapLibName: The full path of the pcap library (wpcap.dll, libpcap.so, or libpcap.dylib) * (Windows only) org.pcap4j.core.packetLibName: The full path of the packet library (Packet.dll) ##### WinPcap or Npcap ##### There are two native pcap libraries for Windows; WinPcap and Npcap. The development of WinPcap has stopped since version 4.1.3 (libpcap 1.0.0 base) was released on 3/8/2013, while Npcap is still being developed. So, you should pick Npcap if you want to use new features or so. Pcap4J can load WinPcap without tricks because it's installed in `%SystemRoot%\System32\`. On the other hand, because Npcap is installed in `%SystemRoot%\System32\Npcap\` by default, you need to do either of the following so that Pcap4J can load it: * Add `%SystemRoot%\System32\Npcap\` to `PATH`. * Set `jna.library.path` to `%SystemRoot%\System32\Npcap\`. * Set `org.pcap4j.core.pcapLibName` to `%SystemRoot%\System32\Npcap\wpcap.dll` and `org.pcap4j.core.packetLibName` to `%SystemRoot%\System32\Npcap\Packet.dll`. * Install Npcap with `WinPcap Compatible Mode` on. ### Docker ### [![](https://images.microbadger.com/badges/image/kaitoy/pcap4j.svg)](https://microbadger.com/images/kaitoy/pcap4j) A Docker image for Pcap4J on CentOS is available at [Docker Hub](https://registry.hub.docker.com/u/kaitoy/pcap4j/). Download it by `docker pull kaitoy/pcap4j` and execute `docker run kaitoy/pcap4j:latest` to start capturing packets from eth0 on the container. This image is built everytime a commit is made on the Git repositry. How to build ------------ 1. Install libpcap, WinPcap, or Npcap: Install WinPcap (if Windows) or libpcap (if Linux/UNIX). It's needed for the unit tests which are run during a build. 2. Install JDK: Download and install JDK 9, 10, or 11, and set the environment variable ***JAVA_HOME*** properly. 3. Add the JDK to [Maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html): Create [toolchains.xml](https://maven.apache.org/ref/3.6.1/maven-core/toolchains.html) describing the JDK installed at the previous step and put it into `~/.m2/`. `toolchains.xml` is like below: ```xml <?xml version="1.0" encoding="UTF-8"?> <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd"> <toolchain> <type>jdk</type> <provides> <version>11</version> </provides> <configuration> <jdkHome>/path/to/jdk-11</jdkHome> </configuration> </toolchain> </toolchains> ``` 4. Install Git: Download [Git](http://git-scm.com/downloads) and install it. This step is optional. 5. Clone the Pcap4J repository: If you installed Git, execute the following command: `git clone git@github.com:kaitoy/pcap4j.git`<br> Otherwise, download the repository as a [zip ball](https://github.com/kaitoy/pcap4j/zipball/v1) and extract it. 6. Build: Open a command prompt/a terminal, `cd` to the project root directory, and execute `./mvnw install`. Note Administrator/root privileges are needed for the unit tests. Contributing Code ----------------- 1. Fork this repository. 2. Create a branch from v1 branch. 3. Write code. * Please refer to [This PR](https://github.com/kaitoy/pcap4j/pull/70) as an example when adding protocol support. * This project follows [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). Execute the following command to format your code: `mvnw com.coveo:fmt-maven-plugin:format` 4. Send a PR from the branch. License ------- [LICENSE](/LICENSE) Contacts -------- Kaito Yamada (kaitoy@pcap4j.org)
0
waylau/netty-4-user-guide-demos
Netty demos. (Netty 案例大全)
java netty
# Netty demos. (Netty 案例大全) Demos of [Netty 4.x User Guide](https://github.com/waylau/netty-4-user-guide) 《Netty 4.x 用户指南》/《Netty原理解析与开发实战》,文中用到的例子源码。 ## 版本 涉及的相关技术及版本如下。 * Netty 4.1.52.Final * Jackson 2.10.1 * JUnit 5.5.2 ## 示例 包含示例如下: * [Java标准I/O实现Echo服务器、客户端](netty4-demos/src/main/java/com/waylau/java/demo/net) * [Java NIO实现Echo服务器、客户端](netty4-demos/src/main/java/com/waylau/java/demo/nio) * [Java AIO实现Echo服务器、客户端](netty4-demos/src/main/java/com/waylau/java/demo/aio) * [Netty实现Echo服务器、客户端](netty4-demos/src/main/java/com/waylau/netty/demo/echo) * [Netty实现丢弃服务器](netty4-demos/src/main/java/com/waylau/netty/demo/discard) * [Netty实现时间服务器](netty4-demos/src/main/java/com/waylau/netty/demo/time) * [Java ByteBuffer使用案例](netty4-demos/src/main/java/com/waylau/java/demo/buffer) * [Netty ByteBuf使用案例](netty4-demos/src/main/java/com/waylau/netty/demo/buffer) * [Netty ByteBuf的三种使用模式](netty4-demos/src/main/java/com/waylau/netty/demo/buffer) * [Netty实现无连接协议Echo服务器、客户端](netty4-demos/src/main/java/com/waylau/netty/demo/echo) * [Java线程池示例](netty4-demos/src/main/java/com/waylau/java/demo/concurrent/ThreadPoolExecutorDemo.java) * [Java Reactor示例](netty4-demos/src/main/java/com/waylau/java/demo/reactor) * [自定义基于换行的解码器](netty4-demos/src/main/java/com/waylau/java/demo/decoder) * [TCP客户端](netty4-demos/src/main/java/com/waylau/java/TcpClient.java) * [自定义编码器](netty4-demos/src/main/java/com/waylau/java/demo/encoder) * [自定义编解码器](netty4-demos/src/main/java/com/waylau/java/demo/codec) * [实现心跳机制](netty4-demos/src/main/java/com/waylau/java/demo/heartbeat) * [基于Netty的对象序列化](netty4-demos/src/main/java/com/waylau/java/demo/codec/serialization) * [基于Jackson的JSON序列化](netty4-demos/src/main/java/com/waylau/java/demo/codec/jackcon) * [基于SSL/TSL的双向认证Echo服务器和客户端](netty4-demos/src/main/java/com/waylau/java/demo/secureecho) * [基于HTTP的Web服务器](netty4-demos/src/main/java/com/waylau/java/demo/httpserver) * [基于HTTP/2的Web服务器和客户端](netty4-demos/src/main/java/com/waylau/java/demo/http2) * [基于WebSocket的聊天室](netty4-demos/src/main/java/com/waylau/java/demo/websocketchat) * [lite-monitoring](https://github.com/waylau/lite-monitoring) * [lite-monitoring-ui](https://github.com/waylau/lite-monitoring-ui) * 陆续整理中... ## 配套书籍 * 开源书《[Netty 4.x User Guide](https://github.com/waylau/netty-4-user-guide)》 * 正式出版物《[Netty原理解析与开发实战](https://book.douban.com/subject/35317298/)》
0
jenly1314/ZXingLite
🔥 ZXing的精简极速版,优化扫码和生成二维码/条形码,内置闪光灯等功能。扫描风格支持:微信的线条样式,支付宝的网格样式。几句代码轻松拥有扫码功能 ,ZXingLite让集成更简单。(扫码识别速度快如微信)
alipay-scan barcode barcode-scanner barcode-scanning camerax code-generator qbar qr-code qrcode qrcode-scanner scan scancode scanner wechat-scan zbar zxing zxing-library zxing-lite zxinglib zxinglibrary
# ZXingLite ![Image](app/src/main/ic_launcher-web.png) [![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/ZXingLite/master/app/release/app-release.apk) [![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/zxing-lite)](https://repo1.maven.org/maven2/com/github/jenly1314/zxing-lite) [![JCenter](https://img.shields.io/badge/JCenter-2.0.3-46C018.svg)](https://bintray.com/beta/#/jenly/maven/zxing-lite) [![JitPack](https://jitpack.io/v/jenly1314/ZXingLite.svg)](https://jitpack.io/#jenly1314/ZXingLite) [![CI](https://travis-ci.org/jenly1314/ZXingLite.svg?branch=master)](https://travis-ci.org/jenly1314/ZXingLite) [![CircleCI](https://circleci.com/gh/jenly1314/ZXingLite.svg?style=svg)](https://circleci.com/gh/jenly1314/ZXingLite) [![API](https://img.shields.io/badge/API-21%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=21) [![License](https://img.shields.io/badge/license-Apche%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义;使用ZXingLite可快速实现扫码识别相关功能。 > 简单如斯,你不试试? ## Gif 展示 ![Image](GIF.gif) > 你也可以直接下载 [演示App](https://raw.githubusercontent.com/jenly1314/ZXingLite/master/app/release/app-release.apk) 体验效果 ## 引入 ### Gradle: 1. 在Project的 **build.gradle** 或 **setting.gradle** 中添加远程仓库 ```gradle repositories { //... mavenCentral() } ``` 2. 在Module的 **build.gradle** 里面添加引入依赖项 ```gradle // AndroidX 版本 implementation 'com.github.jenly1314:zxing-lite:3.1.0' ``` ### 温馨提示 #### 关于ZXingLite版本与编译的SDK版本要求 > 使用 **v3.1.x** 以上版本时,要求 **compileSdkVersion >= 34** > 使用 **v3.0.x** 以上版本时,要求 **compileSdkVersion >= 33** > 如果 **compileSdkVersion < 33** 请使用 [**v2.x版本**](https://github.com/jenly1314/ZXingLite/tree/2.x/) ## 使用 ### 版本变化说明 #### 3.x版本的变化 从 **2.x** 到 **3.x** 主要变化如下: * 2.x版本中的 **CameraScan** 相关核心类被移除了; > 从3.0.0版本开始改为依赖 [CameraScan](https://github.com/jenly1314/CameraScan);([CameraScan](https://github.com/jenly1314/CameraScan)是一个独立的库,单独进行维护) * 2.x版本中的 **ViewfinderView** 被移除了; > 从3.0.0版本开始改为依赖 [ViewfinderView](https://github.com/jenly1314/ViewfinderView);([ViewfinderView](https://github.com/jenly1314/ViewfinderView)是一个独立的库,单独进行维护) * 2.x版本中的 **CaptureActivity** 和 **CaptureFragment** 相关基类被移除了; > 从3.0.0版本开始改为 **BarcodeCameraActivity** 和 **BarcodeCameraFragment** 除了以上几点主要差异变化,3.x版本的整体使用方式和2.x基本类似;3.x版本在2.x版本的基础上再次进行重构,将 **CameraScan** 相关的公共基础类从 **ZXingLite** 中移除后,维护起来更方便了。 > 如果你是从 **2.x** 版本升级至 **3.x** 版本,那么你需要知道上面所说的主要差异;特别是独立出去单独维护的库,其包名都有所变化,这一点需要特别注意;请谨慎升级。 > 如果你使用的是2.x版本的话请直接[查看v2.x分支版本](https://github.com/jenly1314/ZXingLite/tree/2.x/) #### 3.x版本的使用 3.x的实现主要是以 [CameraScan](https://github.com/jenly1314/CameraScan)作为基础库去实现具体的分析检测功能,所以你可以先去看下 [CameraScan](https://github.com/jenly1314/CameraScan)的使用说明;在了解了 [CameraScan](https://github.com/jenly1314/CameraScan)的基本使用方式后,然后再结合当前的使用说明就可以轻松的集成并使用 **ZXingLite**了。 ### 主要类说明 #### 关于Analyzer的实现类 内部提供了Analyzer对应的实现,都是为快速实现扫码识别而提供的分析器。 内部提供的分析器有多个;一般情况下,你只需要知道最终实现的 [**MultiFormatAnalyzer**](zxing-lite/src/main/java/com/king/zxing/analyze/MultiFormatAnalyzer.java) 和 [**QRCodeAnalyzer**](zxing-lite/src/main/java/com/king/zxing/analyze/QRCodeAnalyzer.java) 即可: **MultiFormatAnalyzer** 和 **QRCodeAnalyzer** 的主要区别,从名字大概就能看的出来;一个是可识别多种格式,一个是只识别二维码(具体需要支持识别哪些格式的条码,其实还要看提供的**DecodeConfig**是怎么配置的)。 > 本可以不需要 ****QRCodeAnalyzer****,之所以提供一个 **QRCodeAnalyzer** 是因为有很多需求是只需要识别二维码就行;如果你有连续扫码的需求或不知道怎么选时,推荐直接选择 **MultiFormatAnalyzer** 。 #### 关于DecodeConfig DecodeConfig:解码配置;主要用于在扫码识别时,提供一些配置,便于扩展。通过配置可决定内置分析器的能力,从而间接的控制并简化扫码识别的流程。一般在使用 **Analyzer** 的实现类时,你可能会用到。 #### 关于DecodeFormatManager DecodeConfig:解码格式管理器;主要将多种条码格式进行划分与归类,便于提供快捷配置。 #### 关于CodeUtils 工具类 **CodeUtils** 中主要提供;解析条形码/二维码、生成条形码/二维码相关的能力。 CodeUtils的使用示例 ```Java // 生成二维码 CodeUtils.createQRCode(content,600,logo); // 生成条形码 CodeUtils.createBarCode(content, BarcodeFormat.CODE_128,800,200); // 解析条形码/二维码 CodeUtils.parseCode(bitmap); // 解析二维码 CodeUtils.parseQRCode(bitmap); ``` #### 关于BarcodeCameraScanActivity 通过继承BarcodeCameraScanActivity实现扫二维码完整示例 ```java public class QRCodeScanActivity extends BarcodeCameraScanActivity { @Override public void initCameraScan(@NonNull CameraScan<Result> cameraScan) { super.initCameraScan(cameraScan); // 根据需要设置CameraScan相关配置 cameraScan.setPlayBeep(true); } @Nullable @Override public Analyzer<Result> createAnalyzer() { // 初始化解码配置 DecodeConfig decodeConfig = new DecodeConfig(); decodeConfig.setHints(DecodeFormatManager.QR_CODE_HINTS)//如果只有识别二维码的需求,这样设置效率会更高,不设置默认为DecodeFormatManager.DEFAULT_HINTS .setFullAreaScan(false)//设置是否全区域识别,默认false .setAreaRectRatio(0.8f)//设置识别区域比例,默认0.8,设置的比例最终会在预览区域裁剪基于此比例的一个矩形进行扫码识别 .setAreaRectVerticalOffset(0)//设置识别区域垂直方向偏移量,默认为0,为0表示居中,可以为负数 .setAreaRectHorizontalOffset(0);//设置识别区域水平方向偏移量,默认为0,为0表示居中,可以为负数 // BarcodeCameraScanActivity默认使用的MultiFormatAnalyzer,这里可以改为使用QRCodeAnalyzer return new QRCodeAnalyzer(decodeConfig); } /** * 布局ID;通过覆写此方法可以自定义布局 * * @return 布局ID */ @Override public int getLayoutId() { return R.layout.activity_qrcode_scan; } @Override public void onScanResultCallback(@NonNull AnalyzeResult<Result> result) { // 停止分析 getCameraScan().setAnalyzeImage(false); // 返回结果 Intent intent = new Intent(); intent.putExtra(CameraScan.SCAN_RESULT, result.getResult().getText()); setResult(Activity.RESULT_OK, intent); finish(); } } ``` > **BarcodeCameraScanFragment** 的使用方式与之类似。 更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jitpack.io/com/github/jenly1314/ZXingLite/latest/javadoc/) ### 其他 #### JDK版本与API脱糖 当使用ZXingLite为 **v2.3.x** 以上版本时,(即:更新zxing至v3.5.1后);如果要兼容Android 7.0 (N) 以下版本(即:minSdk<24),可通过脱糖获得 Java 8 及更高版本 API。 ```gradle compileOptions { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true // Sets Java compatibility to Java 11 targetCompatibility JavaVersion.VERSION_11 sourceCompatibility JavaVersion.VERSION_11 } ``` ```gradle dependencies { coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.3' } ``` ## 相关推荐 #### [MLKit](https://github.com/jenly1314/MLKit) 一个强大易用的工具包。通过ML Kit您可以很轻松的实现文字识别、条码识别、图像标记、人脸检测、对象检测等功能。 #### [WeChatQRCode](https://github.com/jenly1314/WeChatQRCode) 基于OpenCV开源的微信二维码引擎移植的扫码识别库。 #### [CameraScan](https://github.com/jenly1314/CameraScan) 一个简化扫描识别流程的通用基础库。 #### [ViewfinderView](https://github.com/jenly1314/ViewfinderView) ViewfinderView一个取景视图:主要用于渲染扫描相关的动画效果。 ## 版本记录 #### v3.1.0:2023-12-31 * 更新CameraScan至v1.1.0 * 更新zxing至v3.5.2 * 更新compileSdkVersion至34 * 更新Gradle至v8.0 #### v3.0.1:2023-9-13 * 更新CameraScan至v1.0.1 * 更新ViewfinderView至v1.1.0 #### v3.0.0:2023-8-23 * 将通用基础类拆分移除并进行重构,后续维护更便捷 * 移除 **CameraScan** 相关核心类,改为依赖 [CameraScan](https://github.com/jenly1314/CameraScan) * 移除扫码取景视图 **ViewfinderView**,改为依赖 [ViewfinderView](https://github.com/jenly1314/ViewfinderView) * 移除 **CaptureActivity** 和 **CaptureFragment**,新增 **BarcodeCameraScanActivity** 和 **BarcodeCameraScanFragment** 来替代 * 优化扫描分析过程的性能体验(优化帧数据分析过程) #### v2.4.0:2023-4-15 * 优化CameraScan的缺省配置(CameraConfig相关配置) * 优化ViewfinderView自定义属性(新增laserDrawableRatio) * 优化ImageAnalyzer中YUV数据的处理 * 更新CameraX至v1.2.2 #### v2.3.1:2023-3-4 * 更新CameraX至v1.2.1 * 更新Gradle至v7.5 * 优化细节 #### v2.3.0:2022-12-11 * 更新CameraX至v1.2.0 * 更新zxing至v3.5.1 * 更新compileSdkVersion至33 #### [查看更多版本记录](change_log.md) ## 赞赏 如果您喜欢ZXingLite,或感觉ZXingLite帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley: <p>您也可以扫描下面的二维码,请作者喝杯咖啡 :coffee: <div> <img src="https://jenly1314.github.io/image/page/rewardcode.png"> </div> ## 关于我 | 我的博客 | GitHub | Gitee | CSDN | 博客园 | |:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------| | <a title="我的博客" href="https://jenly1314.github.io" target="_blank">Jenly's Blog</a> | <a title="GitHub开源项目" href="https://github.com/jenly1314" target="_blank">jenly1314</a> | <a title="Gitee开源项目" href="https://gitee.com/jenly1314" target="_blank">jenly1314</a> | <a title="CSDN博客" href="http://blog.csdn.net/jenly121" target="_blank">jenly121</a> | <a title="博客园" href="https://www.cnblogs.com/jenly" target="_blank">jenly</a> | ## 联系我 | 微信公众号 | Gmail邮箱 | QQ邮箱 | QQ群 | QQ群 | |:-------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------| | [Jenly666](http://weixin.qq.com/r/wzpWTuPEQL4-ract92-R) | <a title="给我发邮件" href="mailto:jenly1314@gmail.com" target="_blank">jenly1314</a> | <a title="给我发邮件" href="mailto:jenly1314@vip.qq.com" target="_blank">jenly1314</a> | <a title="点击加入QQ群" href="https://qm.qq.com/cgi-bin/qm/qr?k=6_RukjAhwjAdDHEk2G7nph-o8fBFFzZz" target="_blank">20867961</a> | <a title="点击加入QQ群" href="https://qm.qq.com/cgi-bin/qm/qr?k=Z9pobM8bzAW7tM_8xC31W8IcbIl0A-zT" target="_blank">64020761</a> | <div> <img src="https://jenly1314.github.io/image/page/footer.png"> </div>
0
spring-projects/spring-integration
Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns (EIP)
eip java microservices spring
<img align="right" width="250" height="250" src="https://spring.io/img/projects/spring-integration.svg?v=2"> # Spring Integration [![Build Status](https://github.com/spring-projects/spring-integration/actions/workflows/ci-snapshot.yml/badge.svg)](https://github.com/spring-projects/spring-integration/actions/workflows/ci-snapshot.yml) [![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.spring.io/scans?search.rootProjectNames=spring-integration) Extends the Spring programming model to support the well-known Enterprise Integration Patterns. Spring Integration enables lightweight messaging within Spring-based applications and supports integration with external systems via declarative adapters. Those adapters provide a higher-level of abstraction over Spring’s support for remoting, messaging, and scheduling. Spring Integration’s primary goal is to provide a simple model for building enterprise integration solutions while maintaining the separation of concerns that is essential for producing maintainable, testable code. Using the Spring Framework encourages developers to code using interfaces and use dependency injection (DI) to provide a Plain Old Java Object (POJO) with the dependencies it needs to perform its tasks. Spring Integration takes this concept one step further, where POJOs are wired together using a messaging paradigm and individual components may not be aware of other components in the application. Such an application is built by assembling fine-grained reusable components to form a higher level of functionality. With careful design, these flows can be modularized and also reused at an even higher level. In addition to wiring together fine-grained components, Spring Integration provides a wide selection of channel adapters and gateways to communicate with external systems. Channel Adapters are used for one-way integration (send or receive); gateways are used for request/reply scenarios (inbound or outbound). # Installation and Getting Started First, you need dependencies in your POM/Gradle: ```xml <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-core</artifactId> </dependency> ``` which is also pulled transitively if you deal with target protocol channel adapters. For example for Apache Kafka support you need just this: ```xml <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-kafka</artifactId> </dependency> ``` For annotations or Java DSL configuration you need to *enable* Spring Integration in the application context: ```java @EnableIntegration @Configuration public class ExampleConfiguration { } ``` # Code of Conduct Please see our [Code of conduct](https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md). # Reporting Security Vulnerabilities Please see our [Security policy](https://github.com/spring-projects/spring-integration/security/policy). # Documentation The Spring Integration maintains reference documentation ([published](https://docs.spring.io/spring-integration/reference/) and [source](src/reference/antora)), GitHub [wiki pages](https://github.com/spring-projects/spring-integration/wiki), and an [API reference](https://docs.spring.io/spring-integration/docs/current/api/). There are also [guides and tutorials](https://spring.io/guides) across Spring projects. # Checking out and Building To check out the project and build from the source, do the following: git clone git://github.com/spring-projects/spring-integration.git cd spring-integration ./gradlew clean test or ./gradlew clean testAll The latter runs additional tests (those annotated with `@LongRunningIntegrationTest`); it is a more thorough test but takes quite a lot longer to run. The test results are captured in `build/reports/tests/test` (or `.../testAll`) under each module (in HTML format). Add `--continue` to the command to perform a complete build, even if there are failing tests in some modules; otherwise the build will stop after the current module(s) being built are completed. **NOTE:** While Spring Integration runs with Java SE 17 or higher, a Java 17 compiler is required to build the project. To build and install jars into your local Maven cache: ./gradlew build publishToMavenLocal To build api Javadoc (results will be in `build/api`): ./gradlew api To build the reference documentation (results will be in `build/site`): ./gradlew antora To build complete distribution including `-dist`, `-docs`, and `-schema` zip files (results will be in `build/distributions`): ./gradlew dist # Using Eclipse or Spring Tool Suite (with BuildShip Plugin) If you have the BuildShip plugin installed, *File -> Import -> Gradle -> Existing Gradle Project* # Using Eclipse or Spring Tool Suite (when the BuildShip Plugin is not installed) To generate Eclipse metadata (.classpath and .project files, etc.), do the following: ./gradlew eclipse Once complete, you may then import the projects into Eclipse as usual: *File -> Import -> General -> Existing projects into workspace* Browse to the *'spring-integration'* root directory. All projects should import free of errors. # Using IntelliJ IDEA To import the project into IntelliJ IDEA: File -> Open... -> and select build.gradle from spring-integration project root directory # Guidelines See also [Contributor Guidelines](https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc). # Resources For more information, please visit the Spring Integration website at: [https://spring.io/projects/spring-integration](https://spring.io/projects/spring-integration/)
0
PaperMC/Velocity
The modern, next-generation Minecraft server proxy.
forge java minecraft minecraft-forge minecraft-server-proxy server-proxy velocity
# Velocity [![Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Velocity/gradle.yml)](https://papermc.io/downloads/velocity) [![Join our Discord](https://img.shields.io/discord/289587909051416579.svg?logo=discord&label=)](https://discord.gg/papermc) A Minecraft server proxy with unparalleled server support, scalability, and flexibility. Velocity is licensed under the GPLv3 license. ## Goals * A codebase that is easy to dive into and consistently follows best practices for Java projects as much as reasonably possible. * High performance: handle thousands of players on one proxy. * A new, refreshing API built from the ground up to be flexible and powerful whilst avoiding design mistakes and suboptimal designs from other proxies. * First-class support for Paper, Sponge, Fabric and Forge. (Other implementations may work, but we make every endeavor to support these server implementations specifically.) ## Building Velocity is built with [Gradle](https://gradle.org). We recommend using the wrapper script (`./gradlew`) as our CI builds using it. It is sufficient to run `./gradlew build` to run the full build cycle. ## Running Once you've built Velocity, you can copy and run the `-all` JAR from `proxy/build/libs`. Velocity will generate a default configuration file and you can configure it from there. Alternatively, you can get the proxy JAR from the [downloads](https://papermc.io/downloads/velocity) page.
0
jline/jline3
JLine is a Java library for handling console input.
null
<!-- Copyright (c) 2002-2020, the original author or authors. This software is distributable under the BSD license. See the terms of the BSD license in the documentation provided with this software. https://opensource.org/licenses/BSD-3-Clause --> # JLine [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jline/jline/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.jline/jline) [![Build Status: Linux](https://travis-ci.org/jline/jline3.svg?branch=master)](https://travis-ci.org/jline/jline3) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/github/jline/jline3?svg=true)](https://ci.appveyor.com/project/gnodet/jline3) JLine is a Java library for handling console input. It is similar in functionality to [BSD editline](http://www.thrysoee.dk/editline/) and [GNU readline](http://www.gnu.org/s/readline/) but with additional features that bring it in par with [ZSH line editor](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html). People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar. JLine 3.x is an evolution of [JLine 2.x](https://github.com/jline/jline2). # License JLine is distributed under the [BSD License](https://opensource.org/licenses/BSD-3-Clause), meaning that you are completely free to redistribute, modify, or sell it with almost no restrictions. # Documentation * [demos](https://github.com/jline/jline3/wiki/Demos) * [wiki](https://github.com/jline/jline3/wiki) * [javadoc](https://www.javadoc.io/doc/org.jline/jline/) # Forums * [jline-users](https://groups.google.com/group/jline-users) * [jline-dev](https://groups.google.com/group/jline-dev) # Artifacts JLine can be used with a single bundle or smaller fine grained jars. The bundle contains all jars except `jline-groovy` that must be included in classpath if you want to use scripting capabilities. The big bundle is named: jline-${jline.version}.jar The dependencies are minimal: you may use JLine without any dependency on *nix systems, but in order to support windows or more advanced usage, you will need to add either [`Jansi`](https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.18/jansi-1.18.jar) or [`JNA`](https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.3.1/jna-5.3.1.jar) library. You can also use fine grained jars: * `jline-terminal`: the `Terminal` api and implementations * `jline-terminal-jansi`: terminal implementations leveraging the `Jansi` library * `jline-terminal-jni`: terminal implementations leveraging the JNI native library * `jline-terminal-jna`: terminal implementations leveraging the `JNA` library * `jline-terminal-ffm`: terminal implementations leveraging the Foreign Functions & Mapping layer * `jline-native`: the native library * `jline-reader`: the line reader (including completion, history, etc...) * `jline-style`: styling api * `jline-remote-ssh`: helpers for using jline with [Mina SSHD](http://mina.apache.org/sshd-project/) * `jline-remote-telnet`: helpers for using jline over telnet (including a telnet server implementation) * `jline-builtins`: several high level tools: `less` pager, `nano` editor, `screen` multiplexer, etc... * `jline-console`: command registry, object printer and widget implementations * `jline-groovy`: `ScriptEngine` implementation using Groovy ## Supported platforms JLine supports the following platforms: * FreeBSD * Linux * OS X * Solaris * Windows ## FFM vs JNI vs Jansi vs JNA vs Exec To perform the required operations, JLine needs to interoperate with the OS layer. This is done through the JLine `TerminalProvider` interface. The terminal builder will automatically select a provider amongst the ones that are available. On the Windows platform, relying on native calls is mandatory, so you need to have a real provider (`jline-terminal-xxx` jar) registered and its dependencies available (usually the Jansi or JNA library). Failing to do so will create a `dumb` terminal with no advanced capabilities. By default, the following order will be used. ### FFM The [FFM](https://docs.oracle.com/en/java/javase/21/core/foreign-function-and-memory-api.html#GUID-FBE990DA-C356-46E8-9109-C75567849BA8) provider is available since JLine 3.24 and when running on JDK >= 21. It's very lightweight with no additional dependencies. With JLine 3.26, the FFM provider requires JDK 22 with the `--enable-native-access=ALL-UNNAMED` JVM option. Note that JLine 3.24 and 3.25 uses the preview version of FFM support shipped in JDK 21 which is incompatible with the final version in JDK 22. ### JNI Since JLine 3.24.0, JLine provides its own JNI based provider and native libraries. This is the best default choice, with no additional dependency, but it requires loading a native library. ### JANSI The [Jansi](https://github.com/fusesource/jansi) library is a library specialized in supporting ANSI sequences in terminals. Historically, the JNI methods used by JLine were provided by Jansi. In order to minimize the maintenance cost, Jansi will be merged into JLine 3.25. This provider has been deprecated in 3.26 in favor of the JNI provider. ### JNA The [JNA](https://github.com/java-native-access/jna) library aims to provide an alternative way to access native methods without requiring writing a full JNI native library. If JNA is in JLine's class loader, the provider may be used. JNA is not supported on Apple M2 architectures. This provider has been deprecated in 3.26 in favor of the FFM provider. ### Exec The exec provider is available on Posix systems and on Windows when running under [Cygwin](https://www.cygwin.com) or [MSys2](https://www.msys2.org). This provider launches child processes whenever the terminal is accessed (using `Terminal.getAttributes`, `Terminal.setAttributes`, `Terminal.getSize`, `Terminal.setSize`). This provider also does not support external terminals (for example when creating a terminal for an incoming connection) and does not support the Windows native environment. # Maven Usage Use the following definition to use JLine in your maven project: ```xml <dependency> <groupId>org.jline</groupId> <artifactId>jline</artifactId> <version>${jline.version}</version> </dependency> ``` JLine can also be used with more low-level jars: ```xml <dependency> <groupId>org.jline</groupId> <artifactId>jline-terminal</artifactId> <version>${jline.version}</version> </dependency> <dependency> <groupId>org.jline</groupId> <artifactId>jline-reader</artifactId> <version>${jline.version}</version> </dependency> ``` All the jars and releases are available from Maven Central, so you'll find everything at the following location <https://repo1.maven.org/maven2/org/jline/>. # Building ## Requirements * Maven 3.5.4+ * Java 8+ at runtime * Java 21+ at build time * Graal 23.1+ (native-image) Check out and build: ```sh git clone git://github.com/jline/jline3.git cd jline3 ./build rebuild ``` Build Graal native-image demo: ```sh ./build rebuild -Pnative-image ``` ## Results The following artifacts are build: The big bundle includes everything (except `jline-groovy`) and is located at: jline/target/jline-${jline.version}.jar The fine grained bundles are located at: terminal/target/jline-terminal-${jline.version}.jar terminal-jansi/target/jline-jansi-${jline.version}.jar terminal-jna/target/jline-jna-${jline.version}.jar reader/target/jline-reader-${jline.version}.jar style/target/jline-style-${jline.version}.jar remote-telnet/target/jline-remote-telnet-${jline.version}.jar remote-ssh/target/jline-remote-ssh-${jline.version}.jar builtins/target/jline-builtins-${jline.version}.jar console/target/jline-console-${jline.version}.jar groovy/target/jline-groovy-${jline.version}.jar Maven has a concept of `SNAPSHOT`. During development, the jline version will always ends with `-SNAPSHOT`, which means that the version is in development and not a release. Note that all those artifacts are also installed in the local maven repository, so you will usually find them in the following folder: `~/.m2/repository/org/jline/`. ## Running the demo To run the demo, simply use one of the following commands after having build `JLine` ```sh # Gogo terminal ./build demo # Groovy REPL ./build repl # Graal native-image ./build graal ``` ## Continuous Integration * [Travis](https://travis-ci.org/jline/jline3) * [AppVeyor](https://ci.appveyor.com/project/gnodet/jline3)
0
rubenlagus/TelegramBots
Java library to create bots using Telegram Bots API
java java-library jitpack maven polling spring-boot telegram telegram-bot telegram-bots-api webhook
# Telegram Bot Java Library [![Telegram](/TelegramBots.svg)](https://telegram.me/JavaBotsApi) [![Build Status](https://travis-ci.org/rubenlagus/TelegramBots.svg?branch=master)](https://travis-ci.org/rubenlagus/TelegramBots) [![Jitpack](https://jitpack.io/v/rubenlagus/TelegramBots.svg)](https://jitpack.io/#rubenlagus/TelegramBots) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.telegram/telegrambots/badge.svg)](http://mvnrepository.com/artifact/org.telegram/telegrambots) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/rubenlagus/TelegramBots/blob/master/LICENSE) A simple to use library to create Telegram Bots in Java ## Contributions Feel free to fork this project, work on it and then make a pull request against **DEV** branch. Most of the times I will accept them if they add something valuable to the code. Please, **DO NOT PUSH ANY TOKEN OR API KEY**, I will never accept a pull request with that content. ## Webhooks vs GetUpdates Both ways are supported, but I recommend long polling method. ## Usage For more information, check our [documentation](https://rubenlagus.github.io/TelegramBotsDocumentation/telegram-bots.html) ## Example bots Open them and send them */help* command to get some information about their capabilities: https://telegram.me/weatherbot (**Use custom keyboards**) https://telegram.me/directionsbot (**Basic messages**) https://telegram.me/filesbot (**Send files by file_id**) https://telegram.me/TGlanguagesbot (**Send files uploding them**) https://telegram.me/RaeBot (**Inline support**) https://telegram.me/SnowcrashBot (**Webhook support**) You can see code for those bots at [TelegramBotsExample](https://github.com/rubenlagus/TelegramBotsExample) project. ## Telegram Bot API This library use [Telegram bot API](https://core.telegram.org/bots), you can find more information following the link. ## Questions or Suggestions Feel free to create issues [here](https://github.com/rubenlagus/TelegramBots/issues) as you need or join the [chat](https://telegram.me/JavaBotsApi) ## Powered by Intellij and DigitalOcean <p align="center"> <a href="https://www.jetbrains.com/?from=TelegramBots"><img src="jetbrains.png" width="75"></a> <a href="https://www.digitalocean.com/?refcode=42a4fa8c6d00&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg" alt="DigitalOcean Referral Badge" /></a> </p> ## License MIT License Copyright (c) 2016 Ruben Bermudez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0
LuckPerms/LuckPerms
A permissions plugin for Minecraft servers.
bukkit bungeecord fabricmc minecraft minecraft-mod minecraft-plugin permissions spigot sponge
![](https://raw.githubusercontent.com/LuckPerms/branding/master/banner/banner.png "Banner") # LuckPerms [![Build Status](https://ci.lucko.me/job/LuckPerms/badge/icon)](https://ci.lucko.me/job/LuckPerms/) [![javadoc](https://javadoc.io/badge2/net.luckperms/api/javadoc.svg)](https://javadoc.io/doc/net.luckperms/api) [![Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/net/luckperms/api/maven-metadata.xml.svg?label=maven%20central&colorB=brightgreen)](https://search.maven.org/artifact/net.luckperms/api) [![Discord](https://img.shields.io/discord/241667244927483904.svg?label=discord&logo=discord)](https://discord.gg/luckperms) LuckPerms is a permissions plugin for Minecraft servers. It allows server admins to control what features players can use by creating groups and assigning permissions. The latest downloads, wiki & other useful links can be found on the project homepage at [luckperms.net](https://luckperms.net/). It is: * **fast** - written with performance and scalability in mind. * **reliable** - trusted by thousands of server admins, and the largest of server networks. * **easy to use** - setup permissions using commands, directly in config files, or using the web editor. * **flexible** - supports a variety of data storage options, and works on lots of different server types. * **extensive** - a plethora of customization options and settings which can be changed to suit your server. * **free** - available for download and usage at no cost, and permissively licensed so it can remain free forever. For more information, see the wiki article on [Why LuckPerms?](https://luckperms.net/wiki/Why-LuckPerms) ## Building LuckPerms uses Gradle to handle dependencies & building. #### Requirements * Java 17 JDK or newer * Git #### Compiling from source ```sh git clone https://github.com/LuckPerms/LuckPerms.git cd LuckPerms/ ./gradlew build ``` You can find the output jars in the `loader/build/libs` or `build/libs` directories. ## Tests There are some automated tests which run during each build. * Unit tests are defined in [`common/src/test`](https://github.com/LuckPerms/LuckPerms/tree/master/common/src/test) * Integration tests are defined in [`standalone/src/test`](https://github.com/LuckPerms/LuckPerms/tree/master/standalone/src/test). ## Contributing #### Pull Requests If you make any changes or improvements to the plugin which you think would be beneficial to others, please consider making a pull request to merge your changes back into the upstream project. (especially if your changes are bug fixes!) LuckPerms loosely follows the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). Generally, try to copy the style of code found in the class you're editing. #### Project Layout The project is split up into a few separate modules. * **API** - The public, semantically versioned API used by other plugins wishing to integrate with and retrieve data from LuckPerms. This module (for the most part) does not contain any implementation itself, and is provided by the plugin. * **Common** - The common module contains most of the code which implements the respective LuckPerms plugins. This abstract module reduces duplicated code throughout the project. * **Bukkit, BungeeCord, Fabric, Forge, Nukkit, Sponge & Velocity** - Each use the common module to implement plugins on the respective server platforms. ## License LuckPerms is licensed under the permissive MIT license. Please see [`LICENSE.txt`](https://github.com/LuckPerms/LuckPerms/blob/master/LICENSE.txt) for more info.
0
jknack/handlebars.java
Logic-less and semantic Mustache templates with Java
handlebars template-engine templates
[![Become a Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://patreon.com/edgarespina) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jknack/handlebars/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jknack/handlebars) [![javadoc](https://javadoc.io/badge/com.github.jknack/handlebars.svg)](https://javadoc.io/doc/com.github.jknack/handlebars) Handlebars.java =============== ## Logic-less and semantic Mustache templates with Java ```java Handlebars handlebars = new Handlebars(); Template template = handlebars.compileInline("Hello {{this}}!"); System.out.println(template.apply("Handlebars.java")); ``` Output: ``` Hello Handlebars.java! ``` Handlebars.java is a Java port of [handlebars](https://handlebarsjs.com/). Handlebars provides the power necessary to let you build semantic templates effectively with no frustration. [Mustache](https://mustache.github.io/mustache.5.html) templates are compatible with Handlebars, so you can take a [Mustache](https://mustache.github.io) template, import it into Handlebars, and start taking advantage of the extra Handlebars features. # Requirements - Handlebars 4.4+ requires Java 17 or higher. - Handlebars 4.3+ requires Java 8 or higher (NOT MAINTAINED). # Getting Started In general, the syntax of **Handlebars** templates is a superset of [Mustache](https://mustache.github.io) templates. For basic syntax, check out the [Mustache manpage](https://mustache.github.io). The [Handlebars.java blog](https://jknack.github.io/handlebars.java) is a good place for getting started too. Javadoc is available at [javadoc.io](https://javadoc.io/doc/com.github.jknack/handlebars). ## Maven #### Stable version: [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.jknack/handlebars/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.jknack/handlebars) ```xml <dependency> <groupId>com.github.jknack</groupId> <artifactId>handlebars</artifactId> <version>${handlebars-version}</version> </dependency> ``` ### Loading templates Templates are loaded using the ```TemplateLoader``` class. Handlebars.java provides three implementations of a ```TemplateLoader```: * ClassPathTemplateLoader (default) * FileTemplateLoader * SpringTemplateLoader (see the [handlebars-springmvc](https://github.com/jknack/handlebars.java/tree/master/handlebars-springmvc) module) This example loads ```mytemplate.hbs``` from the root of the classpath: mytemplate.hbs: ``` Hello {{this}}! ``` ```java var handlebars = new Handlebars(); var template = handlebars.compile("mytemplate"); System.out.println(template.apply("Handlebars.java")); ``` Output: ``` Hello Handlebars.java! ``` You can specify a different ```TemplateLoader``` by: ```java TemplateLoader loader = ...; Handlebars handlebars = new Handlebars(loader); ``` #### Templates prefix and suffix A ```TemplateLoader``` provides two important properties: * ```prefix```: useful for setting a default prefix where templates are stored. * ```suffix```: useful for setting a default suffix or file extension for your templates. Default is: ```.hbs``` Example: ```java TemplateLoader loader = new ClassPathTemplateLoader(); loader.setPrefix("/templates"); loader.setSuffix(".html"); Handlebars handlebars = new Handlebars(loader); Template template = handlebars.compile("mytemplate"); System.out.println(template.apply("Handlebars.java")); ``` Handlebars.java will resolve ```mytemplate``` to ```/templates/mytemplate.html``` and load it. ## The Handlebars.java Server The handlebars.java server is small application where you can write Mustache/Handlebars template and merge them with data. It is a useful tool for Web Designers. Download from Maven Central: 1. Go [here](http://search.maven.org/#search%7Cga%7C1%7Chandlebars-proto) 2. Under the **Download** section click on **jar** Maven: ```xml <dependency> <groupId>com.github.jknack</groupId> <artifactId>handlebars-proto</artifactId> <version>${current-version}</version> </dependency> ``` Usage: ```java -jar handlebars-proto-${current-version}.jar -dir myTemplates``` Example: **myTemplates/home.hbs** ``` <ul> {{#items}} {{name}} {{/items}} </ul> ``` **myTemplates/home.json** ```json { "items": [ { "name": "Handlebars.java rocks!" } ] } ``` or if you prefer YAML **myTemplates/home.yml**: ```yml items: - name: Handlebars.java rocks! ``` ### Open a browser a type: ``` http://localhost:6780/home.hbs ``` enjoy it! ### Additional options: * -dir: set the template directory * -prefix: set the template's prefix, default is / * -suffix: set the template's suffix, default is .hbs * -context: set the context's path, default is / * -port: set port number, default is 6780 * -content-type: set the content-type header, default is text/html ### Multiple data sources per template Sometimes you need or want to test multiple datasets over a single template, you can do that by setting a ```data``` parameter in the request URI. Example: ``` http://localhost:6780/home.hbs?data=mytestdata ``` Please note you don't have to specify the extension file. ## Helpers ### Built-in helpers: * **with** * **each** * **if** * **unless** * **log** * **block** * **partial** * **precompile** * **embedded** * **i18n** and **i18nJs** * **string helpers** * **conditional helpers** ### with, each, if, unless: See the [built-in helper documentation](https://handlebarsjs.com/guide/block-helpers.html). ### block and partial Block and partial helpers work together to provide you [Template Inheritance](http://jknack.github.io/handlebars.java/reuse.html). Usage: ``` {{#block "title"}} ... {{/block}} ``` context: A string literal which defines the region's name. Usage: ``` {{#partial "title"}} ... {{/partial}} ``` context: A string literal which defines the region's name. ### precompile Precompile a Handlebars.java template to JavaScript using handlebars.js user.hbs ```html Hello {{this}}! ``` home.hbs ```html <script type="text/javascript"> {{precompile "user"}} </script> ``` Output: ```html <script type="text/javascript"> (function() { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['user'] = template(function (Handlebars,depth0,helpers,partials,data) { helpers = helpers || Handlebars.helpers; var buffer = "", functionType="function", escapeExpression=this.escapeExpression; buffer += "Hi "; depth0 = typeof depth0 === functionType ? depth0() : depth0; buffer += escapeExpression(depth0) + "!"; return buffer;}); })(); </script> ``` You can access the precompiled template with: ```js var template = Handlebars.templates['user'] ``` By default it uses: ```/handlebars-v1.3.0.js``` to compile the template. Since handlebars.java 2.x it is also possible to use handlebars.js 2.x ```java Handlebars handlebars = new Handlebars(); handlebars.handlebarsJsFile("/handlebars-v2.0.0.js"); ``` For more information have a look at the [Precompiling Templates](https://github.com/wycats/handlebars.js/) documentation. Usage: ``` {{precompile "template" [wrapper="anonymous, amd or none"]}} ``` context: A template name. Required. wrapper: One of "anonymous", "amd" or "none". Default is: "anonymous" There is a [maven plugin](https://github.com/jknack/handlebars.java/tree/master/handlebars-maven-plugin) available too. ### embedded The embedded helper allow you to "embedded" a handlebars template inside a ```<script>``` HTML tag: user.hbs ```html <tr> <td>{{firstName}}</td> <td>{{lastName}}</td> </tr> ``` home.hbs ```html <html> ... {{embedded "user"}} ... </html> ``` Output: ```html <html> ... <script id="user-hbs" type="text/x-handlebars"> <tr> <td>{{firstName}}</td> <td>{{lastName}}</td> </tr> </script> ... </html> ``` Usage: ``` {{embedded "template"}} ``` context: A template name. Required. ### i18n A helper built on top of a {@link ResourceBundle}. A {@link ResourceBundle} is the most well known mechanism for internationalization (i18n) in Java. Usage: ```html {{i18n "hello"}} ``` This require a ```messages.properties``` in the root of classpath. Using a locale: ```html {{i18n "hello" locale="es_AR"}} ``` This requires a ```messages_es_AR.properties``` in the root of classpath. Using a different bundle: ```html {{i18n "hello" bundle="myMessages"}} ``` This requires a ```myMessages.properties``` in the root of classpath. Using a message format: ```html {{i18n "hello" "Handlebars.java"}} ``` Where ```hello``` is ```Hola {0}!```, results in ```Hola Handlebars.java!```. ### i18nJs Translate a ```ResourceBundle``` into JavaScript code. The generated code assumes you have the [I18n](https://github.com/fnando/i18n-js) in your application. Usage: ``` {{i18nJs [locale] [bundle=messages]}} ``` If the locale argument is present it will translate that locale to JavaScript. Otherwise, it will use the default locale. The generated code looks like this: ```javascript <script type="text/javascript"> I18n.defaultLocale = 'es_AR'; I18n.locale = 'es_AR'; I18n.translations = I18n.translations || {}; // Spanish (Argentina) I18n.translations['es_AR'] = { "hello": "Hi {{arg0}}!" } </script> ``` Finally, it converts message patterns like: ```Hi {0}``` into ```Hi {{arg0}}```. This make possible for the [I18n](https://github.com/fnando/i18n-js) JS library to interpolate variables. ### string helpers Functions like abbreviate, capitalize, join, dateFormat, yesno, etc., are available from [StringHelpers](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/main/java/com/github/jknack/handlebars/helper/StringHelpers.java). > NOTE: You need to register string helpers (they are not added by default) ### conditional helpers Functions like eq, neq, lt, gt, and, or, not, etc., are available from [ConditionalHelpers](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/main/java/com/github/jknack/handlebars/helper/ConditionalHelpers.java). > NOTE: You need to register conditional helpers (they are not added by default) ### TypeSafe Templates TypeSafe templates are created by extending the ```TypeSafeTemplate``` interface. For example: ```java // 1 public static interface UserTemplate extends TypeSafeTemplate<User> { // 2 public UserTemplate setAge(int age); public UserTemplate setRole(String role); } // 3 UserTemplate userTmpl = handlebars.compileInline("{{name}} is {{age}} years old!") .as(UserTemplate.class); userTmpl.setAge(32); assertEquals("Edgar is 32 years old!", userTmpl.apply(new User("Edgar"))); ``` 1. You extend the ```TypeSafeTemplate``` interface. 2. You add all the set method you need. The set method can returns ```void``` or ```TypeSafeTemplate``` object. 3. You create a new type safe template using the: ```as()``` method. ### Registering Helpers There are two ways of registering helpers. #### Using the ```Helper``` interface ```java handlebars.registerHelper("blog", new Helper<Blog>() { public CharSequence apply(Blog blog, Options options) { return options.fn(blog); } }); ``` ```java handlebars.registerHelper("blog-list", new Helper<List<Blog>>() { public CharSequence apply(List<Blog> list, Options options) { String ret = "<ul>"; for (Blog blog: list) { ret += "<li>" + options.fn(blog) + "</li>"; } return new Handlebars.SafeString(ret + "</ul>"); } }); ``` #### Using a ```HelperSource``` A helper source is any class with public methods returning an instance of a ```CharSequence```. ```java public static? CharSequence methodName(context?, parameter*, options?) { } ``` Where: * A method can/can't be static * The method's name becomes the helper's name * Context, parameters and options are all optionals * If context and options are present they must be the **first** and **last** arguments of the method All these are valid definitions of helper methods: ```java public class HelperSource { public String blog(Blog blog, Options options) { return options.fn(blog); } public static String now() { return new Date().toString(); } public String render(Blog context, String param0, int param1, boolean param2, Options options) { return ... } } ... handlebars.registerHelpers(new HelperSource()); ``` Or, if you prefer static methods only: ```java handlebars.registerHelpers(HelperSource.class); ``` #### With plain ```JavaScript``` That's right since ```1.1.0``` you can write helpers in JavaScript: helpers.js: ```javascript Handlebars.registerHelper('hello', function (context) { return 'Hello ' + context; }) ``` ```java handlebars.registerHelpers(new File("helpers.js")); ``` Cool, isn't? ### Helper Options #### Parameters ```java handlebars.registerHelper("blog-list", new Helper<Blog>() { public CharSequence apply(List<Blog> list, Options options) { String p0 = options.param(0); assertEquals("param0", p0); Integer p1 = options.param(1); assertEquals(123, p1); ... } }); Bean bean = new Bean(); bean.setParam1(123); Template template = handlebars.compileInline("{{#blog-list blogs \"param0\" param1}}{{/blog-list}}"); template.apply(bean); ``` #### Default parameters ```java handlebars.registerHelper("blog-list", new Helper<Blog>() { public CharSequence apply(List<Blog> list, Options options) { String p0 = options.param(0, "param0"); assertEquals("param0", p0); Integer p1 = options.param(1, 123); assertEquals(123, p1); ... } }); Template template = handlebars.compileInline("{{#blog-list blogs}}{{/blog-list}}"); ``` #### Hash ```java handlebars.registerHelper("blog-list", new Helper<Blog>() { public CharSequence apply(List<Blog> list, Options options) { String class = options.hash("class"); assertEquals("blog-css", class); ... } }); handlebars.compileInline("{{#blog-list blogs class=\"blog-css\"}}{{/blog-list}}"); ``` #### Default hash ```java handlebars.registerHelper("blog-list", new Helper<Blog>() { public CharSequence apply(List<Blog> list, Options options) { String class = options.hash("class", "blog-css"); assertEquals("blog-css", class); ... } }); handlebars.compileInline("{{#blog-list blogs}}{{/blog-list}}"); ``` ## Error reporting ### Syntax errors ``` file:line:column: message evidence ^ [at file:line:column] ``` Examples: template.hbs ``` {{value ``` ``` /templates.hbs:1:8: found 'eof', expected: 'id', 'parameter', 'hash' or '}' {{value ^ ``` If a partial isn't found or if it has errors, a call stack is added: ``` /deep1.hbs:1:5: The partial '/deep2.hbs' could not be found {{> deep2 ^ at /deep1.hbs:1:10 at /deep.hbs:1:10 ``` ### Helper/Runtime errors Helper or runtime errors are similar to syntax errors, except for two things: 1. The location of the problem may (or may not) be the correct one 2. The stack-trace isn't available Examples: Block helper: ```java public CharSequence apply(final Object context, final Options options) throws IOException { if (context == null) { throw new IllegalArgumentException( "found 'null', expected 'string'"); } if (!(context instanceof String)) { throw new IllegalArgumentException( "found '" + context + "', expected 'string'"); } ... } ``` base.hbs ``` {{#block}} {{/block}} ``` Handlebars.java reports: ``` /base.hbs:2:4: found 'null', expected 'string' {{#block}} ... {{/block}} ``` In short, from a helper you can throw an Exception and Handlebars.java will add the filename, line, column and the evidence. ## Advanced Usage ### Extending the context stack Let's say you need to access to the current logged-in user in every single view/page. You can publish the current logged in user by hooking into the context-stack. See it in action: ```java hookContextStack(Object model, Template template) { User user = ....;// Get the logged-in user from somewhere Map moreData = ...; Context context = Context .newBuilder(model) .combine("user", user) .combine(moreData) .build(); template.apply(context); context.destroy(); } ``` Where is the ```hookContextStack``` method? Well, it depends on your application architecture. ### Using the ValueResolver By default, Handlebars.java use the JavaBean methods (i.e. public getXxx and isXxx methods) and Map as value resolvers. You can choose a different value resolver. This section describe how to do this. #### The JavaBeanValueResolver Resolves values from public methods prefixed with "get/is" ```java Context context = Context .newBuilder(model) .resolver(JavaBeanValueResolver.INSTANCE) .build(); ``` #### The FieldValueResolver Resolves values from no-static fields. ```java Context context = Context .newBuilder(model) .resolver(FieldValueResolver.INSTANCE) .build(); ``` #### The MapValueResolver Resolves values from a ```java.util.Map``` objects. ```java Context context = Context .newBuilder(model) .resolver(MapValueResolver.INSTANCE) .build(); ``` #### The MethodValueResolver Resolves values from public methods. ```java Context context = Context .newBuilder(model) .resolver(MethodValueResolver.INSTANCE) .build(); ``` #### The JsonNodeValueResolver Resolves values from ```JsonNode``` objects. ```java Context context = Context .newBuilder(model) .resolver(JsonNodeValueResolver.INSTANCE) .build(); ``` Available in [Jackson 1.x](https://github.com/jknack/handlebars.java/tree/master/handlebars-json) and [Jackson 2.x](https://github.com/jknack/handlebars.java/tree/master/handlebars-jackson2) modules. #### Using multiples value resolvers ```java Context context = Context .newBuilder(model) .resolver( MapValueResolver.INSTANCE, JavaBeanValueResolver.INSTANCE, FieldValueResolver.INSTANCE ).build(); ``` ### The Cache System The cache system is designed to provide scalability and flexibility. Here is a quick view of the ```TemplateCache``` system: ```java public interface TemplateCache { /** * Remove all mappings from the cache. */ void clear(); /** * Evict the mapping for this source from this cache if it is present. * * @param source the source whose mapping is to be removed from the cache */ void evict(TemplateSource source); /** * Return the value to which this cache maps the specified key. * * @param source source whose associated template is to be returned. * @param parser The Handlebars parser. * @return A template. * @throws IOException If input can't be parsed. */ Template get(TemplateSource source, Parser parser) throws IOException; } ``` As you can see, there isn't a ```put``` method. All the hard work is done in the ```get``` method, which is basically the core of the cache system. By default, Handlebars.java uses a ```null``` cache implementation (a.k.a. no cache at all) which looks like: ``` Template get(TemplateSource source, Parser parser) throws IOException { return parser.parse(source); } ``` In addition to the ```null``` cache, Handlebars.java provides three more implementations: 1. ```ConcurrentMapTemplateCache```: a template cache implementation built on top of a ```ConcurrentMap``` that detects changes in files automatically. This implementation works very well in general, but there is a small window where two or more threads can compile the same template. This isn't a huge problem with Handlebars.java because the compiler is very very fast. But if for some reason you don't want this, you can use the ```HighConcurrencyTemplateCache``` template cache. 2. ```HighConcurrencyTemplateCache```: a template cache implementation built on top of ```ConcurrentMap``` that detects changes in files automatically. This cache implementation eliminates the window created by ```ConcurrentMapTemplateCache``` to ```zero```. It follows the patterns described in [Java Concurrency in Practice](http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601) and ensures that a template will be compiled just once regardless of the number of threads. 3. ```GuavaTemplateCache```: a template cache implementation built on top of [Google Guava](https://code.google.com/p/guava-libraries/wiki/CachesExplained). Available in [handlebars-guava-cache module](https://github.com/jknack/handlebars.java/tree/master/handlebars-guava-cache) You can configure Handlebars.java to use a cache by: ``` Handlebars hbs = new Handlebars() .with(new MyCache()); ``` ### Using a MissingValueResolver (@deprecated) NOTE: MissingValueResolver is available in ```<= 1.3.0```. For ```> 1.3.0``` use [Helper Missing](https://github.com/jknack/handlebars.java#helper-missing). A ```MissingValueResolver``` let you use default values for ```{{variable}}``` expressions resolved to ```null```. ```java MissingValueResolver missingValueResolver = new MissingValueResolver() { public String resolve(Object context, String name) { //return a default value or throw an exception ...; } }; Handlebars handlebars = new Handlebars().with(missingValueResolver); ``` ### Helper Missing By default, Handlebars.java throws an ```java.lang.IllegalArgumentException()``` if a helper cannot be resolved. You can override the default behaviour by providing a special helper: ```helperMissing```. Example: ```java handlebars.registerHelperMissing(new Helper<Object>() { @Override public CharSequence apply(final Object context, final Options options) throws IOException { return options.fn.text(); } }); ``` ### String form parameters You can access a parameter name if you set the: ```stringParams: true```. Example: ```html {{sayHi this edgar}} ``` ```java Handlebars handlebars = new Handlebars() .stringParams(true); handlebars.registerHelper("sayHi", new Helper<Object>() { public Object apply(Object context, Options options) { return "Hello " + options.param(0) + "!"; } }); ``` results in: ``` Hello edgar! ``` How does this work? ```stringParams: true``` instructs Handlebars.java to resolve a parameter to it's name if the value isn't present in the context stack. ### Allow Infinite loops By default, Handlebars.java doesn't allow a partial to call itself (directly or indirectly). You can change this by setting the: ```Handlebars.inifiteLoops(true)```, but watch out for a ```StackOverflowError```. ### Pretty Print The Mustache Spec has some rules for removing spaces and new lines. This feature is disabled by default. You can turn this on by setting the: ```Handlebars.prettyPrint(true)```. # Modules ## Jackson 1.x Maven: ```xml <dependency> <groupId>com.github.jknack</groupId> <artifactId>handlebars-json</artifactId> <version>${handlebars-version}</version> </dependency> ``` Usage: ```java handlebars.registerHelper("json", JacksonHelper.INSTANCE); ``` ``` {{json context [view="foo.MyFullyQualifiedClassName"] [escapeHTML=false] [pretty=false]}} ``` Alternative: ```java handlebars.registerHelper("json", new JacksonHelper().viewAlias("myView", foo.MyFullyQualifiedClassName.class); ``` ``` {{json context [view="myView"] [escapeHTML=false] [pretty=false]}} ``` context: An object, may be null. view: The name of the [Jackson View](http://wiki.fasterxml.com/JacksonJsonViews). Optional. escapeHTML: True, if the JSON content contains HTML chars and you need to escaped them. Default is: false. pretty: True, if the JSON content must be formatted. Default is: false. ## Jackson Maven: ```xml <dependency> <groupId>com.github.jknack</groupId> <artifactId>handlebars-jackson</artifactId> <version>${handlebars-version}</version> </dependency> ``` ## SpringMVC Maven: ```xml <dependency> <groupId>com.github.jknack</groupId> <artifactId>handlebars-springmvc</artifactId> <version>${handlebars-version}</version> </dependency> ``` Using value resolvers: ```java HandlebarsViewResolver viewResolver = ...; viewResolver.setValueResolvers(...); ``` In addition, the HandlebarsViewResolver add a ```message``` helper that uses the Spring ```MessageSource``` class: ``` {{message "code" [arg]* [default="default message"]}} ``` where: * code: the message's code. Required. * arg: the message's argument. Optional. * default: the default's message. Optional. Checkout the [HandlebarsViewResolver](https://github.com/jknack/handlebars.java/blob/master/handlebars-springmvc/src/main/java/com/github/jknack/handlebars/springmvc/HandlebarsViewResolver.java). # Performance Handlebars.java is a modern and full featured template engine, but also has a very good performance (Hbs): ![Template Comparison](http://jknack.github.io/handlebars.java/images/bench.png) Benchmark source code is available at: https://github.com/mbosecke/template-benchmark # Architecture and API Design * Handlebars.java follows the JavaScript API with some minors exceptions due to the nature of the Java language. * The parser is built on top of [ANTLR v4] (http://www.antlr.org/). * Data is provided as primitive types (int, boolean, double, etc.), strings, maps, list or JavaBeans objects. * Helpers are type-safe. * Handlebars.java is thread-safe. ## Differences between Handlebars.java and Handlebars.js Handlebars.java scope resolution follows the Mustache Spec. For example: Given: ```json { "value": "parent", "child": { } } ``` and ```html Hello {{#child}}{{value}}{{/child}} ``` will be: ```html Hello parent ``` Now, the same model and template with Handlebars.js is: ```html Hello ``` That is because Handlebars.js doesn't look in the context stack for missing attributes in the current scope (this is consistent with the Mustache Spec). Hopefully, you can turn-off the context stack lookup in Handlebars.java by qualifying the attribute with ```this.```: ```html Hello {{#child}}{{this.value}}{{/child}} ``` ## Differences between Handlebars.java and Mustache.js * Handlebars.java throws a ```java.io.FileNotFoundException``` if a partial cannot be loaded. ## Status ### Mustache 1.0 Compliant * Passes the 123 tests from the [Mustache Spec](https://github.com/mustache/spec). * Tests can be found here [comments.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/CommentsTest.java), [delimiters.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/DelimitersTest.java), [interpolation.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/InterpolationTest.java), [inverted.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/InvertedTest.java), [lambdas.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/LambdasTest.java), [partials.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/PartialsTest.java), [sections.yml](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/specs/SectionsTest.java) ### Handlebars.js Compliant * Passes all the [Handlebars.js tests](https://github.com/wycats/handlebars.js/blob/master/spec/qunit_spec.js) * Tests can be found here [basic context](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/BasicContextTest.java), [string literals](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/StringLiteralParametersTest.java), [inverted sections](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/InvertedSectionTest.java), [blocks](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/BlockTest.java), [block helper missing](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/BlockHelperMissingTest.java), [helper hash](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/HelperHashTest.java), [partials](https://github.com/jknack/handlebars.java/blob/master/handlebars/src/test/java/hbs/js/PartialsTest.java) ## Dependencies ```text +- org.slf4j:slf4j-api:jar:1.6.4 ``` ## FAQ ## Want to contribute? * Fork the project on Github. * Wondering what to work on? See task/bug list and pick up something you would like to work on. * Do you want to donate one or more helpers? See [handlebars=helpers](https://github.com/jknack/handlebars.java/tree/master/handlebars-helpers) a repository for community's helpers. * Create an issue or fix one from [issues list](https://github.com/jknack/handlebars.java/issues). * If you know the answer to a question posted to our [mailing list](https://groups.google.com/forum/#!forum/handlebarsjava) - don't hesitate to write a reply. * Share your ideas or ask questions on [mailing list](https://groups.google.com/forum/#!forum/handlebarsjava) - don't hesitate to write a reply - that helps us improve javadocs/FAQ. * If you miss a particular feature - browse or ask on the [mailing list](https://groups.google.com/forum/#!forum/handlebarsjava) - don't hesitate to write a reply, show us some sample code and describe the problem. * Write a blog post about how you use or extend handlebars.java. * Please suggest changes to javadoc/exception messages when you find something unclear. * If you have problems with documentation, find it non intuitive or hard to follow - let us know about it, we'll try to make it better according to your suggestions. Any constructive critique is greatly appreciated. Don't forget that this is an open source project developed and documented in spare time. ## Help and Support [Help and discussion](https://groups.google.com/forum/#!forum/handlebarsjava) [Bugs, Issues and Features](https://github.com/jknack/handlebars.java/issues) ## Related Projects * [Handlebars.js](http://handlebarsjs.com/) * [Try Handlebars.js](http://tryhandlebarsjs.com/) * [Mustache](http://mustache.github.io/) * [ANTLRv4](http://www.antlr.org/) ## Author [Edgar Espina](https://twitter.com/edgarespina) ## License [Apache License 2](http://www.apache.org/licenses/LICENSE-2.0.html)
0
Y4tacker/JavaSec
a rep for documenting my study, may be from 0 to 0.1
null
# JavaSec ![JavaSec](https://socialify.git.ci/Y4tacker/JavaSec/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Dark) ## 0.For Me 仅仅只是想写给自己看 一个记录我Java安全学习过程的仓库,本仓库不是真正意义上的教学仓库(rep中的内容都是我在平时的一些笔记没有很强逻辑性,内容水平自然也是参差不齐,可能有些对我来说很简单的便忽略不计对其他人来说却是难点,因此作为一个学习目录的话可能会好很多),单纯这是笔者简单记一些笔记,顺便见证自己从0到0.1的过程吧,另外后面如果看到一些好的东西在学习完之后也会贴上链接,少了很多介绍性的东西,以后等厉害了再慢慢补充吧.当然如果感觉还不错的话,师傅们记得给个 Star 呀 ~ <p align="right">@Y4tacker</p> <p align="right">2021年10月18日,梦的开始</p> <br/> ## 1.基础篇 - [Java反射](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E5%8F%8D%E5%B0%84/%E5%8F%8D%E5%B0%84.md) - [补充:通过反射修改用final static修饰的变量](https://github.com/Y4tacker/JavaSec/tree/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E9%80%9A%E8%BF%87%E5%8F%8D%E5%B0%84%E4%BF%AE%E6%94%B9%E7%94%A8final%E4%BF%AE%E9%A5%B0%E7%9A%84%E5%8F%98%E9%87%8F) - [Java动态代理](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86/%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86.md) - [JNDI注入](https://www.mi1k7ea.com/2019/09/15/%E6%B5%85%E6%9E%90JNDI%E6%B3%A8%E5%85%A5/) - [反序列化](https://www.zhihu.com/question/47794528/answer/672095170) - [类加载器与双亲委派模型](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E7%B1%BB%E5%8A%A0%E8%BD%BD%E5%99%A8%E4%B8%8E%E5%8F%8C%E4%BA%B2%E5%A7%94%E6%B4%BE%E6%A8%A1%E5%9E%8B/%E7%B1%BB%E5%8A%A0%E8%BD%BD%E5%99%A8%E4%B8%8E%E5%8F%8C%E4%BA%B2%E5%A7%94%E6%B4%BE%E6%A8%A1%E5%9E%8B.md) - [两种实现Java类隔离加载的方法](https://max.book118.com/html/2021/0415/5213012132003221.shtm)(当然同名目录下也有pdf,防止以后站不在了) - [ClassLoader(类加载机制)](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/ClassLoader(%E7%B1%BB%E5%8A%A0%E8%BD%BD%E6%9C%BA%E5%88%B6)/ClassLoader(%E7%B1%BB%E5%8A%A0%E8%BD%BD%E6%9C%BA%E5%88%B6).md) - [SPI学习](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/SPI/SPI.md) - [JavaAgent](http://wjlshare.com/archives/1582) - [Java9模块化特性](https://developer.aliyun.com/article/618778) - [JMX](https://zhuanlan.zhihu.com/p/166530442) - [JMX补充学习这哥们写的不错](https://github.com/ZhangZiSheng001/02-jmx-demo) - [JDWP远程执行命令](https://www.mi1k7ea.com/2021/08/06/%E6%B5%85%E6%9E%90JDWP%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E/) - [Tomcat中容器的pipeline机制(学了以后更好帮助Tomcat-Valve类型内存马理解)](https://www.cnblogs.com/coldridgeValley/p/5816414.html) - [ASM学习+Class文件结构了解+JVM一些简单知识](https://github.com/Y4tacker/JavaSec/tree/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/ASM%E5%AD%A6%E4%B9%A0/index.md) - [Xpath注入](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/Xpath%E6%B3%A8%E5%85%A5/index.md) - [JSTL(看菜鸟教程即可)](https://www.runoob.com/jsp/jsp-jstl.html) - [JEP290基础概念](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/JEP290%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5/index.md) - [Java中的XXE](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/Java%E4%B8%AD%E7%9A%84XXE/index.md) - [XML外部实体注入(XXE)攻击方式汇总(关于XXE可以延伸继续看看)](https://tttang.com/archive/1813/) - [绕过WAF保护的XXE(一些通用的流量混淆方式)](https://xz.aliyun.com/t/4059?accounttraceid=04ba92e87b2342b9a14daca5812cc52aoxob&time__1311=n4mx0DnDBiitiQo4GNulxU2nD9iBDc70ZAnYD) - [通过反射扫描被注解修饰的类](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/%E9%80%9A%E8%BF%87%E5%8F%8D%E5%B0%84%E6%89%AB%E6%8F%8F%E8%A2%AB%E6%B3%A8%E8%A7%A3%E4%BF%AE%E9%A5%B0%E7%9A%84%E7%B1%BB/index.md) - [低版本下Java文件系统00截断](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E4%BD%8E%E7%89%88%E6%9C%AC%E4%B8%8BJava%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F00%E6%88%AA%E6%96%AD/index.md) - [有趣的XSS之Normalize](https://github.com/Y4tacker/JavaSec/blob/main/1.%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E6%9C%89%E8%B6%A3%E7%9A%84XSS%E4%B9%8BNormalize/index.md) - [红队-java代码审计生命周期(带你简单了解审计)](https://www.secpulse.com/archives/193771.html) ## 2.反序列化 很早前学了,后面补上,更多是说一点关键的东西,不会很详细,好吧这里再拓展成反序列化专区好了 如果想系统学习CC链、CB链的话这部分还是推荐p牛的[Java安全漫谈](https://github.com/phith0n/JavaThings),我只是简单写写便于自己复习而已(这部分看我下面的share并不适合新人,过了这么久看过网上很多文章还是觉得P牛写的更适合新人) - [Java反序列化之URLDNS](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/Java%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B9%8BURLDNS/Java%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B9%8BURLDNS.md) - [CommonsCollections1笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections1/CommonsCollections1.md) - [CommonsCollections2笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections2/CommonsCollections2.md) - [CommonsCollections3笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections3/CommonsCollections3.md) - [CommonsCollections5笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections5/CommonsCollections5.md) - [CommonsCollections6-HashSet笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections6-HashSet/CommonsCollections6-HashSet.md) - [CommonsCollections6-HashMap笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections6-HashMap/CommonsCollections6-HashMap.md) - [CommonsCollections6-Shiro1.2.4笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections6-Shiro1.2.4/CommonsCollections6-Shiro1.2.4.md) - [CommonsCollections7笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections7/CommonsCollections7.md) - [CommonCollectionsWithoutChainedTransformer](https://github.com/Y4tacker/JavaSec/blob/main/2.%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B8%93%E5%8C%BA/CommonCollectionsWithoutChainedTransformer/index.md) - [使用TemplatesImpl改造CommonsCollections2](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/%E4%BD%BF%E7%94%A8TemplatesImpl%E6%94%B9%E9%80%A0CommonsCollections2/%E4%BD%BF%E7%94%A8TemplatesImpl%E6%94%B9%E9%80%A0CommonsCollections2.md) - [网上看到的套娃CommonsCollections11](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsCollections11/CommonsCollections11.md) - [CommonsBeanutils1笔记](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsBeanutils1/CommonsBeanutils1%E7%AC%94%E8%AE%B0.md) - [CommonsBeanutils1-Shiro(无CC依赖)](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/CommonsBeanutils1-Shiro(%E6%97%A0CC%E4%BE%9D%E8%B5%96)/CommonsBeanutils1-Shiro(%E6%97%A0CC%E4%BE%9D%E8%B5%96).md) - [FileUpload1-写文件\删除文件](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/FileUpload/index.md) - [C3P0利用链简单分析](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/C3P0/C3P0.md) - [C3P0Tomcat不出网利用(思路就是之前高版本JNDI注入的思路)](http://www.yulegeyu.com/2021/10/10/JAVA%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B9%8BC3P0%E4%B8%8D%E5%87%BA%E7%BD%91%E5%88%A9%E7%94%A8/) - [反制Ysoserial0.0.6版本-JRMP](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/%E5%8F%8D%E5%88%B6Ysoserial0.0.6%E7%89%88%E6%9C%AC-JRMP/%E5%8F%8D%E5%88%B6Ysoserial0.0.6%E7%89%88%E6%9C%AC-JRMP.md) - [SnakeYAML反序列化及可利用Gadget](https://y4tacker.github.io/2022/02/08/year/2022/2/SnakeYAML%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%8F%8A%E5%8F%AF%E5%88%A9%E7%94%A8Gadget%E5%88%86%E6%9E%90/) - [SnakeYAML出网探测Gadget(自己瞎琢磨出来的,不过在1.7以下版本就不行)](https://y4tacker.github.io/2022/02/08/year/2022/2/SnakeYAML%E5%AE%9E%E7%8E%B0Gadget%E6%8E%A2%E6%B5%8B/) - [XStream反序列化学习](https://y4tacker.github.io/2022/02/10/year/2022/2/XStream%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96/) - [解决反序列化serialVesionUID不一致问题(BestMatch:打破双亲委派对jbxz用工具最方便)](https://gv7.me/articles/2020/deserialization-of-serialvesionuid-conflicts-using-a-custom-classloader/) - [自己搞的把ROME利用链长度缩小4400-1320(Base64)](https://y4tacker.github.io/2022/03/07/year/2022/3/ROME%E6%94%B9%E9%80%A0%E8%AE%A1%E5%88%92/) - [JDK7u21](https://github.com/Y4tacker/JavaSec/blob/main/2.%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B8%93%E5%8C%BA/JDK7u21/index.md) - [AspectJWeaver写文件](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/AspectJWeaver/AspectJWeaver.md) - [反序列化在渗透测试当中值得关注的点](https://github.com/Y4tacker/JavaSec/blob/main/2.%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B8%93%E5%8C%BA/%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%9C%A8%E6%B8%97%E9%80%8F%E6%B5%8B%E8%AF%95%E5%BD%93%E4%B8%AD%E5%80%BC%E5%BE%97%E5%85%B3%E6%B3%A8%E7%9A%84%E7%82%B9/index.md) - [UTF-8 Overlong Encoding导致的安全问题(在绕过流量设备上非常有帮助)](https://mp.weixin.qq.com/s/fcuKNfLXiFxWrIYQPq7OCg) - [构造java探测class反序列化gadget](https://mp.weixin.qq.com/s/KncxkSIZ7HVXZ0iNAX8xPA) - [对URLDNS探测class的补充(为什么本地明明没有这个类却有"DNS解析")](https://github.com/Y4tacker/JavaSec/blob/main/2.%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E4%B8%93%E5%8C%BA/URLDNS%E6%8E%A2%E6%B5%8Bclass%E7%9A%84%E8%A1%A5%E5%85%85/index.md) - [利用Swing构造反序列化SSRF/RCE(JDK CVE-2023-21939)](https://github.com/Y4Sec-Team/CVE-2023-21939) - Hessian反序列化 - [Hessian 反序列化知一二](https://su18.org/post/hessian/) - [hessian-only-jdk利用补充](https://github.com/waderwu/My-CTF-Challenges/blob/master/0ctf-2022/hessian-onlyJdk/writeup/readme.md) - [hessian-onlyjdk-jdk11+jdk.jfr.internal.Utils利用补充](https://guokeya.github.io/post/psaIZKtC4/) ## 3.Fastjson/Jackson专区 可以对比jackson简单学习下,这里我也会简单提一下jackson的一些利用,当然不会很详细,但是会简单列出一些触发原理,而且有些payload是共通的,这里也不以收集各个依赖下利用的payload为主 - Jackson - [Jackson的利用触发及小细节(比较鸡肋仅作为学习了解)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson%E4%B8%93%E5%8C%BA/Jackson%E7%9A%84%E5%88%A9%E7%94%A8%E8%A7%A6%E5%8F%91/index.md) - [Jackson原生反序列化Gadgets(实用)](https://xz.aliyun.com/t/12485#toc-5) - [Jackson构造过程会触发利用导致中断可通过重写类解决(附上demo学习)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson%E4%B8%93%E5%8C%BA/Jackson%E5%8E%9F%E7%94%9F%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96Gadget/Jackson.txt(%E6%94%B9zip%E5%90%8E%E7%BC%80%E8%A7%A3%E5%8E%8B).txt) - [从JSON1链中学习处理JACKSON链的不稳定性(使用JdkDynamicAopProxy让触发更稳定)](https://xz.aliyun.com/t/12846#toc-4) - Fastjson - [Fastjson基本用法](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Fastjson%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95/Fastjson%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%B3%95.md) - [Fastjson1.1.15-1.2.4与BCEL字节码加载](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Fastjson1.1.15-1.2.4%E4%B8%8EBCEL%E5%AD%97%E8%8A%82%E7%A0%81%E5%8A%A0%E8%BD%BD/Fastjson1.1.15-1.2.4%E4%B8%8EBCEL%E5%AD%97%E8%8A%82%E7%A0%81%E5%8A%A0%E8%BD%BD.md) - [Fastjson1.22-1.24反序列化分析之JNDI](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Fastjson1.22-1.24/Fastjson1.22-1.24%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%88%86%E6%9E%90%E4%B9%8BJNDI/Fastjson1.22-1.24.md) - [Fastjson1.22-1.24反序列化分析之TemplateImpl](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Fastjson1.22-1.24/Fastjson1.22-1.24%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E5%88%86%E6%9E%90%E4%B9%8BTemplateImpl/Fastjson1.22-1.24.md) - [Fastjson1.2.25-1.2.41补丁绕过(用L;绕过、需要开启autotype)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Bypass/Fastjson1.2.25-1.2.41%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87/Fastjson1.2.25-1.2.41%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87.md) - [Fastjson1.2.25-1.2.42补丁绕过(双写L;绕过、需要开启autotype)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Bypass/Fastjson1.2.25-1.2.42%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87/Fastjson1.2.25-1.2.42%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87.md) - [Fastjson1.2.25-1.2.43补丁绕过(用左中括号绕过、需要开启autotype)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Bypass/Fastjson1.2.25-1.2.43%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87/Fastjson1.2.25-1.2.43%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87.md) - [Fastjson1.2.25-1.2.45补丁绕过(mybatis的3.x版本且<3.5.0、需要开启autotype)](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Bypass/Fastjson1.2.25-1.2.45%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87/Fastjson1.2.25-1.2.45%E8%A1%A5%E4%B8%81%E7%BB%95%E8%BF%87.md) - [Fastjson1.2.25-1.2.47绕过](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/Bypass/Fastjson1.2.25-1.2.47%E7%BB%95%E8%BF%87%E6%97%A0%E9%9C%80AutoType/Fastjson1.2.25-1.2.47%E7%BB%95%E8%BF%87%E6%97%A0%E9%9C%80AutoType.md) - [Fastjson1.2.48-1.2.68反序列化漏洞](https://www.anquanke.com/post/id/232774) - [Fastjson1.2.68不使用ref引用,不用parseObject触发get方法](https://su18.org/post/fastjson-1.2.68/#getter-%E6%96%B9%E6%B3%95%E8%B0%83%E7%94%A8) - [关于blackhat2021披露的fastjson1.2.68链的一些细节,防止公众号以后找不到同目录下有备份](https://mp.weixin.qq.com/s?__biz=MzUzNDMyNjI3Mg==&mid=2247484866&idx=1&sn=23fb7897f6e54cdf61031a65c602487d&scene=21#wechat_redirect) - [2021L3HCTF中关于Fastjson1.2.68的骚操作](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/%E5%85%B6%E4%BB%96/L3HCTF%202021%20Official%20Write%20Up.pdf) - [一些有趣的Trick](https://github.com/Y4tacker/JavaSec/blob/main/3.FastJson专区/%E6%9C%89%E8%B6%A3Trick/FastJson%20Trick.md) - [fastjson低版本不出网利用(常规很简单的炒陈饭看看就行)](https://mp.weixin.qq.com/s?__biz=MzAwNzk0NTkxNw==&mid=2247486057&idx=1&sn=6799b8b77f058247705beaa6995dcb82&chksm=9b7721bbac00a8adc3ca7b23590bcb7493fc93091eaf76efe4662b7d6f86068e38d20338c3c1&mpshare=1&scene=2&srcid=1109kLt9Pm0fZdiqQ8zbB0IX&sharer_sharetime=1667995572392&sharer_shareid=917ce1404b071ce27556675ad135266f#rd) - [FastJson与原生反序列化(一)](https://y4tacker.github.io/2023/03/20/year/2023/3/FastJson%E4%B8%8E%E5%8E%9F%E7%94%9F%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96/) - [FastJson与原生反序列化(二)](https://y4tacker.github.io/2023/04/26/year/2023/4/FastJson%E4%B8%8E%E5%8E%9F%E7%94%9F%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96-%E4%BA%8C/) - [Fastjson低版本不出网利用(常规很简单的炒陈饭看看就行)](https://mp.weixin.qq.com/s?__biz=MzAwNzk0NTkxNw==&mid=2247486057&idx=1&sn=6799b8b77f058247705beaa6995dcb82&chksm=9b7721bbac00a8adc3ca7b23590bcb7493fc93091eaf76efe4662b7d6f86068e38d20338c3c1&mpshare=1&scene=2&srcid=1109kLt9Pm0fZdiqQ8zbB0IX&sharer_sharetime=1667995572392&sharer_shareid=917ce1404b071ce27556675ad135266f#rd) - [Fastjson与原生反序列化](https://y4tacker.github.io/2023/03/20/year/2023/3/FastJson%E4%B8%8E%E5%8E%9F%E7%94%9F%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96/) - 其他 - [Java JSON解析特性分析](https://javasec.org/javaweb/JSON/FEATURE.html) - [黑盒判断目标的fastjson版本](https://mp.weixin.qq.com/s/jbkN86qq9JxkGNOhwv9nxA) - [fastjson探测class/如何判断是fastjson、jackson、gson](https://github.com/safe6Sec/Fastjson) - [记一次 Fastjson Gadget 寻找](https://mp.weixin.qq.com/s/dJkZuf6Ho6EK71bbnXI0EA) ## 4.Weblogic专区(虽然也挖了一堆,暂时不想写) - [T3协议学习](https://github.com/Y4tacker/JavaSec/blob/main/4.Weblogic专区/T3%E5%8D%8F%E8%AE%AE%E5%AD%A6%E4%B9%A0/T3%E5%8D%8F%E8%AE%AE%E5%AD%A6%E4%B9%A0.md) - [CVE-2015-4852复现分析](https://github.com/Y4tacker/JavaSec/blob/main/4.Weblogic专区/CVE-2015-4852%E5%A4%8D%E7%8E%B0%E5%88%86%E6%9E%90/CVE-2015-4852%E5%A4%8D%E7%8E%B0%E5%88%86%E6%9E%90.md) - [Weblogic使用ClassLoader和RMI来回显命令执行结果](https://xz.aliyun.com/t/7228) - [Weblogic SSRF Involving Deserialized JDBC Connection](https://pyn3rd.github.io/2022/06/18/Weblogic-SSRF-Involving-Deserialized-JDBC-Connection/) ## 5.内存马学习专区 - 基础知识 - [Shell中的幽灵王者—JAVAWEB 内存马 【认知篇】](https://mp.weixin.qq.com/s/NKq4BZ8fLK7bsGSK5UhoGQ) - [JavaWeb与Tomcat介绍](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Tomcat/Tomcat%E4%BB%8B%E7%BB%8D/Tomcat%E4%BB%8B%E7%BB%8D.md) - [Tomcat-Listener型内存马](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Tomcat/Tomcat-Listener%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC/Tomcat-Listener%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC.md) - [Tomcat-Filter型内存马](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Tomcat/Tomcat-Filter%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC/Tomcat-Filter%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC.md) - [Tomcat-Servlet型内存马](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Tomcat/Tomcat-Servlet%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC/Tomcat-Servlet%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC.md) - [Tomcat-Valve内存马](https://mp.weixin.qq.com/s/x4pxmeqC1DvRi9AdxZ-0Lw) - [Tomcat-Upgrade内存马](https://mp.weixin.qq.com/s/RuP8cfjUXnLVJezBBBqsYw) - [WebSocket代理内存马](https://github.com/veo/wsMemShell) - [Executor内存马的实现](https://mp.weixin.qq.com/s/uHxQf86zHJvg9frTbjdIdA) - [浅谈 Java Agent 内存马(网上看到大师傅写的很详细直接搬运工了)](http://wjlshare.com/archives/1582) - [SpringBoot内存马学习-通过添加新路由](https://github.com/Y4tacker/JavaSec/tree/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Spring/%E9%92%88%E5%AF%B9springboot%E7%9A%84controller%E5%86%85%E5%AD%98%E9%A9%AC) - [利用intercetor注入Spring内存马](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Spring/%E5%88%A9%E7%94%A8intercetor%E6%B3%A8%E5%85%A5Spring%E5%86%85%E5%AD%98%E9%A9%AC/index.md) - [Timer型内存马](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Tomcat/Timer%E5%9E%8B%E5%86%85%E5%AD%98%E9%A9%AC/index.md) - [看不见的Jsp-Webshell(有点像平时CTF里面php的不死马的效果)](https://mp.weixin.qq.com/s/1ZiLD396088TxiW_dUOFsQ) - [看不见的 Jsp-WebShell 第二式增强之无痕](https://mp.weixin.qq.com/s/7b3Fyu_K6ZRgKlp6RkdYoA) - [Spring cloud gateway通过SPEL注入内存马](https://gv7.me/articles/2022/the-spring-cloud-gateway-inject-memshell-through-spel-expressions/) - [Java安全攻防之Spring Cloud Gateway攻击Redis](https://mp.weixin.qq.com/s/6U1KaLrrtq2dxg55IYASFg) - Tools - [一款支持高度自定义的 Java 内存马生成工具(配合这个学习别人的内存马构造)](https://github.com/pen4uin/java-memshell-generator) ## 6.JavaAgent学习专区 - [Java Instrument插桩技术初体验](https://github.com/Y4tacker/JavaSec/blob/main/6.JavaAgent/JavaInstrument%E6%8F%92%E6%A1%A9%E6%8A%80%E6%9C%AF/JavaInstrument%E6%8F%92%E6%A1%A9%E6%8A%80%E6%9C%AF.md) - [PreMain之addTransformer与redefineClasses用法学习](https://github.com/Y4tacker/JavaSec/blob/main/6.JavaAgent/PreMain%E4%B9%8BaddTransformer%E4%B8%8EredefineClasses%E7%94%A8%E6%B3%95%E5%AD%A6%E4%B9%A0/PreMain%E4%B9%8BaddTransformer%E4%B8%8EredefineClasses%E7%94%A8%E6%B3%95%E5%AD%A6%E4%B9%A0.md) - [AgentMain(JVM启动后动态Instrument)](https://github.com/Y4tacker/JavaSec/blob/main/6.JavaAgent/AgentMain/AgentMain.md) - [通过JVMTI实现C/C++的JavaAgent交互](https://luckymrwang.github.io/2020/12/28/%E7%A0%B4%E8%A7%A3-Java-Agent-%E6%8E%A2%E9%92%88%E9%BB%91%E7%A7%91%E6%8A%80/#JVMTIAgent) 后面因为一些原因打算更系统学习,感觉在这里面直接添加有点臃肿,故开了一个新的repo来记录整个学习阶段,移步[RaspLearning](https://github.com/Y4tacker/RaspLearning) ## 7.Struts2学习专区 一开始不想搞这个是因为很少人用了,后面想了一下可以具体看看struts2当中对OGNL策略如何做提升处理学学别人的绕过(Ps:不教怎么复现搭建环境) - [Struts2简介与漏洞环境搭建](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA.md) - [S2-001学习(由于是第一篇我还是分析的比较详细,后面不会重复本篇里面的一些流程内容)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/s2-001%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/Struts2-001.md) - [S2-002学习(太鸡肋了感觉实战也比较难出现)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-002%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/S2-002%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90.md) - [S2-003学习(比较有趣的一个洞很多小细节)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/s2-003%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-005学习(通过Ognl将上下文_memberAccess中的acceptProperties设为空绕过)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/s2-005%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-007学习(字符串拼接导致OGNL解析)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-007%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-008学习(很鸡肋,稍微有点用的有开启devMode解析任意Ognl)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-008%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) 后面突然觉得调试的过程很无聊我也不感兴趣,更感兴趣的是关于Struts当中Ognl的攻防所以后面更偏向于这方面研究,而不再具体跟踪中间的调用过程 - [S2-015学习(静态方法受限制以及没有setAllowStaticMethodAccess后如何绕过)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-015%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-032学习(清空_memberAccess当中excludedXXX限制通过构造函数调用/使用DefaultMemberAccess覆盖SecurityMemberAccess绕过限制)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-032%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-045学习(通过container获取全局共享的OgnlUtil实例来清除SecurityMemberAccess当中属性的限制)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-045%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-057学习(突破#context被删除限制,从attr作用域获取context对象)](https://github.com/Y4tacker/JavaSec/blob/main/7.Struts2%E4%B8%93%E5%8C%BA/S2-057%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/index.md) - [S2-066学习(变量覆盖的有趣的例子)](https://y4tacker.github.io/2023/12/09/year/2023/12/Apache-Struts2-%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%88%86%E6%9E%90-S2-066/) ## 8.关于Tomcat的一些小研究 - [JSTL的可利用点](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/JSTL%E7%9A%84%E5%8F%AF%E5%88%A9%E7%94%A8%E7%82%B9/index.md) - [一次jsp的奇异探索](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/%E4%B8%80%E6%AC%A1jsp%E7%9A%84%E5%A5%87%E5%BC%82%E6%8E%A2%E7%B4%A2/1.md) - [Tomcat写文件新利用思路](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/Tomcat%E5%86%99%E6%96%87%E4%BB%B6%E6%96%B0%E5%88%A9%E7%94%A8%E6%80%9D%E8%B7%AF/DC.md) - [两个关于Tomcat的问题](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/%E4%B8%A4%E4%B8%AA%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E9%97%AE%E9%A2%98/1.md) - [Java文件上传大杀器-绕waf(针对commons-fileupload组件)](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/Common-fileupload%E7%BB%84%E4%BB%B6%E7%BB%95%E8%BF%87/Java%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%A4%A7%E6%9D%80%E5%99%A8-%E7%BB%95waf(%E9%92%88%E5%AF%B9commons-fileupload%E7%BB%84%E4%BB%B6).md) - [探寻Tomcat文件上传流量层面绕waf新姿势](https://y4tacker.github.io/2022/06/19/year/2022/6/%E6%8E%A2%E5%AF%BBTomcat%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E6%B5%81%E9%87%8F%E5%B1%82%E9%9D%A2%E7%BB%95waf%E6%96%B0%E5%A7%BF%E5%8A%BF/) - [Tomcat上传.war触发JNDI](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/Tomcat%E4%B8%8A%E4%BC%A0.war%E8%A7%A6%E5%8F%91JNDI/index.md) - [Servlet的线程安全问题](https://y4tacker.github.io/2022/02/03/year/2022/2/Servlet%E7%9A%84%E7%BA%BF%E7%A8%8B%E5%AE%89%E5%85%A8%E9%97%AE%E9%A2%98/) ## 9.JDBC Attack 关于Make JDBC Attacks Brilliant Again的简单记录,当我们在 JDBC Connection URL可控的情况下,攻击者可以进行什么样的攻击?这部分可以配合[探索高版本 JDK 下 JNDI 漏洞的利用方法](https://tttang.com/archive/1405/)来进行拓展攻击 - [MySQL-JDBC-反序列化漏洞](https://github.com/Y4tacker/JavaSec/blob/main/2.反序列化专区/MySQL-JDBC-%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E/MySQL%20JDBC-%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E.md) - (补充各版本区别)[MySQL JDBC 客户端反序列化漏洞分析](https://www.anquanke.com/post/id/203086) - [对fnmsd关于detectCustomCollations触发点的版本纠正](https://xz.aliyun.com/t/10923) - [H2-RCE](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/h2/index.md) - [ModeShape-JNDI](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/ModeShape/index.md) - [IBM DB2-JNDI](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/IBM-DB2/index.md) - [Apache Derby可触发反序列化](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/Apache-Derby/index.md) - [SQLite SSRF](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/SQLite/index.md) - [PostgreSQL-RCE(敌不动我不动,你先发poc我放心)](https://github.com/Y4tacker/JavaSec/blob/main/9.JDBC%20Attack/PostGreSQL/index.md) - [Make JDBC Attacks Brilliant Again 番外篇(作为上面Postgresql的拓展)](https://tttang.com/archive/1462/) - [Hive-RCE](https://github.com/Y4tacker/hue-hive-rce) - [2023BalckHat Asia上补充关于informix-sqli、db2、cloudspanner、avatica、snowflake的利用姿势](https://i.blackhat.com/Asia-23/AS-23-Yuanzhen-A-new-attack-interface-in-Java.pdf) - [JDBC利用链结合原生反序列化的思路](https://mogwailabs.de/en/blog/2023/04/look-mama-no-templatesimpl/) - [JDBC Attack URL 绕过合集](https://mp.weixin.qq.com/s/lmoWKK41ZQzZOh-P26VUng) ## 10.关于JNDI的整理 因为比较重要单独列出来了 - [Java RMI 攻击由浅入深(深入源码,师傅写的很好)](https://su18.org/post/rmi-attack/) - [如何绕过高版本 JDK 的限制进行 JNDI 注入利用](https://paper.seebug.org/942/#classreference-factory) - (自己写的流程补充)[高低版JDK下的JNDI注入绕过流程跟踪](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/%E9%AB%98%E4%BD%8E%E7%89%88JDK%E4%B8%8B%E7%9A%84JNDI%E6%B3%A8%E5%85%A5%E7%BB%95%E8%BF%87%E6%B5%81%E7%A8%8B%E8%B7%9F%E8%B8%AA/%E9%AB%98%E4%BD%8E%E7%89%88JDK%E4%B8%8B%E7%9A%84JNDI%E6%B3%A8%E5%85%A5%E7%BB%95%E8%BF%87%E6%B5%81%E7%A8%8B%E8%B7%9F%E8%B8%AA.md) - [探索高版本 JDK 下 JNDI 漏洞的利用方法](https://tttang.com/archive/1405/) - [JNDI jdk高版本绕过—— Druid](https://xz.aliyun.com/t/10656) ## 11.Spring - [浅谈SpringWeb请求解析过程(很不错的文章把低版本一些绕过的特性基本都提到了)](https://forum.butian.net/share/2214) - [浅谈Spring与安全约束SecurityConstraint](https://forum.butian.net/index.php/share/2283) - [SpirngBoot下结合Tomcat实现无OOB方式下的回显](https://github.com/Y4tacker/JavaSec/blob/main/5.%E5%86%85%E5%AD%98%E9%A9%AC%E5%AD%A6%E4%B9%A0/Spring/springboot-tomcat%E5%9B%9E%E6%98%BE/index.md) - [低版本SpringBoot-SpEL表达式注入漏洞复现分析](https://y4tacker.github.io/2022/02/07/year/2022/2/%E4%BD%8E%E7%89%88%E6%9C%ACSpringBoot-SpEL%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0%E5%88%86%E6%9E%90/) - [SpringCloud-SnakeYAML-RCE(高版本不可用)](https://y4tacker.github.io/2022/02/08/year/2022/2/SpringCloud-SnakeYAML-RCE/) - [Spring Boot Vulnerability Exploit Check List](https://github.com/LandGrey/SpringBootVulExploit) - [SSRF to Rce with Jolokia and Mbeans](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/SSRF%20to%20RCE%20with%20Jolokia%20and%20MBeans%20%E2%80%A2%20Think%20Love%20Share.pdf) - [CVE-2022-22947 SpringCloudGateWay 远程代码执行](https://github.com/Y4tacker/JavaSec/blob/main/11.Spring/CVE-2022-22947%20SpringCloudGateWay%20%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C/index.md) - [Spring Cloud Function-SPEL(利用面不大)](https://hosch3n.github.io/2022/03/26/SpringCloudFunction%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/) - [SpringMVC框架任意代码执行漏洞(CVE-2010-1622)分析](http://rui0.cn/archives/1158) - [Spring Beans RCE分析(CVE-2022-22965)(我还是喜欢叫Spring4shell,自己懒得写了,这篇还可以,稍微注意下AccessLogValve这个类WBS)](https://xz.aliyun.com/t/11129) - [Spring Data MongoDB SpEL表达式注入(CVE-2022-22980)(能看但是有些逻辑还是讲得很混乱总体而已还是好的作为参考即可)](https://xz.aliyun.com/t/11484) - [SpringBoot全局注册Filter过滤XSS](https://github.com/Y4tacker/JavaSec/blob/main/11.Spring/SpringBoot%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8CFilter%E8%BF%87%E6%BB%A4XSS/index.md) - [Springboot devtools反序列化(难点在于secret的获取,当然比如有actuator端点暴露情况下就会变得容易)](https://novysodope.github.io/2022/05/11/77/) - [浅谈Spring中的Controller参数的验证机制(注意Hibernate Validator的正确配置)](https://forum.butian.net/share/2538) ## 12.Shiro - [Shiro RememberMe 漏洞检测的探索之路(长亭的一些总结非常不错)](https://stack.chaitin.com/techblog/detail?id=39) - [Shiro另类检测方式](http://www.lmxspace.com/2020/08/24/%E4%B8%80%E7%A7%8D%E5%8F%A6%E7%B1%BB%E7%9A%84shiro%E6%A3%80%E6%B5%8B%E6%96%B9%E5%BC%8F/) - [浅谈Shiro执行任意反序列化gadget的方案](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/%E6%B5%85%E8%B0%88Shiro%E6%89%A7%E8%A1%8C%E4%BB%BB%E6%84%8F%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96gadget%E7%9A%84%E6%96%B9%E6%A1%88/index.md) - [CVE-2010-3863权限绕过(通过/./admin绕过/admin,/abc/../admin)](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/CVE-2010-3863%E6%9D%83%E9%99%90%E7%BB%95%E8%BF%87/index.md) - [CVE-2016-6802权限绕过(通过/abc/../y4tacker/admin绕过)](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/CVE-2016-6802%E6%9D%83%E9%99%90%E7%BB%95%E8%BF%87/index.md) - [Shiro550-TemplatesImpl(CC6-Shiro)](https://github.com/phith0n/JavaThings/blob/master/shiroattack/src/main/java/com/govuln/shiroattack/CommonsCollectionsShiro.java) - [CommonsBeanutils与无 commons-collections的Shiro反序列化利用](https://github.com/phith0n/JavaThings/blob/master/shiroattack/src/main/java/com/govuln/shiroattack/CommonsBeanutils1Shiro.java) - [另类的shiro检验key的检测方式](http://www.lmxspace.com/2020/08/24/%E4%B8%80%E7%A7%8D%E5%8F%A6%E7%B1%BB%E7%9A%84shiro%E6%A3%80%E6%B5%8B%E6%96%B9%E5%BC%8F/) - [shiro反序列化漏洞攻击拓展面--修改key](https://tttang.com/archive/1457/) - [Tomcat-Header长度受限突破shiro回显](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/Tomcat-Header%E9%95%BF%E5%BA%A6%E5%8F%97%E9%99%90%E7%AA%81%E7%A0%B4shiro%E5%9B%9E%E6%98%BE/index.md) - [Spring下Shiro<1.5.0权限绕过(/unauthorize/)](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/SHIRO682/index.md) - [CVE-2020-13933特殊场景权限绕过(通过/unauthorize/%3b)](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/CVE-2020-13933%E6%9D%83%E9%99%90%E7%BB%95%E8%BF%87/index.md) - [SpringBoot2.3.0下Shiro<=1.5.1权限绕过(通过/aa;/%2e%2e/unauthorize绕过对/unauthorize拦截,当然也可以不用目录穿越/;y4tacker/unauthorize也可以)](https://github.com/Y4tacker/JavaSec/tree/main/11.Spring/SpringBoot2.3.0%E4%B8%8BShiro%3C%3D1.5.1%E6%9D%83%E9%99%90%E7%BB%95%E8%BF%87) - [Spring-Shiro1.5.2 Bypass(通过/unauthorize/a%252Fa绕过对/unauthorize/*的权限限制)](https://github.com/Y4tacker/JavaSec/blob/main/12.Shiro/Spring-Shiro1.5.2%20Bypass/index.md) - [记一次 Shiro 的实战利用(突破限制shiro 550利用payload的长度,这种方式不能很好对抗检测文件落地,其实也可以配合上下文一些无害属性多次set写入加载)](https://mp.weixin.qq.com/s/w9sMhMrCy1pofOV-h94qbQ) ## 13.回显相关技术学习 - [通杀漏洞利用回显方法-linux平台](https://www.00theway.org/2020/01/17/java-god-s-eye/) - [linux下java反序列化通杀回显方法的低配版实现](https://xz.aliyun.com/t/7307) - [Tomcat中一种半通用回显方法](https://xz.aliyun.com/t/7348) - [半自动化挖掘request实现多种中间件回显](https://gv7.me/articles/2020/semi-automatic-mining-request-implements-multiple-middleware-echo/) ## 14. JSPWebshell - [JSP-Webshells集合(三梦的总结挺全面的利用点)](https://github.com/threedr3am/JSP-Webshells) - [JspWebShell新姿势解读](https://y4tacker.github.io/2022/05/16/year/2022/5/JspWebShell%E6%96%B0%E5%A7%BF%E5%8A%BF%E8%A7%A3%E8%AF%BB/) - [jsp新webshell的探索之旅](https://y4tacker.github.io/2022/02/03/year/2022/2/jsp%E6%96%B0webshell%E7%9A%84%E6%8E%A2%E7%B4%A2%E4%B9%8B%E6%97%85/) - [JspWebshell编码混淆篇(unicode和html实体编码那些就懒得写了技术性不强)](https://y4tacker.github.io/2022/11/27/year/2022/11/%E6%B5%85%E8%B0%88JspWebshell%E4%B9%8B%E7%BC%96%E7%A0%81/) ## 15.Waf - [Java文件上传大杀器-绕waf(针对commons-fileupload组件)](https://y4tacker.github.io/2022/02/25/year/2022/2/Java%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E5%A4%A7%E6%9D%80%E5%99%A8-%E7%BB%95waf(%E9%92%88%E5%AF%B9commons-fileupload%E7%BB%84%E4%BB%B6)/) - [探寻Java文件上传流量层面waf绕过姿势系列一](https://y4tacker.github.io/2022/06/19/year/2022/6/%E6%8E%A2%E5%AF%BBTomcat%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E6%B5%81%E9%87%8F%E5%B1%82%E9%9D%A2%E7%BB%95waf%E6%96%B0%E5%A7%BF%E5%8A%BF/) - [探寻Java文件上传流量层面waf绕过姿势系列二](https://y4tacker.github.io/2022/06/21/year/2022/6/%E6%8E%A2%E5%AF%BBJava%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E6%B5%81%E9%87%8F%E5%B1%82%E9%9D%A2waf%E7%BB%95%E8%BF%87%E5%A7%BF%E5%8A%BF%E7%B3%BB%E5%88%97%E4%BA%8C/) - [Java反序列化数据绕WAF之加大量脏数据 | 回忆飘如雪 (gv7.me)](https://gv7.me/articles/2021/java-deserialize-data-bypass-waf-by-adding-a-lot-of-dirty-data/) - [Java反序列化脏数据新姿势-对大师傅的姿势补充(个人的小研究)](https://y4tacker.github.io/2022/02/05/year/2022/2/%E5%AF%B9Java%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%95%B0%E6%8D%AE%E7%BB%95WAF%E6%96%B0%E5%A7%BF%E5%8A%BF%E7%9A%84%E8%A1%A5%E5%85%85/) - [Fastjson词法引擎绕waf](https://y4tacker.github.io/2022/03/30/year/2022/3/%E6%B5%85%E8%B0%88Fastjson%E7%BB%95waf/) - [RCE via SSTI on Spring Boot Error Page with Akamai WAF Bypass](https://h1pmnh.github.io/post/writeup_spring_el_waf_bypass/) ## 16.漏洞复现 - Apache - [Apache Commons Configuration 远程代码执行(虽然是配置文件RCE但也有学习意义)](https://xz.aliyun.com/t/11527) - [Apache Spark shell command injection vulnerability via Spark UI(之前很早前在我的各个知识星球分享了)](https://github.com/Y4tacker/JavaSec/blob/main/16.%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/CVE-2022-33891/index.md) - [Apache Commons JXPath 远程代码执行](https://github.com/Y4tacker/JavaSec/blob/main/16.%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/CVE-2022-41852/index.md) - [Apache Commons Text 远程代码执行](https://github.com/Y4tacker/JavaSec/blob/main/16.%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/CVE-2022-42889/index.md) - [Log4j2-RCE分析](http://blog.gm7.org/%E4%B8%AA%E4%BA%BA%E7%9F%A5%E8%AF%86%E5%BA%93/02.%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/01.Java%E5%AE%89%E5%85%A8/03.%E5%BA%94%E7%94%A8%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/06.log4j2_rce%E5%88%86%E6%9E%90.html#%E5%A4%8D%E7%8E%B0) - [Log4j2不出网检测(靠类型转换、危害有限思路值得学习)](https://cloud.tencent.com/developer/article/2036012) - [Apache Flink RCE via jar/plan API Endpoint in JDK8](https://mp.weixin.qq.com/s?__biz=MzkyNDA5NjgyMg==&mid=2247495227&idx=1&sn=5ab9bcc3d89d57ff9799f88c3363814c&chksm=c1d9ae62f6ae2774dd25902c116f6c24f3e5bbf68836f676c25aac53f2c6b771b4a3823c3e7e&mpshare=1&scene=1&srcid=0325kmXWImZrXe0btPMEsJDY&sharer_sharetime=1679735505328&sharer_shareid=19374164c9d8647c6159e09a97bb1208#rd) - [Apache Dubbo 反序列化漏洞(CVE-2023-23638)分析及利用探索](https://yyhylh.github.io/2023/04/08/Apache%20dubbo%20%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%EF%BC%88CVE-2023-23638%EF%BC%89%E5%88%86%E6%9E%90%E5%8F%8A%E5%88%A9%E7%94%A8%E6%8E%A2%E7%B4%A2/) - [Apache Dubbo反序列化漏洞(CVE-2023-23638)完整利用及工程化实践](https://yyhylh.github.io/2023/05/11/Apache%20Dubbo%20%EF%BC%88CVE-2023-23638%EF%BC%89%E5%AE%8C%E6%95%B4%E5%88%A9%E7%94%A8%E5%8F%8A%E5%B7%A5%E7%A8%8B%E5%8C%96%E5%AE%9E%E8%B7%B5/) - [Apache Airflow: Bypass permission verification to view task instances of other dags(CVE-2023-42663)](https://hackerone.com/reports/2208656) - [Apache Jackrabbit RMI 远程代码执行漏洞分析(CVE-2023-37895)(这个漏洞适合了解RMI攻击的基础)](https://xz.aliyun.com/t/13118) - [Apache ActiveMQ Jolokia远程代码执行不依赖JDK打法](https://y4tacker.github.io/2023/11/30/year/2023/11/Apache-ActiveMQ-Jolokia%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E4%B8%8D%E4%BE%9D%E8%B5%96JDK%E6%89%93%E6%B3%95/) - Apache OFBiz - [Apache OFBiz漏洞 CVE-2023-49070 的前世今生(非常详细)](https://mp.weixin.qq.com/s/iAvitO6otPdHSu1SjRNX3g) - [Apache OFBiz未授权命令执行浅析(CVE-2023-51467)](https://y4tacker.github.io/2023/12/27/year/2023/12/Apache-OFBiz%E6%9C%AA%E6%8E%88%E6%9D%83%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C%E6%B5%85%E6%9E%90-CVE-2023-51467/) - Oracle - [Oracle E-Business Suite Unauthenticated RCE](https://github.com/Y4tacker/JavaSec/blob/main/16.%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/CVE-2022-21587/index.md) - [Exploiting an Order of Operations Bug to Achieve RCE in Oracle Opera](https://blog.assetnote.io/2023/04/30/rce-oracle-opera/) - [Oracle Access Manager Pre-Auth RCE (CVE-2021–35587 Analysis)](https://testbnull.medium.com/oracle-access-manager-pre-auth-rce-cve-2021-35587-analysis-1302a4542316) - Spring - [Spring-Kafka-POC-CVE-2023-34040](https://github.com/Contrast-Security-OSS/Spring-Kafka-POC-CVE-2023-34040) - Nacos - [Aliababa Nacos hessian JRaft反序列化(文章里提到的只能打一次有误,后经过研究可以打多次)](https://y4er.com/posts/nacos-hessian-rce/ ) - [Nacos 多次打非完美方案(这人也没完全考虑到容错,但是网上暂时只有这人的,实际上在构建WriteRequest缺少setOperation)(慎用!别把别人打崩了!)](https://github.com/c0olw/NacosRce) - Adobe - [CVE-2023-29298: Adobe ColdFusion Access Control Bypass](https://www.rapid7.com/blog/post/2023/07/11/cve-2023-29298-adobe-coldfusion-access-control-bypass/) - [Analysis CVE-2023-29300: Adobe ColdFusion Pre-Auth RCE](https://blog.projectdiscovery.io/adobe-coldfusion-rce/) - Smartbi - [浅析Smartbi逻辑漏洞](https://y4tacker.github.io/2023/07/05/year/2023/7/%E6%B5%85%E6%9E%90Smartbi%E9%80%BB%E8%BE%91%E6%BC%8F%E6%B4%9E/) - Others - [HtmlUnit-RCE](https://siebene.github.io/2022/12/30/HtmlUnit-RCE/) - [openfire鉴权绕过漏洞原理解析(主要是学习jetty对%u002e请求的解析支持)](https://mp.weixin.qq.com/s/EzfB8CM4y4aNtKFJqSOM1w) - [Metabase-Pre auth RCE](https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/) - [Ivanti Sentry Authentication Bypass](https://www.horizon3.ai/ivanti-sentry-authentication-bypass-cve-2023-38035-deep-dive/) - [UNAUTHENTICATED SERVER SIDE REQUEST FORGERY & CRLF INJECTION IN GEOSERVER WMS(CRLF注入的好例子)](https://www.synacktiv.com/advisories/unauthenticated-server-side-request-forgery-crlf-injection-in-geoserver-wms) - [JetBrains TeamCity 任意代码执行漏洞分析(CVE-2023-42793)](https://forum.butian.net/share/2514) - [SysAid On-Prem Software(CVE-2023-47246)](https://forum.butian.net/share/2577) - [CrushFTP Unauthenticated Remote Code Execution(CVE-2023-43177)](https://y4tacker.github.io/2023/12/10/year/2023/12/CrushFTP-Unauthenticated-Remote-Code-Execution-CVE-2023-43177/) - [MCMS属性覆盖全版本Bypass分析(又又又是一个属性覆盖带来的漏洞)](https://y4tacker.github.io/2023/12/28/year/2023/12/%E5%8F%88%E5%8F%88%E5%8F%88%E6%98%AF%E4%B8%80%E4%B8%AA%E5%B1%9E%E6%80%A7%E8%A6%86%E7%9B%96%E5%B8%A6%E6%9D%A5%E7%9A%84%E6%BC%8F%E6%B4%9E/) - [Atlassian Confluence-Remote Code Execution(CVE-2023-22527)](https://blog.projectdiscovery.io/atlassian-confluence-ssti-remote-code-execution/) - [Jenkins文件读取漏洞拾遗(CVE-2024-23897)](https://www.leavesongs.com/PENETRATION/jenkins-cve-2024-23897.html) ## 17.模板引擎+表达式相关 - 模板引擎 - [velocity 模板注入](https://www.cnblogs.com/nice0e3/p/16218857.html) - [freemarker 模板注入](https://www.cnblogs.com/nice0e3/p/16217471.html) - [pebble模板注入](https://github.com/Y4tacker/JavaSec/blob/main/%E6%AF%94%E8%B5%9B%E5%8F%8D%E6%80%9D/2022/8/uiuctf-pebble/index.md) - [thymeleaf模板注入](https://xz.aliyun.com/t/10514) - [国产Jfinal用的Enjoy模板引擎主要研究不出网利用](https://y4tacker.github.io/2022/04/14/year/2022/4/Enjoy%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E%E5%88%86%E6%9E%90/) - [Beetl3.15.0以下模板注入(高版本仍然有办法Rce)](https://gitee.com/xiandafu/beetl/issues/I6RUIP) - 表达式 - EL表达式 - [普通EL表达式命令回显的简单研究](https://forum.butian.net/share/886) - [一种新型Java一句话木马的实现](https://yzddmr6.com/posts/%E4%B8%80%E7%A7%8D%E6%96%B0%E5%9E%8BJava%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%9C%A8%E9%A9%AC%E7%9A%84%E5%AE%9E%E7%8E%B0/) - [el表达式绕waf的trick](https://github.com/Y4tacker/JavaSec/blob/main/17.%E6%A8%A1%E6%9D%BF%E5%BC%95%E6%93%8E%2B%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9B%B8%E5%85%B3/el%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%BB%95waf%E7%9A%84trick/index.md) ## 18.各框架对URI处理的特性及Trick - [Tomcat URL解析差异性导致的安全问题(网上看到的主要关注HttpServletRequest中几个解析URL的函数这个问题)](https://xz.aliyun.com/t/7544) - [Tomcat中url解析特性](https://github.com/Y4tacker/JavaSec/blob/main/8.%E5%85%B3%E4%BA%8ETomcat%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E4%BA%AB/Tomcat%E4%B8%ADurl%E8%A7%A3%E6%9E%90%E7%89%B9%E6%80%A7/index.md) - [SpringBoot2.3.0以下路由%2e跨目录处理(可用于权限绕过)](https://github.com/Y4tacker/JavaSec/blob/main/11.Spring/SpringBoot2.3.0%E4%BB%A5%E4%B8%8B%E8%B7%AF%E7%94%B1%252e%E8%B7%A8%E7%9B%AE%E5%BD%95%E5%A4%84%E7%90%86(%E5%8F%AF%E7%94%A8%E4%BA%8E%E6%9D%83%E9%99%90%E7%BB%95%E8%BF%87)/index.md) - [网上看到的Jetty的部分解析特性(支持%uxxx)](https://www.wangan.com/p/7fyg8k2c7781675a) ## 19.ASM与JVM学习 - [JAVA虚拟机执行模型(关注引入了栈映射帧,用于加快虚拟机中类验证过程的速度)](https://www.cnblogs.com/coding-way/p/6600647.html) - [What is a stack map frame](https://stackoverflow.com/questions/25109942/what-is-a-stack-map-frame) - 这里比较有意思的是:Java 1.7引入了此选项以加速类验证。框架分为两部分:变量类型和堆栈类型。第一帧由方法类型描述。在每个GOTO / JUMP调用之后,您需要提供堆栈映射框架的更新描述。为了节省空间,可以使用SAME,APPEND等选项,也可以通过指定变量类型的FULL数组再次描述所有变量。 - [为什么JVM需要DUP指令](https://www.cnblogs.com/clayjj/p/7698035.html) ## 20.议题 - [Hacking FernFlower](https://y4tacker.github.io/2023/12/22/year/2023/12/Hacking-FernFlower/) - [议题相关代码](https://github.com/Y4tacker/HackingFernFlower) ## 其他分享 - JMX - [JMX RMI攻击利用](https://github.com/k1n9/k1n9.github.io/blob/aeeb609fe6a25d67bc2dc5f990a501368fb25409/_posts/2017-08-24-attack-jmx-rmi.md) - [一次从jmx到rce](https://mp.weixin.qq.com/s?__biz=MzIwMzIyMjYzNA==&mid=2247506824&idx=1&sn=1bff6060290c0fdb7fe059cff2c61153&chksm=96d0208da1a7a99b6e61c8e3c332d324c0296bbccf1163cb8a10760e57cd17e150cb23a0e36a&mpshare=1&scene=1&srcid=1220PA2K5MY7dM3gWTr06z4r&sharer_sharetime=1671532238935&sharer_shareid=19374164c9d8647c6159e09a97bb1208#rd) - [tomcat-jmxproxy-rce-exp(JMX with AccessLogValve)](https://www.wangan.com/p/11v6cf3fcad1500e) - [GadgetInspector源码分析](https://y4tacker.github.io/2022/05/09/year/2022/5/GadgetInspector%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/) - [CVE-2021-2471 JDBC-XXE漏洞分析](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/CVE-2021-2471%20JDBC-XXE%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/CVE-2021-2471%20JDBC-XXE%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90.md) - [spring-messaging 远程代码执行漏洞分析](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/spring-messaging%20%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90/spring-messaging%20%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90.md) - [CVE-2020-9484 Tomcat-RCE漏洞分析报告(备注:三梦师傅的文章,提升了我对Tomcat配置的了解)](https://threedr3am.github.io/2020/06/12/CVE-2020-9484%20Tomcat-RCE%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90%E6%8A%A5%E5%91%8A/) - [Java “后反序列化漏洞” 利用思路](https://paper.seebug.org/1133/) - [关于Servlet的线程安全问题](https://y4tacker.github.io/2022/02/03/year/2022/2/Servlet%E7%9A%84%E7%BA%BF%E7%A8%8B%E5%AE%89%E5%85%A8%E9%97%AE%E9%A2%98/) - [BypassSM](https://github.com/Y4tacker/JavaSec/blob/main/其他/BypassSM/bypasssm.md) - [Spring Boot FatJar任意写目录漏洞导致Getshell](https://www.cnblogs.com/wh4am1/p/14681335.html) - [利用TemplatesImpl执行字节码](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/%E5%88%A9%E7%94%A8TemplatesImpl%E6%89%A7%E8%A1%8C%E5%AD%97%E8%8A%82%E7%A0%81/%E5%88%A9%E7%94%A8TemplatesImpl%E6%89%A7%E8%A1%8C%E5%AD%97%E8%8A%82%E7%A0%81.md) - [为什么补丁都喜欢打在resolveClass](https://github.com/Y4tacker/JavaSec/blob/main/4.Weblogic专区/%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A1%A5%E4%B8%81%E5%96%9C%E6%AC%A2%E6%89%93%E5%9C%A8resolveClass/%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A1%A5%E4%B8%81%E5%96%9C%E6%AC%A2%E6%89%93%E5%9C%A8resolveClass.md) - [Java沙箱绕过](https://www.anquanke.com/post/id/151398) - [一种普遍存在于java系统的缺陷 - Memory DoS](https://threedr3am.github.io/2021/11/18/%E4%B8%80%E7%A7%8D%E6%99%AE%E9%81%8D%E5%AD%98%E5%9C%A8%E4%BA%8Ejava%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%BC%BA%E9%99%B7-Memory%20DoS/#more) - [如何关闭百度的Rasp](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/%E5%85%B3%E9%97%AD%E7%99%BE%E5%BA%A6%E7%9A%84Rasp/index.md) - [漫谈 JEP 290](https://paper.seebug.org/1689/#_1) - [Java Web —— 从内存中Dump JDBC数据库明文密码(还挺好玩的)](https://mp.weixin.qq.com/s/QCfqO2BJuhSOr58rldZzxA) - [如何带依赖打包Jar](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/Maven/index.md) - [一些Java二次反序列化的点(持续收集)](https://github.com/Y4tacker/JavaSec/blob/main/%E5%85%B6%E4%BB%96/Java%E4%BA%8C%E6%AC%A1%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96/Java%E8%A7%A6%E5%8F%91%E4%BA%8C%E6%AC%A1%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E7%9A%84%E7%82%B9.md) - [帆软channel接口反序列化漏洞分析(二次反序列化一些实战场景利用)](https://forum.butian.net/share/2806) - [自己写的OpenRasp分析](https://y4tacker.github.io/2022/05/28/year/2022/5/OpenRasp%E5%88%86%E6%9E%90/) - [Apache Unomi 表达式注入攻防](https://github.com/1135/unomi_exploit) - [JEXL3表达式注入](https://xz.aliyun.com/t/8099) - [利用JVMTI实现JAR包加密(还没看很牛逼就是了)](https://mp.weixin.qq.com/s/jH8TNvY8bAu0m2kQBvpQyg) - [安全同学讲Maven重打包的故事](https://mp.weixin.qq.com/s?__biz=MzIzOTU0NTQ0MA==&mid=2247510513&idx=1&sn=fbcd84ba56d0c04dbd28b42f10f3bfb1&chksm=e92a94fede5d1de8e8301f8efb9db5e3f1a4fc14a5e29be541668d706a77141bbbd8d63db1ac&mpshare=1&scene=1&srcid=1025aCfF1bF9RgdhX85sgkj3&sharer_sharetime=1666696525299&sharer_shareid=4a549281c7d8f067d766da5aff57a064#rd) - [某软件监控页面RCE漏洞分析(虽然过于简单,但是可以借此了解下OA系统)](https://xz.aliyun.com/t/11778) - [JDK-Xalan的XSLT整数截断漏洞利用构造](https://mp.weixin.qq.com/s/xxAtjFvk9RxWiY-pwGf8Ow) - [某Cloud系统漏洞分析](https://forum.butian.net/share/2529) - [任意文件下载漏洞的利用思考(总结非常细!)](https://mp.weixin.qq.com/s/3y62xuQJAj2gmtBSKvHHug) ## 比赛反思 特地加了一栏吧,希望从比赛当中了解Java相关的东西学习一些新的点! - [Codegate2022(关键词:绕过开头file协议读文件、xpath注入读系统配置)](https://github.com/Y4tacker/JavaSec/blob/main/%E6%AF%94%E8%B5%9B%E5%8F%8D%E6%80%9D/2022/3/Codegate2022/index.md) - [SUSCTF2022(关键词:绕rasp、fastjson、xxe)](https://github.com/Y4tacker/JavaSec/tree/main/%E6%AF%94%E8%B5%9B%E5%8F%8D%E6%80%9D/2022/3/SUSCTF2022) - [D^3CTF2022(关键词:ROME链缩短、Mybatis与Ognl)](https://y4tacker.github.io/2022/03/07/year/2022/3/ROME%E6%94%B9%E9%80%A0%E8%AE%A1%E5%88%92/) - [虎符CTF2022(关键词:Hessian反序列化、Rome二次反序列化、java.security.SignedObject#getObject、UnixPrintService命令执行、Tabby)](https://y4tacker.github.io/2022/03/21/year/2022/3/2022%E8%99%8E%E7%AC%A6CTF-Java%E9%83%A8%E5%88%86/) - [MRCTF2022(关键词:Kryo反序列化、Rome二次反序列化、内存马、Bypass SerialKiller黑名单-找替代类)](https://y4tacker.github.io/2022/04/24/year/2022/4/2022MRCTF-Java%E9%83%A8%E5%88%86/) - [GoogleCTF2022(关键词:Log4j2、Bundle、ReDoS)](https://github.com/Y4tacker/JavaSec/blob/main/%E6%AF%94%E8%B5%9B%E5%8F%8D%E6%80%9D/2022/3/2022GooGleCTF/index.md) - [UIUCTF2022-Spoink(关键词:Pebble最新模板注入Bypass、Spring中无路由上传文件处理)](https://github.com/Y4tacker/JavaSec/blob/main/%E6%AF%94%E8%B5%9B%E5%8F%8D%E6%80%9D/2022/8/uiuctf-pebble/index.md) - [TetCTF2023&Liferay(CVE-2019-16891)(Pre-Auth RCE)](https://y4tacker.github.io/2023/01/03/year/2023/TetCTF2023-Liferay-CVE-2019-16891-Pre-Auth-RCE/) ## 环境 - [如何远程调试Weblogic](https://github.com/QAX-A-Team/WeblogicEnvironment) - [使用idea进行tomcat源码调试](https://zhuanlan.zhihu.com/p/35454131) - [一些国产系统的环境搭建问题](https://github.com/ax1sX/SecurityList/) ## Todolist - 解决反序列化serialVesionUID不一致问题--已经拿下 - [Dubbo学习之后开启](https://xz.aliyun.com/t/10916) - [无文件落地Agent型内存马植入(Java内存攻击技术漫谈-Rebyond)](https://xz.aliyun.com/t/10075#toc-5) - 自己对所有文件上传框架Trick总结 - 消化腾讯大师傅写的关于文件上传waf ## 注意事项 * 本仓库仅用于合法合规用途,严禁用于违法违规用途。 * 本工具中所涉及的漏洞均为网上已公开。 ## 优质博客 - [Y4tacker(自己的能不写吗)](https://y4tacker.github.io/) - [三梦](https://threedr3am.github.io/) - [su18](https://su18.org/) - [landgrey](https://landgrey.me/) - [回忆飘如雪](https://gv7.me/) ## 更多 <div align=center><img src="https://api.star-history.com/svg?repos=Y4tacker/JavaSec&type=Timeline" div align=center/></div>
0
d3vilbug/HackBar
HackBar plugin for Burpsuite
burp burp-extensions burp-plugin burp-ui burpsuite burpsuite-extender hackbar
# HackBar (Burpsuite Plugin) [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) [![GitHub version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=gh&type=0.2&v=1.0&x2=0)](http://badge.fury.io/gh/boennemann%2Fbadges) [![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/ellerbrock/open-source-badge/) ### Usage <img src="https://i.imgur.com/rlHIJko.gif" /> ### Requirements - Burpsuite ### How to Install Download Latest Jar from https://github.com/d3vilbug/HackBar/releases/ and add in burpsuite <img src="https://i.imgur.com/0CP3iCM.gif" /> ### Tested on - Burpsuite 2021.4 - Windows 10 - Ubuntu & PopOS ### Upcoming Features/Modules - Ctrl + H (shortcut) - WAF bypass (SQLi) - Decoder/Encoder ### Greets - An0n 3xPloiTeR https://github.com/Anon-Exploiter/ for SQLi && XSS payloads - PayloadsAllTheThings https://github.com/swisskyrepo/PayloadsAllTheThings/
0
jeecgboot/jeewx-boot
JAVA版免费开源的微信管家平台。支持微信公众号、小程序、第三方平台等。平台已经实现了公众号基础管理、群发、系统权限、抽奖活动、小程序官网等功能,便于二次开发,可以快速搭建微信应用!
jeewx jeewx-api jeewxboot spring-boot springboot weixin weixin-application weixin-java wepy xiaochengxu
Jeewx-Boot 免费微信管家平台 ========== 当前最新版本: 1.3(发布日期:20200916) [![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/zhangdaiscott/jeewx-boot/blob/master/LICENSE) [![](https://img.shields.io/badge/Author-JEECG团队-orange.svg)](http://www.jeewx.com) [![](https://img.shields.io/badge/version-1.3-brightgreen.svg)](https://gitee.com/jeecg/jeewx-boot) 项目介绍 ----------------------------------- JeewxBoot是一款免费的JAVA微信管家平台,支持微信公众号、小程序、微信第三方平台、抽奖活动等。JeewxBoot已经实现了系统权限管理、公众号管理、抽奖活动等基础功能,便于二次开发,可以快速搭建微信应用! 技术架构:SpringBoot2.1.3 + Mybatis + Velocity; 采用插件开发机制,实现一个抽奖活动一个独立插件(对JAVA来讲就是一个JAR包),可以很方便的做插拔,提供丰富的活动插件下载。。 技术文档 ----------------------------------- * 入门必读:http://doc.jeewx.com/1414959 * QQ交流群 : 97460170 * 技术官网 :[www.jeewx.com](http://www.jeewx.com) * 演示地址 :[http://demo.jeewx.com](http://demo.jeewx.com) 【测试账号: jeewx/123456】 * 视频教程 :[JeewxBoot入门视频教程](https://www.bilibili.com/video/av62847704) * 常见问题:[入门常见问题汇总](http://bbs.jeecg.com/forum.php?mod=viewthread&tid=8185&extra=page%3D1) 项目说明 ----------------------------------- #### 基础平台项目 | 项目名 | 中文名 | 备注 | |----------|:-------------:|------:| | jeewx-boot-start | 启动项目 | | | jeewx-boot-base-system | 系统用户管理模块 | | | jeewx-boot-module-weixin | 微信公众号管理 | | | jeewx-boot-module-api | 共通业务API接口 | | | huodong/jeewx-boot-module-goldenegg | 砸金蛋活动 | | | huodong/jeewx-boot-module-cms | 小程序官网 | [集成文档](http://doc.jeewx.com/1767423) | #### 插件项目说明 * 免费插件下载: [http://cloud.jeecg.com](http://cloud.jeecg.com/?categoryId=1291328642663645186) | 项目名 | 中文名 | 备注 |----------|:-------------:|------:| | jeewx-boot-module-commonluckymoney | 圣诞拆红包抽奖 | | jeewx-boot-module-scratchcards | 刮刮乐活动 | | jeewx-module-divination | 摇签祈福活动 | | P3-Biz-shaketicket | 摇一摇活动 | | jeewx-boot-module-luckyroulette | 新版大转盘活动 | #### 小程序源码 * 小程序官网 :http://cloud.jeecg.com/page?id=1409695763776249857 功能清单 ----------------------------------- ``` ├─系统管理 │ ├─用户管理 │ ├─角色管理 │ ├─菜单管理 │ └─首页设置 │ └─项目管理(插件) ├─公众号运营 │ ├─基础配置 │ │ ├─公众号管理 │ │ ├─关注欢迎语 │ │ ├─未识别回复语 │ │ ├─关键字设置 │ │ ├─自定义菜单 │ │ ├─菜单支持小程序链接 │ │ ├─Oauth2.0链接机制 │ └─微信第三方平台 │ └─支持扫描授权公众号 │ ├─素材管理 │ │ ├─文本素材 │ │ ├─图文素材 │ │ ├─超强图文编辑器 │ │ ├─图文预览功能 │ ├─用户管理 │ │ ├─粉丝管理 │ │ ├─粉丝标签管理 │ │ ├─图文编辑器 │ │ ├─接受消息管理 │ │ ├─粉丝消息回复 │ │ ├─图文预览功能 │ ├─高级功能 │ │ ├─微信群发功能 │ │ ├─群发审核功能 │ │ ├─二维码管理 ├─微信抽奖活动 │ ├─砸金蛋 │ ├─小程序官网(CMS模块) │ ├─摇一摇(尚未开源) │ ├─微信砍价(尚未开源) │ ├─更多商业活动 ├─高级功能(尚未开源) │ ├─小程序商城 │ ├─竞选投票 │ ├─分销商城 │ ├─团购商城 │ ├─红包活动 │ ├─更多商业功能 │ ├─。。。 ``` 系统效果 ---- ##### 系统截图 ![](https://oscimg.oschina.net/oscnet/up-cfcc44a9ad6cc52a5e4dd2a19d1cd775d55.png) ![](https://oscimg.oschina.net/oscnet/up-697c944f14c0d16a9bce405e1369ab27088.png) ![](https://oscimg.oschina.net/oscnet/up-e77abee0fcbc6b1216e987b9721f7c497e8.png) ![](https://oscimg.oschina.net/oscnet/up-83fcf83848071fa7499bdb8792358aec355.png) ![](https://oscimg.oschina.net/oscnet/up-77d779e14210120766c256b5c7af768ec8a.png) ![](https://images.gitee.com/uploads/images/2019/0715/140426_f26f4ebf_57093.jpeg) ![](https://oscimg.oschina.net/oscnet/up-26a8ad222460e46515e572e9f73134df8b1.png) ![](https://oscimg.oschina.net/oscnet/up-b13041a3f8ef35e5cc5d528a1f2dfe1a5bd.png) ![](https://oscimg.oschina.net/oscnet/up-ec65fa68786246deda14a2020fc81d54e5d.png) ##### 体验二维码 ![github](https://static.oschina.net/uploads/img/201907/13100959_naiO.jpg "jeewx521")
0
shimh-develop/blog-vue-springboot
基于Vue+SpringBoot构建的博客项目
null
Vue + SpringBoot实现的博客系统 线上地址:<a target="_blank" href="http://blog.shiminghui.top">For Fun</a> ## ssr 服务端渲染版本 <a href="https://github.com/shimh-develop/blog-vue-springboot/tree/ssr" target="_blank">ssr分支</a> # 效果图 ## 首页 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/index2.png) ## 登录页 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/login.png) ## 注册页 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/register.png) ## 文章分类-标签、详情 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/ct.png) ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/ct-detail.png) ## 文章归档 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/archive.png) ## 写文章 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/write.png) ## 文章详情 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/detail.png) ## 评论 ![image](https://github.com/shimh-develop/blog-vue-springboot/blob/master/document/comment2.png) # 技术 ## 前端 blog-app - Vue - Vue-router - Vuex - ElementUI - mavon-editor - lodash - axios - Webpack ## 后端 blog-api - SpringBoot - Shiro - Jpa - Redis - Fastjson - Druid - MySQL - Maven # 实现功能 ## 整体 - 用户:登录 注册 退出 - 首页:文章列表、最热标签、最新文章、最热文章 - 文章分类-标签:列表、详情 - 文章归档 - 文章:写文章、文章详情 - 评论:文章添加评论 对评论回复 - 文章列表滑动分页 ## 后端 - 用户、文章、文章分类、标签和评论 增删改查api接口 - 基于token权限控制 - Redis存储Session - 全局异常处理 - 操作日志记录 # 待实现功能 - 评论的分页 点赞 - 留言板 - 第三方登录 - ...... # 运行 将项目clone到本地 ## 方式一 直接运行SpringBoot项目(已将打包的静态文件放到了 resources/static下) 1. 将blog-api导入到IDE工具中 2. resources/sql/blog-schema.sql、blog-data.sql导入MySQL数据库 3. 打开Redis数据库 4. resources/application.properties 修改MySQL、Redis连接 5. Runas运行,访问:http://localhost:8888 ## 方式二 前后分离(开发方式) 1. 按方式一运行blog-api,提供api数据接口 2. 打开命令行 > cd blog-app > npm install > npm run dev 3. 访问:http://localhost:8080 4. 修改blog-app/src 下的文件进行开发 5. npm run build 生成最终静态文件
0
alibaba/SREWorks
Cloud Native DataOps & AIOps Platform | 云原生数智运维平台
aiops application cloudnative dataops devops engineering flink k8s kubernetes maintenance oam operation ops saas sre
<p align="center"> <img src="https://sreworks.oss-cn-beijing.aliyuncs.com/logo/logo.png" width="120"> </p> <h1 align="center"> SREWorks </h1> <p align="center"><b> Cloud Native DataOps & AIOps Platform </b></p> <p align="center"> <a href="./LICENSE"><img src="https://img.shields.io/github/license/alibaba/sreworks" /></a> <img src="https://img.shields.io/github/repo-size/alibaba/sreworks" /> </p> <p align="center"> <a href="https://www.yuque.com/sreworks-doc/docs" target="_blank">Documentation</a> <a href="https://sreworks.opensource.alibaba.com/" target="_blank">Website</a> </p> --- <p align="center"> English | <a href="README-CN.md">中文<a/> </p> ## Introduction SREWorks: Alibaba Cloud Big Data SRE team's cloud-native operation and maintenance (O&M) platform was born out of nearly a decade of business precipitation, using the thinking of "Big Data and AI" for O&M work(we call it DataOps and AIOps), to help more practitioners use DataOps and AIOps to do a efficient O&M work. Google suggested a job title of SRE (Site Reliability Engineer) in 2003. It consists of a team of software engineers and system administrators who place a premium on O & M personnel's development skills, forcing them to devote less than half of their time to daily tasks and the other half to the creation of automation technologies to decrease labor needs. SREWorks focuses on the application-centric one-stop "cloud native" and "DataOps and AIOps" O & M SaaS management suite as an engineering practice for the Alibaba Cloud Big Data SRE team's SRE concept. It enables companies to achieve the delivery and maintenance of cloud-native apps and resources via two primary capabilities: enterprise application and resource management and O & M development. Alibaba Cloud Big Data SRE team has been working hard to practice the "DataOps and AIOps" concept, the industry's DataOps (data operation and maintenance) first proposed by the team, is naturally close to big data and AI, is very familiar with Big Data & AI technology, and has the big data and AI computing power resources on demand, has been working hard to practice the "DataOps and AIOps" concept, the industry's DataOps Standard O & M warehouses, data O & M platforms, and operation centers are among the end-to-end DataOps closed-loop engineering methods in the SREWorks. There are many excellent open-source O & M platforms that reflect cloud-native scenarios in the traditional IT O&M field. There are currently no systematic O & M solutions available. With the rise of the cloud-native era, the Alibaba Cloud Big Data SRE team will open-source its O & M platform, SREWorks, in the hopes of providing O & M engineers with an out-of-the-box experience. ![image.png](paas/frontend/docs/docs/pictures/1663627633334-32214451-31cf-4e1a-b0a3-3cc3047ab842.jpeg.png) ## Getting Started - [Quick Install](/paas/frontend/docs/docs/rr5g10.md) - [Installation from source code](/paas/frontend/docs/docs/ek2tysaxo4d9108i.md) - [Document](https://www.yuque.com/sreworks-doc/docs/) - [Online Demo](https://wj.qq.com/s2/10565748/53da/) ## Roadmap [ROADMAP](ROADMAP.md) ## Contributing We'd love to accept your patches and contributions to SREWorks. Please refer to [CONTRIBUTING](CONTRIBUTING.md) for a few small guidelines you need to follow. ## Community - Wechat Chat Group (*Chinese*): Broker wechat to add you into the user group. <img src="/paas/frontend/app/src/assets/icons/weixin.jpg" width="100" /> - Dingtalk Chat Group (*Chinese*): 35853026 <img src="/paas/frontend/app/src/assets/icons/ding.jpg" width="100" /> ## Code of Conduct Contributions to the SREWorks are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
0
LinShunKang/MyPerf4J
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
agent apm bytecode diagnosis java-agent jvm-monitor metrics microservices monitor monitoring monitoring-tool observability performance performance-analysis performance-metrics performance-monitoring performance-tuning performance-visualization profiler profiling
简体中文 | [English](./README.EN.md) <h1 align="center">MyPerf4J</h1> <div align="center"> 一个针对高并发、低延迟应用设计的高性能 Java 性能监控和统计工具。 [![GitHub (pre-)release](https://img.shields.io/github/release/LinShunKang/MyPerf4J/all.svg)](https://github.com/LinShunKang/MyPerf4J) [![Build Status](https://travis-ci.com/LinShunKang/MyPerf4J.svg?branch=develop)](https://travis-ci.com/LinShunKang/MyPerf4J) [![Coverage Status](https://coveralls.io/repos/github/LinShunKang/MyPerf4J/badge.svg?branch=develop)](https://coveralls.io/github/LinShunKang/MyPerf4J?branch=develop) [![GitHub issues](https://img.shields.io/github/issues/LinShunKang/MyPerf4J.svg)](https://github.com/LinShunKang/MyPerf4J/issues) [![GitHub closed issues](https://img.shields.io/github/issues-closed/LinShunKang/MyPerf4J.svg)](https://github.com/LinShunKang/MyPerf4J/issues?q=is%3Aissue+is%3Aclosed) [![GitHub](https://img.shields.io/github/license/LinShunKang/MyPerf4J.svg)](./LICENSE) </div> ## 价值 * 快速定位性能瓶颈 * 快速定位故障原因 ## 优势 * [高性能](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%80%A7%E8%83%BD%E5%BC%80%E9%94%80): 单线程支持每秒 **1600 万次** 响应时间的记录,每次记录只花费 **63 纳秒** * [无侵入](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86#%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86): 采用 **JavaAgent** 方式,对应用程序完全无侵入,无需修改应用代码 * [低内存](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86#%E6%95%B0%E6%8D%AE%E5%AD%98%E5%82%A8): 采用**内存复用**的方式,整个生命周期只产生极少的临时对象,不影响应用程序的 GC * 高实时: 支持**秒级统计**,最低统计粒度为 **1 秒**,并且是**全量统计**,不丢失任何一次记录 ## 文档 * [English Doc](https://github.com/LinShunKang/MyPerf4J/wiki/English-Doc) * [中文文档](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc) ## 监控指标 MyPerf4J 为每个应用收集数十个监控指标,所有的监控指标都是实时采集和展现的。 下面是 MyPerf4J 目前支持的监控指标列表: - **[Method Metrics](https://grafana.com/dashboards/7766)**<br/> [RPS,Count,Avg,Min,Max,StdDev,TP50, TP90, TP95, TP99, TP999, TP9999, TP100](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#method-metrics) ![Markdown](https://raw.githubusercontent.com/LinShunKang/Objects/master/MyPerf4J-InfluxDB-Method_Show_Operation.gif) - **[JVM Metrics](https://grafana.com/dashboards/8787)**<br/> [Thread](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-thread-metrics),[Memory](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-memory-metrics),[ByteBuff](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-bytebuff-metrics),[GC](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-gc-metrics),[Class](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-class-metrics),[Compilation](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-compilation-metrics),[FileDescriptor](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-filedescriptor-metrics) ![Markdown](https://github.com/LinShunKang/Objects/blob/master/images/JVM_Metrics_Dashboard_V2.png?raw=true) > 想知道如何实现上述效果?请先按照[快速启动](https://github.com/LinShunKang/MyPerf4J#%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8)的描述启动应用,再按照[这里](https://github.com/LinShunKang/MyPerf4J/wiki/InfluxDB_)的描述进行安装配置即可。 ## 快速启动 MyPerf4J 采用 JavaAgent 配置方式,**透明化**接入应用,对应用代码完全**没有侵入**。 ### 下载 * 下载并解压 [MyPerf4J-ASM.zip](https://github.com/LinShunKang/Objects/blob/master/zips/CN/MyPerf4J-ASM-3.4.0-SNAPSHOT.zip?raw=true) * 阅读解压出的 `README` 文件 * 修改解压出的 `MyPerf4J.properties` 配置文件中 `app_name`、`metrics.log.xxx` 和 `filter.packages.include` 的配置值 > 查看[配置文件模板](https://github.com/LinShunKang/Objects/blob/master/jars/MyPerf4J-3.x.properties)。想了解更多的配置?请看[这里](https://github.com/LinShunKang/MyPerf4J/wiki/3.x-%E9%85%8D%E7%BD%AE) ### 配置 在 JVM 启动参数里加上以下两个参数 * -javaagent:/path/to/MyPerf4J-ASM.jar * -DMyPerf4JPropFile=/path/to/MyPerf4J.properties > 形如:java -javaagent:/path/to/MyPerf4J-ASM.jar -DMyPerf4JPropFile=/path/to/MyPerf4J.properties `-jar yourApp.jar` > > 注意:如果您使用 JDK9 及其之上的版本,请额外添加 `--add-opens java.base/java.lang=ALL-UNNAMED` ### 运行 启动应用,监控日志输出到 /path/to/log/method_metrics.log: ``` MyPerf4J Method Metrics [2020-01-01 12:49:57, 2020-01-01 12:49:58] Method[6] Type Level TimePercent RPS Avg(ms) Min(ms) Max(ms) StdDev Count TP50 TP90 TP95 TP99 TP999 TP9999 DemoServiceImpl.getId2(long) General Service 322.50% 6524 0.49 0 1 0.50 6524 0 1 1 1 1 1 DemoServiceImpl.getId3(long) General Service 296.10% 4350 0.68 0 1 0.47 4350 1 1 1 1 1 1 DemoServiceImpl.getId4(long) General Service 164.60% 2176 0.76 0 1 0.43 2176 1 1 1 1 1 1 DemoServiceImpl.getId1(long) General Service 0.00% 8704 0.00 0 0 0.00 8704 0 0 0 0 0 0 DemoDAO.getId1(long) DynamicProxy DAO 0.00% 2176 0.00 0 0 0.00 2176 0 0 0 0 0 0 DemoDAO.getId2() DynamicProxy DAO 0.00% 2176 0.00 0 0 0.00 2176 0 0 0 0 0 0 ``` ### 卸载 在 JVM 启动参数中去掉以下两个参数,重启即可卸载此工具。 * -javaagent:/path/to/MyPerf4J-ASM.jar * -DMyPerf4JPropFile=/path/to/MyPerf4J.properties ## 构建 您可以自行构建 MyPerf4J-ASM.jar * git clone git@github.com:LinShunKang/MyPerf4J.git * mvn clean package > MyPerf4J-ASM-${MyPerf4J-version}.jar 在 MyPerf4J-ASM/target/ 目录下 ## 问题 如果您有任何问题、疑问或者建议,您可以 [提交Issue](https://github.com/LinShunKang/MyPerf4J/issues/new/choose) 或者 [发送邮件](mailto:linshunkang.chn@gmail.com) :) 注意,为了保障大家的时间,请保证您已经**完整阅读过**以下内容: * [提问模板](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8F%90%E9%97%AE%E6%A8%A1%E6%9D%BF) * [快速启动](https://github.com/LinShunKang/MyPerf4J#%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8) * [中文文档](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc) * [常见问题](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) ## 已知用户 如果您在使用 MyPerf4J,请告诉我,您的使用对我来说非常重要:[https://github.com/LinShunKang/MyPerf4J/issues/30](https://github.com/LinShunKang/MyPerf4J/issues/30)(按登记顺序排列) <div align="center"> <img src="https://github.com/LinShunKang/Objects/blob/master/logos/Boss_300x300.png?raw=true" width="80" height="80"/> &nbsp;&nbsp;&nbsp; <img src="https://github.com/LinShunKang/Objects/blob/master/logos/Lever.jpeg?raw=true" width="240" height="80"/> &nbsp;&nbsp;&nbsp; <img src="https://github.com/LinShunKang/Objects/blob/master/logos/dianzhang_303x303.jpeg?raw=true" width="80" height="80"/> </div> ## 鸣谢 感谢 JetBrains [OpenSourceSupport](https://www.jetbrains.com/community/opensource/#support) 所提供的支持 : ) <div align="center"> <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" width="200" height="200"/> </div> ## 项目捐赠 如果 MyPerf4J 对您有帮助,可以使用微信扫描下面的赞赏码,请我喝杯咖啡 : ) <div align="center"> <img src="https://github.com/LinShunKang/Objects/blob/master/logos/WechatIMG16.jpeg?raw=true" width="200" height="200"/> </div> ## 参考项目 MyPerf4J 是受以下项目启发而来: * [Perf4J](https://github.com/perf4j/perf4j) * [TProfiler](https://github.com/alibaba/TProfiler) ## 更多信息 想更深入的了解 MyPerf4J?请看 [https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc)。
0
rengwuxian/RxJavaSamples
RxJava 2 和 Retrofit 结合使用的几个最常见使用方式举例
null
样例代码已正式切换到基于 RxJava 2 ================ > 需要旧版 RxJava 1 代码的点[这里](https://github.com/rengwuxian/RxJavaSamples/tree/1.x) ### 项目介绍 RxJava 2 和 Retrofit 结合使用的几个最常见使用方式举例。 1. **基本使用** 实现最基本的网络请求和结果处理。 ![screenshot_1](./images/screenshot_1.png) 2. **转换(map)** 把返回的数据转换成更方便处理的格式再交给 Observer。 ![screenshot_2](./images/screenshot_2.png) 3. **压合(zip)** 将不同接口并行请求获取到的数据糅合在一起后再处理。 ![screenshot_3](./images/screenshot_3.png) 4. **一次性 token** 需要先请求 token 再访问的接口,使用 flatMap() 将 token 的请求和实际数据的请求连贯地串起来,而不必写嵌套的 Callback 结构。 ![screenshot_4](./images/screenshot_4.png) 5. **非一次性 token** 对于非一次性的 token (即可重复使用的 token),在获取 token 后将它保存起来反复使用,并通过 retryWhen() 实现 token 失效时的自动重新获取,将 token 获取的流程彻底透明化,简化开发流程。 ![screenshot_5](./images/screenshot_5.png) 6. **缓存** 使用 BehaviorSubject 缓存数据。 ![screenshot_6](./images/screenshot_6.png) ### apk 下载 [RxJavaSamples_2.0.apk](https://github.com/rengwuxian/RxJavaSamples/releases/download/2.0/RxJavaSamples_2.0.apk)
0
apache/shenyu
Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
api-gateway dubbo-proxy grpc-proxy http-proxy motan-proxy reactor-java sofa-proxy spring-cloud-proxy
![Light Logo](https://raw.githubusercontent.com/apache/shenyu-website/main/static/img/logo-light.svg#gh-dark-mode-only) ![Dark Logo](https://raw.githubusercontent.com/apache/shenyu-website/main/static/img/logo.svg#gh-light-mode-only) <p align="center"> <strong>Scalable, High Performance, Responsive API Gateway Solution for all MicroServices</strong> </p> <p align="center"> <a href="https://shenyu.apache.org/">https://shenyu.apache.org/</a> </p> <p align="center"> <a href="https://shenyu.apache.org/docs/index" > <img src="https://img.shields.io/badge/document-English-blue.svg" alt="EN docs" /> </a> <a href="https://shenyu.apache.org/zh/docs/index"> <img src="https://img.shields.io/badge/文档-简体中文-blue.svg" alt="简体中文文档" /> </a> </p> <p align="center"> <a target="_blank" href="https://search.maven.org/search?q=g:org.apache.shenyu%20AND%20a:shenyu"> <img src="https://img.shields.io/maven-central/v/org.apache.shenyu/shenyu.svg?label=maven%20central" /> </a> <a target="_blank" href="https://github.com/apache/shenyu/blob/master/LICENSE"> <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license" /> </a> <a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"> <img src="https://img.shields.io/badge/JDK-8+-green.svg" /> </a> <a target="_blank" href="https://github.com/apache/shenyu/actions"> <img src="https://github.com/apache/shenyu/workflows/ci/badge.svg" /> </a> <a target="_blank" href='https://github.com/apache/shenyu'> <img src="https://img.shields.io/github/forks/apache/shenyu.svg" alt="github forks"/> </a> <a target="_blank" href='https://github.com/apache/shenyu'> <img src="https://img.shields.io/github/stars/apache/shenyu.svg" alt="github stars"/> </a> <a target="_blank" href='https://github.com/apache/shenyu'> <img src="https://img.shields.io/github/contributors/apache/shenyu.svg" alt="github contributors"/> </a> <a target="_blank" href="https://codecov.io/gh/apache/shenyu"> <img src="https://codecov.io/gh/apache/shenyu/branch/master/graph/badge.svg" /> </a> <a target="_blank" href="https://hub.docker.com/r/apache/shenyu-bootstrap/tags"> <image src="https://img.shields.io/docker/pulls/apache/shenyu-bootstrap" alt="Docker Pulls"/> </a> </p> <br/> --- # Architecture ![](https://shenyu.apache.org/img/architecture/shenyu-architecture-3d.png) ---- # Why named Apache ShenYu ShenYu (神禹) is the honorific name of Chinese ancient monarch Xia Yu (also known in later times as Da Yu), who left behind the touching story of the three times he crossed the Yellow River for the benefit of the people and successfully managed the flooding of the river. He is known as one of the three greatest kings of ancient China, along with Yao and Shun. * Firstly, the name ShenYu is to promote the traditional virtues of our Chinese civilisation. * Secondly, the most important thing about the gateway is the governance of the traffic. * Finally, the community will do things in a fair, just, open and meritocratic way, paying tribute to ShenYu while also conforming to the Apache Way. --- # Features * Proxy: Support for Apache® Dubbo™, Spring Cloud, gRPC, Motan, SOFA, TARS, WebSocket, MQTT * Security: Sign, OAuth 2.0, JSON Web Tokens, WAF plugin * API governance: Request, response, parameter mapping, Hystrix, RateLimiter plugin * Observability: Tracing, metrics, logging plugin * Dashboard: Dynamic traffic control, visual backend for user menu permissions * Extensions: Plugin hot-swapping, dynamic loading * Cluster: NGINX, Docker, Kubernetes * Language: provides .NET, Python, Go, Java client for API register --- # Quick Start (docker) ### Create network for Shenyu ``` > docker network create shenyu ``` ### Run Apache ShenYu Admin ``` > docker pull apache/shenyu-admin > docker run -d --name shenyu-admin-quickstart -p 9095:9095 --net shenyu apache/shenyu-admin ``` ### Run Apache ShenYu Bootstrap ``` > docker pull apache/shenyu-bootstrap > docker run -d --name shenyu-quickstart -p 9195:9195 -e "shenyu.local.enabled=true" -e SHENYU_SYNC_WEBSOCKET_URLS=ws://shenyu-admin-quickstart:9095/websocket --net shenyu apache/shenyu-bootstrap ``` ### Set router * Real request :http://127.0.0.1:8080/helloworld, ```json { "name" : "Shenyu", "data" : "hello world" } ``` * Set routing rules (Standalone) Add `localKey: 123456` to Headers. If you need to customize the localKey, you can use the sha512 tool to generate the key based on plaintext and update the `shenyu.local.sha512Key` property. ``` curl --location --request POST 'http://localhost:9195/shenyu/plugin/selectorAndRules' \ --header 'Content-Type: application/json' \ --header 'localKey: 123456' \ --data-raw '{ "pluginName": "divide", "selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8080\"}]", "conditionDataList": [{ "paramType": "uri", "operator": "match", "paramValue": "/**" }], "ruleDataList": [{ "ruleHandler": "{\"loadBalance\":\"random\"}", "conditionDataList": [{ "paramType": "uri", "operator": "match", "paramValue": "/**" }] }] }' ``` * Proxy request :http://localhost:9195/helloworld ```json { "name" : "Shenyu", "data" : "hello world" } ``` --- # Plugin Whenever a request comes in, Apache ShenYu will execute it by all enabled plugins through the chain of responsibility. As the heart of Apache ShenYu, plugins are extensible and hot-pluggable. Different plugins do different things. Of course, users can also customize plugins to meet their own needs. If you want to customize, see [custom-plugin](https://shenyu.apache.org/docs/developer/custom-plugin/) . --- # Selector & Rule According to your HTTP request headers, selectors and rules are used to route your requests. Selector is your first route, It is coarser grained, for example, at the module level. Rule is your second route and what do you think your request should do. For example a method level in a module. The selector and the rule match only once, and the match is returned. So the coarsest granularity should be sorted last. --- # Data Caching & Data Sync Since all data have been cached using ConcurrentHashMap in the JVM, it's very fast. Apache ShenYu dynamically updates the cache by listening to the ZooKeeper node (or WebSocket push, HTTP long polling) when the user changes configuration information in the background management. ![](https://shenyu.apache.org/img/shenyu/dataSync/shenyu-config-processor-en.png) ![](https://shenyu.apache.org/img/shenyu/dataSync/config-strategy-processor-en.png) --- # Prerequisite * JDK 1.8+ --- # Stargazers over time [![Stargazers over time](https://starchart.cc/apache/shenyu.svg)](https://starchart.cc/apache/shenyu.svg) --- # Contributor and Support * [How to Contribute](https://shenyu.apache.org/community/contributor-guide) * [Mailing Lists](mailto:dev@shenyu.apache.org) --- # Known Users In order of registration, More access companies are welcome to register at [https://github.com/apache/shenyu/issues/68](https://github.com/apache/shenyu/issues/68) (For open source users only) . All Users : [Known Users](https://shenyu.apache.org/community/user-registration)
0
openzipkin/brave
Java distributed tracing implementation compatible with Zipkin backend services.
distributed-tracing instrumentation java openzipkin tracing zipkin zipkin-brave
[![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/openzipkin/zipkin) [![Build Status](https://github.com/openzipkin/brave/workflows/test/badge.svg)](https://github.com/openzipkin/brave/actions?query=workflow%3Atest) [![Maven Central](https://img.shields.io/maven-central/v/io.zipkin.brave/brave.svg)](https://search.maven.org/search?q=g:io.zipkin.brave%20AND%20a:brave) # Brave Brave is a distributed tracing instrumentation library. Brave typically intercepts production requests to gather timing data, correlate and propagate trace contexts. While typically trace data is sent to [Zipkin server](https://github.com/openzipkin/zipkin/tree/master/zipkin-server), third-party plugins are available to send to alternate services such as [Amazon X-Ray](https://github.com/openzipkin/zipkin-aws/tree/master/storage/xray-udp). This repository includes dependency-free Java libraries and instrumentation for common components used in production services. For example, this includes trace filters for Servlet and log correlation for Apache Log4J. You can look at our [example project](https://github.com/openzipkin/brave-webmvc-example) for how to trace a simple web application. ## What's included Brave's dependency-free [tracer library](brave/) works against JRE6+. This is the underlying api that instrumentation use to time operations and add tags that describe them. This library also includes code that parses `X-B3-TraceId` headers. Most users won't write tracing code directly. Rather, they reuse instrumentation others have written. Check our [instrumentation](instrumentation/) and [Zipkin's list](https://zipkin.io/pages/tracers_instrumentation.html) before rolling your own. Common tracing libraries like JDBC, Servlet and Spring already exist. Instrumentation written here are tested and benchmarked. If you are trying to trace legacy applications, you may be interested in [Spring XML Configuration](spring-beans/). This allows you to set up tracing without any custom code. You may want to put trace IDs into your log files, or change thread local behavior. Look at our [context libraries](context/), for integration with tools such as SLF4J. ## Version Compatibility policy All Brave libraries match the minimum Java version of what's being traced or integrated with, and adds no 3rd party dependencies. The goal is to neither impact your projects' choices, nor subject your project to dependency decisions made by others. For example, even including a basic reporting library, [zipkin-sender-urlconnection](https://github.com/openzipkin/zipkin-reporter-java), Brave transitively includes no json, logging, protobuf or thrift dependency. This means zero concern if your application chooses a specific version of SLF4J, Gson or Guava. Moreover, the entire dependency tree including basic reporting in json, thrift or protobuf is less than 512KiB of jars. There is a floor Java version of 1.6, which allows older JREs and older Android runtimes, yet may limit some applications. For example, Servlet 2.5 works with Java 1.5, but due to Brave being 1.6, you will not be able to trace Servlet 2.5 applications until you use at least JRE 1.6. All integrations set their associated library to "provided" scope. This ensures Brave doesn't interfere with the versions you choose. Some libraries update often which leads to api drift. In some cases, we test versions ranges to reduce the impact of this. For example, we test [gRPC](instrumentation/grpc) and [Kafka](instrumentation/kafka-clients) against multiple library versions. ## Artifacts All artifacts publish to the group ID "io.zipkin.brave". We use a common release version for all components. ### Library Releases Snapshots are uploaded to [Sonatype](https://oss.sonatype.org/content/repositories/releases) which synchronizes with [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.zipkin.brave%22) ### Library Snapshots Snapshots are uploaded to [Sonatype](https://oss.sonatype.org/content/repositories/snapshots) after commits to master. ### Version alignments When using multiple brave components, you'll want to align versions in one place. This allows you to more safely upgrade, with less worry about conflicts. You can use our Maven instrumentation BOM (Bill of Materials) for this: Ex. in your dependencies section, import the BOM like this: ```xml <dependencyManagement> <dependencies> <dependency> <groupId>io.zipkin.brave</groupId> <artifactId>brave-bom</artifactId> <version>${brave.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> ``` Now, you can leave off the version when choosing any supported instrumentation. Also, any indirect use will have versions aligned: ```xml <dependency> <groupId>io.zipkin.brave</groupId> <artifactId>brave-instrumentation-okhttp3</artifactId> </dependency> ``` With the above in place, you can use the property `brave.version` to override dependency versions coherently. This is most commonly to test a new feature or fix. Note: If you override a version, always double check that your version is valid (equal to or later) than what you are updating. This will avoid class conflicts.
0
in28minutes/devops-master-class
Devops Tutorial for Beginners - Learn Docker, Kubernetes, Terraform, Ansible, Jenkins and Azure Devops
azure-devops devops-course kubernetes learn-devops
null
1
laodaobazi/ldbz-shop
分布式商城
null
## LDBZ-SHOP [![License](https://img.shields.io/badge/license-GPL-blue.svg)](LICENSE) [![GitHub stars](https://img.shields.io/github/stars/laodaobazi/ldbz-shop.svg?style=social&label=Stars)](https://github.com/laodaobazi/ldbz-shop)[![GitHub forks](https://img.shields.io/github/forks/laodaobazi/ldbz-shop.svg?style=social&label=Fork)](https://github.com/laodaobazi/ldbz-shop) 使用技术(个人时间和精力有限,项目不定期更新中....): * 后台 * ![使用`Spring Boot` 构建整个项目 去除 XML 配置](https://github.com/spring-projects/spring-boot) * ![`Maven`构建项目](http://maven.apache.org/) * `Jenkins`作为持续集成 * ![采用`Dubbo`作为RPC框架](http://dubbo.apache.org/zh-cn/) * ![使用 `Apollo` 分布式配置中心](https://github.com/ApolloAuto/apollo/blob/master/README_cn.md) * 使用`Spring`+`Spring MVC`+`MyBatis`SSM框架 * ![数据库连接池使用`druid`](https://github.com/alibaba/druid/) * 数据存储使用`MySQL`和`Redis` * ![页面引擎采用 `Beetl`](http://ibeetl.com/guide/) * 网页采用`freemarker`生成静态化页面 * ![采用`SolrCloud`实现搜索服务](https://lucene.apache.org/solr/) * ![`Swagger2` 生成 RESTful Apis文档](https://swagger.io/) * 负载均衡使用`Nginx`、`keepalived`实现高可用 * ![tcc-transaction分布式事务](https://github.com/changmingxie/tcc-transaction/blob/master-1.2.x/README.md) ## Web应用的端口 | 名称 | 端口 | 说明 | |:---------------:|:---------------:|:---------------:| | Admin | 8100 | 管理端 | | Cart | 8101 | 购物车 | | Item | 8102 | 商品详细 | | Order | 8103 | 订单 | | Portal | 8104 | 首页 | | Search | 8105 | 检索商品 | | SSO | 8106 | 单点 | | Wishlist | 8107 | 商品收藏 | ## Dubbo服务端口 | 服务名称|Dubbo服务端口|服务说明| |:---------------:|:---------------:|:---------------:| | Admin-Service | 20880 |管理端服务| | Advertisement-Service |20881 |广告服务| | Cart-Service | 20882 |购物车服务| | Item-Service | 20883 |商品详细服务| | Notify-Service | 20884 |消息服务| | Order-Service | 20885 |订单服务| | Portal-Service | 20886 |首页服务| | Redis-Service | 20887 |缓存服务| | Search-Service | 20888 |检索服务| | SSO-Service | 20889 |单点服务| | Wishlist-Service | 20890 |收藏服务| ## Dubbo Admin 管控台 ![dubbo.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/dubbo.png) ## Apollo 配置中心 ![apollo.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/apollo.png) ## SolrCloud 检索 ![solrcloud.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/solrcloud.png) ## maven 构建 ![build.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/build.png) ## project 骨架 ![frame.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/frame.png) ## 首页效果图 ![index.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/index.png) ## 商品明细页效果图 ![item.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/item.png) ## 商品检索页效果图 ![search.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/search.png) ## 购物车页效果图 ![cart.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/cart.png) ## 商品收藏页效果图 ![wishlist.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/wishlist.png) ## 后台管理页效果图 ![admin.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/admin.png) ## 微信交流群 ![wechat.png](https://github.com/laodaobazi/ldbz-shop/blob/master/ldbz-images/wechat.png) ##个人联系方式 ### 📮:biao.li@neusoft.com - 个人QQ [![](http://pub.idqqimg.com/wpa/images/group.png)](http://sighttp.qq.com/msgrd?v=1&uin=444823046) - 如果这个项目让你有所收获,请Star✨ and Fork有时间我会持续更新下去的。 - 注:如果遇到问题还请Issues,我会尽快回复。
0
primefaces/primefaces
Ultimate Component Suite for JavaServer Faces
null
[![Maven](https://img.shields.io/maven-central/v/org.primefaces/primefaces.svg)](https://repo.maven.apache.org/maven2/org/primefaces/primefaces/) [![Actions Status CI](https://github.com/primefaces/primefaces/workflows/CI/badge.svg)](https://github.com/primefaces/primefaces/actions/workflows/build.yml) [![Actions Status Integration Tests](https://github.com/primefaces/primefaces/workflows/IT/badge.svg)](https://github.com/primefaces/primefaces/actions/workflows/nightly.yml) [![Sonar](https://sonarcloud.io/api/project_badges/measure?project=org.primefaces%3Aprimefaces&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.primefaces%3Aprimefaces) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Discord Chat](https://img.shields.io/discord/557940238991753223.svg?color=7289da&label=chat&logo=discord)](https://discord.gg/gzKFYnpmCY) [![Stackoverflow](https://img.shields.io/badge/StackOverflow-primefaces-chocolate.svg)](https://stackoverflow.com/questions/tagged/primefaces+jsf) [![Prime Discussions](https://img.shields.io/github/discussions-search?query=org%3Aprimefaces&logo=github&label=Prime%20Discussions&link=https%3A%2F%2Fgithub.com%2Forgs%2Fprimefaces%2Fdiscussions)](https://github.com/orgs/primefaces/discussions) [![PrimeFaces Hero](https://www.primefaces.org/wp-content/uploads/2021/10/PrimeFaces-GitHub-2021Q4.jpg "PrimeFaces Hero")](https://www.primefaces.org/showcase) # PrimeFaces This is an overview page, please visit [PrimeFaces.org](https://www.primefaces.org) for more information. [![PrimeFaces Logo](https://www.primefaces.org/wp-content/uploads/2016/10/prime_logo_new.png)](https://www.primefaces.org/showcase) ### Overview *** [PrimeFaces](https://www.primefaces.org/) is one of the most popular UI libraries in Java EE Ecosystem and widely used by software companies, world renowned brands, banks, financial institutions, insurance companies, universities and more. Here are [some of the users](https://www.primefaces.org/whouses) who notified us or subscribed to a [PrimeFaces Support Service](https://www.primefaces.org/support). ### Community <> Elite <> Pro *** This is the open source code and issue tracker of the PrimeFaces master (a.k.a. community version). Please check the following link for informations about Elite and Pro: [PrimeFaces Support](https://www.primefaces.org/support/) What does that mean? - PrimeFaces is developed by PrimeTek and the open source community. - The most contributers here on GitHub are working on PrimeFaces in their spare time. - PrimeTek pushes fixes and new features from their closed source Elite and Pro repositories to the community edition. - We, the community on GitHub, only provide support for issues, which are reproducable with the current SNAPSHOT (scroll down for more information on how to use it). - We are NOT able to port bugfixes to elite releases. This is up to PrimeTek and can e.g. be triggered with PrimeFaces PRO. ### Versions *** Version | Binary | Source | JSF version | Java version | Documentation ------------ | ------------- | ------------- | ------------- | ------------- | ------------- | ![14.0.x](https://img.shields.io/maven-central/v/org.primefaces/primefaces.svg?versionPrefix=14&color=cyan)| [JAR](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/14.0.0-RC1/primefaces-14.0.0-RC1.jar) | [Sources](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/14.0.0-RC1/primefaces-14.0.0-RC1-sources.jar)| 2.3 - 4.0 | 11 - ? | [14.0.0 Documentation](https://primefaces.github.io/primefaces/14_0_0/#/) ![13.0.x](https://img.shields.io/maven-central/v/org.primefaces/primefaces.svg?versionPrefix=13&color=cyan)| [JAR](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/13.0.7/primefaces-13.0.7.jar) | [Sources](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/13.0.7/primefaces-13.0.7-sources.jar) | 2.0 - 4.0 | 1.8 - ? | [13.0.7 Documentation](https://primefaces.github.io/primefaces/13_0_0/#/) ![12.0.x](https://img.shields.io/maven-central/v/org.primefaces/primefaces.svg?versionPrefix=12&color=cyan)| [JAR](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/12.0.0/primefaces-12.0.0.jar) | [Sources](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/12.0.0/primefaces-12.0.0-sources.jar) | 2.0 - 4.0 | 1.8 - ? | [12.0.0 Documentation](https://primefaces.github.io/primefaces/12_0_0/#/) <details> <summary>Archive</summary> Version | Binary | Source | JSF version | Java version | Documentation ------------ | ------------- | ------------- | ------------- | ------------- | ------------- | 11.0.0| [primefaces-11.0.0.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/11.0.0/primefaces-11.0.0.jar) | [primefaces-11.0.0-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/11.0.0/primefaces-11.0.0-sources.jar) | 2.0 - 4.0 | 1.8 - ? | [11.0.0 Documentation](https://primefaces.github.io/primefaces/11_0_0/#/) 10.0.0| [primefaces-10.0.0.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/10.0.0/primefaces-10.0.0.jar) | [primefaces-10.0.0-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/10.0.0/primefaces-10.0.0-sources.jar) | 2.0 - 3.0 | 1.8 - ? | [10.0.0 Documentation](https://primefaces.github.io/primefaces/10_0_0/#/) 8.0| [primefaces-8.0.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/8.0/primefaces-8.0.jar) | [primefaces-8.0-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/8.0/primefaces-8.0-sources.jar) | 2.0 - 2.3 | 1.8 - ? | [8.0 Documentation](https://primefaces.github.io/primefaces/8_0/#/) 7.0| [primefaces-7.0.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/7.0/primefaces-7.0.jar) | [primefaces-7.0-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/7.0/primefaces-7.0-sources.jar) | 2.0 - 2.3 | 1.7 - ? | [7.0 Documentation](https://primefaces.github.io/primefaces/7_0/#/) 6.2| [primefaces-6.2.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.2/primefaces-6.2.jar) | [primefaces-6.2-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.2/primefaces-6.2-sources.jar) | 2.0 - 2.3 | 1.6 - ? | [6.2 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_6_2.pdf) 6.1| [primefaces-6.1.jar](http://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.1/primefaces-6.1.jar) | [primefaces-6.1-sources.jar](http://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.1/primefaces-6.1-sources.jar) | 2.0 - 2.3 | 1.5 - ? | [6.1 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_6_1.pdf) 6.0| [primefaces-6.0.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.0/primefaces-6.0.jar) | [primefaces-6.0-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/6.0/primefaces-6.0-sources.jar) | 2.0 - 2.2 | 1.5 - ? | [6.0 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_6_0.pdf) 5.3| [primefaces-5.3.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.3/primefaces-5.3.jar) | [primefaces-5.3-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.3/primefaces-5.3-sources.jar) | 2.0 - 2.2 | 1.5 - ? | [5.3 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_5_3.pdf) 5.2| [primefaces-5.2.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.2/primefaces-5.2.jar) | [primefaces-5.2-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.2/primefaces-5.2-sources.jar) | 2.0 - 2.2 | 1.5 - ? | [5.2 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_5_2.pdf) 5.1| [primefaces-5.1.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.1/primefaces-5.1.jar) | [primefaces-5.1-sources.jar](https://search.maven.org/remotecontent?filepath=org/primefaces/primefaces/5.1/primefaces-5.1-sources.jar) | 2.0 - 2.2 | 1.5 - ? | [5.1 Documentation](https://www.primefaces.org/docs/guide/primefaces_user_guide_5_1.pdf) </details> For a full list of the available downloads, please visit the [download page](https://www.primefaces.org/downloads). ### Maven *** ##### Release ```xml <!-- Java EE / javax.* / JSF 2.2 - JSF 2.3 --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>13.0.7</version> </dependency> <!-- Jakarta EE / jakarta.* / Faces 3.0 - Faces 4.0 --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>13.0.7</version> <classifier>jakarta</classifier> </dependency> ``` ##### SNAPSHOT ```xml <!-- Java EE / javax.* / JSF 2.3 --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>14.0.0-SNAPSHOT</version> </dependency> <!-- Jakarta EE / jakarta.* / Faces 3.0 - Faces 4.0 --> <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>14.0.0-SNAPSHOT</version> <classifier>jakarta</classifier> </dependency> <repositories> <repository> <id>sonatype-snapshots</id> <name>Sonatype Snapshot Repository</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> ``` ### Usage *** ```xml <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:jsf="http://xmlns.jcp.org/jsf" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head> </h:head> <h:body> <p:spinner /> </h:body> </html> ``` ### Demo *** Please refer to the [showcase](https://www.primefaces.org/showcase) in order to see the full usage of the components. Sources of PrimeFaces showcase are available within module [primefaces-showcase](https://github.com/primefaces/primefaces/tree/master/primefaces-showcase). ### Contribution *** Visit the [contribution](./CONTRIBUTING.md) page for detailed information. ### Release Instructions *** - Run `mvn versions:set -DgenerateBackupPoms=false -DnewVersion=14.0.0` to update all modules versions - Commit and push the changes to GitHub - In GitHub create a new Release titled `14.0.0` to tag this release - Run `mvn clean deploy -Prelease` to push to Maven Central - Rename Milestone in GitHub Issues and close it - Create a new Milestone ### License *** Licensed under the MIT License.
0
CaffeineMC/sodium-fabric
A Fabric mod designed to improve frame rates and reduce micro-stutter
azdo fabric minecraft opengl
<img src="src/main/resources/assets/sodium/icon.png" width="128"> # Sodium (for Fabric) Sodium is a powerful rendering engine and optimization mod for the Minecraft client which improves frame rates and reduces micro-stutter, while fixing many graphical issues in Minecraft. ### 📥 Installation The latest releases of Sodium are published to our official [Modrinth](https://modrinth.com/mod/sodium) and [GitHub release](https://github.com/CaffeineMC/sodium-fabric/releases) pages. These releases are considered by our team to be suitable for general use, but they are not guaranteed to be free of bugs and other issues. For more information about downloading and installing the mod, you can read our installation guide on [Modrinth](https://modrinth.com/mod/sodium#installation). It also contains information about any currently known compatibility issues, which are often useful to read. ### 🐛 Reporting Issues You can report bugs and crashes by opening an issue on our [issue tracker](https://github.com/CaffeineMC/sodium-fabric/issues). Before opening a new issue, use the search tool to make sure that your issue has not already been reported and ensure that you have completely filled out the issue template. Issues that are duplicates or do not contain the necessary information to triage and debug may be closed. Please note that while the issue tracker is open to feature requests, development is primarily focused on improving hardware compatibility, performance, and finishing any unimplemented features necessary for parity with the vanilla renderer. ### 💬 Join the Community We have an [official Discord community](https://caffeinemc.net/discord) for all of our projects. By joining, you can: - Get installation help and technical support for all of our mods - Get the latest updates about development and community events - Talk with and collaborate with the rest of our team - ... and just hang out with the rest of our community. ## ✅ Hardware Compatibility We only provide support for graphics cards which have up-to-date drivers for OpenGL 4.6. Most graphics cards which have been released since year 2010 are supported, such as the... - AMD Radeon HD 7000 Series (GCN 1) or newer - NVIDIA GeForce 400 Series (Fermi) or newer - Intel HD Graphics 500 Series (Skylake) or newer In some cases, older graphics cards may also work (so long as they have up-to-date drivers which have support for OpenGL 3.3), but they are not officially supported, and may not be compatible with future versions of Sodium. #### OpenGL Compatibility Layers Devices which need to use OpenGL translation layers (such as GL4ES, ANGLE, etc) are not supported and will very likely not work with Sodium. These translation layers do not implement required functionality and they suffer from underlying driver bugs which cannot be worked around. ## 🛠️ Developer Guide ### Building from sources Sodium uses a typical Gradle project structure and can be compiled by simply running the default `build` task. The build artifacts (typical mod binaries, and their sources) can be found in the `build/libs` directory. #### Requirements We recommend using a package manager (such as [SDKMAN](https://sdkman.io/)) to manage toolchain dependencies and keep them up to date. For many Linux distributions, these dependencies will be standard packages in your software repositories. - OpenJDK 17 - We recommend using the [Eclipse Temurin](https://adoptium.net/) distribution, as it's known to be high quality and to work without issues. - Gradle 8.2.1 (optional) - The [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:using_wrapper) is provided in this repository can be used instead of installing a suitable version of Gradle yourself. However, if you are building many projects, you may prefer to install it yourself through a suitable package manager as to save disk space and to avoid many different Gradle daemons sitting around in memory. - Typically, newer versions of Gradle will work without issues, but the build script is only tested against the version specified by the wrapper script. ## 📜 License Except where otherwise stated, the content of this repository is provided under the [Polyform Shield 1.0.0](LICENSE.md) license by [JellySquid](https://jellysquid.me).
0
freeplane/freeplane
Application for Mind Mapping, Knowledge Management, Project Management. Develop, organize and communicate your ideas and knowledge in the most effective way.
groovy-scripts java knowledge-management latex markdown mindmap mindmap-editor mindmapping mindmaps note-taking outliner presentation project-management writing
Freeplane ========= [![SourceForge](https://img.shields.io/sourceforge/dt/freeplane?color=green)](https://sourceforge.net/projects/freeplane/files/stats/timeline) [![GitHub Repo stars](https://img.shields.io/github/stars/freeplane/freeplane?color=yellow)](https://github.com/freeplane/freeplane/stargazers) [![GitHub forks](https://img.shields.io/github/forks/freeplane/freeplane)](https://github.com/freeplane/freeplane/network) [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/freeplane/freeplane?color=red)](https://img.shields.io/github/commit-activity/y/freeplane/freeplane?color=red) [![GitHub last commit](https://img.shields.io/github/last-commit/freeplane/freeplane?color=orange)](https://github.com/freeplane/freeplane/commits) [![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/freeplane/freeplane)](https://github.com/freeplane/freeplane/pulls) [![GitHub contributors](https://img.shields.io/github/contributors/freeplane/freeplane?color=purple)](https://github.com/freeplane/freeplane/graphs/contributors) [![GitHub watchers](https://img.shields.io/github/watchers/freeplane/freeplane?color=yellowgreen)](https://img.shields.io/github/watchers/freeplane/freeplane?color=yellowgreen) [Freeplane](https://www.freeplane.org) is a free and open source software application that supports thinking, sharing information, getting things done at work, in school and at home. It provides you a set of tools for mind mapping (also known as concept mapping or information mapping) and navigating the mapped information. Freeplane is also a more robust and superior alternative to Xmind, Mindmeister, and similar mind mapping software. Freeplane is written in Java using OSGi and Java Swing. It runs on any operating system that has a current version of Java installed. It can be installed or can run from removable storage like a USB drive. Download and install the latest version over at [Sourceforge](https://sourceforge.net/projects/freeplane/files/). If you would like to report a bug, you can go report it over at [Issues](https://github.com/freeplane/freeplane/issues). The documentation can be found at [![mdBook Docu](https://img.shields.io/badge/mdBook-Docu-lightblue)](https://docs.freeplane.org/). There, you will find How-To Guides, FAQs, Examples and explanations about the functions of Freeplane. Hop on to our [Discussions](https://github.com/freeplane/freeplane/discussions) if you have any questions, ideas, or thoughts you'd like to share. Contributors are very much welcome, of course! Features Rundown ===================================== ![student](https://user-images.githubusercontent.com/88552647/170373856-7a636373-a783-4fa0-ba27-2ddb39d8ca3c.png) ------------- ![slides](https://user-images.githubusercontent.com/88552647/170373905-107a46ce-b8e6-4d6c-bf19-e711bfeb6a20.png) ------------- ![formatting](https://user-images.githubusercontent.com/88552647/170373875-b2885816-b900-4a2f-9ab4-3293cb148654.png) ------------- ![UI](https://user-images.githubusercontent.com/88552647/170374143-9e65d981-c7ef-456e-8c84-a43abcae3181.png) ------------- ![addons](https://user-images.githubusercontent.com/88552647/170373895-f851ddf8-4bc3-4544-a197-9b101c0d986d.png) ------------- ![command search](https://user-images.githubusercontent.com/88552647/170373890-fdb4ec75-ba95-4a71-ab6e-65f50e72897b.png) ------------- ![styling](https://user-images.githubusercontent.com/88552647/170373913-7337604c-9a08-4a73-8d7b-2d9d73981fa8.png) ------------- ![formulas](https://user-images.githubusercontent.com/88552647/170373932-247effb8-3df4-49a8-9158-192d26a752ec.png) ------------- ![discussions](https://user-images.githubusercontent.com/88552647/170373883-2a34bbeb-5bfe-4544-99bd-435295f46f8f.png) ------------- How to Start Contributing ===================================== We're currently looking for contributors for developing the documentation. If you can write simple step-by-step guides, translate existing text into English, transfer text from our old documentation into the new one, then we could use your help. You can start a discussion post saying you want to contribute to the documentation and the Freeplane team will respond and assist you. If you have other ways of contributing: developing an add-on, sharing your pre-configured mindmap, or suggestions about future development, please feel free to join us in the [Discussions](https://github.com/freeplane/freeplane/discussions) Every contributor or team member freely decides what task they are going to work on. However, for making the best decision regarding development, it's advised that we first propose and suggest the idea to the community through a discussion post as to enable early discussion and community feedback. Where to Download ===================================== Download and install the latest version over at [Sourceforge](https://sourceforge.net/projects/freeplane/files/).
0
confluentinc/kafka-streams-examples
Demo applications and code examples for Apache Kafka's Streams API.
null
# Kafka Streams Examples This project contains code examples that demonstrate how to implement real-time applications and event-driven microservices using the Streams API of [Apache Kafka](http://kafka.apache.org/) aka Kafka Streams. For more information take a look at the [**latest Confluent documentation on the Kafka Streams API**](http://docs.confluent.io/current/streams/), notably the [**Developer Guide**](https://docs.confluent.io/platform/current/streams/developer-guide/index.html) --- Table of Contents * [Available examples](#available-examples) * [Examples: Runnable Applications](#examples-apps) * [Examples: Unit Tests](#examples-unit-tests) * [Examples: Integration Tests](#examples-integration-tests) * [Docker Example: Kafka Music demo application](#examples-docker) * [Examples: Event Streaming Platform](#examples-event-streaming-platform) * [Requirements](#requirements) * [Apache Kafka](#requirements-kafka) * [Confluent Platform](#requirements-confluent-platform) * [Using IntelliJ or Eclipse](#requirements-ide) * [Java](#requirements-java) * [Scala](#requirements-scala) * [Packaging and running the examples](#packaging-and-running) * [Development](#development) * [Version Compatibility Matrix](#version-compatibility) * [Where to find help](#help) --- <a name="available-examples"/> # Available examples This repository has several branches to help you find the correct code examples for the version of Apache Kafka and/or Confluent Platform that you are using. See [Version Compatibility Matrix](#version-compatibility) below for details. There are three kinds of examples: * **Examples under [src/main/](src/main/)**: These examples are short and concise. Also, you can interactively test-drive these examples, e.g. against a local Kafka cluster. If you want to actually run these examples, then you must first install and run Apache Kafka and friends, which we describe in section [Packaging and running the examples](#packaging-and-running). Each example also states its exact requirements and instructions at the very top. * **Examples under [src/test/](src/test/)**: These examples should test applications under [src/main/](src/main/). Unit Tests with TopologyTestDriver test the stream logic without external system dependencies. The integration tests use an embedded Kafka clusters, feed input data to them (using the standard Kafka producer client), process the data using Kafka Streams, and finally read and verify the output results (using the standard Kafka consumer client). These examples are also a good starting point to learn how to implement your own end-to-end integration tests. * **Ready-to-run Docker Examples**: These examples are already built and containerized. <a name="examples-apps"/> ## Examples: Runnable Applications Additional examples may be found under [src/main/](src/main/java/io/confluent/examples/streams/). | Application Name | Concepts used | Java 8+ | Java 7+ | Scala | | --------------------------- | -------------------------------------------------------- | ------- | ------- | ----- | | WordCount | DSL, aggregation, stateful | [Java 8+ example](src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java) | | [Scala Example](src/main/scala/io/confluent/examples/streams/WordCountScalaExample.scala) | | MapFunction | DSL, stateless transformations, `map()` | [Java 8+ example](src/main/java/io/confluent/examples/streams/MapFunctionLambdaExample.java) | | [Scala Example](src/main/scala/io/confluent/examples/streams/MapFunctionScalaExample.scala) | | SessionWindows | Sessionization of user events, user behavior analysis | | [Java 7+ example](src/main/java/io/confluent/examples/streams/SessionWindowsExample.java) | GlobalKTable | `join()` between `KStream` and `GlobalKTable` | [Java 8+ example](src/main/java/io/confluent/examples/streams/GlobalKTablesExample.java) | | | | GlobalStore | "join" between `KStream` and `GlobalStore` | [Java 8+ example](src/main/java/io/confluent/examples/streams/GlobalStoresExample.java) | | | | PageViewRegion | `join()` between `KStream` and `KTable` | [Java 8+ example](src/main/java/io/confluent/examples/streams/PageViewRegionLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/PageViewRegionExample.java) | | | PageViewRegionGenericAvro | Working with data in Generic Avro format | [Java 8+ example](src/main/java/io/confluent/examples/streams/PageViewRegionLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/PageViewRegionExample.java) | | | WikipediaFeedSpecificAvro | Working with data in Specific Avro format | [Java 8+ example](src/main/java/io/confluent/examples/streams/WikipediaFeedAvroLambdaExample.java) | [Java 7+ example](src/main/java/io/confluent/examples/streams/WikipediaFeedAvroExample.java) | | | SecureKafkaStreams | Secure, encryption, client authentication | | [Java 7+ example](src/main/java/io/confluent/examples/streams/SecureKafkaStreamsExample.java) | | | Sum | DSL, stateful transformations, `reduce()` | [Java 8+ example](src/main/java/io/confluent/examples/streams/SumLambdaExample.java) | | | | WordCountInteractiveQueries | Interactive Queries, REST, RPC | [Java 8+ example](src/main/java/io/confluent/examples/streams/interactivequeries/WordCountInteractiveQueriesExample.java) | | | | KafkaMusic | Interactive Queries, State Stores, REST API | [Java 8+ example](src/main/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExample.java) | | | | ApplicationReset | Application Reset Tool `kafka-streams-application-reset` | [Java 8+ example](src/main/java/io/confluent/examples/streams/ApplicationResetExample.java) | | | | Microservice | Microservice ecosystem, state stores, dynamic routing, joins, filtering, branching, stateful operations | [Java 8+ example](src/main/java/io/confluent/examples/streams/microservices) | | | <a name="examples-unit-tests"/> ## Examples: Unit Tests The stream processing of Kafka Streams can be **unit tested** with the `TopologyTestDriver` from the `org.apache.kafka:kafka-streams-test-utils` artifact. The test driver allows you to write sample input into your processing topology and validate its output. See the documentation at [Testing Streams Code](https://docs.confluent.io/current/streams/developer-guide/test-streams.html). <a name="examples-integration-tests"/> ## Examples: Integration Tests We also provide several **integration tests**, which demonstrate end-to-end data pipelines. Here, we spawn embedded Kafka clusters and the [Confluent Schema Registry](https://github.com/confluentinc/schema-registry), feed input data to them (using the standard Kafka producer client), process the data using Kafka Streams, and finally read and verify the output results (using the standard Kafka consumer client). Additional examples may be found under [src/test/](src/test/java/io/confluent/examples/streams/). > Tip: Run `mvn test` to launch the tests. | Integration Test Name | Concepts used | Java 8+ | Java 7+ | Scala | | ----------------------------------- | ------------------------------------------- | ------- | ------- | ----- | | WordCount | DSL, aggregation, stateful | [Java 8+ Example](src/test/java/io/confluent/examples/streams/WordCountLambdaIntegrationTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/WordCountScalaIntegrationTest.scala) | | WordCountInteractiveQueries | Interactive Queries, REST, RPC | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/interactivequeries/WordCountInteractiveQueriesExampleTest.java) | | | Aggregate | DSL, `groupBy()`, `aggregate()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/AggregateTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/AggregateScalaTest.scala) | | CustomStreamTableJoin | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/CustomStreamTableJoinIntegrationTest.java) | | | | EventDeduplication | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/EventDeduplicationLambdaIntegrationTest.java) | | | | GlobalKTable | DSL, global state | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GlobalKTablesExampleTest.java) | | | GlobalStore | DSL, global state, Transformers | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GlobalStoresExampleTest.java) | | | HandlingCorruptedInputRecords | DSL, `flatMap()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/HandlingCorruptedInputRecordsIntegrationTest.java) | | | | KafkaMusic (Interactive Queries) | Interactive Queries, State Stores, REST API | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/interactivequeries/kafkamusic/KafkaMusicExampleTest.java) | | | MapFunction | DSL, stateless transformations, `map()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/MapFunctionLambdaIntegrationTest.java) | | | | MixAndMatch DSL + Processor API | Integrating DSL and Processor API | [Java 8+ Example](src/test/java/io/confluent/examples/streams/MixAndMatchLambdaIntegrationTest.java) | | | | PassThrough | DSL, `stream()`, `to()` | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/PassThroughIntegrationTest.java) | | | PoisonPill | DSL, `flatMap()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/HandlingCorruptedInputRecordsIntegrationTest.java) | | | | ProbabilisticCounting\*\*\* | DSL, Processor API, custom state stores | | | [Scala Example](src/test/scala/io/confluent/examples/streams/ProbabilisticCountingScalaIntegrationTest.scala) | | Reduce (Concatenate) | DSL, `groupByKey()`, `reduce()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/ReduceTest.java) | | [Scala Example](src/test/scala/io/confluent/examples/streams/ReduceScalaTest.scala) | | SessionWindows | DSL, windowed aggregation, sessionization | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/SessionWindowsExampleTest.java) | | | StatesStoresDSL | DSL, Processor API, Transformers | [Java 8+ Example](src/test/java/io/confluent/examples/streams/StateStoresInTheDSLIntegrationTest.java) | | | | StreamToStreamJoin | DSL, `join()` between KStream and KStream | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/StreamToStreamJoinIntegrationTest.java) | | | StreamToTableJoin | DSL, `join()` between KStream and KTable | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/StreamToTableJoinIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/StreamToTableJoinScalaIntegrationTest.scala) | | Sum | DSL, aggregation, stateful, `reduce()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/SumLambdaIntegrationTest.java) | | | | TableToTableJoin | DSL, `join()` between KTable and KTable | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/TableToTableJoinIntegrationTest.java) | | | UserCountsPerRegion | DSL, aggregation, stateful, `count()` | [Java 8+ Example](src/test/java/io/confluent/examples/streams/UserCountsPerRegionLambdaIntegrationTest.java) | | | | ValidateStateWithInteractiveQueries | Interactive Queries for validating state | | [Java 8+ Example](src/test/java/io/confluent/examples/streams/ValidateStateWithInteractiveQueriesLambdaIntegrationTest.java) | | | | GenericAvro | Working with data in Generic Avro format | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/GenericAvroIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/GenericAvroScalaIntegrationTest.scala) | | SpecificAvro | Working with data in Specific Avro format | | [Java 7+ Example](src/test/java/io/confluent/examples/streams/SpecificAvroIntegrationTest.java) | [Scala Example](src/test/scala/io/confluent/examples/streams/SpecificAvroScalaIntegrationTest.scala) | \*\*\*demonstrates how to probabilistically count items in an input stream by implementing a custom state store ([CMSStore](src/main/scala/io/confluent/examples/streams/algebird/CMSStore.scala)) that is backed by a [Count-Min Sketch](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) data structure (with the CMS implementation of [Twitter Algebird](https://github.com/twitter/algebird)) <a name="examples-docker"/> # Docker Example: Kafka Music demo application This containerized example launches: * Confluent's Kafka Music demo application for the Kafka Streams API, which makes use of [Interactive Queries](http://docs.confluent.io/current/streams/developer-guide.html) * a single-node Apache Kafka cluster with a single-node ZooKeeper ensemble * a [Confluent Schema Registry](https://github.com/confluentinc/schema-registry) instance The Kafka Music application demonstrates how to build of a simple music charts application that continuously computes, in real-time, the latest charts such as latest Top 5 songs per music genre. It exposes its latest processing results -- the latest charts -- via Kafka’s [Interactive Queries](http://docs.confluent.io/current/streams/developer-guide.html#interactive-queries) feature via a REST API. The application's input data is in Avro format, hence the use of Confluent Schema Registry, and comes from two sources: a stream of play events (think: "song X was played") and a stream of song metadata ("song X was written by artist Y"). You can find detailed documentation at https://docs.confluent.io/current/streams/kafka-streams-examples/docs/index.html. <a name="event-streaming-platform"/> # Examples: Event Streaming Platform For additional examples that showcase Kafka Streams applications within an event streaming platform, please refer to the [examples GitHub repository](https://github.com/confluentinc/examples). <a name="requirements"/> # Requirements <a name="requirements-kafka"/> ## Apache Kafka The code in this repository requires Apache Kafka 0.10+ because from this point onwards Kafka includes its [Kafka Streams](https://github.com/apache/kafka/tree/trunk/streams) library. See [Version Compatibility Matrix](#version-compatibility) for further details, as different branches of this repository may have different Kafka requirements. > **For the `master` branch:** To build a development version, you typically need the latest `trunk` version of Apache Kafka > (cf. `kafka.version` in [pom.xml](pom.xml) for details). The following instructions will build and locally install > the latest `trunk` Kafka version: > > ```shell > $ git clone git@github.com:apache/kafka.git > $ cd kafka > $ git checkout trunk > > # Now build and install Kafka locally > $ ./gradlew clean && ./gradlewAll install > ``` <a name="requirements-confluent-platform"/> ## Confluent Platform The code in this repository requires [Confluent Schema Registry](https://github.com/confluentinc/schema-registry). See [Version Compatibility Matrix](#version-compatibility) for further details, as different branches of this repository have different Confluent Platform requirements. * [Confluent Platform Quickstart](http://docs.confluent.io/current/quickstart.html) (how to download and install) * [Confluent Platform documentation](http://docs.confluent.io/current/) > **For the `master` branch:** To build a development version, you typically need the latest `master` version of Confluent Platform's > Schema Registry (cf. `confluent.version` in [pom.xml](pom.xml), which is set by the upstream > [Confluent Common](https://github.com/confluentinc/common) project). > The following instructions will build and locally install the latest `master` Schema Registry version, which includes > building its dependencies such as [Confluent Common](https://github.com/confluentinc/common) and > [Confluent Rest Utils](https://github.com/confluentinc/rest-utils). > Please read the [Schema Registry README](https://github.com/confluentinc/schema-registry) for details. > > ```shell > $ git clone https://github.com/confluentinc/common.git > $ cd common > $ git checkout master > > # Build and install common locally > $ mvn -DskipTests=true clean install > > $ git clone https://github.com/confluentinc/rest-utils.git > $ cd rest-utils > $ git checkout master > > # Build and install rest-utils locally > $ mvn -DskipTests=true clean install > > $ git clone https://github.com/confluentinc/schema-registry.git > $ cd schema-registry > $ git checkout master > > # Now build and install schema-registry locally > $ mvn -DskipTests=true clean install > ``` Also, each example states its exact requirements at the very top. <a name="requirements-ide"/> ## Using IntelliJ or Eclipse If you are using an IDE and import the project you might end up with a "missing import / class not found" error. Some Avro classes are generated from schema files and IDEs sometimes do not generate these classes automatically. To resolve this error, manually run: ```shell $ mvn -Dskip.tests=true compile ``` If you are using Eclipse, you can also right-click on `pom.xml` file and choose _Run As > Maven generate-sources_. <a name="requirements-java"/> ## Java 8+ Some code examples require Java 8+, primarily because of the usage of [lambda expressions](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html). IntelliJ IDEA users: * Open _File > Project structure_ * Select "Project" on the left. * Set "Project SDK" to Java 1.8. * Set "Project language level" to "8 - Lambdas, type annotations, etc." <a name="requirements-scala"/> ## Scala > Scala is required only for the Scala examples in this repository. If you are a Java developer you can safely ignore > this section. If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 8 and SAM / Java lambda (e.g. Scala 2.11 with `-Xexperimental` compiler flag, or 2.12). If you are compiling with Java 9+, you'll need to have Scala version 2.12+ to be compatible with the Java version. <a name="packaging-and-running"/> # Packaging and running the Application Examples The instructions in this section are only needed if you want to interactively test-drive the [application examples](#examples-apps) under [src/main/](src/main/). > **Tip:** If you only want to run the integration tests (`mvn test`), then you do not need to package or install > anything -- just run `mvn test`. These tests launch embedded Kafka clusters. The first step is to install and run a Kafka cluster, which must consist of at least one Kafka broker as well as at least one ZooKeeper instance. Some examples may also require a running instance of Confluent schema registry. The [Confluent Platform Quickstart](http://docs.confluent.io/current/quickstart.html) guide provides the full details. In a nutshell: ```shell # Ensure you have downloaded and installed Confluent Platform as per the Quickstart instructions above. # Start ZooKeeper $ ./bin/zookeeper-server-start ./etc/kafka/zookeeper.properties # In a separate terminal, start Kafka broker $ ./bin/kafka-server-start ./etc/kafka/server.properties # In a separate terminal, start Confluent Schema Registry $ ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties # Again, please refer to the Confluent Platform Quickstart for details such as # how to download Confluent Platform, how to stop the above three services, etc. ``` The next step is to create a standalone jar ("fat jar") of the [application examples](#examples-apps): ```shell # Create a standalone jar ("fat jar") $ mvn clean package # >>> Creates target/kafka-streams-examples-7.8.0-0-standalone.jar ``` > Tip: If needed, you can disable the test suite during packaging, for example to speed up the packaging or to lower > JVM memory usage: > > ```shell > $ mvn -DskipTests=true clean package > ``` You can now run the application examples as follows: ```shell # Run an example application from the standalone jar. Here: `WordCountLambdaExample` $ java -cp target/kafka-streams-examples-7.8.0-0-standalone.jar \ io.confluent.examples.streams.WordCountLambdaExample ``` The application will try to read from the specified input topic (in the above example it is ``streams-plaintext-input``), execute the processing logic, and then try to write back to the specified output topic (in the above example it is ``streams-wordcount-output``). In order to observe the expected output stream, you will need to start a console producer to send messages into the input topic and start a console consumer to continuously read from the output topic. More details in how to run the examples can be found in the [java docs](src/main/java/io/confluent/examples/streams/WordCountLambdaExample.java#L31) of each example code. If you want to turn on log4j while running your example application, you can edit the [log4j.properties](src/main/resources/log4j.properties) file and then execute as follows: ```shell # Run an example application from the standalone jar. Here: `WordCountLambdaExample` $ java -cp target/kafka-streams-examples-7.8.0-0-standalone.jar \ -Dlog4j.configuration=file:src/main/resources/log4j.properties \ io.confluent.examples.streams.WordCountLambdaExample ``` Keep in mind that the machine on which you run the command above must have access to the Kafka/ZooKeeper clusters you configured in the code examples. By default, the code examples assume the Kafka cluster is accessible via `localhost:9092` (aka Kafka's ``bootstrap.servers`` parameter) and the ZooKeeper ensemble via `localhost:2181`. You can override the default ``bootstrap.servers`` parameter through a command line argument. <a name="development"/> # Development This project uses the standard maven lifecycle and commands such as: ```shell $ mvn compile # This also generates Java classes from the Avro schemas $ mvn test # Runs unit and integration tests $ mvn package # Packages the application examples into a standalone jar ``` <a name="version-compatibility"/> # Version Compatibility Matrix | Branch (this repo) | Confluent Platform | Apache Kafka | | ----------------------------------------|--------------------|-------------------| | [5.4.x](../../../tree/5.4.x/)\* | 5.4.0-SNAPSHOT | 2.4.0-SNAPSHOT | | [5.3.0-post](../../../tree/5.3.0-post/) | 5.3.0 | 2.3.0 | | [5.2.2-post](../../../tree/5.2.2-post/) | 5.2.2 | 2.2.1 | | [5.2.1-post](../../../tree/5.2.1-post/) | 5.2.1 | 2.2.1 | | [5.1.0-post](../../../tree/5.1.0-post/) | 5.1.0 | 2.1.0 | | [5.0.0-post](../../../tree/5.0.0-post/) | 5.0.0 | 2.0.0 | | [4.1.0-post](../../../tree/4.1.0-post/) | 4.1.0 | 1.1.0 | | [4.0.0-post](../../../tree/4.4.0-post/) | 4.0.0 | 1.0.0 | | [3.3.0-post](../../../tree/3.3.0-post/) | 3.3.0 | 0.11.0 | \*You must manually build the `2.3` version of Apache Kafka and the `5.3.x` version of Confluent Platform. See instructions above. The `master` branch of this repository represents active development, and may require additional steps on your side to make it compile. Check this README as well as [pom.xml](pom.xml) for any such information. <a name="help"/> # Where to find help * Looking for documentation on Apache Kafka's Streams API? * We recommend to read the [Kafka Streams chapter](https://docs.confluent.io/current/streams/) in the [Confluent Platform documentation](https://docs.confluent.io/current/). * Watch our talk [Rethinking Stream Processing with Apache Kafka](https://www.youtube.com/watch?v=ACwnrnVJXuE) * Running into problems to use the demos and examples in this project? * First, you should check our [FAQ wiki](https://github.com/confluentinc/kafka-streams-examples/wiki/FAQ) for an answer first. * If the FAQ doesn't help you, [create a new GitHub issue](https://github.com/confluentinc/kafka-streams-examples/issues). * Want to ask a question, report a bug in Kafka or its Kafka Streams API, request a new Kafka feature? * For general questions about Apache Kafka and Confluent Platform, please head over to the [Confluent mailing list](https://groups.google.com/forum/?pli=1#!forum/confluent-platform) or to the [Apache Kafka mailing lists](http://kafka.apache.org/contact). # License Usage of this image is subject to the license terms of the software contained within. Please refer to Confluent's Docker images documentation [reference](https://docs.confluent.io/platform/current/installation/docker/image-reference.html) for further information. The software to extend and build the custom Docker images is available under the Apache 2.0 License.
0
TeamNewPipe/NewPipeExtractor
NewPipe's core library for extracting data from streaming sites
bandcamp crawler extractor mediaccc newpipe peertube scraper soundcloud youtube
# NewPipe Extractor [![CI](https://github.com/TeamNewPipe/NewPipeExtractor/actions/workflows/ci.yml/badge.svg?branch=dev&event=schedule)](https://github.com/TeamNewPipe/NewPipeExtractor/actions/workflows/ci.yml) [![JIT Pack Badge](https://jitpack.io/v/TeamNewPipe/NewPipeExtractor.svg)](https://jitpack.io/#TeamNewPipe/NewPipeExtractor) [JDoc](https://teamnewpipe.github.io/NewPipeExtractor/javadoc/) • [Documentation](https://teamnewpipe.github.io/documentation/) NewPipe Extractor is a library for extracting things from streaming sites. It is a core component of [NewPipe](https://github.com/TeamNewPipe/NewPipe), but could be used independently. ## Usage NewPipe Extractor is available at JitPack's Maven repo. If you're using Gradle, you could add NewPipe Extractor as a dependency with the following steps: 1. Add `maven { url 'https://jitpack.io' }` to the `repositories` in your `build.gradle`. 2. Add `implementation 'com.github.TeamNewPipe:NewPipeExtractor:INSERT_VERSION_HERE'` to the `dependencies` in your `build.gradle`. Replace `INSERT_VERSION_HERE` with the [latest release](https://github.com/TeamNewPipe/NewPipeExtractor/releases/latest). 3. If you are using tools to minimize your project, make sure to keep the files below, by e.g. adding the following lines to your proguard file: ``` ## Rules for NewPipeExtractor -keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; } -keep class org.mozilla.javascript.** { *; } -keep class org.mozilla.classfile.ClassFileWriter -dontwarn org.mozilla.javascript.tools.** ``` **Note:** To use NewPipe Extractor in Android projects with a `minSdk` below 26, [API desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) is required. If the `minSdk` is below 19, the `desugar_jdk_libs_nio` artifact is required, which requires Android Gradle Plugin (AGP) version 7.4.0. ### Testing changes To test changes quickly you can build the library locally. A good approach would be to add something like the following to your `settings.gradle`: ```groovy includeBuild('../NewPipeExtractor') { dependencySubstitution { substitute module('com.github.TeamNewPipe:NewPipeExtractor') with project(':extractor') } } ``` Another approach would be to use the local Maven repository, here's a gist of how to use it: 1. Add `mavenLocal()` in your project `repositories` list (usually as the first entry to give priority above the others). 2. It's _recommended_ that you change the `version` of this library (e.g. `LOCAL_SNAPSHOT`). 3. Run gradle's `ìnstall` task to deploy this library to your local repository (using the wrapper, present in the root of this project: `./gradlew install`) 4. Change the dependency version used in your project to match the one you chose in step 2 (`implementation 'com.github.TeamNewPipe:NewPipeExtractor:LOCAL_SNAPSHOT'`) > Tip for Android Studio users: After you make changes and run the `install` task, use the menu option `File → "Sync with File System"` to refresh the library in your project. ## Supported sites The following sites are currently supported: - YouTube - SoundCloud - media.ccc.de - PeerTube (no P2P) - Bandcamp ## License [![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) NewPipe Extractor is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the [GNU General Public License](https://www.gnu.org/licenses/gpl.html) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
0
tonikelope/megabasterd
Yet another unofficial (and ugly) cross-platform MEGA downloader/uploader/streaming suite.
null
<h1>MegaBasterd</h1> [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) <p align="center"><i>"If it compiles, it's good; if it boots up, it's perfect." (Linus Torvalds)</i></p> <p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/mbasterd_logo_git.png"></a></p> <h2 align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><b>Download latest build</b></a></h2> <h3 align="center"><i>Note: MegaBasterd jar version requires <a href="https://adoptium.net/es/temurin/releases/?version=11" target="_blank">Java 11 or later</a> (at the moment it works in Java 8 but it is not guaranteed).</i></h3> <p align="center"><a href="https://github.com/tonikelope/megabasterd/releases/latest" target="_blank"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/linux-mac-windows.png"></a></p> <p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/397"><b>Would you like to help by translating MegaBasterd into your favorite language?</b></a></p> ![Screnshot](/src/main/resources/images/mbasterd_screen.png) <p align="center"><a href="https://youtu.be/5TkBXT7osQI"><b>MegaBasterd DEMO</b></a></p> <p align="center"><img src="https://raw.githubusercontent.com/tonikelope/megabasterd/master/src/main/resources/images/ethereum_toni.png"></p> <p align="center"><a href="https://github.com/tonikelope/megabasterd/issues/385#issuecomment-1019215670">BONUS: Why the f*ck has MegaBasterd stopped downloading?</a></p>
0
minio/minio-java
MinIO Client SDK for Java
aws-s3 client-sdk libraries minio-java s3-bucket sdk
# MinIO Java SDK for Amazon S3 Compatible Cloud Storage [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) MinIO Java SDK is Simple Storage Service (aka S3) client to perform bucket and object operations to any Amazon S3 compatible object storage service. For a complete list of APIs and examples, please take a look at the [Java Client API Reference](https://min.io/docs/minio/linux/developers/java/API.html) documentation. ## Minimum Requirements Java 1.8 or above. ## Maven usage ```xml <dependency> <groupId>io.minio</groupId> <artifactId>minio</artifactId> <version>8.5.9</version> </dependency> ``` ## Gradle usage ``` dependencies { implementation("io.minio:minio:8.5.9") } ``` ## JAR download The latest JAR can be downloaded from [here](https://repo1.maven.org/maven2/io/minio/minio/8.5.9/) ## Quick Start Example - File Uploader This example program connects to an object storage server, makes a bucket on the server and then uploads a file to the bucket. You need three items in order to connect to an object storage server. | Parameters | Description | |------------|------------------------------------------------------------| | Endpoint | URL to S3 service. | | Access Key | Access key (aka user ID) of an account in the S3 service. | | Secret Key | Secret key (aka password) of an account in the S3 service. | This example uses MinIO server playground [https://play.min.io](https://play.min.io). Feel free to use this service for test and development. ### FileUploader.java ```java import io.minio.BucketExistsArgs; import io.minio.MakeBucketArgs; import io.minio.MinioClient; import io.minio.UploadObjectArgs; import io.minio.errors.MinioException; import java.io.IOException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; public class FileUploader { public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException { try { // Create a minioClient with the MinIO server playground, its access key and secret key. MinioClient minioClient = MinioClient.builder() .endpoint("https://play.min.io") .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") .build(); // Make 'asiatrip' bucket if not exist. boolean found = minioClient.bucketExists(BucketExistsArgs.builder().bucket("asiatrip").build()); if (!found) { // Make a new bucket called 'asiatrip'. minioClient.makeBucket(MakeBucketArgs.builder().bucket("asiatrip").build()); } else { System.out.println("Bucket 'asiatrip' already exists."); } // Upload '/home/user/Photos/asiaphotos.zip' as object name 'asiaphotos-2015.zip' to bucket // 'asiatrip'. minioClient.uploadObject( UploadObjectArgs.builder() .bucket("asiatrip") .object("asiaphotos-2015.zip") .filename("/home/user/Photos/asiaphotos.zip") .build()); System.out.println( "'/home/user/Photos/asiaphotos.zip' is successfully uploaded as " + "object 'asiaphotos-2015.zip' to bucket 'asiatrip'."); } catch (MinioException e) { System.out.println("Error occurred: " + e); System.out.println("HTTP trace: " + e.httpTrace()); } } } ``` #### Compile FileUploader ```sh $ javac -cp minio-8.5.9-all.jar FileUploader.java ``` #### Run FileUploader ```sh $ java -cp minio-8.5.9-all.jar:. FileUploader '/home/user/Photos/asiaphotos.zip' is successfully uploaded as object 'asiaphotos-2015.zip' to bucket 'asiatrip'. $ mc ls play/asiatrip/ [2016-06-02 18:10:29 PDT] 82KiB asiaphotos-2015.zip ``` ## More References * [Java Client API Reference](https://min.io/docs/minio/linux/developers/java/API.html) * [Javadoc](https://minio-java.min.io/) * [Examples](https://github.com/minio/minio-java/tree/release/examples) ## Explore Further * [Complete Documentation](https://min.io/docs/minio/kubernetes/upstream/index.html) * [Build your own Photo API Service - Full Application Example ](https://github.com/minio/minio-java-rest-example) ## Contribute Please refer [Contributors Guide](https://github.com/minio/minio-java/blob/release/CONTRIBUTING.md)
0
mybatis/generator
A code generator for MyBatis.
code-generator java-8 kotlin mybatis mybatis-generator sql-generation
MyBatis Generator (MBG) ======================= [![Build Status](https://github.com/mybatis/generator/workflows/Java%20CI/badge.svg?branch=master)](https://github.com/mybatis/generator/actions?query=workflow%3A%22Java+CI%22) [![Coverage Status](https://coveralls.io/repos/mybatis/generator/badge.svg?branch=master&service=github)](https://coveralls.io/github/mybatis/generator?branch=master) [![Maven central](https://maven-badges.herokuapp.com/maven-central/org.mybatis.generator/mybatis-generator/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.mybatis.generator/mybatis-generator) [![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/org.mybatis.generator/mybatis-generator.svg)](https://oss.sonatype.org/content/repositories/snapshots/org/mybatis/generator/mybatis-generator/) [![License](https://img.shields.io/:license-apache-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mybatis_generator&metric=alert_status)](https://sonarcloud.io/dashboard?id=mybatis_generator) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=mybatis_generator&metric=security_rating)](https://sonarcloud.io/dashboard?id=mybatis_generator) ![mybatis-generator](https://mybatis.org/images/mybatis-logo.png) This is a code generator for MyBatis. This library will generate code for use with MyBatis. It will introspect a database table (or many tables) and will generate artifacts that can be used to access the table(s). This lessens the initial nuisance of setting up objects and configuration files to interact with database tables. MBG seeks to make a major impact on the large percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete). MBG can generate code in multiple styles (or "runtimes"). MBG can generate code for Java based projects, or for Kotlin based projects. ## Eclipse Update Site (Direct) ## https://jeffgbutler.github.io/mybatis-generator-update-site/ ## Eclipse Update Site (Marketplace) ## https://marketplace.eclipse.org/content/mybatis-generator
0
eclipse/milo
Eclipse Milo™ - an open source implementation of OPC UA (IEC 62541).
client iec-62541 iec62541 industrial-automation iot java milo opc-ua opcua sdk server stack
# Eclipse Milo [![Jenkins](https://img.shields.io/jenkins/build/https/ci.eclipse.org/milo/job/Milo_Deploy.svg)](https://ci.eclipse.org/milo/) [![Maven Central](https://img.shields.io/maven-central/v/org.eclipse.milo/milo.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.eclipse.milo%22%20AND%20a%3A%22milo%22) Milo is an open-source implementation of OPC UA (currently targeting 1.03). It includes a high-performance stack (channels, serialization, data structures, security) as well as client and server SDKs built on top of the stack. Stack Overflow tag: [milo](http://stackoverflow.com/questions/tagged/milo) Mailing list: https://dev.eclipse.org/mailman/listinfo/milo-dev ## Maven ### Building Milo **Using JDK 8**, run `mvn clean install` from the project root. To maintain compatibility with Java 8 it is recommended that you build using JDK 8, however the library is runtime compatible with versions 8 and later (e.g. JDK 11, JDK 17). ### Releases Releases are published to Maven Central and snapshots to Sonatype. #### OPC UA Client SDK ```xml <dependency> <groupId>org.eclipse.milo</groupId> <artifactId>sdk-client</artifactId> <version>0.6.12</version> </dependency> ``` #### OPC UA Server SDK ```xml <dependency> <groupId>org.eclipse.milo</groupId> <artifactId>sdk-server</artifactId> <version>0.6.12</version> </dependency> ``` Referencing a `SNAPSHOT` release requires the Sonatype snapshot repository be added to your pom file: ```xml <repository> <id>oss-sonatype</id> <name>oss-sonatype</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> </repository> ``` ## Public Demo Server An internet-facing demo server is accessible at `opc.tcp://milo.digitalpetri.com:62541/milo`. It accepts both unsecured and secured connections. Before connecting with security you must upload your client's DER-encoded X509 certificate using the form at http://milo.digitalpetri.com. Authenticate anonymously or with one of the following credential pairs: - `user1` / `password` - `user2` / `password` - `admin` / `password` The code powering the demo server is available here: https://github.com/digitalpetri/opc-ua-demo-server
0
Xunzhuo/Algorithm-Guide
Xunzhuo`s Tutorials of Algorithm and Data Structure 🚀🚀🚀
acm algorithms c datastructure datastructures-algorithms icpc interview job
<div align ="center"> <h1> Algorithm Guide </h1> </div> 本仓库带你系统掌握程序员必知必会的**算法**和**数据结构** 本仓库主要有**两个分支**: + **master分支**:最近的新分支,也是以后日常维护的主分支,内容为算法和数据结构的教程。 + **Collections 分支**:以前的主分支,整理了算法和数据结构的资料,现作为辅助分支:[这里访问](https://github.com/Xunzhuo/Algorithms-in-4-Steps/tree/Collections) > **算法部分**基本完成,**数据结构**还有很多未完成部分,空闲时会加快完善 ## 目录: 1. [算法篇](#算法篇) 2. [数据结构篇](#数据结构篇) 3. [刷题练习篇](#刷题练习篇) ## 算法篇 + [一、复杂度分析](algorithm/analysis.md) + [二、高精度算法](algorithm/big-num.md) + [三、排序算法](algorithm/sort.md) + [四、递推算法](algorithm/recursion.md) + [五 、递归算法](algorithm/recursion-2.md) + [六、分治算法](algorithm/bi-divide.md) + [七、贪心算法](algorithm/greedy.md) + [八、广度优先搜索算法](algorithm/bfs.md) + [九、深度优先搜索算法](algorithm/dfs.md) + [十、回溯算法](algorithm/backtrace.md) + [十一、动态规划](algorithm/dynamic%20programming.md) + [十二、字符串算法](algorithm/string.md) ## 数据结构篇 + [一、栈](data-structure/stack.md) + [二、队列](data-structure/queue.md) + [三、树](data-structure/tree.md) + [四、堆](data-structure/heap.md) + [五、图论算法 ](data-structure/graph.md) + [六、并查集](data-structure/DisjointSets.md) + [七、最小生成树](data-structure/kruskal.md) + [八、拓扑排序与关键路径](data-structure/key-path.md) + [九、线段树](data-structure/line-tree.md) + [十、树状数组](data-structure/tree-array.md) ## 刷题练习篇 在掌握了重要的算法和数据结构之后,需要练习巩固 #### **网站的选择?** 推荐 **LeetCode**,[这里访问](https://leetcode-cn.com/) #### **刷哪些题目?** 1. 如果你**时间紧张**:可以练习**LeetCode**的**热门推荐**: ![image-20201220164553273](https://picreso.oss-cn-beijing.aliyuncs.com/image-20201220164553273.png) 比如:[Leetcode 热题 Hot 100](https://leetcode-cn.com/problemset/leetcode-hot-100/) 和 [LeetCode 精选 TOP 面试题](https://leetcode-cn.com/problemset/leetcode-top/) 2. 如果你**时间充裕**:可以按以下分类,系统练习: + **专题一:数组(`Chapter1_Array`)** + **专题二:链表(`Chapter2_list`)** + **专题三:字符串(`Chapter3_String`)** + **专题四:栈(`Chapter4_Stack`)** + **专题五:树(`Chapter5_Tree`)** + **专题六:排序(`Chapter6_Sort`)** + **专题七:查找(`Chapter7_Search`)** + **专题八:暴力解法(`Chapter8_Violence`)** + **专题九:BFS(`Chapter9_BFS`)** + **专题十:DFS(`Chapter10_DFS`)** + **专题十一:分治(`Chapter11_Paritition`)** + **专题十二:贪心(`Chapter12_Greedy`)** + **专题十三:动态规划(`Chapter13_DP`)** + **专题十四:图(`Chapter14_Graph`)** + **专题十五:不定类型(`Chapter15_Unspecific`)** #### 练习策略 + **第一遍**:**先思考**,如果没思路,可以看题解,结合其他人的题解刷。总结自己是否在思路上有问题,或者是否算法与数据结构基础上有问题,掌握本题的类型,思考方式,最优题解。 + **第二遍**:**回忆最优解法**,**尝试直接写**,并与之前自己写过的解答作比对,总结问题和方法。 + **第三遍**:提升**刷题速度**和**一题多解**,拿出一个题,就能够知道其考察重点,解题方法,在短时间内写出解答,并且思考多种解决办法。
0
ZHENFENG13/My-Blog
:palm_tree::octocat:A simple & beautiful blogging system implemented with spring-boot & thymeleaf & mybatis My Blog 是由 SpringBoot + Mybatis + Thymeleaf 等技术实现的 Java 博客系统,页面美观、功能齐全、部署简单及完善的代码,一定会给使用者无与伦比的体验
adminlte adminlte3 blog docker-compose java java-8 javablog jqgrid maven mybatis spring-boot spring-boot-3 spring-boot2 springboot springboot-learning springboot-mybatis springboot-sample springboot2 springboot3 thymeleaf
# My Blog ![personal-blog](static-files/personal-blog.png) **坚持不易,各位朋友如果觉得项目还不错的话可以给项目一个 star 吧,也是对我一直更新代码的一种鼓励啦,谢谢各位的支持。** ![my-blog-info](static-files/my-blog-info.png) 当前分支的 Spring Boot 版本为 2.7.5,想要学习和使用其它版本可以直接点击下方的分支名称跳转至对应的仓库分支中。 | 分支名称 | Spring Boot Version | | ------------------------------------------------------------ | ------------------- | | [spring-boot-2.3.7](https://github.com/ZHENFENG13/My-Blog/tree/spring-boot-2.3.7) | 2.3.7-RELEASE | | [main](https://github.com/ZHENFENG13/My-Blog) | 2.7.5 | | [spring-boot-3.x](https://github.com/ZHENFENG13/My-Blog/tree/spring-boot-3.x) | 3.1.0 | - **你可以拿它作为博客模板,因为 My Blog 界面十分美观简洁,满足私人博客的一切要求;** - **你也可以把它作为 SpringBoot 技术栈的学习项目,My Blog也足够符合要求,且代码和功能完备;** - **内置三套博客主题模板,主题风格各有千秋,满足大家的选择空间,后续会继续增加,以供大家打造自己的博客;** - **技术栈新颖且知识点丰富,学习后可以提升大家对于知识的理解和掌握,对于提升你的市场竞争力有一定的帮助。** > 更多 Spring Boot 实战项目可以关注十三的另一个代码仓库 [spring-boot-projects](https://github.com/ZHENFENG13/spring-boot-projects),该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前后端分离实践项目等,后续会根据大家的反馈继续增加一些实战项目源码,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。 关注公众号:**程序员十三**,回复"勾搭"进群交流。 ![wx-gzh](https://newbee-mall.oss-cn-beijing.aliyuncs.com/wx-gzh/%E7%A8%8B%E5%BA%8F%E5%91%98%E5%8D%81%E4%B8%89-%E5%85%AC%E4%BC%97%E5%8F%B7.png) ## 注意事项 - **数据库文件目录为```static-files/my_blog_db.sql```;** - **部署后你可以根据自己需求修改版权文案、logo 图片、备案记录等网站基础信息;** - **My Blog 后台管理系统的默认登陆账号为 admin 默认登陆密码为 123456;** - **layui 版本的 My-Blog,仓库地址 [My-Blog-layui](https://github.com/ZHENFENG13/My-Blog-layui) ,感兴趣的朋友也可以学习一下;** - **My Blog 还有一些不完善的地方,鄙人才疏学浅,望见谅;** - **有任何问题都可以反馈给我,我会尽量完善该项目。** [![Build Status](https://travis-ci.org/ZHENFENG13/My-Blog.svg?branch=master)](https://travis-ci.org/ZHENFENG13/My-Blog) ![Version 4.0.0](https://img.shields.io/badge/version-4.0.0-yellow.svg) [![License](https://img.shields.io/badge/license-apache-blue.svg)](https://github.com/ZHENFENG13/My-Blog/blob/master/LICENSE) ## 项目演示 - [视频1:My-Blog博客项目简介](https://edu.csdn.net/course/play/29029/406882) - [视频2:My-Blog博客项目系统演示-1](https://edu.csdn.net/course/play/29029/405864) - [视频3:My-Blog博客项目系统演示-2](https://edu.csdn.net/course/play/29029/405865) - [视频4:博客项目预览](https://www.bilibili.com/video/av52551095) ## 开发文档 ### 《SpringBoot + Mybatis + Thymeleaf 搭建美观实用的个人博客》(支付减免优惠券码 LSJdK3KT ) [![lesson-03](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/store/lesson-03.png)](https://www.shiyanlou.com/courses/1367) - [**第01课:Spring Boot 搭建简洁实用的个人博客系统导读**](https://www.shiyanlou.com/courses/1367) - [第02课:快速构建 Spring Boot 应用](https://www.shiyanlou.com/courses/1367) - [第03课:Spring Boot 项目开发之web项目开发讲解](https://www.shiyanlou.com/courses/1367) - [第04课:Spring Boot 整合 Thymeleaf 模板引擎](https://www.shiyanlou.com/courses/1367) - [第05课:Spring Boot 处理文件上传及路径回显](https://www.shiyanlou.com/courses) - [第06课:Spring Boot 自动配置数据源及操作数据库](https://www.shiyanlou.com/courses/1367) - [第07课:Spring Boot 整合 MyBatis 操作数据库](https://www.shiyanlou.com/courses/1367) - [第08课:Mybatis-Generator 自动生成代码](https://www.shiyanlou.com/courses/1367) - [第09课:Spring Boot 中的事务处理](https://www.shiyanlou.com/courses/1367) - [第10课:Spring Boot 项目实践之 Ajax 技术使用教程](https://www.shiyanlou.com/courses/1367) - [第11课:Spring Boot 项目实践之 RESTful API 设计与实现](https://www.shiyanlou.com/courses/1367) - [第12课:Spring Boot 博客系统项目开发之分页功能实现](https://www.shiyanlou.com/courses/1367) - [第13课:Spring Boot 博客系统项目开发之验证码功能](https://www.shiyanlou.com/courses/1367) - [第14课:Spring Boot 博客系统项目开发之登录模块实现](https://www.shiyanlou.com/courses/1367) - [第15课:Spring Boot 博客系统项目开发之登陆拦截器](https://www.shiyanlou.com/courses/1367) - [第16课:Spring Boot 博客系统项目开发之分类功能实现](https://www.shiyanlou.com/courses/1367) - [第17课:Spring Boot 博客系统项目开发之标签功能实现](https://www.shiyanlou.com/courses/1367) - [第18课:Spring Boot 博客系统项目开发之文章编辑功能](https://www.shiyanlou.com/courses/1367) - [第19课:Spring Boot 博客系统项目开发之文章编辑完善](https://www.shiyanlou.com/courses/1367) - [第20课:Spring Boot 博客系统项目开发之文章模块实现](https://www.shiyanlou.com/courses/1367) - [第21课:Spring Boot 博客系统项目开发之友链模块实现](https://www.shiyanlou.com/courses/1367) - [第22课:Spring Boot 博客系统项目开发之网站首页制作](https://www.shiyanlou.com/courses/1367) - [第23课:Spring Boot 博客系统项目开发之分页及侧边栏制作](https://www.shiyanlou.com/courses/1367) - [第24课:Spring Boot 博客系统项目开发之搜索页面制作](https://www.shiyanlou.com/courses/1367) - [第25课:Spring Boot 博客系统项目开发之文章详情页制作](https://www.shiyanlou.com/courses/1367) - [第26课:Spring Boot 博客系统项目开发之错误页面制作](https://www.shiyanlou.com/courses/1367) - [第27课:Spring Boot 博客系统项目开发之评论功能实现](https://www.shiyanlou.com/courses/1367) - [第28课:Spring Boot 博客系统项目开发之项目打包部署](https://www.shiyanlou.com/courses/1367) ## 联系作者 > 大家有任何问题或者建议都可以在 [issues](https://github.com/ZHENFENG13/My-Blog/issues) 中反馈给我,我会慢慢完善这个项目。 - 我的邮箱:2449207463@qq.com - QQ技术交流群:719099151 796794009 881582471 > My-Blog 在 GitHub 和国内的码云都创建了代码仓库,如果有人访问 GitHub 比较慢的话,建议在 Gitee 上查看该项目,两个仓库会保持同步更新。 - [My-Blog in GitHub](https://github.com/ZHENFENG13/My-Blog) - [My-Blog in Gitee](https://gitee.com/zhenfeng13/My-Blog) ## 效果预览 ### 后台管理页面 - 登录页 ![login](static-files/login.png) - 后台首页 ![dashboard](static-files/dashboard.png) - 文章管理 ![blog-list](static-files/blog-list.png) - 文章编辑 ![edit](static-files/edit.png) - 评论管理 ![comment-list](static-files/comment-list.png) - 系统配置 ![config](static-files/config.png) ### 博客展示页面 开发时,在项目中**内置了三套博客主题模板,主题风格各有千秋**,效果如下: #### 模板一 - 首页 ![index01](static-files/index01.png) - 文章浏览 ![detail01](static-files/detail01.png) - 友情链接 ![link01](static-files/link01.png) #### 模板二 - 首页 ![index02](static-files/index02.png) - 文章浏览 ![detail02](static-files/detail02.png) - 友情链接 ![link02](static-files/link02.png) #### 模板三 - 首页 ![index03](static-files/index03.png) - 文章浏览 ![detail03](static-files/detail03.png) - 友情链接 ![link03](static-files/link03.png) ## 感谢 - [spring-projects](https://github.com/spring-projects/spring-boot) - [ColorlibHQ](https://github.com/ColorlibHQ/AdminLTE) - [tonytomov](https://github.com/tonytomov/jqGrid) - [pandao](https://github.com/pandao/editor.md) - [DONGChuan](https://github.com/DONGChuan/Yummy-Jekyll) - [zjhch123](https://github.com/zjhch123/solo-skin-amaze) - [t4t5](https://github.com/t4t5/sweetalert)
0
Endava/cats
CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
api fuzzer java openapi rest-api rest-fuzzer swagger testing
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Endava/cats/master/images/cats_logo_dark.svg" /> <img alt="CATS logo" src="https://raw.githubusercontent.com/Endava/cats/master/images/cats_logo_light.svg" width="400"> </picture> </p> <p align="center"> ![CI](https://img.shields.io/github/actions/workflow/status/Endava/cats/main.yml?style=for-the-badge&logo=git&logoColor=white) [![Commits](https://img.shields.io/github/commit-activity/m/Endava/cats?style=for-the-badge&logo=git&logoColor=white)](https://github.com/Endava/cats/pulse) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cats&metric=alert_status)](https://sonarcloud.io/dashboard?id=cats) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=cats&metric=sqale_index)](https://sonarcloud.io/dashboard?id=cats) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cats&metric=coverage)](https://sonarcloud.io/dashboard?id=cats) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=cats&metric=bugs)](https://sonarcloud.io/dashboard?id=cats) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=cats&metric=code_smells)](https://sonarcloud.io/dashboard?id=cats) </p> > CATS documentation is available at [https://endava.github.io/cats/](https://endava.github.io/cats/) **REST API fuzzer and negative testing tool. Run thousands of self-healing API tests within minutes with no coding effort!** - **Comprehensive**: tests are generated automatically based on a large number scenarios and cover **every** field and header - **Intelligent**: tests are generated based on data types and constraints; each Fuzzer has specific expectations depending on the scenario under test - **Highly Configurable**: high amount of customization: you can filter specific Fuzzers, HTTP response codes, HTTP methods, request paths, provide business context and a lot more - **Self-Healing**: as tests are generated, any OpenAPI spec change is picked up automatically - **Simple to Learn**: flat learning curve, with intuitive configuration and syntax - **Fast**: automatic process for write, run and report tests which covers thousands of scenarios within minutes <p align="center"></p> > Short on time? Check out the [1-minute Quick Start Guide](https://endava.github.io/cats/docs/intro)! # Overview By using a simple and minimal syntax, with a flat learning curve, CATS (**C**ontract **A**PI **T**esting and **S**ecurity) enables you to generate thousands of API tests within minutes with **no coding effort**. All tests are **generated, run and reported automatically** based on a pre-defined set of **100+ Fuzzers**. The Fuzzers cover a wide range of boundary testing and negative scenarios from fully random large Unicode values to well crafted, context dependant values based on the request data types and constraints. Even more, you can leverage the fact that CATS generates request payloads dynamically and write simple end-to-end functional tests. ## HTML Report <div align="center"> <img alt="CATS" width="100%" src="images/tests_result.png"/> </div> ## Command Line <div align="center"> <img alt="CATS" width="100%" src="images/run_result.png"/> </div> # Tutorials on how to use CATS This is a list of articles with step-by-step guides on how to use CATS: * [Testing the GitHub API with CATS](https://ludovicianul.github.io/2020/10/05/github-api-testing/) * [How to write self-healing functional tests with no coding effort](https://ludovicianul.github.io/2020/09/09/cats/) # Some bugs found by CATS - https://github.com/hashicorp/vault/issues/13274 | https://github.com/hashicorp/vault/issues/13273 - https://github.com/hashicorp/vault/issues/13225 | https://github.com/hashicorp/vault/issues/13232 - https://github.com/go-gitea/gitea/issues/19397 | https://github.com/go-gitea/gitea/issues/19398 - https://github.com/go-gitea/gitea/issues/19399 # Installation ## Homebrew ```shell > brew tap endava/tap > brew install cats ``` ## Manual CATS is bundled both as an executable JAR or a native binary. The native binaries do not need Java installed. After downloading your OS native binary, you can add it to PATH so that you can execute it as any other command line tool: ```shell sudo cp cats /usr/local/bin/cats ``` You can also get autocomplete by downloading the [cats_autocomplete](cats_autocomplete) script and do: ```shell source cats_autocomplete ``` To get persistent autocomplete, add the above line in `.zshrc` or `.bashrc`, but make sure you put the fully qualified path for the `cats_autocomplete` script. You can also check the `cats_autocomplete` source for alternative setup. There is no native binary for Windows, but you can use the uberjar version. This requires Java 17+ to be installed. You can run it as `java -jar cats.jar`. Head to the releases page to download the latest version: [https://github.com/Endava/cats/releases](https://github.com/Endava/cats/releases). ## Build from sources You can build CATS from sources on you local box. You need [Java 17+](https://sdkman.io/jdks). Maven is already bundled. > Before running the first build, please make sure you do a `./mvnw clean`. CATS uses a fork of [OKHttp](https://square.github.io/okhttp/) which will install locally under the `4.11.0-CATS` version, so don't worry about overriding the official versions. You can use the following Maven command to build the project as an uberjar: `./mvnw package -Dquarkus.package.type=uber-jar` You will end up with a `cats-runner.jar` in the `target` folder. You can run it wih `java -jar cats-runner.jar ...`. You can also build native images using a [GraalVM Java version](https://www.graalvm.org/). `./mvnw package -Pnative` ### Notes on Unit Tests You may see some `error` log messages while running the Unit Tests. Those are expected behaviour for testing the negative scenarios of the Fuzzers. ## Experimental: Maven dependency for programmatic use CATS doesn't have explicit support (yet) for programmatic use via JUnit or TestNG. You can however experiment with running the `CatsMain` class with the same arguments as you would run in the command line. You must add these 2 dependencies: ```xml <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.11.0</version> </dependency> <dependency> <groupId>com.endava</groupId> <artifactId>cats</artifactId> <version>9.0.3</version> </dependency> ``` > Please not that you also need to explicitly add the `okhttp` dependency. > CATS uses a fork of okhttp that is not published in Maven central. > When using CATS as a dependency, HTTP header fuzzers that prefix/suffix header values with spaces won't properly work. # Contributing Please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
0
google/auto
A collection of source code generators for Java.
null
# Auto [![Build Status](https://github.com/google/auto/actions/workflows/ci.yml/badge.svg)](https://github.com/google/auto/actions/workflows/ci.yml) A collection of source code generators for [Java][java]. ## Overview [Java][java] is full of code that is mechanical, repetitive, typically untested and sometimes the source of subtle bugs. _Sounds like a job for robots!_ The Auto subprojects are a collection of code generators that automate those types of tasks. They create the code you would have written, but without the bugs. Save time. Save code. Save sanity. ## Subprojects * [AutoFactory] - JSR-330-compatible factories [![Maven Central](https://img.shields.io/maven-central/v/com.google.auto.factory/auto-factory.svg)](https://mvnrepository.com/artifact/com.google.auto.factory/auto-factory) * [AutoService] - Provider-configuration files for [`ServiceLoader`] [![Maven Central](https://img.shields.io/maven-central/v/com.google.auto.service/auto-service.svg)](https://mvnrepository.com/artifact/com.google.auto.service/auto-service) * [AutoValue] - Immutable [value-type] code generation for Java 7+. [![Maven Central](https://img.shields.io/maven-central/v/com.google.auto.value/auto-value.svg)](https://mvnrepository.com/artifact/com.google.auto.value/auto-value) * [Common] - Helper utilities for writing annotation processors. [![Maven Central](https://img.shields.io/maven-central/v/com.google.auto/auto-common.svg)](https://mvnrepository.com/artifact/com.google.auto/auto-common) ## License Copyright 2013 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. [AutoFactory]: https://github.com/google/auto/tree/main/factory [AutoService]: https://github.com/google/auto/tree/main/service [AutoValue]: https://github.com/google/auto/tree/main/value [Common]: https://github.com/google/auto/tree/main/common [java]: https://en.wikipedia.org/wiki/Java_(programming_language) [value-type]: http://en.wikipedia.org/wiki/Value_object [`ServiceLoader`]: http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html
0
Netflix/mantis
A platform that makes it easy for developers to build realtime, cost-effective, operations-focused applications
null
<img alt="Mantis logo" src="./.assets/mantis.png" width="200" align="right"> # Mantis Documentation [![Build Status](https://img.shields.io/travis/com/Netflix/mantis.svg)](https://travis-ci.com/Netflix/mantis) [![OSS Lifecycle](https://img.shields.io/osslifecycle/Netflix/mantis.svg)](https://github.com/Netflix/mantis) [![License](https://img.shields.io/github/license/Netflix/mantis.svg)](https://www.apache.org/licenses/LICENSE-2.0) [Official Website](https://netflix.github.io/mantis/) --- ## Development ### Setting up Intellij Run `./gradlew idea` to (re-) generate IntelliJ project and module files from the templates in `.baseline`. The generated project is pre-configured with Baseline code style settings and support for the CheckStyle-IDEA plugin. ### Install Docker Install and run Docker to support local containers. ### Building ```sh $ ./gradlew clean build ``` ### Testing ```sh $ ./gradlew clean test ``` ### Formatting the code Run `./gradlew format` task which autoformats all Java files using [Spotless](https://github.com/diffplug/spotless). ### Building deployment into local Maven cache ```sh $ ./gradlew clean publishNebulaPublicationToMavenLocal ``` ### Releasing We release by tagging which kicks off a CI build. The CI build will run tests, integration tests, static analysis, checkstyle, build, and then publish to the public Bintray repo to be synced into Maven Central. Tag format: ``` vMajor.Minor.Patch ``` You can tag via git or through Github's Release UI. ## Contributing Mantis is interested in building the community. We welcome any forms of contributions through discussions on any of our [mailing lists](https://netflix.github.io/mantis/community/#mailing-lists) or through patches. For more information on contribution, check out the contributions file [here](https://github.com/Netflix/mantis/blob/master/CONTRIBUTING.md). ### Module Structure This excludes all connectors and examples as they are mostly leaf nodes in the dependency graph. Module | Purpose | Example Classes | Package Prefixes ----------------------------|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------- mantis-common-serde | Support for serializing and deserializing POJOs using Json | <li>JsonSerializer</li> | <li>io.mantisrx.common.*</li> mantis-discovery-proto | todo: need to fill this in | <li>JobDiscoveryProto</li><li>AppJobClustersMap</li><li>StageWorkers</li> | <li>com.netflix.mantis.discovery.proto.*</li> mantis-common | Mantis common code shared across modules | <li>MantisJobDefinition</li><li>MachineDefinition</li><li>MantisJobState | <li>io.mantisrx.common.\*</li><li> io.mantisrx.runtime.\*<li>io.mantisrx.server.code.\*</li><li>io.reactivx.mantis.operators.\*</li><li>com.mantisrx.common.utils.\* mantis-remote-observable | connection to other job,stage related code | <li>ConnectToObservable</li><li>ConnectToGroupedObservable</li><li>RemoteObservable | <li>io.reactivex.mantis.remote.observable.\*</li><li>io.reactivex.netty.codec.\*<li> mantis-control-plane-core | common code between mantis-control-plane-server, mantis-control-plane-client, mantis-server-worker, mantis-server-agent | <li>TaskExecutorID</li><li>ClusterID</li><li>ExecuteStageRequest</li><li>JobAssignmentResult</li><li>Status | <li>io.mantisrx.server.core.\*</li><li>io.mantisrx.server.master.resourcecluster.\*</li><li>io.mantisrx.server.worker.\* mantis-control-plane-client | API to talk to the mantis control plane server | <li>MasterClientWrapper</li><li>MantisMasterGateway</li><li>MantisMasterClientApi | <li>io.mantisrx.server.master.client.\*<li> io.mantisrx.server.master.resourcecluster.\* mantis-network | todo: need to fill this in | | mantis-publish-core | todo: need to fill this in | | mantis-server-worker-client | API to interact with workers | <li>MetricsClient</li><li> MetricsClientImpl</li><li>WorkerConnection</li><li>WorkerMetricsClient | <li>io.mantisrx.server.worker.client.\* mantis-runtime | Runtime that the jobs need to depend upon. Job DSL should go in here along with how to talk to other jobs | <li>KeyToKey</li><li>GroupToGroup</li><li>Source</li><li>Sink | <li>io.mantisrx.runtime.\* mantis-publish-netty | todo: need to fill this in | | mantis-client | client to interact with mantis control plane | <li>MantisClient::submitJob</li><li> MantisClient::killJob | <li>io.mantisrx.client.*</li> mantis-publish-netty-guice | todo: need to fill this in | | mantis-control-plane-server | Actual server that runs the mantis master code | <li>MasterMain</li><li>SchedulingService</li><li>ServiceLifecycle | <li>io.mantisrx.master.\*<li>io.mantisrx.server.master.\* mantis-server-agent | Contains mantis-runtime agnostic code to start the task executor that runs on the agent | <li>TaskExecutor</li><li>TaskExecutorStarter</li><li>BlobStore</li><li>BlobStoreAwareClassLoaderHandle | <li>io.mantisrx.server.agent.\* mantis-server-worker | One implementation of Mantis Worker that depends on the master runtime | <li>MantisWorker</li><li>Task</li><li>ExecuteStageRequestService<li>JobAutoScaler | <li>io.mantisrx.server.worker.config.\*<li>io.mantisrx.server.worker.jobmaster.\* ### Dependency Graph ```mermaid graph TD; A[mantis-common-serde]-->B[mantis-common]; B-->C[mantis-control-plane-core]; B-->D[mantis-runtime]; C-->E[mantis-control-plane-client]; E-->F[mantis-server-worker-client]; F-->G[mantis-client]; E-->G; C-->H[mantis-control-plane-server]; C-->I[mantis-server-worker]; F-->I; D-->I; F-->J[mantis-server-agent]; E-->J; ```
0
lihangleo2/ShadowLayout
可定制化阴影的万能阴影布局ShadowLayout 3.0 震撼上线。效果赶超CardView。阴影支持x,y轴偏移,支持阴影扩散程度,支持阴影圆角,支持单边或多边不显示阴影;控件支持动态设置shape和selector(项目里再也不用画shape了);支持随意更改颜色值,支持随意更改颜色值,支持随意更改颜色值。重要的事情说三遍
null
# 万能阴影布局-ShadowLayout [![](https://jitpack.io/v/lihangleo2/ShadowLayout.svg)](https://jitpack.io/#lihangleo2/ShadowLayout) [![](https://img.shields.io/badge/license-MIT-green)](https://github.com/lihangleo2/ShadowLayout/blob/master/LICENSE) ## 特点功能 任何view被包裹后即可享受阴影,以及系统shape,selector功能(清空项目drawable文件夹)。具体介绍如下: ``` 支持定制化阴影: 1. 随意修改阴影颜色值 2. 阴影圆角:可统一设置圆角,也可对某几个角单独设置 3. 阴影x,y偏移量 4. 随意修改阴影扩散程度,即阴影大小 5. 隐藏阴影:隐藏某边或多边阴影,或完全隐藏 6. 可随意代码动态修改阴影 不止于阴影;系统shape功能:项目中shape、selector、ripple统统拥有。解放你的双手,清空项目drawable文件夹 1. shape样式:pressed(按钮点击)、selected(按钮选择)、ripple(点击水波纹) 2. 背景色设置 3. stroke边框设置 4. 渐变色背景色设置 5. 按钮是否可被点击及不可点击背景 6. 可绑定textView后,可伴随文案变化,可伴随文案颜色变化 7. 支持设置图片背景,支持图片selector 8. 可以剪裁子view,比如用到播放器之类的地方,想要各种不同的圆角时,ShadowLayout可以轻松解决 ``` ## ShadowLayout动态 * [ShadowLayout成长史](https://github.com/lihangleo2/ShadowLayout/wiki) * 注意:3.0后修改大量api及规范命名,如果还在用2.0,不方便转移的可查看[ShadowLayout2.0文档](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/README218.md) * 注意:3.4.0后适配了AndroidX ## Demo 为录制流畅,截图分辨率比较模糊。可在下方扫描二维码下载apk,查看真机效果。 ![](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/ShadowLayout_.png) <br/> ## 效果展示 为录制流畅,截图分辨率模糊。可下载apk查看真机效果 * ### 1.0功能展示 |基础功能展示|各属性展示|随意更改颜色| |:---:|:---:|:---:| |<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/main.jpg" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/first_show.gif" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/other_show.gif" alt="Sample" width="100%"> <br/> * ### 2.0功能更新 |2.1.6新增shape,selector功能|2.1.7isSym属性对比|2.1.8单独更改某圆角大小| |:---:|:---:|:---:| |<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/shape_gif.gif" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/isSym_half.jpg" alt="Sample" width="481">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/corners.gif" alt="Sample" width="100%"> <br/> * ### 3.0.1版本来袭 |stroke边框及点击|shape及图片selector|组合使用| |:---:|:---:|:---:| |<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/stroke2.gif" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/shapeSelector2.gif" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/groupUse2.gif" alt="Sample" width="100%"> <br/> * ### 3.1.0新增ripple及渐变色及3.1.1绑定textView |3.1.0渐变色及ripple|3.1.1绑定textView| |:---:|:---:| |<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/ripple.gif" alt="Sample">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/bindTextView.gif" alt="Sample"> <br/> * ### 3.3.1功能更新 |增加虚线边框|单边虚线|边框和ripple共存| |:---:|:---:|:---:| |<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/show_3.3.1_1.jpg" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/show_3.3.1_2.jpg" alt="Sample" width="100%">|<img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/show_3.3.1_3.jpg" alt="Sample" width="100%"> <br/> ## 添加依赖 - 项目build.gradle添加如下 ```java allprojects { repositories { maven { url 'https://jitpack.io' } } } ``` - app build.gradle添加如下 ```java dependencies { //使用AndroidX版本 implementation 'com.github.lihangleo2:ShadowLayout:3.4.0' //不使用AndroidX //implementation 'com.github.lihangleo2:ShadowLayout:3.3.3' } ``` <br/> ## 热门问题 - [glide版本冲突终极解决方案](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/GLIDE.md) - [3.2.4依赖问题解决](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/problem.md) <br/> ## 基本使用 * #### 一、阴影的简单使用 ```xml <com.lihang.ShadowLayout android:id="@+id/mShadowLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" app:hl_cornerRadius="10dp" app:hl_shadowColor="#2a000000" app:hl_shadowLimit="5dp" > <TextView android:id="@+id/txt_test" android:layout_width="wrap_content" android:layout_height="36dp" android:gravity="center" android:paddingLeft="10dp" android:paddingRight="10dp" android:text="圆角" android:textColor="#000" /> </com.lihang.ShadowLayout> ``` <br/> * #### 二、stroke边框的简单使用 ```xml <com.lihang.ShadowLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" app:hl_cornerRadius="10dp" app:hl_strokeColor="#000"> <TextView android:layout_width="wrap_content" android:layout_height="36dp" android:gravity="center" android:paddingLeft="10dp" android:paddingRight="10dp" android:text="圆角边框" android:textColor="#000" /> </com.lihang.ShadowLayout> ``` <br/> * #### 三、shape selector的简单使用 ```xml <com.lihang.ShadowLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="10dp" app:hl_cornerRadius="30dp" app:hl_cornerRadius_leftTop="0dp" app:hl_layoutBackground="#F76C6C" app:hl_layoutBackground_true="#89F76C6C" app:hl_shapeMode="pressed"> <TextView android:layout_width="wrap_content" android:layout_height="36dp" android:gravity="center" android:paddingLeft="10dp" android:paddingRight="10dp" android:text="selector的pressed用法,请点击" android:textColor="#fff" /> </com.lihang.ShadowLayout> ``` <br/> * #### 四、图片 selector的简单使用 ```xml <com.lihang.ShadowLayout android:id="@+id/ShadowLayout_shape" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="10dp" app:hl_cornerRadius="18dp" app:hl_cornerRadius_rightTop="0dp" app:hl_layoutBackground="@mipmap/test_background_false" app:hl_layoutBackground_true="@mipmap/test_background_true"> <TextView android:layout_width="wrap_content" android:layout_height="36dp" android:gravity="center" android:paddingLeft="10dp" android:paddingRight="10dp" android:text="图片selector" android:textColor="#fff" /> </com.lihang.ShadowLayout> ``` 如果你觉得麻烦,你还可以这样 ```xml <com.lihang.ShadowLayout android:id="@+id/ShadowLayout_image" android:layout_width="50dp" android:layout_height="50dp" android:layout_gravity="center_horizontal" android:layout_marginTop="10dp" app:hl_layoutBackground="@mipmap/game_6_right" app:hl_layoutBackground_true="@mipmap/game_6_wrong" app:hl_shapeMode="pressed" /> ``` <br/> * #### 五、渐变色的简单使用 ```xml <com.lihang.ShadowLayout android:layout_width="wrap_content" android:layout_height="wrap_content" app:hl_cornerRadius="18dp" app:hl_startColor="#ff0000" app:hl_endColor="#0000ff" > <TextView android:layout_width="160dp" android:layout_height="40dp" android:gravity="center" android:text="渐变色" android:textColor="#fff" /> </com.lihang.ShadowLayout> ``` <br/> * #### 六、水波纹ripple的使用 ```xml <com.lihang.ShadowLayout android:layout_width="wrap_content" android:layout_height="wrap_content" app:hl_cornerRadius="18dp" app:hl_shadowColor="#2a000000" app:hl_shadowLimit="7dp" app:hl_layoutBackground="#fff" app:hl_layoutBackground_true="#ff0000" app:hl_shapeMode="ripple" > <TextView android:layout_width="160dp" android:layout_height="40dp" android:gravity="center" android:text="水波纹" /> </com.lihang.ShadowLayout> ``` <br/> * #### 七、绑定textView,伴随文案及颜色变化 ```xml <com.lihang.ShadowLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="20dp" app:hl_bindTextView="@+id/txt_press" app:hl_cornerRadius="18dp" app:hl_layoutBackground="#FF9800" app:hl_layoutBackground_true="#ff0000" app:hl_shapeMode="pressed" app:hl_textColor_true="#fff" app:hl_text="点我,press样式" app:hl_text_true="我改变了文案了" > <TextView android:id="@+id/txt_press" android:layout_width="wrap_content" android:layout_height="36dp" android:gravity="center" android:paddingLeft="10dp" android:paddingRight="10dp" android:text="点我,press样式" android:textColor="#000" /> </com.lihang.ShadowLayout> ``` <br/> * #### 八、单条虚线、hl_shapeMode:dashLine的使用(以长边为宽度,短边为虚线width。由此可知,如下例子:为横向虚线) ```xml <com.lihang.ShadowLayout android:id="@+id/ShadowLayout_line" android:layout_width="match_parent" android:layout_height="1dp" app:hl_strokeColor="#ff0000" app:hl_shapeMode="dashLine" app:hl_stroke_dashWidth="5dp" app:hl_stroke_dashGap="5dp" /> ``` <br/> * #### 九、剪裁各种难以搞定的圆角(如特殊视频圆角剪裁,注意任何view被ShadowLayout包裹都能剪裁) ``` 如下代码,剪裁视频播放器(注明2点) - app:hl_layoutBackground="@color/transparent" 取消shadowLayout默认背景白色改透明 - app:clickable="false" 取消shadowLayout的点击焦点(用于解决recyclerView里的点击冲突) ``` ```xml <com.lihang.ShadowLayout android:id="@+id/shadowlayout_Container" android:layout_width="match_parent" android:layout_height="@dimen/dp_259" app:hl_cornerRadius_leftTop="@dimen/dp_12" app:hl_cornerRadius_rightTop="@dimen/dp_12" app:hl_layoutBackground="@color/transparent" app:clickable="false" > <com.iccapp.module.common.widget.video.VideoView android:id="@+id/video_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </com.lihang.ShadowLayout> ``` <br/> ## 属性表格(Attributes) ### 一、关于阴影 |name|format|description| |:---:|:---:|:---:| |hl_shadowHidden|boolean|是否隐藏阴影(默认false)| |hl_shadowColor|color|阴影颜色值,如不带透明,默认透明16%| |hl_shadowLimit|dimension|阴影扩散程度(dp)| |hl_shadowOffsetX|dimension|x轴的偏移量(dp)| |hl_shadowOffsetY|dimension|y轴的偏移量(dp)| |hl_shadowHiddenLeft|boolean|左边的阴影不可见,其他3边同理| |hl_shadowSymmetry|boolean|控件区域是否对称(默认true)根据此图理解<br><img src="https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/isSym_half.jpg" alt="Sample" width="350">| <br/> ### 二、关于圆角 |name|format|description| |:---:|:---:|:---:| |hl_cornerRadius|dimension|包括阴影圆角、shape圆角(dp)| |hl_cornerRadius_leftTop|dimension|左上圆角,其他角还是hl_cornerRadius值;同理其他3角(dp)| <br/> ### 三、关于shape * #### 3.1、关于shape样式及背景色 |name|format|description| |:---:|:---:|:---:| |hl_shapeMode|enum|有4种模式:pressed和selected。和系统shape一样,以及ripple点击水波纹。新增dashLine| |hl_layoutBackground|reference/color|背景色,为false时展示:可以是颜色值,图片以及系统shape样式| |hl_layoutBackground_true|reference/color|背景色,为true时展示:可以是颜色值,图片以及系统shape样式| <br/> * #### 3.2、关于stroke边框 |name|format|description| |:---:|:---:|:---:| |hl_strokeWith|dimension|stroke边框线宽度| |hl_strokeColor|color|边框颜色值,为false展示| |hl_strokeColor_true|color|边框颜色值,为true展示| |hl_stroke_dashWidth|dimension|虚线边框的实线部分长度| |hl_stroke_dashGap|dimension|虚线边框的间隔宽度| <br/> * #### 3.3、关于渐变色 |name|format|description| |:---:|:---:|:---:| |hl_startColor|color|渐变起始颜色(设置渐变色后,hl_layoutBackground属性将无效)| |hl_centerColor|color|渐变中间颜色(可不填)| |hl_endColor|color|渐变的终止颜色| |hl_angle|integer|渐变角度(默认0)| <br/> * #### 3.4、关于绑定textView |name|format|description| |:---:|:---:|:---:| |hl_bindTextView|reference|当前要绑定的textView的id| |hl_textColor|color|shape为false是展示的文案颜色| |hl_textColor_true|color|shape为true是展示的文案颜色| |hl_text|string|shape为false时展示的文案| |hl_text_true|string|shape为true时展示的文案| <br/> ### 四、关于clickable |name|format|description| |:---:|:---:|:---:| |clickable|boolean|设置ShadowLayout是否可以被点击;代码设置:mShadowLayout.setClickable(false);(默认true)| |hl_layoutBackground_clickFalse|reference/color|Clickable为false时,要展示的图片或颜色。(此属性应当在app:hl_shapeMode="pressed"时生效)| <br/> ## 方法表格(Method) |name|format|description| |:---:|:---:|:---:| |setShadowHidden()|boolean|是否隐藏阴影| |setShadowColor()|color|设置阴影颜色值| |setShadowLimit()|dimension|设置阴影扩散区域| |setOffsetX()|dimension|设置阴影的X轴偏移量| |setOffsetY()|dimension|设置阴影的Y轴偏移量| |setShadowHiddenTop()|boolean|隐藏上边阴影(同理其他三遍)| |setCornerRadius()|dimension|设置圆角| |setLayoutBackground()|color|设置false时的背景颜色值| |setLayoutBackgroundTrue()|color|设置true时的背景颜色值| |setStrokeColor()|color|设置false时的边框颜色| |setStrokeColorTrue()|color|设置true时的边框颜色| |setStrokeWidth()|dimension|设置边框的粗细| |setClickable()|boolean|设置ShadowLayout是否可以点击| |setSpecialCorner()|integer|设置ShadowLayout四个角的大小| |setGradientColor()|integer|设置渐变颜色| <br/> ## 赞赏 如果你喜欢 ShadowLayout 的功能,感觉 ShadowLayout 帮助到了你,可以点右上角 "Star" 支持一下 谢谢! ^_^ 你也还可以扫描下面的二维码~ 请作者喝一杯咖啡。或者遇到工作中比较难实现的需求请作者帮忙。 ![](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/pay_ali.png) ![](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/pay_wx.png) 如果在捐赠留言中备注名称,将会被记录到列表中~ 如果你也是github开源作者,捐赠时可以留下github项目地址或者个人主页地址,链接将会被添加到列表中 ### [捐赠列表](https://github.com/lihangleo2/ShadowLayout/blob/master/showImages/friend.md) <br/> ## 其他作品 [万能ViewPager2适配器SmartViewPager2Adapter](https://github.com/lihangleo2/ViewPager2Demo) [RichEditTextCopyToutiao](https://github.com/lihangleo2/RichEditTextCopyToutiao) [mPro](https://github.com/lihangleo2/mPro) [SmartLoadingView](https://github.com/lihangleo2/SmartLoadingView) <br/> ## 关于作者。 Android工作多年了。前进的道路上是孤独的。如果你在学习的路上也感觉孤独,请和我一起。让我们在学习道路上少些孤独 <!-- * [关于我的经历](https://mp.weixin.qq.com/s?__biz=MzAwMDA3MzU2Mg==&mid=2247483667&idx=1&sn=1a575ea2c636980e5f4c579d3a73d8ab&chksm=9aefcb26ad98423041c61ad7cbad77f0534495d11fc0a302b9fdd3a3e6b84605cad61d192959&mpshare=1&scene=23&srcid=&sharer_sharetime=1572505105563&sharer_shareid=97effcbe7f9d69e6067a40da3e48344a#rd) --> * QQ群: 209010674 <a target="_blank" href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=C5RJFvVexskcqccqO1ORpLID9dBxlbIM&authKey=aax93zJjnA2San0TA0VEIc%2BLU9RDtstZ7BD7pz3FPdJRjlOu8%2Ffb%2BDNSX0Cz6hbr&noverify=0&group_code=209010674"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="android交流群" title="android交流群"></a>(点击图标,可以直接加入) <br/> ## Licenses ``` MIT License Copyright (c) 2019 leo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ```
0
google/tsunami-security-scanner
Tsunami is a general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence.
null
# Tsunami ![build](https://github.com/google/tsunami-security-scanner/workflows/build/badge.svg) Tsunami is a general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence. To learn more about Tsunami, visit our [documentation](https://github.com/google/tsunami-security-scanner/blob/master/docs/index.md). Tsunami relies heavily on its plugin system to provide basic scanning capabilities. All publicly available Tsunami plugins are hosted in a separate [google/tsunami-security-scanner-plugins](https://github.com/google/tsunami-security-scanner-plugins) repository. ## Current Status * Currently Tsunami is in 'pre-alpha' release for developer preview. * Tsunami project is currently under active development. Do expect major API changes in the future. ## Quick Start To quickly get started with Tsunami scans, ### Traditional install 1. install the following required dependencies: ``` nmap >= 7.80 ncrack >= 0.7 ``` 1. start a vulnerable application that can be identified by Tsunami, e.g. an unauthenticated Jupyter Notebook server. The easiest way is to use a docker image: ```shell docker run --name unauthenticated-jupyter-notebook -p 8888:8888 -d jupyter/base-notebook start-notebook.sh --NotebookApp.token='' ``` 1. execute the following command: ``` bash -c "$(curl -sfL https://raw.githubusercontent.com/google/tsunami-security-scanner/master/quick_start.sh)" ``` The `quick_start.sh` script performs the following tasks: 1. Clone the [google/tsunami-security-scanner](https://github.com/google/tsunami-security-scanner) and [google/tsunami-security-scanner-plugins](https://github.com/google/tsunami-security-scanner-plugins) repos into `$HOME/tsunami/repos` directory. 1. Compile all [Google Tsunami plugins](https://github.com/google/tsunami-security-scanner-plugins/tree/master/google) and move all plugin `jar` files into `$HOME/tsunami/plugins` directory. 1. Compile the Tsunami scanner Fat Jar file and move it into `$HOME/tsunami` directory. 1. Move the `tsunami.yaml` example config into `$HOME/tsunami` directory. 1. Print example Tsunami command for scanning `127.0.0.1` using the previously generated artifacts. ### Docker install 1. start a vulnerable application that can be identified by Tsunami, e.g. an unauthenticated Jupyter Notebook server. The easiest way is to use a docker image: ```shell docker run --name unauthenticated-jupyter-notebook -p 8888:8888 -d jupyter/base-notebook start-notebook.sh --NotebookApp.token='' ``` 1. build the docker image for Tsunami: ```shell docker build -t tsunami . ``` 1. run the Tsunami image. The logs can be saved to the host machine by mounting a volume: ```shell docker run --network="host" -v "$(pwd)/logs":/usr/tsunami/logs tsunami ``` 1. debugging issues with Tsunami container. The tsunami container is based on Debian. To run debug tools simply exec into the container and install them: ```shell docker exec -it tsunami bash ``` ## Contributing Read how to [contribute to Tsunami](docs/contributing.md). ## License Tsunami is released under the [Apache 2.0 license](LICENSE). ``` Copyright 2019 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` ## Disclaimers Tsunami is not an official Google product.
0
cod3rcursos/curso-java
Java 13 COMPLETO: Do Zero ao Profissional + Projetos Reais!
null
# Java 13 COMPLETO: Do Zero ao Profissional + Projetos Reais!
0
dyc87112/SpringCloud-Learning
Spring Cloud基础教程,持续连载更新中
consul eureka hystrix nacos rabbitmq ribbon sentinel spring-boot spring-cloud stream zipkin zuul
# Spring Cloud教程 本项目内容为Spring Cloud教程的程序样例。如您觉得该项目对您有用,欢迎点击右上方的**Star**按钮,给予支持!! - 公益调试 Eureka:http://eureka.didispace.com - 公益调试 Nacos:http://blog.didispace.com/open-nacos-server-1-0-0/ ## 特别赞助商 <table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://start.aliyun.com/" target="_blank"> <img width="300" src="http://img.didispace.com/FlCL2IV4kAY92Ko9-MCUM_hVaiDf"> </a> </td> <td align="center" valign="middle"> <a href="http://gk.link/a/103EK" target="_blank"> <img width="300" src="http://img.didispace.com/FraIu771RXtYnQ3o5croL31PVzUB"> </a> </td> <td align="center" valign="middle"> <a href="https://openwrite.cn/?from=didi-springcloud" target="_blank"> <img width="300" src="http://img.didispace.com/Fq6H6vSRJugF3cLxFNc29D9WVwFA"> </a> </td> </tr> <tr> <td align="center" valign="middle"> <a href="https://www.aliyun.com/minisite/goods?userCode=wxfqkr0o&share_source=copy_link" target="_blank"> <img width="300" src="https://tva1.sinaimg.cn/large/006tNbRwgy1g9utcfi2hxj308c02i755.jpg"> </a> </td> <td align="center" valign="middle"> <a href="https://cloud.tencent.com/redirect.php?redirect=1027&cps_key=f6a8af1297bfac40b9d10ffa1270029a&from=console" target="_blank"> <img width="300" src="http://img.didispace.com/FlcCuj0c-JhViRzr1wrynE941T9b"> </a> </td> <td align="center" valign="middle"> </td> </tr> </tbody> </table> > 如果您也想赞助支持并出现在上表中的话,可以通过邮件联系我:`didi@didispace.com` ## 教程列表 ### 《Spring Cloud构建微服务架构》系列博文 #### Finchley版 **本系列主要补充之前版本新增或是变动的主要内容,基础使用依然可以参考Dalston版教程** - [Spring Cloud Finchley版中Consul多实例注册的问题处理](http://blog.didispace.com/Spring-Cloud-Finchley-Consul-InstanceId/) ##### Spring Cloud Aliabab专题 - [Spring Cloud Alibaba与Spring Boot、Spring Cloud之间不得不说的版本关系](http://blog.didispace.com/spring-cloud-alibaba-version/) - [说说我为什么看好Spring Cloud Alibaba](http://blog.didispace.com/spring-cloud-alibaba-significance/) - [Spring Cloud Alibaba到底坑不坑?](http://blog.didispace.com/bo-kengdie-spring-cloud-alibaba/) *注册中心与配置中心:Nacos* - [Spring Cloud Alibaba基础教程:使用Nacos实现服务注册与发现](http://blog.didispace.com/spring-cloud-alibaba-1/) - [Spring Cloud Alibaba基础教程:Nacos 生产级版本 0.8.0](http://blog.didispace.com/spring-cloud-alibaba-nacos-1/) - [Spring Cloud Alibaba基础教程:支持的几种服务消费方式(RestTemplate、WebClient、Feign)](http://blog.didispace.com/spring-cloud-alibaba-2/) - [Spring Cloud Alibaba基础教程:使用Nacos作为配置中心](http://blog.didispace.com/spring-cloud-alibaba-3/) - [Spring Cloud Alibaba基础教程:Nacos配置的加载规则详解](http://blog.didispace.com/spring-cloud-alibaba-nacos-config-1/) - [Spring Cloud Alibaba基础教程:Nacos配置的多环境管理](http://blog.didispace.com/spring-cloud-alibaba-nacos-config-2/) - [Spring Cloud Alibaba基础教程:Nacos配置的多文件加载与共享配置](http://blog.didispace.com/spring-cloud-alibaba-nacos-config-3/) - [Spring Cloud Alibaba基础教程:Nacos的数据持久化](http://blog.didispace.com/spring-cloud-alibaba-4/) - [Spring Cloud Alibaba基础教程:Nacos的集群部署](http://blog.didispace.com/spring-cloud-alibaba-5/) *分布式流量防卫兵:Sentinel* - [Spring Cloud Alibaba基础教程:使用Sentinel实现接口限流](http://blog.didispace.com/spring-cloud-alibaba-sentinel-1/) - [Spring Cloud Alibaba基础教程:Sentinel使用Nacos存储规则](http://blog.didispace.com/spring-cloud-alibaba-sentinel-2-1/) - [Spring Cloud Alibaba基础教程:Sentinel使用Apollo存储规则](http://blog.didispace.com/spring-cloud-alibaba-sentinel-2-2/) - [Spring Cloud Alibaba基础教程:Sentinel Dashboard中修改规则同步到Apollo](http://blog.didispace.com/spring-cloud-alibaba-sentinel-2-3/) - [Spring Cloud Alibaba基础教程:Sentinel Dashboard中修改规则同步到Nacos](http://blog.didispace.com/spring-cloud-alibaba-sentinel-2-4/) - [Spring Cloud Alibaba基础教程:@SentinelResource注解使用详解](http://blog.didispace.com/spring-cloud-alibaba-sentinel-2-5/) *国内使用最多的RPC框架整合:Dubbo* - [Spring Cloud Alibaba基础教程:与Dubbo的完美融合](http://blog.didispace.com/spring-cloud-alibaba-dubbo-1/) ##### Spring Cloud Stream专题补充 - [Spring Cloud Stream如何消费自己生产的消息](http://blog.didispace.com/spring-cloud-starter-finchley-7-1) - [Spring Cloud Stream同一通道根据消息内容分发不同的消费逻辑](http://blog.didispace.com/spring-cloud-starter-finchley-7-6) - [Spring Cloud Stream使用延迟消息实现定时任务(RabbitMQ)](http://blog.didispace.com/spring-cloud-starter-finchley-7-7) - [Spring Cloud Stream消费失败后的处理策略(一):自动重试](http://blog.didispace.com/spring-cloud-starter-finchley-7-2) - [Spring Cloud Stream消费失败后的处理策略(二):自定义错误处理逻辑](http://blog.didispace.com/spring-cloud-starter-finchley-7-3) - [Spring Cloud Stream消费失败后的处理策略(三):使用DLQ队列(RabbitMQ)](http://blog.didispace.com/spring-cloud-starter-finchley-7-4) - [Spring Cloud Stream消费失败后的处理策略(四):重新入队(RabbitMQ)](http://blog.didispace.com/spring-cloud-starter-finchley-7-5) #### Edgware版 > 本系列主要是对Dalston版的补充,包含Edgware版的主要新增或变动的内容,对于Spring Cloud的基础使用依然建议参考Dalston版教程 - [分布式配置中心(数据库存储)](http://blog.didispace.com/spring-cloud-starter-edgware-3-1) #### Dalston版 - [服务注册与发现(Eureka、Consul)](http://blog.didispace.com/spring-cloud-starter-dalston-1/) - [服务消费者(基础)](http://blog.didispace.com/spring-cloud-starter-dalston-2-1/) - [服务消费者(Ribbon)](http://blog.didispace.com/spring-cloud-starter-dalston-2-2/) - [服务消费者(Feign)](http://blog.didispace.com/spring-cloud-starter-dalston-2-3/) - [服务消费者(Feign)传文件](http://blog.didispace.com/spring-cloud-starter-dalston-2-4/) - [分布式配置中心](http://blog.didispace.com/spring-cloud-starter-dalston-3) - [服务容错保护(Hystrix服务降级)](http://blog.didispace.com/spring-cloud-starter-dalston-4-1) - [服务容错保护(Hystrix依赖隔离)](http://blog.didispace.com/spring-cloud-starter-dalston-4-2) - [服务容错保护(Hystrix断路器)](http://blog.didispace.com/spring-cloud-starter-dalston-4-3) - [Hystrix监控面板](http://blog.didispace.com/spring-cloud-starter-dalston-5-1/) - [Hystrix监控数据聚合](http://blog.didispace.com/spring-cloud-starter-dalston-5-2/) - [服务网关(基础)](http://blog.didispace.com/spring-cloud-starter-dalston-6-1/) - [服务网关(路由配置)](http://blog.didispace.com/spring-cloud-starter-dalston-6-2/) - [服务网关(过滤器)](http://blog.didispace.com/spring-cloud-starter-dalston-6-3/) - [服务网关(API文档汇总)](http://blog.didispace.com/Spring-Cloud-Zuul-use-Swagger-API-doc/) - [消息驱动的微服务(入门)](http://blog.didispace.com/spring-cloud-starter-dalston-7-1/) - [消息驱动的微服务(核心概念)](http://blog.didispace.com/spring-cloud-starter-dalston-7-2/) - [消息驱动的微服务(消费组)](http://blog.didispace.com/spring-cloud-starter-dalston-7-3/) - [消息驱动的微服务(消费组案例:解决消息重复消费)](http://blog.didispace.com/spring-cloud-starter-dalston-7-5/) - [消息驱动的微服务(消息分区)](http://blog.didispace.com/spring-cloud-starter-dalston-7-4/) - [分布式服务跟踪(入门)](http://blog.didispace.com/spring-cloud-starter-dalston-8-1/) - [分布式服务跟踪(跟踪原理)](http://blog.didispace.com/spring-cloud-starter-dalston-8-2/) - [分布式服务跟踪(整合logstash)](http://blog.didispace.com/spring-cloud-starter-dalston-8-3/) - [分布式服务跟踪(整合zipkin)](http://blog.didispace.com/spring-cloud-starter-dalston-8-4/) - [分布式服务跟踪(收集原理)](http://blog.didispace.com/spring-cloud-starter-dalston-8-5/) - [分布式服务跟踪(抽样收集)](http://blog.didispace.com/spring-cloud-starter-dalston-8-6/) #### Brixton版 - 1-Brixton版教程示例/chapter1-1-1:[Spring Cloud构建微服务架构(一)服务注册与发现](http://blog.didispace.com/springcloud1/) - 1-Brixton版教程示例/chapter1-1-2:[Spring Cloud构建微服务架构(二)服务消费者](http://blog.didispace.com/springcloud2/) - 1-Brixton版教程示例/chapter1-1-3:[Spring Cloud构建微服务架构(三)断路器](http://blog.didispace.com/springcloud3/) - 1-Brixton版教程示例/chapter1-1-4:[Spring Cloud构建微服务架构(四)分布式配置中心](http://blog.didispace.com/springcloud4/) - 1-Brixton版教程示例/chapter1-1-8:[Spring Cloud构建微服务架构(四)分布式配置中心(续)](http://blog.didispace.com/springcloud4-2/) - 1-Brixton版教程示例/chapter1-1-5:[Spring Cloud构建微服务架构(五)服务网关](http://blog.didispace.com/springcloud5/) - 1-Brixton版教程示例/chapter1-1-6:[Spring Cloud构建微服务架构(六)高可用服务注册中心](http://blog.didispace.com/springcloud6/) - 1-Brixton版教程示例/chapter1-1-7:[Spring Cloud构建微服务架构(七)消息总线(Rabbit)](http://blog.didispace.com/springcloud7/) - 1-Brixton版教程示例/chapter1-1-7:[Spring Cloud构建微服务架构(七)消息总线(Kafka)](http://blog.didispace.com/springcloud7-2/) ### 《Spring Cloud源码分析》系列博文 - [Spring Cloud源码分析(一)Eureka](http://blog.didispace.com/springcloud-sourcecode-eureka/) - [Spring Cloud源码分析(二)Ribbon](http://blog.didispace.com/springcloud-sourcecode-ribbon/) - [Spring Cloud源码分析(二)Ribbon](http://blog.didispace.com/springcloud-sourcecode-ribbon/) - [Spring Cloud源码分析(四)Zuul:核心过滤器](http://blog.didispace.com/spring-cloud-source-zuul/) - 未完待续 ### 《Spring Cloud实战小贴士》系列博文 - [Spring Cloud实战小贴士:版本依赖关系](http://blog.didispace.com/spring-cloud-tips-1/) - [Spring Cloud实战小贴士:随机端口](http://blog.didispace.com/spring-cloud-tips-2/) - [Spring Cloud实战小贴士:健康检查](http://blog.didispace.com/spring-cloud-tips-3/) - [Spring Cloud实战小贴士:Zuul处理Cookie和重定向](http://blog.didispace.com/spring-cloud-zuul-cookie-redirect/) - [Spring Cloud实战小贴士:Zuul统一异常处理(一)](http://blog.didispace.com/spring-cloud-zuul-exception/) - [Spring Cloud实战小贴士:Zuul统一异常处理(二)](http://blog.didispace.com/spring-cloud-zuul-exception-2/) - [Spring Cloud实战小贴士:Zuul统一异常处理(三)【Dalston版】](http://blog.didispace.com/spring-cloud-zuul-exception-3/) - [Spring Cloud实战小贴士:Turbine如何聚合设置了context-path的Hystrix数据](http://blog.didispace.com/spring-cloud-tips-4/) - [Spring Cloud实战小贴士:Feign的继承特性(伪RPC模式)](http://blog.didispace.com/spring-cloud-tips-feign-rpc/) - [Spring Cloud实战小贴士:Ribbon的饥饿加载(eager-load)模式](http://blog.didispace.com/spring-cloud-tips-ribbon-eager/) - [Spring Cloud实战小贴士:Zuul的饥饿加载(eager-load)使用](http://blog.didispace.com/spring-cloud-tips-zuul-eager/) #### 其他文章 - [使用Intellij中的Spring Initializr来快速构建Spring Boot/Cloud工程](http://blog.didispace.com/spring-initializr-in-intellij/) - [为Spring Cloud Ribbon配置请求重试(Camden.SR2+)](http://blog.didispace.com/spring-cloud-ribbon-failed-retry/) - [Consul注销实例时候的问题](http://blog.didispace.com/consul-deregister/) - [使用Spring Boot Actuator、Jolokia和Grafana实现准实时监控](http://blog.didispace.com/spring-boot-jolokia-grafana-monitor/) - [Netflix Zuul与Nginx的性能对比](http://blog.didispace.com/zuul-vs-nginx-performance/) - [基于Consul的分布式锁实现](http://blog.didispace.com/spring-cloud-consul-lock-and-semphore/) - [基于Consul的分布式信号量实现](http://blog.didispace.com/spring-cloud-consul-lock-and-semphore-2/) ## 我的公众号 ![](http://git.oschina.net/uploads/images/2017/0105/082137_85109d07_437188.jpeg "在这里输入图片标题") ## 推荐我的书 ![](https://git.oschina.net/uploads/images/2017/0416/233656_dd3bce94_437188.png "在这里输入图片标题") ## 其他推荐 - [我的博客](http://blog.didispace.com):分享平时学习和实践过的技术内容 - [知识星球](https://t.xiaomiquan.com/zfEiY3v):聊聊技术人的斜杠生活 - [GitHub](https://github.com/dyc87112/SpringCloud-Learning):Star支持一下呗 - [Gitee](https://gitee.com/didispace/SpringCloud-Learning):Star支持一下呗 - [Spring问答社区](http://www.spring4all.com/):如果您有什么问题,可以去这里发帖 - [Spring Boot基础教程](http://blog.didispace.com/Spring-Boot%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/):全网Star最多的免费Spring Boot基础教程 - [Spring Cloud基础教程](http://blog.didispace.com/Spring-Cloud%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/):全网最早最全的免费Spring Cloud基础教程 - [微服务架构专题](http://blog.didispace.com/micro-serivces-arch/)
0
alibaba/QLExpress
QLExpress is a powerful, lightweight, dynamic language for the Java platform aimed at improving developers’ productivity in different business scenes.
null
# QLExpress基本语法 [![Join the chat at https://gitter.im/QLExpress/Lobby](https://badges.gitter.im/QLExpress/Lobby.svg)](https://gitter.im/QLExpress/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # 一、背景介绍 由阿里的电商业务规则、表达式(布尔组合)、特殊数学公式计算(高精度)、语法分析、脚本二次定制等强需求而设计的一门动态脚本引擎解析工具。 在阿里集团有很强的影响力,同时为了自身不断优化、发扬开源贡献精神,于2012年开源。 QLExpress脚本引擎被广泛应用在阿里的电商业务场景,具有以下的一些特性: - 1、线程安全,引擎运算过程中的产生的临时变量都是threadlocal类型。 - 2、高效执行,比较耗时的脚本编译过程可以缓存在本地机器,运行时的临时变量创建采用了缓冲池的技术,和groovy性能相当。 - 3、弱类型脚本语言,和groovy,javascript语法类似,虽然比强类型脚本语言要慢一些,但是使业务的灵活度大大增强。 - 4、安全控制,可以通过设置相关运行参数,预防死循环、高危系统api调用等情况。 - 5、代码精简,依赖最小,250k的jar包适合所有java的运行环境,在android系统的低端pos机也得到广泛运用。 # 二、依赖和调用说明 ```xml <dependency> <groupId>com.alibaba</groupId> <artifactId>QLExpress</artifactId> <version>3.3.3</version> </dependency> ``` 版本兼容性: [跳转查看](VERSIONS.md) ```java ExpressRunner runner = new ExpressRunner(); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); context.put("a", 1); context.put("b", 2); context.put("c", 3); String express = "a + b * c"; Object r = runner.execute(express, context, null, true, false); System.out.println(r); ``` 如果应用有让终端用户输入与执行 QLExpress 的功能,务必关注 [多级别安全控制](#4-多级别安全控制),**将 QLExpress 的安全级别配置在白名单或以上。** # 三、语法介绍 ## 1、操作符和java对象操作 ### 普通java语法 ```java //支持 +,-,*,/,<,>,<=,>=,==,!=,<>【等同于!=】,%,mod【取模等同于%】,++,--, //in【类似sql】,like【sql语法】,&&,||,!,等操作符 //支持for,break、continue、if then else 等标准的程序控制逻辑 n = 10; sum = 0; for(i = 0; i < n; i++) { sum = sum + i; } return sum; //逻辑三元操作 a = 1; b = 2; maxnum = a > b ? a : b; ``` ### 和java语法相比,要避免的一些ql写法错误 - 不支持try{}catch{} - 注释目前只支持 /** **/,不支持单行注释 // - 不支持java8的lambda表达式 - 不支持for循环集合操作for (Item item : list) - 弱类型语言,请不要定义类型声明,更不要用Template(Map<String, List>之类的) - array的声明不一样 - min,max,round,print,println,like,in 都是系统默认函数的关键字,请不要作为变量名 ``` //java语法:使用泛型来提醒开发者检查类型 keys = new ArrayList<String>(); deviceName2Value = new HashMap<String, String>(7); String[] deviceNames = {"ng", "si", "umid", "ut", "mac", "imsi", "imei"}; int[] mins = {5, 30}; //ql写法: keys = new ArrayList(); deviceName2Value = new HashMap(); deviceNames = ["ng", "si", "umid", "ut", "mac", "imsi", "imei"]; mins = [5, 30]; //java语法:对象类型声明 FocFulfillDecisionReqDTO reqDTO = param.getReqDTO(); //ql写法: reqDTO = param.getReqDTO(); //java语法:数组遍历 for(Item item : list) { } //ql写法: for(i = 0; i < list.size(); i++){ item = list.get(i); } //java语法:map遍历 for(String key : map.keySet()) { System.out.println(map.get(key)); } //ql写法: keySet = map.keySet(); objArr = keySet.toArray(); for (i = 0; i < objArr.length; i++) { key = objArr[i]; System.out.println(map.get(key)); } ``` ### java的对象操作 ```java import com.ql.util.express.test.OrderQuery; //系统自动会import java.lang.*,import java.util.*; query = new OrderQuery(); // 创建class实例,自动补全类路径 query.setCreateDate(new Date()); // 设置属性 query.buyer = "张三"; // 调用属性,默认会转化为setBuyer("张三") result = bizOrderDAO.query(query); // 调用bean对象的方法 System.out.println(result.getId()); // 调用静态方法 ``` ## 2、脚本中定义function ```java function add(int a, int b){ return a + b; }; function sub(int a, int b){ return a - b; }; a = 10; return add(a, 4) + sub(a, 9); ``` ## 3、扩展操作符:Operator ### 替换 if then else 等关键字 ```java runner.addOperatorWithAlias("如果", "if", null); runner.addOperatorWithAlias("则", "then", null); runner.addOperatorWithAlias("否则", "else", null); express = "如果 (语文 + 数学 + 英语 > 270) 则 {return 1;} 否则 {return 0;}"; DefaultContext<String, Object> context = new DefaultContext<String, Object>(); runner.execute(express, context, null, false, false, null); ``` ### 如何自定义Operator ```java import java.util.ArrayList; import java.util.List; /** * 定义一个继承自com.ql.util.express.Operator的操作符 */ public class JoinOperator extends Operator { public Object executeInner(Object[] list) throws Exception { Object opdata1 = list[0]; Object opdata2 = list[1]; if (opdata1 instanceof List) { ((List)opdata1).add(opdata2); return opdata1; } else { List result = new ArrayList(); for (Object opdata : list) { result.add(opdata); } return result; } } } ``` ### 如何使用Operator ```java //(1)addOperator ExpressRunner runner = new ExpressRunner(); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); runner.addOperator("join", new JoinOperator()); Object r = runner.execute("1 join 2 join 3", context, null, false, false); System.out.println(r); // 返回结果 [1, 2, 3] //(2)replaceOperator ExpressRunner runner = new ExpressRunner(); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); runner.replaceOperator("+", new JoinOperator()); Object r = runner.execute("1 + 2 + 3", context, null, false, false); System.out.println(r); // 返回结果 [1, 2, 3] //(3)addFunction ExpressRunner runner = new ExpressRunner(); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); runner.addFunction("join", new JoinOperator()); Object r = runner.execute("join(1, 2, 3)", context, null, false, false); System.out.println(r); // 返回结果 [1, 2, 3] ``` ## 4、绑定java类或者对象的method addFunctionOfClassMethod + addFunctionOfServiceMethod ```java public class BeanExample { public static String upper(String abc) { return abc.toUpperCase(); } public boolean anyContains(String str, String searchStr) { char[] s = str.toCharArray(); for (char c : s) { if (searchStr.contains(c+"")) { return true; } } return false; } } runner.addFunctionOfClassMethod("取绝对值", Math.class.getName(), "abs", new String[] {"double"}, null); runner.addFunctionOfClassMethod("转换为大写", BeanExample.class.getName(), "upper", new String[] {"String"}, null); runner.addFunctionOfServiceMethod("打印", System.out, "println", new String[] { "String" }, null); runner.addFunctionOfServiceMethod("contains", new BeanExample(), "anyContains", new Class[] {String.class, String.class}, null); String express = "取绝对值(-100); 转换为大写(\"hello world\"); 打印(\"你好吗?\"); contains("helloworld",\"aeiou\")"; runner.execute(express, context, null, false, false); ``` ## 5、macro 宏定义 ```java runner.addMacro("计算平均成绩", "(语文+数学+英语)/3.0"); runner.addMacro("是否优秀", "计算平均成绩>90"); IExpressContext<String, Object> context = new DefaultContext<String, Object>(); context.put("语文", 88); context.put("数学", 99); context.put("英语", 95); Object result = runner.execute("是否优秀", context, null, false, false); System.out.println(r); //返回结果true ``` ## 6、编译脚本,查询外部需要定义的变量和函数。 **注意以下脚本int和没有int的区别** ```java String express = "int 平均分 = (语文 + 数学 + 英语 + 综合考试.科目2) / 4.0; return 平均分"; ExpressRunner runner = new ExpressRunner(true, true); String[] names = runner.getOutVarNames(express); for(String s:names){ System.out.println("var : " + s); } //输出结果: var : 数学 var : 综合考试 var : 英语 var : 语文 ``` ## 7、关于不定参数的使用 ```java @Test public void testMethodReplace() throws Exception { ExpressRunner runner = new ExpressRunner(); IExpressContext<String, Object> expressContext = new DefaultContext<String, Object>(); runner.addFunctionOfServiceMethod("getTemplate", this, "getTemplate", new Class[]{Object[].class}, null); //(1)默认的不定参数可以使用数组来代替 Object r = runner.execute("getTemplate([11,'22', 33L, true])", expressContext, null, false, false); System.out.println(r); //(2)像java一样,支持函数动态参数调用,需要打开以下全局开关,否则以下调用会失败 DynamicParamsUtil.supportDynamicParams = true; r = runner.execute("getTemplate(11, '22', 33L, true)", expressContext, null, false, false); System.out.println(r); } //等价于getTemplate(Object[] params) public Object getTemplate(Object... params) throws Exception{ String result = ""; for(Object obj:params){ result = result + obj + ","; } return result; } ``` ## 8、关于集合的快捷写法 ```java @Test public void testSet() throws Exception { ExpressRunner runner = new ExpressRunner(false, false); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); String express = "abc = NewMap(1:1, 2:2); return abc.get(1) + abc.get(2);"; Object r = runner.execute(express, context, null, false, false); System.out.println(r); express = "abc = NewList(1, 2, 3); return abc.get(1) + abc.get(2)"; r = runner.execute(express, context, null, false, false); System.out.println(r); express = "abc = [1, 2, 3]; return abc[1] + abc[2];"; r = runner.execute(express, context, null, false, false); System.out.println(r); } ``` ## 9、集合的遍历 其实类似java的语法,只是ql不支持for(obj:list){}的语法,只能通过下标访问。 ```java //遍历map map = new HashMap(); map.put("a", "a_value"); map.put("b", "b_value"); keySet = map.keySet(); objArr = keySet.toArray(); for (i = 0; i < objArr.length; i++) { key = objArr[i]; System.out.println(map.get(key)); } ``` # 四、运行参数和API列表介绍 QLExpressRunner如下图所示,从语法树分析、上下文、执行过程三个方面提供二次定制的功能扩展。 ![QlExpress-detail.jpg](http://ata2-img.cn-hangzhou.img-pub.aliyun-inc.com/dec904b003aba15cbf1af2726914ddee.jpg) ## 1、属性开关 ### isPrecise ```java /** * 是否需要高精度计算 */ private boolean isPrecise = false; ``` > 高精度计算在会计财务中非常重要,java的float、double、int、long存在很多隐式转换,做四则运算和比较的时候其实存在非常多的安全隐患。 > 所以类似汇金的系统中,会有很多BigDecimal转换代码。而使用QLExpress,你只要关注数学公式本身 _订单总价 = 单价 * 数量 + 首重价格 + ( 总重量 - 首重) * 续重单价_ ,然后设置这个属性即可,所有的中间运算过程都会保证不丢失精度。 ### isShortCircuit ```java /** * 是否使用逻辑短路特性 */ private boolean isShortCircuit = true; ``` 在很多业务决策系统中,往往需要对布尔条件表达式进行分析输出,普通的java运算一般会通过逻辑短路来减少性能的消耗。例如规则公式: _star > 10000 and shopType in ('tmall', 'juhuasuan') and price between (100, 900)_ 假设第一个条件 _star>10000_ 不满足就停止运算。但业务系统却还是希望把后面的逻辑都能够运算一遍,并且输出中间过程,保证更快更好的做出决策。 参照单元测试:[ShortCircuitLogicTest.java](https://github.com/alibaba/QLExpress/blob/master/src/test/java/com/ql/util/express/test/logic/ShortCircuitLogicTest.java) ### isTrace ```java /** * 是否输出所有的跟踪信息,同时还需要log级别是DEBUG级别 */ private boolean isTrace = false; ``` 这个主要是是否输出脚本的编译解析过程,一般对于业务系统来说关闭之后会提高性能。 ## 2、调用入参 ```java /** * 执行一段文本 * @param expressString 程序文本 * @param context 执行上下文,可以扩展为包含ApplicationContext * @param errorList 输出的错误信息List * @param isCache 是否使用Cache中的指令集,建议为true * @param isTrace 是否输出详细的执行指令信息,建议为false * @param aLog 输出的log * @return * @throws Exception */ Object execute(String expressString, IExpressContext<String, Object> context, List<String> errorList, boolean isCache, boolean isTrace); ``` ## 3、功能扩展API列表 QLExpress主要通过子类实现Operator.java提供的以下方法来最简单的操作符定义,然后可以被通过addFunction或者addOperator的方式注入到ExpressRunner中。 ```java public abstract Object executeInner(Object[] list) throws Exception; ``` 比如我们几行代码就可以实现一个功能超级强大、非常好用的join操作符: ``` _list = 1 join 2 join 3;_ -> [1,2,3] _list = join(list, 4, 5, 6);_ -> [1,2,3,4,5,6] ``` ```java import java.util.ArrayList; import java.util.List; public class JoinOperator extends Operator { public Object executeInner(Object[] list) throws Exception { List result = new ArrayList(); Object opdata1 = list[0]; if (opdata1 instanceof List) { result.addAll((List)opdata1); } else { result.add(opdata1); } for (int i = 1; i < list.length; i++) { result.add(list[i]); } return result; } } ``` 如果你使用Operator的基类OperatorBase.java将获得更强大的能力,基本能够满足所有的要求。 ### (1)function相关API ```java //通过name获取function的定义 OperatorBase getFunciton(String name); //通过自定义的Operator来实现类似:fun(a, b, c) void addFunction(String name, OperatorBase op); //fun(a, b, c) 绑定 object.function(a, b, c)对象方法 void addFunctionOfServiceMethod(String name, Object aServiceObject, String aFunctionName, Class<?>[] aParameterClassTypes, String errorInfo); //fun(a, b, c) 绑定 Class.function(a, b, c)类方法 void addFunctionOfClassMethod(String name, String aClassName, String aFunctionName, Class<?>[] aParameterClassTypes, String errorInfo); //给Class增加或者替换method,同时支持 a.fun(b), fun(a, b) 两种方法调用 //比如扩展String.class的isBlank方法:"abc".isBlank()和isBlank("abc")都可以调用 void addFunctionAndClassMethod(String name, Class<?> bindingClass, OperatorBase op); ``` ### (2)Operator相关API 提到脚本语言的操作符,优先级、运算的目数、覆盖原始的操作符(+,-,*,/等等)都是需要考虑的问题,QLExpress统统帮你搞定了。 ```java //添加操作符号,可以设置优先级 void addOperator(String name, Operator op); void addOperator(String name, String aRefOpername, Operator op); //替换操作符处理 OperatorBase replaceOperator(String name, OperatorBase op); //添加操作符和关键字的别名,比如 if..then..else -> 如果。。那么。。否则。。 void addOperatorWithAlias(String keyWordName, String realKeyWordName, String errorInfo); ``` ### (3)宏定义相关API QLExpress的宏定义比较简单,就是简单的用一个变量替换一段文本,和传统的函数替换有所区别。 ```java //比如addMacro("天猫卖家", "userDO.userTag &1024 == 1024") void addMacro(String macroName, String express); ``` ### (4)java class的相关api QLExpress可以通过给java类增加或者改写一些method和field,比如 链式调用:"list.join("1").join("2")",比如中文属性:"list.长度"。 ```java //添加类的属性字段 void addClassField(String field, Class<?>bindingClass, Class<?>returnType, Operator op); //添加类的方法 void addClassMethod(String name, Class<?>bindingClass, OperatorBase op); ``` > 注意,这些类的字段和方法是执行器通过解析语法执行的,而不是通过字节码增强等技术,所以只在脚本运行期间生效,不会对jvm整体的运行产生任何影响,所以是绝对安全的。 ### (4)语法树解析变量、函数的API > 这些接口主要是对一个脚本内容的静态分析,可以作为上下文创建的依据,也可以用于系统的业务处理。 > 比如:计算 "a + fun1(a) + fun2(a + b) + c.getName()" > 包含的变量:a,b,c > 包含的函数:fun1,fun2 ```java //获取一个表达式需要的外部变量名称列表 String[] getOutVarNames(String express); String[] getOutFunctionNames(String express); ``` ### (5)语法解析校验api 脚本语法是否正确,可以通过ExpressRunner编译指令集的接口来完成。 ```java String expressString = "for(i = 0; i < 10; i++) {sum = i + 1;} return sum;"; InstructionSet instructionSet = expressRunner.parseInstructionSet(expressString); //如果调用过程不出现异常,指令集instructionSet就是可以被加载运行(execute)了! ``` ### (6)指令集缓存相关的api 因为QLExpress对文本到指令集做了一个本地HashMap缓存,通常情况下一个设计合理的应用脚本数量应该是有限的,缓存是安全稳定的,但是也提供了一些接口进行管理。 ```java //优先从本地指令集缓存获取指令集,没有的话生成并且缓存在本地 InstructionSet getInstructionSetFromLocalCache(String expressString); //清除缓存 void clearExpressCache(); ``` ### (7)安全风险控制 #### 7.1 防止死循环 ```java try { express = "sum = 0; for(i = 0; i < 1000000000; i++) {sum = sum + i;} return sum;"; //可通过timeoutMillis参数设置脚本的运行超时时间:1000ms Object r = runner.execute(express, context, null, true, false, 1000); System.out.println(r); throw new Exception("没有捕获到超时异常"); } catch (QLTimeOutException e) { System.out.println(e); } ``` #### 7.1 防止调用不安全的系统api 更加详细多级安全控制见 [多级别安全控制](#4-多级别安全控制) ```java ExpressRunner runner = new ExpressRunner(); QLExpressRunStrategy.setForbiddenInvokeSecurityRiskMethods(true); DefaultContext<String, Object> context = new DefaultContext<String, Object>(); try { express = "System.exit(1);"; Object r = runner.execute(express, context, null, true, false); System.out.println(r); throw new Exception("没有捕获到不安全的方法"); } catch (QLException e) { System.out.println(e); } ``` ### (8)增强上下文参数Context相关的api #### 8.1 与spring框架的无缝集成 上下文参数 IExpressContext context 非常有用,它允许put任何变量,然后在脚本中识别出来。 在实际中我们很希望能够无缝的集成到spring框架中,可以仿照下面的例子使用一个子类。 ```java public class QLExpressContext extends HashMap<String, Object> implements IExpressContext<String, Object> { private final ApplicationContext context; // 构造函数,传入context 和 ApplicationContext public QLExpressContext(Map<String, Object> map, ApplicationContext aContext) { super(map); this.context = aContext; } /** * 抽象方法:根据名称从属性列表中提取属性值 */ public Object get(Object name) { Object result; result = super.get(name); try { if (result == null && this.context != null && this.context.containsBean((String)name)) { // 如果在Spring容器中包含bean,则返回String的Bean result = this.context.getBean((String)name); } } catch (Exception e) { throw new RuntimeException(e); } return result; } public Object put(String name, Object object) { return super.put(name, object); } } ``` 完整的demo参照 [SpringDemoTest.java](https://github.com/alibaba/QLExpress/blob/master/src/test/java/com/ql/util/express/test/spring/SpringDemoTest.java) #### 8.2 自定义函数操作符获取原始的context控制上下文 自定义的Operator需要直接继承OperatorBase,获取到parent即可,可以用于在运行一组脚本的时候,直接编辑上下文信息,业务逻辑处理上也非常有用。 ```java public class ContextMessagePutTest { class OperatorContextPut extends OperatorBase { public OperatorContextPut(String aName) { this.name = aName; } @Override public OperateData executeInner(InstructionSetContext parent, ArraySwap list) throws Exception { String key = list.get(0).toString(); Object value = list.get(1); parent.put(key, value); return null; } } @Test public void test() throws Exception { ExpressRunner runner = new ExpressRunner(); OperatorBase op = new OperatorContextPut("contextPut"); runner.addFunction("contextPut", op); String express = "contextPut('success', 'false'); contextPut('error', '错误信息'); contextPut('warning', '提醒信息')"; IExpressContext<String, Object> context = new DefaultContext<String, Object>(); context.put("success", "true"); Object result = runner.execute(express, context, null, false, true); System.out.println(result); System.out.println(context); } } ``` ## 4. 多级别安全控制 QLExpress 与本地 JVM 交互的方式有: - 应用中的自定义函数/操作符/宏: 该部分不在 QLExpress 运行时的管控范围,属于应用开放给脚本的业务功能,不受安全控制,应用需要自行确保这部分是安全的 - 在 QLExpress 运行时中发生的交互: 安全控制可以对这一部分进行管理, QLExpress 会开放相关的配置给应用 - 通过 `.` 操作符获取 Java 对象的属性或者调用 Java 对象中的方法 - 通过 `import` 可以导入 JVM 中存在的任何类并且使用, 默认情况下会导入 `java.lang`, `java.util` 以及 `java.util.stream` 在不同的场景下,应用可以配置不同的安全级别,安全级别由低到高: 1. 黑名单控制:QLExpress 默认会阻断一些高危的系统 API, 用户也可以自行添加, 但是开放对 JVM 中其他所有类与方法的访问, 最灵活, 但是很容易被反射工具类绕过,只适用于脚本安全性有其他严格控制的场景,禁止直接运行终端用户输入 2. 白名单控制:QLExpress 支持编译时白名单和运行时白名单机制, 编译时白名单设置到类级别, 能够在语法检查阶段就暴露出不安全类的使用, 但是无法阻断运行时动态生成的类(比如通过反射), 运行时白名单能够确保运行时只可以直接调用有限的 Java 方法, 必须设置了运行时白名单, 才算是达到了这个级别 3. 沙箱模式:QLExpress 作为一个语言沙箱, 只允许通过自定义函数/操作符/宏与应用交互, 不允许与 JVM 中的类产生交互 ### (1) 黑名单控制 QLExpess 目前默认添加的黑名单有: - `java.lang.System.exit` - `java.lang.Runtime.exec` - `java.lang.ProcessBuilder.start` - `java.lang.reflect.Method.invoke` - `java.lang.reflect.Class.forName` - `java.lang.reflect.ClassLoader.loadClass` - `java.lang.reflect.ClassLoader.findClass` 同时支持通过 `QLExpressRunStrategy.addSecurityRiskMethod` 额外添加 `com.ql.util.express.example.MultiLevelSecurityTest#blockWhiteListControlTest` ```java // 必须将该选项设置为 true QLExpressRunStrategy.setForbidInvokeSecurityRiskMethods(true); // 这里不区分静态方法与成员方法, 写法一致 // 不支持重载, riskMethod 的所有重载方法都会被禁止 QLExpressRunStrategy.addSecurityRiskMethod(RiskBean.class, "riskMethod"); ExpressRunner expressRunner = new ExpressRunner(); DefaultContext<String, Object> context = new DefaultContext<>(); try { expressRunner.execute("import com.ql.util.express.example.RiskBean;" + "RiskBean.riskMethod()", context, null, true, false); fail("没有捕获到不安全的方法"); } catch (Exception e) { assertTrue(e.getCause() instanceof QLSecurityRiskException); } ``` ### (2)白名单控制 **编译期白名单:** 编译期白名单是类维度的,脚本中只允许显式引用符合白名单条件的类,支持两种设置方式,精确设置某个类,以及设置某个类的全部子类。 `com.ql.util.express.example.MultiLevelSecurityTest#compileWhiteListTest` ```java // 设置编译期白名单 QLExpressRunStrategy.setCompileWhiteCheckerList(Arrays.asList( // 精确设置 CheckerFactory.must(Date.class), // 子类设置 CheckerFactory.assignable(List.class) )); ExpressRunner expressRunner = new ExpressRunner(); // Date 在编译期白名单中, 可以显示引用 expressRunner.execute("new Date()", new DefaultContext<>(), null, false, true); // LinkedList 是 List 的子类, 符合白名单要求 expressRunner.execute("LinkedList ll = new LinkedList; ll.add(1); ll.add(2); ll", new DefaultContext<>(), null, false, true); try { // String 不在白名单中, 不可以显示引用 // 但是隐式引用, a = 'mmm', 或者定义字符串常量 'mmm' 都是可以的 expressRunner.execute("String a = 'mmm'", new DefaultContext<>(), null, false, true); } catch (Exception e) { assertTrue(e.getCause() instanceof QLSecurityRiskException); } // Math 不在白名单中 // 对于不满足编译期类型白名单的脚本无需运行, 即可通过 checkSyntax 检测出 assertFalse(expressRunner.checkSyntax("Math.abs(-1)")); ``` 编译期白名单只能检测出脚本编译时能够确认的类型,任何运行时出现的类型都是无法检测的,诸如各种反射`Class.forName`, `ClassLoader.loadClass`,或者没有声明类型的变量等等,因为编译期白名单只能增加黑客的作案成本,是容易被绕过。因此建议编译期白名单只用来帮助脚本校验,如果需要接收终端用户输入,运行期白名单是务必要配置的。 **运行期白名单:** 如果有白名单设置,所有的黑名单设置就都会无效,以白名单为准。默认没有白名单设置。 `com.ql.util.express.example.MultiLevelSecurityTest#blockWhiteListControlTest` ```java // 必须将该选项设置为 true QLExpressRunStrategy.setForbidInvokeSecurityRiskMethods(true); // 有白名单设置时, 则黑名单失效 QLExpressRunStrategy.addSecureMethod(RiskBean.class, "secureMethod"); // 白名单中的方法, 允许正常调用 expressRunner.execute("import com.ql.util.express.example.RiskBean;" + "RiskBean.secureMethod()", context, null, true, false); try { // java.lang.String.length 不在白名单中, 不允许调用 expressRunner.execute("'abcd'.length()", context, null, true, false); fail("没有捕获到不安全的方法"); } catch (Exception e) { assertTrue(e.getCause() instanceof QLSecurityRiskException); } // setSecureMethods 设置方式 Set<String> secureMethods = new HashSet<>(); secureMethods.add("java.lang.String.length"); secureMethods.add("java.lang.Integer.valueOf"); QLExpressRunStrategy.setSecureMethods(secureMethods); // 白名单中的方法, 允许正常调用 Object res = expressRunner.execute("Integer.valueOf('abcd'.length())", context, null, true, false); assertEquals(4, res); try { // java.lang.Long.valueOf 不在白名单中, 不允许调用 expressRunner.execute("Long.valueOf('abcd'.length())", context, null, true, false); fail("没有捕获到不安全的方法"); } catch (Exception e) { assertTrue(e.getCause() instanceof QLSecurityRiskException); } ``` 从上图中可以看出白名单有两种设置方式: - 添加:`QLExpressRunStrategy.addSecureMethod` - 置换:`QLExpressRunStrategy.setSecureMethods` 在应用中使用的时,推荐将白名单配置在诸如 `etcd`,`configServer` 等配置服务中,根据需求随时调整。 ### (3)沙箱模式 如果你厌烦上述复杂的配置,只是想完全关闭 QLExpress 和 Java 应用的自由交互,那么推荐使用沙箱模式。 在沙箱模式中,脚本**不可以**: - import Java 类 - 显式引用 Java 类,比如 `String a = 'mmm'` - 取 Java 类中的字段:`a = new Integer(11); a.value` - 调用 Java 类中的方法:`Math.abs(12)` 脚本**可以**: - 使用 QLExpress 的自定义操作符/宏/函数,以此实现与应用的受控交互 - 使用 `.` 操作符获取 `Map` 的 `key` 对应的 `value`,比如 `a` 在应用传入的表达式中是一个 `Map`,那么可以通过 `a.b` 获取 - 所有不涉及应用 Java 类的操作 `com.ql.util.express.example.MultiLevelSecurityTest#sandboxModeTest` ```java // 开启沙箱模式 QLExpressRunStrategy.setSandBoxMode(true); ExpressRunner expressRunner = new ExpressRunner(); // 沙箱模式下不支持 import 语句 assertFalse(expressRunner.checkSyntax("import com.ql.util.express.example.RiskBean;")); // 沙箱模式下不支持显式的类型引用 assertFalse(expressRunner.checkSyntax("String a = 'abc'")); assertTrue(expressRunner.checkSyntax("a = 'abc'")); // 无法用 . 获取 Java 类属性或者 Java 类方法 try { expressRunner.execute("'abc'.length()", new DefaultContext<>(), null, false, true); fail(); } catch (QLException e) { // 没有找到方法:length } try { DefaultContext<String, Object> context = new DefaultContext<>(); context.put("test", new CustBean(12)); expressRunner.execute("test.id", context, null, false, true); fail(); } catch (RuntimeException e) { // 无法获取属性:id } // 沙箱模式下可以使用 自定义操作符/宏/函数 和应用进行交互 expressRunner.addFunction("add", new Operator() { @Override public Object executeInner(Object[] list) throws Exception { return (Integer) list[0] + (Integer) list[1]; } }); assertEquals(3, expressRunner.execute("add(1,2)", new DefaultContext<>(), null, false, true)); // 可以用 . 获取 map 的属性 DefaultContext<String, Object> context = new DefaultContext<>(); HashMap<Object, Object> testMap = new HashMap<>(); testMap.put("a", "t"); context.put("test", testMap); assertEquals("t", expressRunner.execute("test.a", context, null, false, true)); ``` 在沙箱模式下,为了进一步保障内存的安全,建议同时限制脚本能够申请的最大数组长度以及超时时间,设置方法如下: `com.ql.util.express.test.ArrayLenCheckTest` ```java // 限制最大申请数组长度为10, 默认没有限制 QLExpressRunStrategy.setMaxArrLength(10); ExpressRunner runner = new ExpressRunner(); String code = "byte[] a = new byte[11];"; try { // 20ms 超时时间 runner.execute(code, new DefaultContext<>(), null, false, false, 20); Assert.fail(); } catch (QLException e) { } QLExpressRunStrategy.setMaxArrLength(-1); // 20ms 超时时间 runner.execute(code, new DefaultContext<>(), null, false, false, 20); ``` 附录: [版本更新列表](VERSIONS.md) ## links for us - Gitter channel - Online chat room with QLExpress developers. [Gitter channel ](https://gitter.im/QLExpress/Lobby) - email:tianqiao@alibaba-inc.com,baoxingjie@126.com - wechart:371754252
0
tianshiyeben/wgcloud
Linux运维监控工具,支持系统硬件信息,内存,cpu,温度,磁盘空间及IO,硬盘smart,系统负载,网络流量等监控,服务接口,大屏展示,拓扑图,进程监控,端口监控,docker监控,文件防篡改,日志监控,数据可视化,web ssh,堡垒机,指令下发批量执行,Linux面板(探针),SNMP,故障告警
agent cpu devops grafana-dashboard linux memory monitoring monitoring-systems nagios prometheus snmp snmp-agent springboot springboot2 sysstat webssh2 wgcloud zabbix
<p align="center"> <a target="_blank" href="http://www.wgstart.com"> <img src="./demo/logo.png"> </a> </p> ## WGCLOUD [中文版README](./README_cn.md) Wgcloud design idea is a new generation of very simple operation and maintenance monitoring system, which advocates rapid deployment, reduces the difficulty of operation and maintenance learning, runs automatically, and has no template and script. **The current warehouse version is v2 3.7 for the latest secondary development, please pull the master branch.** Wgcloud is developed based on the microservice springboot architecture, and is a lightweight and high-performance distributed monitoring system. The core collection indexes include: **CPU utilization, CPU temperature, memory utilization, disk capacity, disk IO, smart health status of hard disk, system load, number of connections, network card traffic, hardware system information, etc. Support the monitoring of process applications, files, ports, logs, docker containers, databases, data tables and other resources on the server. Support monitoring service interface API, data communication equipment (such as switch, router, printer), etc. Automatically generate network topology map, large screen visualization, web SSH (Fortress machine), statistical analysis chart, command issuance, batch execution, alarm information push (such as email, nail, wechat, SMS, etc.)** 1. V2.3.7 abandons the sigar method of v2.3.6 to obtain host indicators, and v2.3.7 uses popular oshi components to collect host indicators 2. the server and client work together, which is lighter and more efficient, and can support thousands of hosts to monitor online at the same time. 3. The server side is responsible for receiving data, processing data, and generating chart display. The agent side reports the index data every 30 seconds (time adjustable) by default. 4. support the installation and deployment of mainstream server platforms, such as Linux, windows, MacOS, etc. 5. Wgcloud adopts springboot+bootstrap to realize the distributed monitoring system perfectly, which is used to feed the open source community and open source for the second time. 6. if you feel wggroup has helped you, you don't need to reward it, just click star to support it 7. About sharing, the original intention of open source is to share learning. If you can, please add [wgcloud] on your blog and website (if any)[WGCLOUD](http://www.wgstart.com)Link or write a post to share with others to help wgcloud learn and progress. Finally, if you like, you can send us your company name by email, and we will show it to the [thank you] column of wgcloud website. ## site <http://www.wgstart.com> ## video <https://space.bilibili.com/549621501/video> ## **Source code use** 1.If you use idea (recommended), you can directly open wgcloud server and wgcloud agent. JDK uses 1.8 2.If you use eclipse, you can import the Maven project wgcloud server and wgcloud agent. JDK uses 1.8 3.Run the required SQL script (MySQL database is used in this project). Under the SQL folder, create the database wgcloud in MySQL database and import wgcloud.sql. **4. If you feel that wgcloud has helped you, please support [www.wgstart.com](http://www.wgstart.com). With your support, open source can do better. Thank you.** ## **Demo** ![WGCLOUD监控主面板](./demo/demo2.jpg) ![WGCLOUD监控主机列表](./demo/demo3.jpg) ![WGCLOUD监控主机磁盘图表](./demo/demo9.jpg) ![WGCLOUD监控主机告警图表](./daping/dapingv4.jpg) ![WGCLOUD监控主机告警图表](./demo/dp.jpg) ![WGCLOUD监控主机告警图表](./demo/dapingNew.jpg) ![WGCLOUD监控主机状态趋势图](./demo/demo4.jpg) ![WGCLOUD网络拓扑图](./demo/tpdemo.jpg) ![WGCLOUD主机画像图](./demo/ssh.jpg) ![WGCLOUD主机画像图](./demo/huaxiang.jpg) ## Example of communication diagram (HTTP protocol) ![WGCLOUD通信图示例](./demo/tongxin.jpg) ## Running environment 1.JDK1.8、JDK11 2.Mysql5.6 and above、MariaDB、PostgreSQL、Oracle 3.Support operating system platform > Support monitoring linux series: Debian, RedHat, CentOS, Ubuntu ..... > > support monitoring windows series: Windows Server 2008 R2 2012 , 2016 , 2019, Windows 7, Windows 8, windows 10 ,windows 11 > > support monitoring UNIX series: Solaris, FreeBSD, OpenBSD ...... > > support monitoring Mac OS series: Mac OS AMD64 ## EMAIL **wgcloud@foxmail.com** ## SPONSORS https://www.wgstart.com/docs19.html
0
dromara/hmily
Distributed transaction solutions
dubbo motan spring springcloud tac tansaction tcc xa
<p align="center" > <a href="https://dromara.org"><img src="https://yu199195.github.io/images/hmily/hmily-logo.png" width="45%"></a> </p> <p align="center"> <strong>Financial-level flexible distributed transaction solution</strong> </p> <p align="center"> <a href="https://dromara.org">https://dromara.org/</a> </p> <p align="center"> English | <a href="https://github.com/dromara/hmily/blob/master/README_CN.md">简体中文</a> </p> <p align="center"> <a target="_blank" href="https://search.maven.org/search?q=g:org.dromara%20AND%20hmily"> <img src="https://img.shields.io/maven-central/v/org.dromara/hmily.svg?label=maven%20central" /> </a> <a target="_blank" href="https://github.com/Dromara/hmily/blob/master/LICENSE"> <img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license" /> </a> <a target="_blank" href="https://app.codacy.com/app/Dromara/hmily?utm_source=github.com&utm_medium=referral&utm_content=Dromara/hmily&utm_campaign=Badge_Grade_Settings"> <img src="https://api.codacy.com/project/badge/Grade/2f0a0191b02448e6919aca6ce12a1584" /> </a> <a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"> <img src="https://img.shields.io/badge/JDK-8+-green.svg" /> </a> <a target="_blank" href="https://github.com/dromara/hmily"> <img src="https://github.com/dromara/hmily/workflows/build/badge.svg" /> </a> <a href="https://codecov.io/gh/dromara/hmily"> <img src="https://codecov.io/gh/dromara/hmily/branch/master/graph/badge.svg"/> </a> <a target="_blank" href='https://gitee.com/dromara/hmily/stargazers'> <img src='https://gitee.com/dromara/hmily/badge/star.svg?theme=gvp' alt='gitee stars'/> </a> <a target="_blank" href='https://github.com/dromara/hmily'> <img src="https://img.shields.io/github/forks/dromara/hmily.svg" alt="github forks"/> </a> <a target="_blank" href='https://github.com/dromara/hmily'> <img src="https://img.shields.io/github/stars/dromara/hmily.svg" alt="github stars"/> </a> <a target="_blank" href='https://github.com/dromara/hmily'> <img src="https://img.shields.io/github/contributors/dromara/hmily.svg" alt="github contributors"/> </a> <a href="https://github.com/Dromara/hmily"> <img src="https://tokei.rs/b1/github/Dromara/hmily?category=lines"/> </a> </p> <br/> ------------------------------------------------------------------------------- # Panorama of distributed transaction solutions ![](https://yu199195.github.io/images/hmily/hmily.png) ------------------------------------------------------------------------------- # Features * high reliability :supports abnormal transaction rollback in distributed scenarios, and abnormal recovery over time to prevent transaction suspension * usability :provide zero-invasive `Spring-Boot`, `Spring-Namespace` to quickly integrate with business systems * high performance :decentralized design, fully integrated with business systems, naturally supporting cluster deployment * observability :metrics performance monitoring of multiple indicators, and admin management background UI display * various RPC : support `Dubbo`, `SpringCloud`, `Motan`, `Sofa-rpc`, `brpc`, `tars` and other well-known RPC frameworks * log storage : support `mysql`, `oracle`, `mongodb`, `redis`, `zookeeper` etc. * complex scene : support RPC nested call transaction ------------------------------------------------------------------------------- # Necessary premise * must use `JDK8+` * TCC mode must use a `RPC` framework, such as: `Dubbo`, `SpringCloud`, `Montan` ------------------------------------------------------------------------------- # TCC mode ![](https://yu199195.github.io/images/hmily/hmily-tcc.png) when using the `TCC` mode, users provide three methods: `try`, `confirm`, and `cancel` according to their business needs. And the `confirm` and `cancel` methods are implemented by themselves, and the framework is only responsible for calling them to achieve transaction consistency。 ------------------------------------------------------------------------------- # TAC mode ![](https://yu199195.github.io/images/hmily/hmily-tac.png) When the user uses the `TAC` mode, the user must use a relational database for business operations, and the framework will automatically generate a `rollback SQL`, When the business is abnormal, the `rollback SQL` will be executed to achieve transaction consistency。 ------------------------------------------------------------------------------- # Documentation [![EN doc](https://img.shields.io/badge/document-English-blue.svg)](https://dromara.org/projects/hmily) [![CN doc](https://img.shields.io/badge/文档-中文版-blue.svg)](https://dromara.org/zh/projects/hmily) If you want to use it, you can refer to [Quick Start](https://dromara.org/projects/hmily) # About Hmily Hmily is a flexible distributed transaction solution that provides `TCC` and `TAC` modes。 It can be easily integrated by business with zero intrusion and rapid integration。 In terms of performance, log storage is asynchronous (optional) and asynchronous execution is used, without loss of business methods。 It was previously developed by me personally. At present, I have restarted at JD Digital. The future will be a distributed transaction solution for financial scenarios.。 ------------------------------------------------------------------------------- # Follow the trend [![Stargazers over time](https://starchart.cc/yu199195/hmily.svg)](https://starchart.cc/yu199195/hmily) ------------------------------------------------------------------------------- # User wall # Support ![](https://yu199195.github.io/images/qq.png) ![](https://yu199195.github.io/images/public.jpg)
0
yanzhenjie/SwipeRecyclerView
:melon: RecyclerView侧滑菜单,Item拖拽,滑动删除Item,自动加载更多,HeaderView,FooterView,Item分组黏贴。
footerview headerview item-drag loadmore recyclerview swipe-delete swipe-menu
# SwipeRecyclerView 作者的主页:[https://www.yanzhenjie.com](https://www.yanzhenjie.com) 技术交流群:[46505645](https://jq.qq.com/?_wv=1027&k=5wY8UWl) ---- 本库是基于RecyclerView的封装,提供了Item侧滑菜单、Item滑动删除、Item长按拖拽、添加HeaderView/FooterView、加载更多、Item点击监听等基本功能。 ## 特性 1. Item侧滑菜单,支持水平分布、垂直分布 2. Item长按拖拽、侧滑删除 3. 添加/移除HeaderView/FooterView 4. **自动/点击**加载更多的功能 5. 支持二级列表,List形式、Grid形式、Staggered形式 6. Sticky普通布局黏贴和ReyclerView分组黏贴 7. 支持AndroidX > 使用本库只需要使用SwipeRecyclerView即可,用法和原生RecyclerView一模一样,本库比原生的RecyclerView多了几个扩展方法。 ## 截图 对上面提到的效果基本都有演示,但不是全部,更多效果可以下载Demo查看。 ### Item侧滑菜单 <img src="./image/1.gif" width="180px"/> <img src="./image/2.gif" width="180px"/> <img src="./image/3.gif" width="180px"/> ### Item侧滑删除、拖拽 <img src="./image/4.gif" width="180px"/> <img src="./image/5.gif" width="180px"/> <img src="./image/6.gif" width="180px"/> ### 下拉刷新和加载更多 <img src="./image/7.gif" width="180px"/> ### HeaderView和FooterView <img src="./image/8.gif" width="180px"/> ### Sticky效果和Item分组 <img src="./image/9.gif" width="180px"/> <img src="./image/10.gif" width="180px"/> ### 和DrawerLayout嵌套 <img src="./image/11.gif" width="180px"/> ## 如何使用 如果你使用的是android support库,那么请添加下述依赖: ```groovy implementation 'com.yanzhenjie.recyclerview:support:1.3.2' ``` 如果你使用的是android x库,那么请添加下述依赖: ```groovy implementation 'com.yanzhenjie.recyclerview:x:1.3.2' ``` > **1. SwipeRecyclerView从1.3.0版本开始支持AndroidX和二级列表,因此相对于低版本的包名和类名有所改动,从低版本升级的开发者需要考量是否要升级。** **2. 为了让开发者方便切换support库和x库,SwipeRecyclerView的support库和x库除了依赖时的名称不一样外,包名、控件名和类名都是一样的,因此两个库不能共存。** ### 加入布局 在布局的xml中加入`SwipeRecyclerView`: ```xml <com.yanzhenjie.recyclerview.SwipeRecyclerView .../> ``` ### ItemDecoration 也就是分割线,支持Grid形式和Linear形式,可以选择某个ViewType不画分割线: ```java // 默认构造,传入颜色即可。 ItemDecoration itemDecoration = new DefaultDecoration(color); // 或者:颜色,宽,高,最后一个参数是不画分割线的ViewType,可以传入多个。 itemDecoration = new DefaultDecoration(color, width, height, excludeViewType); // 或者:例如下面的123都是不画分割线的ViewType: itemDecoration = new DefaultDecoration(color, width, height, 1, 2, 3); SwipeRecyclerView recyclerView = ...; recyclerView.setDecoration(itemDecoration); ``` ### Item点击监听 ```java recyclerView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(View view, int position) { // TODO... } }); ``` ### 侧滑菜单 ```java // 设置监听器。 swipeRecyclerView.setSwipeMenuCreator(mSwipeMenuCreator); // 创建菜单: SwipeMenuCreator mSwipeMenuCreator = new SwipeMenuCreator() { @Override public void onCreateMenu(SwipeMenu leftMenu, SwipeMenu rightMenu, int position) { SwipeMenuItem deleteItem = new SwipeMenuItem(mContext) ...; // 各种文字和图标属性设置。 leftMenu.addMenuItem(deleteItem); // 在Item左侧添加一个菜单。 SwipeMenuItem deleteItem = new SwipeMenuItem(mContext) ...; // 各种文字和图标属性设置。 leftMenu.addMenuItem(deleteItem); // 在Item右侧添加一个菜单。 // 注意:哪边不想要菜单,那么不要添加即可。 } }; // 菜单点击监听。 swipeRecyclerView.setOnItemMenuClickListener(mItemMenuClickListener); OnItemMenuClickListener mItemMenuClickListener = new OnItemMenuClickListener() { @Override public void onItemClick(SwipeMenuBridge menuBridge, int position) { // 任何操作必须先关闭菜单,否则可能出现Item菜单打开状态错乱。 menuBridge.closeMenu(); // 左侧还是右侧菜单: int direction = menuBridge.getDirection(); // 菜单在Item中的Position: int menuPosition = menuBridge.getPosition(); } }; ``` **注意**:菜单需要设置高度,关于菜单高度: 1. `MATCH_PARENT`,自动适应Item高度,保持和Item一样高,比较推荐; 2. 指定具体的高,比如80; 3. `WRAP_CONTENT`,自身高度,极不推荐; ### 侧滑删除和拖拽 拖拽和侧滑删除的功能默认关闭的,所以先要打开功能: ```java recyclerView.setLongPressDragEnabled(true); // 拖拽排序,默认关闭。 recyclerView.setItemViewSwipeEnabled(true); // 侧滑删除,默认关闭。 ``` 只需要设置上面两个属性就可以进行相应的动作了,如果不需要哪个,不要打开就可以了。 然后监听拖拽和侧滑的动作,进行数据更新: ```java recyclerView.setOnItemMoveListener(mItemMoveListener);// 监听拖拽,更新UI。 OnItemMoveListener mItemMoveListener = new OnItemMoveListener() { @Override public boolean onItemMove(ViewHolder srcHolder, ViewHolder targetHolder) { // 此方法在Item拖拽交换位置时被调用。 // 第一个参数是要交换为之的Item,第二个是目标位置的Item。 // 交换数据,并更新adapter。 int fromPosition = srcHolder.getAdapterPosition(); int toPosition = targetHolder.getAdapterPosition(); Collections.swap(mDataList, fromPosition, toPosition); adapter.notifyItemMoved(fromPosition, toPosition); // 返回true,表示数据交换成功,ItemView可以交换位置。 return true; } @Override public void onItemDismiss(ViewHolder srcHolder) { // 此方法在Item在侧滑删除时被调用。 // 从数据源移除该Item对应的数据,并刷新Adapter。 int position = srcHolder.getAdapterPosition(); mDataList.remove(position); adapter.notifyItemRemoved(position); } }; ``` **特别注意**:如果`LayoutManager`是`List`形式,那么Item拖拽时只能从1-2-3-4这样走,如果你的`LayoutManager`是`Grid`形式的,那么Item可以从1直接到3或者5或者6...,这样数据就会错乱,所以**当`LayoutManager`是Grid形式时**这里要特别注意转换数据位置的算法: ```java @Override public boolean onItemMove(ViewHolder srcHolder, ViewHolder targetHolder) { int fromPosition = srcHolder.getAdapterPosition(); int toPosition = targetHolder.getAdapterPosition(); if (fromPosition < toPosition) { for (int i = fromPosition; i < toPosition; i++) { Collections.swap(mDataList, i, i + 1); } } else { for (int i = fromPosition; i > toPosition; i--) { Collections.swap(mDataList, i, i - 1); } } mMenuAdapter.notifyItemMoved(fromPosition, toPosition); return true; } ``` 我们还可以监听用户的侧滑删除和拖拽Item时的手指状态: ```java recyclerView.setOnItemStateChangedListener(mStateChangedListener); ... private OnItemStateChangedListener mStateChangedListener = (viewHolder, actionState) -> { if (actionState == OnItemStateChangedListener.ACTION_STATE_DRAG) { // 状态:正在拖拽。 } else if (actionState == OnItemStateChangedListener.ACTION_STATE_SWIPE) { // 状态:滑动删除。 } else if (actionState == OnItemStateChangedListener.ACTION_STATE_IDLE) { // 状态:手指松开。 } }; ``` 想用户触摸到某个`Item`时就开始拖拽或者侧滑删除时,只需要调用`startDrag()`和`startSwipe()`并转入当前`Item`的`ViewHoler`即可。 触摸拖拽: ```java swipeRecyclerView.startDrag(ViewHolder); ``` 触摸侧滑删除: ```java swipeRecyclerView.startSwipe(ViewHolder); ``` ### HeaderView和FooterView 主要方法: ```java addHeaderView(View); // 添加HeaderView。 removeHeaderView(View); // 移除HeaderView。 addFooterView(View); // 添加FooterView。 removeFooterView(View); // 移除FooterView。 getHeaderItemCount(); // 获取HeaderView个数。 getFooterItemCount(); // 获取FooterView个数。 getItemViewType(int); // 获取Item的ViewType,包括HeaderView、FooterView、普通ItemView。 ``` 添加/移除`HeaderView`/`FooterView`和`setAdapter()`的调用不分先后顺序。 **特别注意**: 1. 如果添加了`HeaderView`,凡是通过`ViewHolder`拿到的`position`都要减掉`HeaderView`的数量才能得到正确的`position`。 ### 加载更多 本库默认提供了加载更多的动画和View,开发者也可以自定义,默认支持`RecyclerView`自带的三种布局管理器。 默认加载更多: ```java RecyclerView recyclerView = ...; ... recyclerView.useDefaultLoadMore(); // 使用默认的加载更多的View。 recyclerView.setLoadMoreListener(mLoadMoreListener); // 加载更多的监听。 LoadMoreListener mLoadMoreListener = new LoadMoreListener() { @Override public void onLoadMore() { // 该加载更多啦。 ... // 请求数据,并更新数据源操作。 mMainAdapter.notifyDataSetChanged(); // 数据完更多数据,一定要调用这个方法。 // 第一个参数:表示此次数据是否为空。 // 第二个参数:表示是否还有更多数据。 mRecyclerView.loadMoreFinish(false, true); // 如果加载失败调用下面的方法,传入errorCode和errorMessage。 // errorCode随便传,你自定义LoadMoreView时可以根据errorCode判断错误类型。 // errorMessage是会显示到loadMoreView上的,用户可以看到。 // mRecyclerView.loadMoreError(0, "请求网络失败"); } }; ``` 自定义加载更多View也很简单,自定义一个View,并实现一个接口即可: ```java public class DefineLoadMoreView extends LinearLayout implements SwipeRecyclerView.LoadMoreView, View.OnClickListener { private LoadMoreListener mLoadMoreListener; public DefineLoadMoreView(Context context) { super(context); ... setOnClickListener(this); } /** * 马上开始回调加载更多了,这里应该显示进度条。 */ @Override public void onLoading() { // 展示加载更多的动画和提示信息。 ... } /** * 加载更多完成了。 * * @param dataEmpty 是否请求到空数据。 * @param hasMore 是否还有更多数据等待请求。 */ @Override public void onLoadFinish(boolean dataEmpty, boolean hasMore) { // 根据参数,显示没有数据的提示、没有更多数据的提示。 // 如果都不存在,则都不用显示。 } /** * 加载出错啦,下面的错误码和错误信息二选一。 * * @param errorCode 错误码。 * @param errorMessage 错误信息。 */ @Override public void onLoadError(int errorCode, String errorMessage) { } /** * 调用了setAutoLoadMore(false)后,在需要加载更多的时候,此方法被调用,并传入listener。 */ @Override public void onWaitToLoadMore(SwipeRecyclerView.LoadMoreListener loadMoreListener) { this.mLoadMoreListener = loadMoreListener; } /** * 非自动加载更多时mLoadMoreListener才不为空。 */ @Override public void onClick(View v) { if (mLoadMoreListener != null) mLoadMoreListener.onLoadMore(); } } ``` ## 感谢与参考 * [cube-sdk](https://github.com/liaohuqiu/cube-sdk) * [SwipeMenu](https://github.com/TUBB/SwipeMenu/) * [HeaderAndFooterWrapper](https://github.com/hongyangAndroid/baseAdapter/blob/master/baseadapter-recyclerview/src/main/java/com/zhy/adapter/recyclerview/wrapper/HeaderAndFooterWrapper.java) 加载更多的灵感来自`cube-sdk`,侧滑菜单参考了`SwipeMenu`,添加`HeaderView`参考了`HeaderAndFooterWrapper`类,特别感谢上述开源库及其作者。 ## License ```text Copyright 2019 Zhenjie Yan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```
0
google/guice
Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 11 and above, brought to you by Google.
null
Guice ==== - **Latest releases:** * **[6.0.0](https://github.com/google/guice/wiki/Guice600) (supports `javax.{inject,servlet,persistence}`, [mostly supports](https://github.com/google/guice/wiki/Guice600#jee-jakarta-transition) `jakarta.inject`)** * **[7.0.0](https://github.com/google/guice/wiki/Guice700) (supports `jakarta.{inject,servlet,persistence}`)** * (6.0.0 & 7.0.0 are equivalent except for their javax/jakarta support.) - **Documentation:** * [User Guide](https://github.com/google/guice/wiki/Motivation), * [6.0.0 javadocs](https://google.github.io/guice/api-docs/6.0.0/javadoc/index.html) * [7.0.0 javadocs](https://google.github.io/guice/api-docs/7.0.0/javadoc/index.html) * [Latest Snapshot javadocs](https://google.github.io/guice/api-docs/latest/javadoc/index.html) - **Continuous Integration:** [![Build Status](https://github.com/google/guice/workflows/continuous-integration/badge.svg)](https://github.com/google/guice/actions) - **Mailing Lists:** [User Mailing List](http://groups.google.com/group/google-guice) <br/> - **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) Overview ==== Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of Guice's @Inject as the new new. You will still need to write factories in some cases, but your code will not depend directly on them. Your code will be easier to change, unit test and reuse in other contexts. Guice embraces Java's type safe nature. You might think of Guice as filling in missing features for core Java. Ideally, the language itself would provide most of the same features, but until such a language comes along, we have Guice. Guice helps you design better APIs, and the Guice API itself sets a good example. Guice is not a kitchen sink. We justify each feature with at least three use cases. When in doubt, we leave it out. We build general functionality which enables you to extend Guice rather than adding every feature to the core framework. Guice aims to make development and debugging easier and faster, not harder and slower. In that vein, Guice steers clear of surprises and magic. You should be able to understand code with or without tools, though tools can make things even easier. When errors do occur, Guice goes the extra mile to generate helpful messages. For an introduction to Guice and a comparison to new and the factory pattern, see [Bob Lee's video presentation](https://www.youtube.com/watch?v=hBVJbzAagfs). After that, check out our [user's guide](https://github.com/google/guice/wiki/Motivation). We've been running Guice in mission critical applications since 2006, and now you can, too. We hope you enjoy it as much as we do. Installation Instructions ==== Guice Core (Maven) ```xml <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> <!-- {version} can be 6.0.0, 7.0.0, etc. --> <version>{version}</version> </dependency> ``` Guice Extension (Maven) ```xml <dependency> <groupId>com.google.inject.extensions</groupId> <!-- {extension-name} can be one of: assistedinject, dagger-adapter, grapher, jmx, jndi, persist, spring, testlib or throwingproviders --> <artifactId>guice-{extension-name}</artifactId> <!-- {version} must match the guice core version. --> <version>{version}</version> </dependency> ``` See [Maven Central](https://central.sonatype.com/artifact/com.google.inject/guice/) for more details, including snippets for other build systems such as Gradle, Ivy, sbt, and more. --- [![jolt award](https://user-images.githubusercontent.com/1885701/52603534-0d620380-2e1c-11e9-8cd5-95f0e141fcb0.png)](http://www.drdobbs.com/tools/winners-of-the-18th-jolt-product-excelle/207600666?pgno=6)
0
XiaoMi/mone
No description, website, or topics provided
null
<div align='center'> <a href="https://github.com/XiaoMi/mone"> <img width="500" style='background:black' src="https://img.youpin.mi-img.com/middlewareGroup/1bd0957f930473e6449e3c34d52df98a.png"> </a> </div> <div align='center'> <br> <h2 align='center' >Provided by Xiaomi Mione Team </h2> <br> </div> Mone is a one-stop enterprise collaborative Research and Development platform centered on microservices. It supports various deployment forms such as public cloud, private cloud, and hybrid cloud; it provides end-to-end R&D full-process services from "creation -> development -> deployment -> governance -> observation". Mone creates "dual agility", agile R&D and agile organization through new cloud-native technologies and new R&D models, to ensure the agile R&D collaboration of Xiaomi's high-complexity business and large-scale teams in the China region, achieving multiple efficiency improvements. ## ✨ Architecture ### Product Architecture ![mone](readme/image/mione_architect.png) ### Improving Efficiency Across the Entire R&D Process ![mone](readme/image/mione_devflow.png) ## ✨ Features - 🌈 Full Lifecycle Project Management - 📦 Continuous Integration, Continuous Delivery - 🛡 Dayu - Microservice Governance - ⚙️ Tesla Gateway - 🌍 OzHera - Application Observability Platform - 🎨 FaaS Platform - ⚙️ API Management Platform ## 🔗 Mone introduction ### [OzHera - Application Observability Platform] ![mone-hera](readme/image/en/hera_en01_new.jpeg) ![mone-hera](readme/image/en/hera_en02.jpeg) ![mone-hera](readme/image/en/hera_en03.jpeg) ![mone-hera](readme/image/en/hera_en04.jpeg) ![mone-hera](readme/image/en/hera_en05.jpeg) ![mone-hera](readme/image/en/hera_en06.jpeg) ![mone-hera](readme/image/en/hera_en07.jpeg) ## 📃 Document To learn more or get started quickly [Quick Start](http://mone.xiaomiyoupin.com/#/doc/1),please refer to the [Mone Official Website](http://mone.xiaomiyoupin.com/#/index) ## 🔨Contributing **owners:** - Xinyan Xing - Jinliang Ou - Zhiyong Zhang - Wenbang Dan - Qingfu Ren - Pei Ding **committers:** - Ping Zhang - Baoyu Cao - Yibo Gao - Zhenxing Dong - Zhidong Wang - Tao Ding - Xiaowei Zhang - Gaofeng Zhang - Tao Wang - Min Wang - Xihui Gao - Haoyang Wang - Linlin Tan - Chuankang Liu - Yandong Wang - Yulin Gao - Ting Kang - Yuchong Liu - Xiuhua Zhang - Zheng Xu - Ming Zhi - Lei Chen - Hao Zheng ## 📞 Contact + 📮 Mailing list: + mione@xiaomi.com + 📮 Wechat official account + 天穹云原生 + 📮 Forum + [Mone](https://m.one.mi.com/) ## *License* Mone is released under the [Apache 2.0 license](LICENSE). ``` Copyright 2020 XiaoMi. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at the following link. http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` ## User List If you are using [XiaoMi/mone](https://github.com/w1zirn/mone) and think that it helps you or want to contribute code for mone, please add your company to the user list to let us know your needs. |![xiao mi](https://s02.mifile.cn/assets/static/image/logo-mi2.png)|![auchosaur games](readme/image/auchosaur_games.png)|![lingdong](readme/image/lingdong.png)|![airstar](readme/image/airstar.png)| | :---: | :---: | :---: | :---: |
0
apache/incubator-seata
:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
at consistency distributed-transaction microservice saga tcc xa
<div style="align: center"> <img src="https://img.alicdn.com/imgextra/i1/O1CN011z0JfQ2723QgDiWuH_!!6000000007738-2-tps-1497-401.png" height="100" width="426"/> </div> # Seata: Simple Extensible Autonomous Transaction Architecture [![Build Status](https://github.com/apache/incubator-seata/workflows/build/badge.svg?branch=develop)](https://github.com/apache/incubator-seata/actions) [![codecov](https://codecov.io/gh/apache/incubator-seata/branch/develop/graph/badge.svg)](https://codecov.io/gh/apache/incubator-seata) [![license](https://img.shields.io/github/license/apache/incubator-seata.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![maven](https://img.shields.io/maven-central/v/io.apache/incubator-seata-parent?versionSuffix=2.0.0)](https://search.maven.org/search?q=io.seata) ## What is Seata? A **distributed transaction solution** with high performance and ease of use for **microservices** architecture. ### Distributed Transaction Problem in Microservices Let's imagine a traditional monolithic application. Its business is built up with 3 modules. They use a single local data source. Naturally, data consistency will be guaranteed by the local transaction. ![Monolithic App](https://img.alicdn.com/imgextra/i3/O1CN01FTtjyG1H4vvVh1sNY_!!6000000000705-0-tps-1106-678.jpg) Things have changed in a microservices architecture. The 3 modules mentioned above are designed to be 3 services on top of 3 different data sources ([Pattern: Database per service](http://microservices.io/patterns/data/database-per-service.html)). Data consistency within every single service is naturally guaranteed by the local transaction. **But how about the whole business logic scope?** ![Microservices Problem](https://img.alicdn.com/imgextra/i1/O1CN01DXkc3o1te9mnJcHOr_!!6000000005926-0-tps-1268-804.jpg) ### How Seata do? Seata is just a solution to the problem mentioned above. ![Seata solution](https://img.alicdn.com/imgextra/i1/O1CN01FheliH1k5VHIRob3p_!!6000000004632-0-tps-1534-908.jpg) Firstly, how to define a **Distributed Transaction**? We say, a **Distributed Transaction** is a **Global Transaction** which is made up with a batch of **Branch Transaction**, and normally **Branch Transaction** is just **Local Transaction**. ![Global & Branch](https://cdn.nlark.com/lark/0/2018/png/18862/1545015454979-a18e16f6-ed41-44f1-9c7a-bd82c4d5ff99.png) There are three roles in Seata Framework: - **Transaction Coordinator(TC):** Maintain status of global and branch transactions, drive the global commit or rollback. - **Transaction Manager(TM):** Define the scope of global transaction: begin a global transaction, commit or rollback a global transaction. - **Resource Manager(RM):** Manage resources that branch transactions working on, talk to TC for registering branch transactions and reporting status of branch transactions, and drive the branch transaction commit or rollback. ![Model](https://cdn.nlark.com/lark/0/2018/png/18862/1545013915286-4a90f0df-5fda-41e1-91e0-2aa3d331c035.png) A typical lifecycle of Seata managed distributed transaction: 1. TM asks TC to begin a new global transaction. TC generates an XID representing the global transaction. 2. XID is propagated through microservices' invoke chain. 3. RM registers local transaction as a branch of the corresponding global transaction of XID to TC. 4. TM asks TC for committing or rollbacking the corresponding global transaction of XID. 5. TC drives all branch transactions under the corresponding global transaction of XID to finish branch committing or rollbacking. ![Typical Process](https://cdn.nlark.com/lark/0/2018/png/18862/1545296917881-26fabeb9-71fa-4f3e-8a7a-fc317d3389f4.png) For more details about principle and design, please go to [Seata wiki page](https://github.com/apache/incubator-seata/wiki). ### History ##### Alibaba - **TXC**: Taobao Transaction Constructor. Alibaba middleware team started this project since 2014 to meet the distributed transaction problems caused by application architecture change from monolithic to microservices. - **GTS**: Global Transaction Service. TXC as an Aliyun middleware product with new name GTS was published since 2016. - **Fescar**: we started the open source project Fescar based on TXC/GTS since 2019 to work closely with the community in the future. ##### Ant Financial - **XTS**: Extended Transaction Service. Ant Financial middleware team developed the distributed transaction middleware since 2007, which is widely used in Ant Financial and solves the problems of data consistency across databases and services. - **DTX**: Distributed Transaction Extended. Since 2013, XTS has been published on the Ant Financial Cloud, with the name of DTX . ##### Seata Community - **Seata** :Simple Extensible Autonomous Transaction Architecture. Ant Financial joins Fescar, which make it to be a more neutral and open community for distributed transaction, and Fescar be renamed to Seata. ## Maven dependency Depending on the scenario, choose one of the two dependencies: `io.seata:seata-all` or `io.seata:seata-spring-boot-starter`. ```xml <properties> <seata.version>2.0.0</seata.version> </properties> <dependencies> <!--dependencies for non-SpringBoot application framework--> <dependency> <groupId>io.seata</groupId> <artifactId>seata-all</artifactId> <version>${seata.version}</version> </dependency> <!--If your project base on `Spring Boot`, you can directly use the following dependencies--> <!--Notice: `seata-spring-boot-starter` has already included `seata-all` dependency--> <dependency> <groupId>io.seata</groupId> <artifactId>seata-spring-boot-starter</artifactId> <version>${seata.version}</version> </dependency> </dependencies> ``` ## Quick Start [Quick Start](https://seata.apache.org/zh-cn/docs/ops/deploy-guide-beginner) ## Documentation You can view the full documentation from Seata Official Website: [Seata Website page](https://seata.apache.org/zh-cn/docs/overview/what-is-seata). ## Reporting bugs Please follow the [template](./.github/ISSUE_TEMPLATE/BUG_REPORT.md) for reporting any issues. ## Security Please do not use our public issue tracker but refer to our [security policy](./SECURITY.md) ## Contributing Contributors are welcomed to join the Seata project. Please check [CONTRIBUTING](./CONTRIBUTING.md) and[CONTRIBUTING-CN](./CONTRIBUTING_CN.md)about how to contribute to this project. ## Contact * Mailing list: * dev@seata.apache.org , for dev/user discussion. [subscribe](mailto:dev-subscribe@seata.apache.org), [unsubscribe](mailto:dev-unsubscribe@seata.apache.org), [archive](https://lists.apache.org/list.html?dev@seata.apache.org) * Online chat: <img src="https://img.alicdn.com/imgextra/i2/O1CN01nQG77T1VNcpPDOMVi_!!6000000002641-0-tps-1566-424.jpg" height="200" width="630"> ## Seata ecosystem * [Seata Website](https://github.com/apache/incubator-seata.github.io) - Seata official website * [Seata GoLang](https://github.com/apache/incubator-seata-go) - Seata GoLang client and server * [Seata Samples](https://github.com/apache/incubator-seata-samples) - Samples for Seata * [Seata GoLang Simples](https://github.com/apache/incubator-seata-go-samples) - Samples for Seata GoLang * [Seata K8s](https://github.com/apache/incubator-seata-k8s) - Seata integration with k8s * [Seata CLI](https://github.com/apache/incubator-seata-ctl) - CLI tool for Seata ## Contributors This project exists thanks to all the people who contribute. [[Contributors](https://github.com/apache/incubator-seata/graphs/contributors)]. ## License Seata is under the Apache 2.0 license. See the [LICENSE](https://github.com/apache/incubator-seata/blob/master/LICENSE) file for details. ## Who is using These are only part of the companies using Seata, for reference only. If you are using Seata, please [add your company here](https://github.com/apache/incubator-seata/issues/1246) to tell us your scenario to make Seata better. <div style='vertical-align: middle'> <img alt='Alibaba Group' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01TleQq128FAP8POtL5_!!6000000007902-2-tps-241-42.png' /img> <img alt='蚂蚁金服' height='40' src='https://img.alicdn.com/tfs/TB1wuuCoET1gK0jSZFhXXaAtVXa-496-202.jpg' /img> <img alt='阿里云' height='40' src='https://img.alicdn.com/tfs/TB1Ly5oS3HqK1RjSZFPXXcwapXa-238-54.png' /img> <img alt='中航信' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01Hohqhm1JvGPE4cSD4_!!6000000001090-1-tps-436-84.gif' /img> <img alt='联通(浙江)' height='40' src='https://img.alicdn.com/tfs/TB1hvabw9f2gK0jSZFPXXXsopXa-174-100.png' /img> <img alt='中国铁塔' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01qkkEMZ1Jr8qDmXdAa_!!6000000001081-2-tps-220-67.png' /img> <img alt='滴滴' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01RXbaWn1SDbBfpCs1B_!!6000000002213-0-tps-640-458.jpg' /img> <img alt='中国邮政' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01Rkw4z01OPGomOisU1_!!6000000001697-2-tps-220-64.png' /img> <img alt='58集团' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01y0Wwc51wxnbw9FDJi_!!6000000006375-2-tps-252-84.png' /img> <img alt='南航' height='40' src='https://img.alicdn.com/tfs/TB1GMQpZHY1gK0jSZTEXXXDQVXa-203-63.png' /img> <img alt='TCL' height='40' src='https://img.alicdn.com/tfs/TB1oHThw.Y1gK0jSZFCXXcwqXXa-214-200.png' /img> <img alt='韵达快递' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01McNkv624Z5AKVHR0h_!!6000000007404-2-tps-140-54.png' /img> <img alt='科大讯飞' height='40' src='https://img.alicdn.com/tfs/TB1x0p5jxvbeK8jSZPfXXariXXa-272-83.png' /img> <img alt='奇虎360' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01M9aSuY1nQWGxoVQu9_!!6000000005084-2-tps-239-78.png' /img> <img alt='收钱吧' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01PmTFnO1gZ2K7GUpgh_!!6000000004155-2-tps-2406-747.png' /img> <img alt='太极计算机' height='40' src='https://img.alicdn.com/tfs/TB1.zqEoAL0gK0jSZFAXXcA9pXa-245-38.png' /img> <img alt='美的集团' height='40' src='https://img.alicdn.com/tfs/TB1cgvjwYj1gK0jSZFOXXc7GpXa-1040-282.png' /img> <img alt='中国网安' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01OioqXX1dfxSxg6DYn_!!6000000003764-2-tps-574-122.png' /img> <img alt='政采云' height='40' src='https://img.alicdn.com/tfs/TB1DDiCorY1gK0jSZTEXXXDQVXa-440-114.jpg' /img> <img alt='浙江公安厅' height='40' src='https://img.alicdn.com/tfs/TB1SXGzoxn1gK0jSZKPXXXvUXXa-426-180.jpg' /img> <img alt='特步' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01qo6gfd1l7AK1LIF8t_!!6000000004771-2-tps-132-40.png' /img> <img alt='中通快递' height='40' src='https://img.alicdn.com/tfs/TB1rCNSFxn1gK0jSZKPXXXvUXXa-172-31.png' /img> <img alt='欧莱雅百库' height='40' src='https://img.alicdn.com/tfs/TB1Xa3bZQL0gK0jSZFtXXXQCXXa-936-93.png' /img> <img alt='浙江烟草' height='40' src='https://img.alicdn.com/tfs/TB1e7Wiovb2gK0jSZK9XXaEgFXa-1028-160.jpg' /img> <img alt='波司登' height='40' src='https://img.alicdn.com/tfs/TB12cmCouL2gK0jSZFmXXc7iXXa-310-110.jpg' /img> <img alt='凯京科技' height='40' src='https://img.alicdn.com/tfs/TB1j0dEop67gK0jSZPfXXahhFXa-400-208.jpg' /img> <img alt='点购集团' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01edO0ox1Nu7syhwbAy_!!6000000001629-2-tps-300-112.png' /img> <img alt='求是创新健康' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01hygG6821bQLGWN8tm_!!6000000007003-2-tps-98-52.png' /img> <img alt='科蓝' height='40' src='https://img.alicdn.com/tfs/TB1tuSyouT2gK0jSZFvXXXnFXXa-304-94.jpg' /img> <img alt='康美药业' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01BWFT271rXAVLUYWWG_!!6000000005640-2-tps-185-40.png' /img> <img alt='雁联' height='40' src='https://img.alicdn.com/tfs/TB1c8iCouL2gK0jSZFmXXc7iXXa-428-102.jpg' /img> <img alt='学两手' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01njYJ2J1ytnNhCFWcI_!!6000000006637-2-tps-340-104.png' /img> <img alt='衣二三' height='40' src='https://img.alicdn.com/tfs/TB1OCGioCf2gK0jSZFPXXXsopXa-500-179.jpg' /img> <img alt='北京薪福社' height='40' src='https://img.alicdn.com/tfs/TB1Atu9ovzO3e4jSZFxXXaP_FXa-310-60.png' /img> <img alt='叩丁狼教育' height='40' src='https://img.alicdn.com/tfs/TB1pfYTpRBh1e4jSZFhXXcC9VXa-151-72.png' /img> <img alt='悦途出行' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01F5wna31NJwavQ0r4w_!!6000000001550-2-tps-171-48.png' /img> <img alt='国信易企签' height='40' src='https://img.alicdn.com/tfs/TB1UTwmZFT7gK0jSZFpXXaTkpXa-201-85.png' /img> <img alt='睿颐软件' height='40' src='https://img.alicdn.com/tfs/TB143R4op67gK0jSZPfXXahhFXa-148-42.png' /img> <img alt='全房通' height='40' src='https://img.alicdn.com/tfs/TB1iMSAopP7gK0jSZFjXXc5aXXa-398-182.jpg' /img> <img alt='有利网' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01b1huj51aYDwz4RqSQ_!!6000000003341-2-tps-350-51.png' /img> <img alt='赛维' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01SekTsn25izLZW7IKo_!!6000000007561-2-tps-270-124.png' /img> <img alt='安心保险' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01cyUkSO20BUISGUjyw_!!6000000006811-2-tps-149-114.png' /img> <img alt='科达科技' height='40' src='https://img.alicdn.com/tfs/TB1JvOjouT2gK0jSZFvXXXnFXXa-386-146.jpg' /img> <img alt='会分期' height='40' src='https://img.alicdn.com/tfs/TB1ChKFoBr0gK0jSZFnXXbRRXXa-402-166.jpg' /img> <img alt='会找房' height='40' src='https://img.alicdn.com/tfs/TB1bNWFoBr0gK0jSZFnXXbRRXXa-398-336.jpg' /img> <img alt='会通教育' height='40' src='https://img.alicdn.com/tfs/TB1_D9Boxn1gK0jSZKPXXXvUXXa-580-218.jpg' /img> <img alt='享住智慧' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01u3zEdz1Puhc2jO2kT_!!6000000001901-2-tps-114-43.png' /img> <img alt='兰亮网络' height='40' src='https://img.alicdn.com/tfs/TB1_miroq61gK0jSZFlXXXDKFXa-283-70.png' /img> <img alt='桔子数科' height='40' src='https://img.alicdn.com/tfs/TB1HD.oZUY1gK0jSZFMXXaWcVXa-300-300.png' /img> <img alt='蓝天教育' height='40' src='https://img.alicdn.com/tfs/TB1CaSroAT2gK0jSZPcXXcKkpXa-492-176.jpg' /img> <img alt='烟台欣和' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01lp3KWN1uGd2y6CEAx_!!6000000006010-2-tps-1383-1023.png' /img> <img alt='阿康健康' height='40' src='https://img.alicdn.com/tfs/TB1JNSqouH2gK0jSZFEXXcqMpXa-450-182.jpg' /img> <img alt='财新传媒' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01MMilH71k2IUuZsp45_!!6000000004625-2-tps-128-80.png' /img> <img alt='新脉远' height='40' src='https://img.alicdn.com/tfs/TB1NV1uouH2gK0jSZJnXXaT1FXa-462-172.jpg' /img> <img alt='乾动新能源' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01ZTwkxR1VubDVHuxii_!!6000000002713-2-tps-72-50.png' /img> <img alt='路客精品民宿' height='40' src='https://img.alicdn.com/tfs/TB1CCavoBr0gK0jSZFnXXbRRXXa-240-100.png' /img> <img alt='深圳好尔美' height='40' src='https://img.alicdn.com/tfs/TB1IIivoxD1gK0jSZFyXXciOVXa-200-130.png' /img> <img alt='浙大睿医' height='40' src='https://img.alicdn.com/tfs/TB1kQThrFY7gK0jSZKzXXaikpXa-220-110.jpg' /img> <img alt='深圳市云羿贸易科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB15r7dZHY1gK0jSZTEXXXDQVXa-234-233.png' /img> <img alt='居然之家' height='40' src='https://img.alicdn.com/tfs/TB1LK6jrUT1gK0jSZFrXXcNCXXa-180-54.png' /img> <img alt='深圳来电科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1SEzM0eL2gK0jSZFmXXc7iXXa-154-45.png' /img> <img alt='臻善科技' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01g9LjBW1YCa03USGaO_!!6000000003023-2-tps-158-29.png' /img> <img alt='中国支付通' height='40' src='https://img.alicdn.com/tfs/TB1VGpTFET1gK0jSZFrXXcNCXXa-193-55.png' /img> <img alt='众网小贷' height='40' src='https://img.alicdn.com/tfs/TB19Y8XFEY1gK0jSZFMXXaWcVXa-160-60.png' /img> <img alt='谐云科技' height='40' src='https://img.alicdn.com/tfs/TB1V1YlrRv0gK0jSZKbXXbK2FXa-514-160.png' /img> <img alt='浙江甄品' height='40' src='https://img.alicdn.com/tfs/TB1oC2prND1gK0jSZFyXXciOVXa-246-124.jpg' /img> <img alt='深圳海豚网' height='40' src='https://img.alicdn.com/tfs/TB1defkrLb2gK0jSZK9XXaEgFXa-434-146.jpg' /img> <img alt='汇通天下' height='40' src='https://img.alicdn.com/tfs/TB1uIHmrHr1gK0jSZR0XXbP8XXa-1024-568.png' /img> <img alt='九机网' height='40' src='https://img.alicdn.com/tfs/TB1ERHlrUY1gK0jSZFMXXaWcVXa-120-60.png' /img> <img alt='有好东西' height='40' src='https://img.alicdn.com/tfs/TB1LT2lrNn1gK0jSZKPXXXvUXXa-300-300.jpg' /img> <img alt='南京智慧盾' height='40' src='https://img.alicdn.com/tfs/TB1s2LprUY1gK0jSZFCXXcwqXXa-618-148.jpg' /img> <img alt='数跑科技' height='40' src='https://img.alicdn.com/tfs/TB1qtGew7T2gK0jSZPcXXcKkpXa-294-104.png' /img> <img alt='拉粉粉' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN0191WwyY1d8WZaQZcjA_!!6000000003691-2-tps-200-200.png' /img> <img alt='汇通达' height='40' src='https://img.alicdn.com/tfs/TB1KVJ9wWL7gK0jSZFBXXXZZpXa-145-59.png' /img> <img alt='易宝支付' height='40' src='https://img.alicdn.com/tfs/TB1vWafw7T2gK0jSZFkXXcIQFXa-301-100.png' /img> <img alt='维恩贝特' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01Nop2ji1glrR8j0u21_!!6000000004183-2-tps-120-50.png' /img> <img alt='八库' height='40' src='https://img.alicdn.com/tfs/TB1hC5cwVY7gK0jSZKzXXaikpXa-318-134.png' /img> <img alt='大诚若谷' height='40' src='https://img.alicdn.com/tfs/TB1VuPhw4D1gK0jSZFyXXciOVXa-294-124.png' /img> <img alt='杭州华网信息' height='40' src='https://img.alicdn.com/tfs/TB1FFX6FqL7gK0jSZFBXXXZZpXa-288-101.png' /img> <img alt='深圳易佰' height='40' src='https://img.alicdn.com/tfs/TB1gkXaFrr1gK0jSZR0XXbP8XXa-187-57.png' /img> <img alt='易点生活' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01svojxj1LuvK3hgQ5Y_!!6000000001360-2-tps-133-48.png' /img> <img alt='成都数智索' height='40' src='https://img.alicdn.com/tfs/TB1oJKiw4D1gK0jSZFyXXciOVXa-2053-377.png' /img> <img alt='北京超图' height='40' src='https://img.alicdn.com/tfs/TB1eKFXFEz1gK0jSZLeXXb9kVXa-163-54.png' /img> <img alt='江西群享科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1Qcd0p79l0K4jSZFKXXXFjpXa-372-125.png' /img> <img alt='宋城独木桥网络有限公司' height='40' src='https://img.alicdn.com/tfs/TB1UKocmPMZ7e4jSZFOXXX7epXa-234-82.png' /img> <img alt='唯小宝(江苏)网络技术有限公司' height='40' src='https://img.alicdn.com/tfs/TB1eswAZFP7gK0jSZFjXXc5aXXa-800-800.png' /img> <img alt='杭州喜团科技' height='40' src='https://img.alicdn.com/tfs/TB1IXqgwYj1gK0jSZFuXXcrHpXa-197-58.png' /img> <img alt='海典软件' height='40' src='https://img.alicdn.com/tfs/TB1KmosZNv1gK0jSZFFXXb0sXXa-247-61.png' /img> <img alt='中元健康科技有限公司' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN018aBoRi1ZOm8uiOJwA_!!6000000003185-0-tps-1659-569.jpg' /img> <img alt='宿迁民丰农商银行' height='40' src='https://img.alicdn.com/tfs/TB1bH5fw7L0gK0jSZFAXXcA9pXa-442-39.png' /img> <img alt='上海海智在线' height='40' src='https://img.alicdn.com/tfs/TB1xAJUFy_1gK0jSZFqXXcpaXXa-320-80.jpg' /img> <img alt='丞家(上海)公寓管理' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01bQlU6F1r8R7GYzQxf_!!6000000005586-2-tps-318-60.png' /img> <img alt='安徽国科新材科' height='40' src='https://img.alicdn.com/tfs/TB1ICJfFuH2gK0jSZJnXXaT1FXa-654-232.png' /img> <img alt='商银信支付' height='40' src='https://img.alicdn.com/tfs/TB1rxndw4n1gK0jSZKPXXXvUXXa-150-68.png' /img> <img alt='钛师傅云' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01jEUKEJ1WS28EnlGRb_!!6000000002786-2-tps-240-60.png' /img> <img alt='广州力生信息' height='40' src='https://img.alicdn.com/tfs/TB1m0FcFuH2gK0jSZFEXXcqMpXa-139-48.png' /img> <img alt='杭州启舰科技有限公司' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01XJFoMP1qIDxrcCFC8_!!6000000005472-2-tps-120-46.png' /img> <img alt='微链' height='40' src='https://img.alicdn.com/tfs/TB14LhHmMgP7K4jSZFqXXamhVXa-300-135.png' /img> <img alt='上海美浮特' height='40' src='https://img.alicdn.com/tfs/TB1uUtaFuT2gK0jSZFvXXXnFXXa-370-45.jpg' /img> <img alt='江西群享科技有限公司' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN018AiGbE1PZdN8Vu4Fd_!!6000000001855-2-tps-630-220.png' /img> <img alt='杭州中威慧云医疗科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1iqo_FaL7gK0jSZFBXXXZZpXa-361-54.jpg' /img> <img alt='易族智汇(北京)' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01fkwike1yZdx8ZBeP6_!!6000000006593-2-tps-460-136.png' /img> <img alt='佛山宅无限' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01onGhwm1j2vQTRjmx8_!!6000000004491-2-tps-100-48.png' /img> <img alt='F5未来商店' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN014QzjZ31l7AK1LINSu_!!6000000004771-2-tps-1073-175.png' /img> <img alt='重庆雷高科技有限公司' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01TKiMMC1VQpSIe3n7i_!!6000000002648-2-tps-931-865.png' /img> <img alt='甄品信息科技' height='40' src='https://img.alicdn.com/tfs/TB1SxJWFEY1gK0jSZFCXXcwqXXa-185-65.png' /img> <img alt='行云全球汇跨境电商(杭州分部)' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01tiLZ0d1dvWx2Dwl4N_!!6000000003798-2-tps-189-45.png' /img> <img alt='世纪加华' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN012jqfoI22wmQR2jiiY_!!6000000007185-0-tps-200-93.jpg' /img> <img alt='快陪练' height='40' src='https://img.alicdn.com/tfs/TB1rhNRFAL0gK0jSZFtXXXQCXXa-321-96.png' /img> <img alt='西南石油大学' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN012swbCB1HU7hgxsF8r_!!6000000000760-0-tps-121-121.jpg' /img> <img alt='厦门服云信息科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1zuAzZKL2gK0jSZFmXXc7iXXa-691-263.png' /img> <img alt='领课网络' height='40' src='https://img.alicdn.com/tfs/TB18TNRFEz1gK0jSZLeXXb9kVXa-244-60.jpg' /img> <img alt='美通社' height='40' src='https://img.alicdn.com/tfs/TB1i1JTFCf2gK0jSZFPXXXsopXa-151-60.png' /img> <img alt='睿维科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1ztXXFpY7gK0jSZKzXXaikpXa-179-60.png' /img> <img alt='郑州信源信息技术' height='40' src='https://img.alicdn.com/tfs/TB1SkJ9FuT2gK0jSZFvXXXnFXXa-266-56.png' /img> <img alt='荣怀集团' height='40' src='https://img.alicdn.com/tfs/TB1AzbWgZKfxu4jSZPfXXb3dXXa-1117-382.png' /img> <img alt='浙江群集大数据科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1HtFZFq61gK0jSZFlXXXDKFXa-1375-214.png' /img> <img alt='北京易点租有限公司' height='40' src='https://img.alicdn.com/tfs/TB1nax.FuH2gK0jSZFEXXcqMpXa-336-154.png' /img> <img alt='浙江蕙康科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1nS7IZNv1gK0jSZFFXXb0sXXa-716-193.png' /img> <img alt='致远创想' height='40' src='https://img.alicdn.com/tfs/TB13aaKpA9l0K4jSZFKXXXFjpXa-300-300.png' /img> <img alt='深圳智荟物联技术有限公司' height='40' src='https://img.alicdn.com/tfs/TB1To3amPMZ7e4jSZFOXXX7epXa-1228-500.png' /img> <img alt='源讯中国' height='40' src='https://img.alicdn.com/tfs/TB1CZuKpA9l0K4jSZFKXXXFjpXa-283-92.png' /img> <img alt='武汉江寓生活服务有限公司' height='40' src='https://img.alicdn.com/tfs/TB1E4slZFT7gK0jSZFpXXaTkpXa-268-268.png' /img> <img alt='大账房' height='40' src='https://img.alicdn.com/tfs/TB1.sIyZKL2gK0jSZFmXXc7iXXa-121-121.png' /img> <img alt='上海阳光喔教育科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1aUUcZHY1gK0jSZTEXXXDQVXa-246-72.png' /img> <img alt='北京新学道教育科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1v3.gZLb2gK0jSZK9XXaEgFXa-240-240.png' /img> <img alt='北京悦途出行网络科技公司' height='40' src='https://img.alicdn.com/tfs/TB1VHkrZHr1gK0jSZFDXXb9yVXa-248-80.png' /img> <img alt='上海意贝斯特信息技术有限公司' height='40' src='https://img.alicdn.com/tfs/TB1kGElZUH1gK0jSZSyXXXtlpXa-126-48.png' /img> <img alt='御家汇' height='40' src='https://img.alicdn.com/tfs/TB1kIIqZUY1gK0jSZFMXXaWcVXa-90-80.png' /img> <img alt='广州社众软件' height='40' src='https://img.alicdn.com/tfs/TB1CawkZND1gK0jSZFsXXbldVXa-112-112.png' /img> <img alt='浩鲸科技' height='40' src='https://img.alicdn.com/tfs/TB1fxZqZQL0gK0jSZFAXXcA9pXa-300-300.png' /img> <img alt='华宇信息' height='40' src='https://img.alicdn.com/tfs/TB1q3UiZKL2gK0jSZPhXXahvXXa-802-271.png' /img> <img alt='中国云尚科技' height='40' src='https://img.alicdn.com/tfs/TB1uf7bZQL0gK0jSZFtXXXQCXXa-303-65.png' /img> <img alt='卫宁健康' height='40' src='https://img.alicdn.com/tfs/TB1WMgmZUY1gK0jSZFCXXcwqXXa-189-57.png' /img> <img alt='聚合联动' height='40' src='https://img.alicdn.com/tfs/TB1gnllpnM11u4jSZPxXXahcXXa-150-60.png' /img> <img alt='熙菱信息' height='40' src='https://img.alicdn.com/tfs/TB1NJmLpA9l0K4jSZFKXXXFjpXa-195-60.png' /img> <img alt='鲸算科技' height='40' src='https://img.alicdn.com/tfs/TB1jfCLpA9l0K4jSZFKXXXFjpXa-514-220.png' /img> <img alt='杭州沃朴物联科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1vxJ.ZVT7gK0jSZFpXXaTkpXa-309-51.png' /img> <img alt='深圳市臻络科技有限公司' height='40' src='https://img.alicdn.com/tfs/TB1v5eiZ.T1gK0jSZFrXXcNCXXa-500-41.png' /img> <img alt='白云电气' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01QPEPnx1zaOC9n4QXE_!!6000000006730-0-tps-781-100.jpg' /img> <img alt='百果园' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN018XKqWK1VPSHxBxLHR_!!6000000002645-2-tps-295-79.png' /img> <img alt='海尔' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01UkbkeF1PCjajbslRf_!!6000000001805-0-tps-200-200.jpg' /img> <img alt='六倍体科技' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01TuPFhT288krOXRXQC_!!6000000007888-0-tps-200-200.jpg' /img> <img alt='泉州银行' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01tUg4Nw1mULzRSQr4B_!!6000000004957-2-tps-447-346.png' /img> <img alt='小滴课堂' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01sWwoq21VPSHmzCqh7_!!6000000002645-2-tps-200-100.png' /img> <img alt='医百顺' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01obgBun1PjFiKUoWGr_!!6000000001876-2-tps-192-192.png' /img> <img alt='正泰中自控制' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01i8iiCk29QuAitxiJq_!!6000000008063-0-tps-378-123.jpg' /img> <img alt='中国电子科技网络' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01LBYXi6288krJ6Axq8_!!6000000007888-2-tps-1206-158.png' /img> <img alt='卓源软件' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN01FN4K3I1Sq4SQVsDxo_!!6000000002297-2-tps-414-95.png' /img> <img alt='重庆直通物流有限公司' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN0130Bp8H1STd65Fnxn0_!!6000000002248-2-tps-677-172.png' /img> <img alt='海澜集团' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN0186ESVW1hhZO7Otx4X_!!6000000004309-2-tps-376-108.png' /img> <img alt='南宁微服信息技术有限公司' height='40' src='https://img.alicdn.com/imgextra/i2/O1CN011hLbRH1fTiAi6Lq5Z_!!6000000004008-0-tps-283-283.jpg' /img> <img alt='日事清' height='40' src='https://img.alicdn.com/imgextra/i3/O1CN01cJQsV91Fz9LeJEaL1_!!6000000000557-0-tps-339-189.jpg' /img> <img alt='小鹏汽车' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01KvsEOP21a3CUzDllu_!!6000000007000-2-tps-1920-750.png' /img> <img alt='平安人寿' height='40' src='https://img.alicdn.com/imgextra/i1/O1CN01Erdiwd1RrcDt2bqKl_!!6000000002165-0-tps-1080-1080.jpg' /img> <img alt='光大银行' height='40' src='https://img.alicdn.com/imgextra/i4/O1CN01Rc0vU61sSQ3jvR0rw_!!6000000005765-2-tps-1076-228.png' /img> </div>
0
LianjiaTech/retrofit-spring-boot-starter
A spring-boot starter for retrofit, supports rapid integration and feature enhancements.(适用于retrofit的spring-boot-starter,支持快速集成和功能增强)
http java okhttp3 retrofit spring-boot
## retrofit-spring-boot-starter [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Build Status](https://api.travis-ci.com/LianjiaTech/retrofit-spring-boot-starter.svg?branch=master)](https://travis-ci.com/github/LianjiaTech/retrofit-spring-boot-starter) [![Maven central](https://maven-badges.herokuapp.com/maven-central/com.github.lianjiatech/retrofit-spring-boot-starter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.lianjiatech/retrofit-spring-boot-starter) [![GitHub release](https://img.shields.io/github/v/release/lianjiatech/retrofit-spring-boot-starter.svg)](https://github.com/LianjiaTech/retrofit-spring-boot-starter/releases) [![License](https://img.shields.io/badge/JDK-1.8+-4EB1BA.svg)](https://docs.oracle.com/javase/8/docs/index.html) [![License](https://img.shields.io/badge/SpringBoot-1.5+-green.svg)](https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/htmlsingle/) [![Author](https://img.shields.io/badge/Author-chentianming-orange.svg?style=flat-square)](https://juejin.im/user/3562073404738584/posts) [![QQ-Group](https://img.shields.io/badge/QQ%E7%BE%A4-806714302-orange.svg?style=flat-square) ](https://img.ljcdn.com/hc-picture/6302d742-ebc8-4649-95cf-62ccf57a1add) [English Document](https://github.com/LianjiaTech/retrofit-spring-boot-starter/blob/master/README_EN.md) **适用于retrofit的spring-boot-starter,支持快速集成和功能增强**。 1. *Spring Boot 3.x 项目,请使用retrofit-spring-boot-starter 3.x*。 2. *Spring Boot 1.x/2.x 项目,请使用retrofit-spring-boot-starter 2.x*。 > 🚀项目持续优化迭代,欢迎大家提ISSUE和PR!麻烦大家能给一颗star✨,您的star是我们持续更新的动力! github项目地址:[https://github.com/LianjiaTech/retrofit-spring-boot-starter](https://github.com/LianjiaTech/retrofit-spring-boot-starter) gitee项目地址:[https://gitee.com/lianjiatech/retrofit-spring-boot-starter](https://gitee.com/lianjiatech/retrofit-spring-boot-starter) 示例demo:[https://github.com/ismart-yuxi/retrofit-spring-boot-demo](https://github.com/ismart-yuxi/retrofit-spring-boot-demo) > 感谢`@ismart-yuxi`为本项目写的示例demo <!--more--> ## 功能特性 - [x] [自定义OkHttpClient](#自定义OkHttpClient) - [x] [注解式拦截器](#注解式拦截器) - [x] [日志打印](#日志打印) - [x] [请求重试](#请求重试) - [x] [熔断降级](#熔断降级) - [x] [错误解码器](#错误解码器) - [x] [微服务之间的HTTP调用](#微服务之间的HTTP调用) - [x] [全局拦截器](#全局拦截器) - [x] [调用适配器](#调用适配器) - [x] [数据转换器](#数据转码器) - [x] [元注解](#元注解) - [x] [其他功能示例](#其他功能示例) ## 快速开始 ### 引入依赖 ```xml <dependency> <groupId>com.github.lianjiatech</groupId> <artifactId>retrofit-spring-boot-starter</artifactId> <version>3.0.3</version> </dependency> ``` **如果启动失败,大概率是依赖冲突,烦请引入或者排除相关依赖**。 ### 定义HTTP接口 **接口必须使用`@RetrofitClient`注解标记**!HTTP相关注解可参考官方文档:[retrofit官方文档](https://square.github.io/retrofit/)。 ```java @RetrofitClient(baseUrl = "${test.baseUrl}") public interface UserService { /** * 根据id查询用户姓名 */ @POST("getName") String getName(@Query("id") Long id); } ``` > 注意:**方法请求路径慎用`/`开头**。对于`Retrofit`而言,如果`baseUrl=http://localhost:8080/api/test/`,方法请求路径如果是`person`,则该方法完整的请求路径是:`http://localhost:8080/api/test/person`。而方法请求路径如果是`/person`,则该方法完整的请求路径是:`http://localhost:8080/person`。 ### 注入使用 **将接口注入到其它Service中即可使用!** ```java @Service public class BusinessService { @Autowired private UserService userService; public void doBusiness() { // call userService } } ``` **默认情况下,自动使用`SpringBoot`扫描路径进行`RetrofitClient`注册**。你也可以在配置类加上`@RetrofitScan`手工指定扫描路径。 ## HTTP请求相关注解 `HTTP`请求相关注解,全部使用了`Retrofit`原生注解,以下是一个简单说明: | 注解分类|支持的注解 | |------------|-----------| |请求方式|`@GET` `@HEAD` `@POST` `@PUT` `@DELETE` `@OPTIONS` `@HTTP`| |请求头|`@Header` `@HeaderMap` `@Headers`| |Query参数|`@Query` `@QueryMap` `@QueryName`| |path参数|`@Path`| |form-encoded参数|`@Field` `@FieldMap` `@FormUrlEncoded`| | 请求体 |`@Body`| |文件上传|`@Multipart` `@Part` `@PartMap`| |url参数|`@Url`| > 详细信息可参考官方文档:[retrofit官方文档](https://square.github.io/retrofit/) ## 配置属性 组件支持了多个可配置的属性,用来应对不同的业务场景,具体可支持的配置属性及默认值如下: **注意:应用只需要配置要更改的配置项**! ```yaml retrofit: # 全局转换器工厂 global-converter-factories: - com.github.lianjiatech.retrofit.spring.boot.core.BasicTypeConverterFactory - retrofit2.converter.jackson.JacksonConverterFactory # 全局调用适配器工厂(组件扩展的调用适配器工厂已经内置,这里请勿重复配置) global-call-adapter-factories: # 全局日志打印配置 global-log: # 启用日志打印 enable: true # 全局日志打印级别 log-level: info # 全局日志打印策略 log-strategy: basic # 是否聚合打印请求日志 aggregate: true # 全局重试配置 global-retry: # 是否启用全局重试 enable: false # 全局重试间隔时间 interval-ms: 100 # 全局最大重试次数 max-retries: 2 # 全局重试规则 retry-rules: - response_status_not_2xx - occur_io_exception # 全局超时时间配置 global-timeout: # 全局读取超时时间 read-timeout-ms: 10000 # 全局写入超时时间 write-timeout-ms: 10000 # 全局连接超时时间 connect-timeout-ms: 10000 # 全局完整调用超时时间 call-timeout-ms: 0 # 熔断降级配置 degrade: # 熔断降级类型。默认none,表示不启用熔断降级 degrade-type: none # 全局sentinel降级配置 global-sentinel-degrade: # 是否开启 enable: false # 各降级策略对应的阈值。平均响应时间(ms),异常比例(0-1),异常数量(1-N) count: 1000 # 熔断时长,单位为 s time-window: 5 # 降级策略(0:平均响应时间;1:异常比例;2:异常数量) grade: 0 # 全局resilience4j降级配置 global-resilience4j-degrade: # 是否开启 enable: false # 根据该名称从#{@link CircuitBreakerConfigRegistry}获取CircuitBreakerConfig,作为全局熔断配置 circuit-breaker-config-name: defaultCircuitBreakerConfig # 自动设置PathMathInterceptor的scope为prototype auto-set-prototype-scope-for-path-math-interceptor: true ``` ## 高级功能 ### 超时时间配置 如果仅仅需要修改`OkHttpClient`的超时时间,可以通过`@RetrofitClient`相关字段修改,或者全局超时配置修改。 ### 自定义OkHttpClient 如果需要修改`OkHttpClient`其它配置,可以通过自定义`OkHttpClient`来实现,步骤如下: **实现`SourceOkHttpClientRegistrar`接口,调用`SourceOkHttpClientRegistry#register()`方法注册`OkHttpClient`** ```java @Component public class CustomOkHttpClientRegistrar implements SourceOkHttpClientRegistrar { @Override public void register(SourceOkHttpClientRegistry registry) { // 注册customOkHttpClient,超时时间设置为1s registry.register("customOkHttpClient", new OkHttpClient.Builder() .connectTimeout(Duration.ofSeconds(1)) .writeTimeout(Duration.ofSeconds(1)) .readTimeout(Duration.ofSeconds(1)) .addInterceptor(chain -> chain.proceed(chain.request())) .build()); } } ``` **通过`@RetrofitClient.sourceOkHttpClient`指定当前接口要使用的`OkHttpClient`** ```java @RetrofitClient(baseUrl = "${test.baseUrl}", sourceOkHttpClient = "customOkHttpClient") public interface CustomOkHttpUserService { /** * 根据id查询用户信息 */ @GET("getUser") User getUser(@Query("id") Long id); } ``` > 注意:组件不会直接使用指定的`OkHttpClient`,而是基于该`OkHttpClient`创建一个新的。 ### 注解式拦截器 组件提供了**注解式拦截器**,支持基于url路径匹配拦截,使用的步骤如下: 1. 继承`BasePathMatchInterceptor` 2. 使用`@Intercept`注解指定要使用的拦截器 > 如果需要使用多个拦截器,在接口上标注多个`@Intercept`注解即可。 #### 继承`BasePathMatchInterceptor`编写拦截处理器 ```java @Component public class PathMatchInterceptor extends BasePathMatchInterceptor { @Override protected Response doIntercept(Chain chain) throws IOException { Response response = chain.proceed(chain.request()); // response的Header加上path.match return response.newBuilder().header("path.match", "true").build(); } } ``` 默认情况下,**组件会自动将`BasePathMatchInterceptor`的`scope`设置为`prototype`**。 可通过`retrofit.auto-set-prototype-scope-for-path-math-interceptor=false`关闭该功能。关闭之后,需要手动将`scope`设置为`prototype`。 ```java @Component @Scope("prototype") public class PathMatchInterceptor extends BasePathMatchInterceptor { } ``` #### 接口上使用`@Intercept`进行标注 ```java @RetrofitClient(baseUrl = "${test.baseUrl}") @Intercept(handler = PathMatchInterceptor.class, include = {"/api/user/**"}, exclude = "/api/user/getUser") // @Intercept() 如果需要使用多个路径匹配拦截器,继续添加@Intercept即可 public interface InterceptorUserService { /** * 根据id查询用户姓名 */ @POST("getName") Response<String> getName(@Query("id") Long id); /** * 根据id查询用户信息 */ @GET("getUser") Response<User> getUser(@Query("id") Long id); } ``` 上面的`@Intercept`配置表示:拦截`InterceptorUserService`接口下`/api/user/**`路径下(排除`/api/user/getUser`)的请求,拦截处理器使用`PathMatchInterceptor`。 ### 自定义拦截注解 有的时候,我们需要在"拦截注解"动态传入一些参数,然后在拦截的时候使用这些参数。 这时候,我们可以使用"自定义拦截注解",步骤如下: 1. 自定义注解。必须使用`@InterceptMark`标记,并且注解中必须包括`include、exclude、handler`字段。 2. 继承`BasePathMatchInterceptor`编写拦截处理器 3. 接口上使用自定义注解 例如,我们需要"在请求头里面动态加入`accessKeyId`、`accessKeySecret`签名信息才能再发起HTTP请求",这时候可以自定义`@Sign`注解来实现。 #### 自定义`@Sign`注解 ```java @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @InterceptMark public @interface Sign { String accessKeyId(); String accessKeySecret(); String[] include() default {"/**"}; String[] exclude() default {}; Class<? extends BasePathMatchInterceptor> handler() default SignInterceptor.class; } ``` 在`@Sign`注解中指定了使用的拦截器是`SignInterceptor`。 #### 实现`SignInterceptor` ```java @Component @Setter public class SignInterceptor extends BasePathMatchInterceptor { private String accessKeyId; private String accessKeySecret; @Override public Response doIntercept(Chain chain) throws IOException { Request request = chain.request(); Request newReq = request.newBuilder() .addHeader("accessKeyId", accessKeyId) .addHeader("accessKeySecret", accessKeySecret) .build(); Response response = chain.proceed(newReq); return response.newBuilder().addHeader("accessKeyId", accessKeyId) .addHeader("accessKeySecret", accessKeySecret).build(); } } ``` > 注意:`accessKeyId`和`accessKeySecret`字段必须提供`setter`方法。 拦截器的`accessKeyId`和`accessKeySecret`字段值会依据`@Sign`注解的`accessKeyId()`和`accessKeySecret()`值自动注入,如果`@Sign`指定的是占位符形式的字符串,则会取配置属性值进行注入。 #### 接口上使用`@Sign` ```java @RetrofitClient(baseUrl = "${test.baseUrl}") @Sign(accessKeyId = "${test.accessKeyId}", accessKeySecret = "${test.accessKeySecret}", include = "/api/user/getAll") public interface InterceptorUserService { /** * 查询所有用户信息 */ @GET("getAll") Response<List<User>> getAll(); } ``` ### 日志打印 组件支持支持全局日志打印和声明式日志打印。 #### 全局日志打印 默认情况下,全局日志打印是开启的,默认配置如下: ```yaml retrofit: # 全局日志打印配置 global-log: # 启用日志打印 enable: true # 全局日志打印级别 log-level: info # 全局日志打印策略 log-strategy: basic # 是否聚合打印请求日志 aggregate: true ``` 四种日志打印策略含义如下: 1. `NONE`:No logs. 2. `BASIC`:Logs request and response lines. 3. `HEADERS`:Logs request and response lines and their respective headers. 4. `BODY`:Logs request and response lines and their respective headers and bodies (if present). #### 声明式日志打印 如果只需要部分请求才打印日志,可以在相关接口或者方法上使用`@Logging`注解。 #### 日志打印自定义扩展 如果需要修改日志打印行为,可以继承`LoggingInterceptor`,并将其配置成`Spring bean`。 ### 请求重试 组件支持支持全局重试和声明式重试。 #### 全局重试 全局重试默认关闭,默认配置项如下: ```yaml retrofit: # 全局重试配置 global-retry: # 是否启用全局重试 enable: false # 全局重试间隔时间 interval-ms: 100 # 全局最大重试次数 max-retries: 2 # 全局重试规则 retry-rules: - response_status_not_2xx - occur_io_exception ``` 重试规则支持三种配置: 1. `RESPONSE_STATUS_NOT_2XX`:响应状态码不是`2xx`时执行重试 2. `OCCUR_IO_EXCEPTION`:发生IO异常时执行重试 3. `OCCUR_EXCEPTION`:发生任意异常时执行重试 #### 声明式重试 如果只有一部分请求需要重试,可以在相应的接口或者方法上使用`@Retry`注解。 #### 请求重试自定义扩展 如果需要修改请求重试行为,可以继承`RetryInterceptor`,并将其配置成`Spring bean`。 ### 熔断降级 熔断降级默认关闭,当前支持`sentinel`和`resilience4j`两种实现。 ```yaml retrofit: # 熔断降级配置 degrade: # 熔断降级类型。默认none,表示不启用熔断降级 degrade-type: sentinel ``` #### Sentinel 配置`degrade-type=sentinel`开启,然后在相关接口或者方法上声明`@SentinelDegrade`注解即可。 记得手动引入`Sentinel`依赖: ```xml <dependency> <groupId>com.alibaba.csp</groupId> <artifactId>sentinel-core</artifactId> <version>1.6.3</version> </dependency> ``` 此外,还支持全局`Sentinel`熔断降级: ```yaml retrofit: # 熔断降级配置 degrade: # 熔断降级类型。默认none,表示不启用熔断降级 degrade-type: sentinel # 全局sentinel降级配置 global-sentinel-degrade: # 是否开启 enable: true # ...其他sentinel全局配置 ``` #### Resilience4j 配置`degrade-type=resilience4j`开启。然后在相关接口或者方法上声明`@Resilience4jDegrade`即可。 记得手动引入`Resilience4j`依赖: ```xml <dependency> <groupId>io.github.resilience4j</groupId> <artifactId>resilience4j-circuitbreaker</artifactId> <version>1.7.1</version> </dependency> ``` 通过以下配置可开启全局resilience4j熔断降级: ```yaml retrofit: # 熔断降级配置 degrade: # 熔断降级类型。默认none,表示不启用熔断降级 degrade-type: resilience4j # 全局resilience4j降级配置 global-resilience4j-degrade: # 是否开启 enable: true # 根据该名称从#{@link CircuitBreakerConfigRegistry}获取CircuitBreakerConfig,作为全局熔断配置 circuit-breaker-config-name: defaultCircuitBreakerConfig ``` 熔断配置管理: 实现`CircuitBreakerConfigRegistrar`接口,注册`CircuitBreakerConfig`。 ```java @Component public class CustomCircuitBreakerConfigRegistrar implements CircuitBreakerConfigRegistrar { @Override public void register(CircuitBreakerConfigRegistry registry) { // 替换默认的CircuitBreakerConfig registry.register(Constants.DEFAULT_CIRCUIT_BREAKER_CONFIG, CircuitBreakerConfig.ofDefaults()); // 注册其它的CircuitBreakerConfig registry.register("testCircuitBreakerConfig", CircuitBreakerConfig.custom() .slidingWindowType(CircuitBreakerConfig.SlidingWindowType.TIME_BASED) .failureRateThreshold(20) .minimumNumberOfCalls(5) .permittedNumberOfCallsInHalfOpenState(5) .build()); } } ``` 通过`circuitBreakerConfigName`指定`CircuitBreakerConfig`。包括`retrofit.degrade.global-resilience4j-degrade.circuit-breaker-config-name`或者`@Resilience4jDegrade.circuitBreakerConfigName` #### 扩展熔断降级 如果用户需要使用其他的熔断降级实现,继承`BaseRetrofitDegrade`,并将其配置`Spring Bean`。 #### 配置fallback或者fallbackFactory (可选) 如果`@RetrofitClient`不设置`fallback`或者`fallbackFactory`,当触发熔断时,会直接抛出`RetrofitBlockException`异常。 用户可以通过设置`fallback`或者`fallbackFactory`来定制熔断时的方法返回值。 > 注意:`fallback`类必须是当前接口的实现类,`fallbackFactory`必须是`FallbackFactory<T>` 实现类,泛型参数类型为当前接口类型。另外,`fallback`和`fallbackFactory`实例必须配置成`Spring Bean`。 `fallbackFactory`相对于`fallback`,主要差别在于能够感知每次熔断的异常原因(cause),参考示例如下: ```java @Slf4j @Service public class HttpDegradeFallback implements HttpDegradeApi { @Override public Result<Integer> test() { Result<Integer> fallback = new Result<>(); fallback.setCode(100) .setMsg("fallback") .setBody(1000000); return fallback; } } ``` ```java @Slf4j @Service public class HttpDegradeFallbackFactory implements FallbackFactory<HttpDegradeApi> { @Override public HttpDegradeApi create(Throwable cause) { log.error("触发熔断了! ", cause.getMessage(), cause); return new HttpDegradeApi() { @Override public Result<Integer> test() { Result<Integer> fallback = new Result<>(); fallback.setCode(100) .setMsg("fallback") .setBody(1000000); return fallback; } }; } } ``` ### 错误解码器 在`HTTP`发生请求错误(包括发生异常或者响应数据不符合预期)的时候,错误解码器可将`HTTP`相关信息解码到自定义异常中。你可以在`@RetrofitClient`注解的`errorDecoder()` 指定当前接口的错误解码器,自定义错误解码器需要实现`ErrorDecoder`接口: ### 微服务之间的HTTP调用 #### 继承`ServiceInstanceChooser` 用户可以自行实现`ServiceInstanceChooser`接口,完成服务实例的选取逻辑,并将其配置成`Spring Bean`。对于`Spring Cloud` 应用,可以使用如下实现。 ```java @Service public class SpringCloudServiceInstanceChooser implements ServiceInstanceChooser { private LoadBalancerClient loadBalancerClient; @Autowired public SpringCloudServiceInstanceChooser(LoadBalancerClient loadBalancerClient) { this.loadBalancerClient = loadBalancerClient; } /** * Chooses a ServiceInstance URI from the LoadBalancer for the specified service. * * @param serviceId The service ID to look up the LoadBalancer. * @return Return the uri of ServiceInstance */ @Override public URI choose(String serviceId) { ServiceInstance serviceInstance = loadBalancerClient.choose(serviceId); Assert.notNull(serviceInstance, "can not found service instance! serviceId=" + serviceId); return serviceInstance.getUri(); } } ``` #### 指定`serviceId`和`path` ```java @RetrofitClient(serviceId = "user", path = "/api/user") public interface ChooserOkHttpUserService { /** * 根据id查询用户信息 */ @GET("getUser") User getUser(@Query("id") Long id); } ``` ## 全局拦截器 ### 全局应用拦截器 如果我们需要对整个系统的的`HTTP`请求执行统一的拦截处理,可以实现全局拦截器`GlobalInterceptor`, 并配置成`spring Bean`。 ```java @Component public class MyGlobalInterceptor implements GlobalInterceptor { @Override public Response intercept(Chain chain) throws IOException { Response response = chain.proceed(chain.request()); // response的Header加上global return response.newBuilder().header("global", "true").build(); } } ``` ### 全局网络拦截器 实现`NetworkInterceptor`接口,并配置成`spring Bean`。 ## 调用适配器 `Retrofit`可以通过`CallAdapterFactory`将`Call<T>`对象适配成接口方法的返回值类型。组件扩展了一些`CallAdapterFactory`实现: 1. `BodyCallAdapterFactory` - 同步执行`HTTP`请求,将响应体内容适配成方法的返回值类型。 - 任意方法返回值类型都可以使用`BodyCallAdapterFactory`,优先级最低。 2. `ResponseCallAdapterFactory` - 同步执行`HTTP`请求,将响应体内容适配成`Retrofit.Response<T>`返回。 - 只有方法返回值类型为`Retrofit.Response<T>`,才可以使用`ResponseCallAdapterFactory`。 3. 响应式编程相关`CallAdapterFactory` **`Retrofit`会根据方法返回值类型选择对应的`CallAdapterFactory`执行适配处理**,目前支持的返回值类型如下: - `String`:将`Response Body`适配成`String`返回。 - 基础类型(`Long`/`Integer`/`Boolean`/`Float`/`Double`):将`Response Body`适配成上述基础类型 - 任意`Java`类型: 将`Response Body`适配成对应的`Java`对象返回 - `CompletableFuture<T>`: 将`Response Body`适配成`CompletableFuture<T>`对象返回 - `Void`: 不关注返回类型可以使用`Void` - `Response<T>`: 将`Response`适配成`Response<T>`对象返回 - `Call<T>`: 不执行适配处理,直接返回`Call<T>`对象 - `Mono<T>`: `Project Reactor`响应式返回类型 - `Single<T>`:`Rxjava`响应式返回类型(支持`Rxjava2/Rxjava3`) - `Completable`:`Rxjava`响应式返回类型,`HTTP`请求没有响应体(支持`Rxjava2/Rxjava3`) 可以通过继承`CallAdapter.Factory`扩展`CallAdapter`。 组件支持通过`retrofit.global-call-adapter-factories`配置全局调用适配器工厂: ```yaml retrofit: # 全局转换器工厂(组件扩展的`CallAdaptorFactory`工厂已经内置,这里请勿重复配置) global-call-adapter-factories: # ... ``` 针对每个Java接口,还可以通过`@RetrofitClient.callAdapterFactories`指定当前接口采用的`CallAdapter.Factory`。 > 建议:将`CallAdapter.Factory`配置成`Spring Bean` ### 数据转码器 `Retrofit`使用`Converter`将`@Body`注解的对象转换成`Request Body`,将`Response Body`转换成一个`Java`对象,可以选用以下几种`Converter`: - [Gson](https://github.com/google/gson): com.squareup.Retrofit:converter-gson - [Jackson](https://github.com/FasterXML/jackson): com.squareup.Retrofit:converter-jackson - [Moshi](https://github.com/square/moshi/): com.squareup.Retrofit:converter-moshi - [Protobuf](https://developers.google.com/protocol-buffers/): com.squareup.Retrofit:converter-protobuf - [Wire](https://github.com/square/wire): com.squareup.Retrofit:converter-wire - [Simple XML](http://simple.sourceforge.net/): com.squareup.Retrofit:converter-simplexml - [JAXB](https://docs.oracle.com/javase/tutorial/jaxb/intro/index.html): com.squareup.retrofit2:converter-jaxb - fastJson:com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory 组件支持通过`retrofit.global-converter-factories`配置全局`Converter.Factory`,默认的是`retrofit2.converter.jackson.JacksonConverterFactory`。 如果需要修改`Jackson`配置,自行覆盖`JacksonConverterFactory`的`bean`配置即可。 ```yaml retrofit: # 全局转换器工厂 global-converter-factories: - com.github.lianjiatech.retrofit.spring.boot.core.BasicTypeConverterFactory - retrofit2.converter.jackson.JacksonConverterFactory ``` 针对每个`Java`接口,还可以通过`@RetrofitClient.converterFactories`指定当前接口采用的`Converter.Factory`。 > 建议:将`Converter.Factory`配置成`Spring Bean`。 ### 元注解 `@RetrofitClient`、`@Retry`、`@Logging`、`@Resilience4jDegrade`等注解支持元注解、继承以及`@AliasFor`。 ```java @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @Inherited @RetrofitClient(baseUrl = "${test.baseUrl}") @Logging(logLevel = LogLevel.WARN) @Retry(intervalMs = 200) public @interface MyRetrofitClient { @AliasFor(annotation = RetrofitClient.class, attribute = "converterFactories") Class<? extends Converter.Factory>[] converterFactories() default {GsonConverterFactory.class}; @AliasFor(annotation = Logging.class, attribute = "logStrategy") LogStrategy logStrategy() default LogStrategy.BODY; } ``` ## 其他功能示例 ### form参数 ```java @FormUrlEncoded @POST("token/verify") Object tokenVerify(@Field("source") String source,@Field("signature") String signature,@Field("token") String token); @FormUrlEncoded @POST("message") CompletableFuture<Object> sendMessage(@FieldMap Map<String, Object> param); ``` ### 文件上传 #### 创建MultipartBody.Part ```java // 对文件名使用URLEncoder进行编码 public ResponseEntity importTerminology(MultipartFile file){ String fileName=URLEncoder.encode(Objects.requireNonNull(file.getOriginalFilename()),"utf-8"); okhttp3.RequestBody requestBody=okhttp3.RequestBody.create(MediaType.parse("multipart/form-data"),file.getBytes()); MultipartBody.Part part=MultipartBody.Part.createFormData("file",fileName,requestBody); apiService.upload(part); return ok().build(); } ``` #### `HTTP`上传接口 ```java @POST("upload") @Multipart Void upload(@Part MultipartBody.Part file); ``` ### 文件下载 #### `HTTP`下载接口 ```java @RetrofitClient(baseUrl = "https://img.ljcdn.com/hc-picture/") public interface DownloadApi { @GET("{fileKey}") Response<ResponseBody> download(@Path("fileKey") String fileKey); } ``` #### `HTTP`下载使用 ```java @SpringBootTest(classes = {RetrofitBootApplication.class}) @RunWith(SpringRunner.class) public class DownloadTest { @Autowired DownloadApi downLoadApi; @Test public void download() throws Exception { String fileKey = "6302d742-ebc8-4649-95cf-62ccf57a1add"; Response<ResponseBody> response = downLoadApi.download(fileKey); ResponseBody responseBody = response.body(); // 二进制流 InputStream is = responseBody.byteStream(); // 具体如何处理二进制流,由业务自行控制。这里以写入文件为例 File tempDirectory = new File("temp"); if (!tempDirectory.exists()) { tempDirectory.mkdir(); } File file = new File(tempDirectory, UUID.randomUUID().toString()); if (!file.exists()) { file.createNewFile(); } FileOutputStream fos = new FileOutputStream(file); byte[] b = new byte[1024]; int length; while ((length = is.read(b)) > 0) { fos.write(b, 0, length); } is.close(); fos.close(); } } ``` ### 动态URL 使用`@url`注解可实现动态URL。此时,`baseUrl`配置任意合法url即可。例如: `http://github.com/` 。运行时只会根据`@Url`地址发起请求。 > 注意:`@url`必须放在方法参数的第一个位置,另外,`@GET`、`@POST`等注解上,不需要定义端点路径。 ```java @GET Map<String, Object> test3(@Url String url,@Query("name") String name); ``` ### `DELETE`请求添加请求体 ```java @HTTP(method = "DELETE", path = "/user/delete", hasBody = true) ``` ### `GET`请求添加请求体 `okhttp3`自身不支持`GET`请求添加请求体,源码如下: ![image](https://user-images.githubusercontent.com/30620547/108949806-0a9f7780-76a0-11eb-9eb4-326d5d546e98.png) ![image](https://user-images.githubusercontent.com/30620547/108949831-1ab75700-76a0-11eb-955c-95d324084580.png) 作者给出了具体原因,可以参考: [issue](https://github.com/square/okhttp/issues/3154) 但是,如果实在需要这么做,可以使用:`@HTTP(method = "get", path = "/user/get", hasBody = true)`,使用小写`get`绕过上述限制。 ## 反馈建议 如有任何问题,欢迎提issue或者加QQ群反馈。 群号:806714302 ![QQ群图片](https://github.com/LianjiaTech/retrofit-spring-boot-starter/blob/master/group.png)
0
rbmonster/learning-note
Java开发及面试(个人面试、工作总结、资料收集站)
design java mysql redis spring
# learning-note > repository相关的markdown的目录,在`com`目录下使用命令`python TOC-new.py all`生成,`toc`文件夹为带目录的MD文件 [在线阅读网站](https://rbmonster.github.io/learning-note/): TOP标签会出现失效的情况,使用侧边栏进行导航 一个技术点,面试官常见的三连问: 1. xxx是什么? 2. xxx优缺点是什么? 3. xxx应用及使用场景是什么? BTW:强烈大家注册一个ChatGPT,可以用来完善面试题。 目前有些内容有一些过时,入职新公司估计很长时间都没空更新了,大家参考着看看。👻 ## Java相关 - [Java基础](/src/main/java/com/toc/JAVA_BASE.md) - [Java集合类](/src/main/java/com/toc/COLLECTION.md) - [Java IO](/src/main/java/com/toc/JAVA_IO.md) - [Java虚拟机](/src/main/java/com/toc/JVM.md) - [Java 单元测试](/src/main/java/com/toc/UNIT_TEST.md) - [Netty](/src/main/java/com/toc/NETTY.md) - [MyBatis](/src/main/java/com/toc/MYBATIS.md) - [Drools规则引擎](/src/main/java/com/toc/RULE_ENGINE.md) ## Java并发相关 - [Java线程](/src/main/java/com/toc/THREAD.md) - [Java并发(虚拟机)](/src/main/java/com/toc/CONCURRENT.md) - [Java并发(AQS)](/src/main/java/com/toc/CONCURRENTTOOL.md) - [Java并发应用](/src/main/java/com/toc/CONCURRENT_APPLICATION.md) ## Spring - [Spring 基础](/src/main/java/com/toc/SPRING.md) - [Bean生命周期](/src/main/java/com/toc/LIFECYCLE.md) - [Spring 源码](/src/main/java/com/toc/SOURCECODE.md) - [拦截器与过滤器](/src/main/java/com/toc/FILTERANDINTERCEPTOR.md) - [Spring Boot加载流程](/src/main/java/com/toc/SPRINGBOOT.md) - [Spring Security](/src/main/java/com/toc/SPRING-SECURITY.md) - [Spring Sharding-JDBC](/src/main/java/com/four/SHARDING_JDBC.md) ## 中间件 - [Redis](/src/main/java/com/toc/REDIS.md) - [MySQL](/src/main/java/com/toc/MYSQL.md) - [MongoDB](/src/main/java/com/toc/MONGODB.md) - [Elasticsearch](/src/main/java/com/toc/ES.md) - [ZooKeeper](/src/main/java/com/toc/ZOOKEEPER.md) - [消息队列](/src/main/java/com/toc/MESSAGEQUEUE.md) - [FastDFS](/src/main/java/com/toc/FASTDFS.md) ## 算法 - [算法基础](/src/main/java/com/toc/ALGORITHM.md) - [排序算法](/src/main/java/com/toc/SORT_ALGORITHM.md) ## 计算机基础 - [计算机网络](/src/main/java/com/toc/NETWORK.md) - [操作系统](/src/main/java/com/toc/OPERATING_SYSTEM.md) - [Linux命令](/src/main/java/com/toc/LINUX.md) ## 系统设计 ### 设计思想及概念 - [设计原则及架构思想](/src/main/java/com/toc/SYSTEM_DESIGN.md) - [设计模式](/src/main/java/com/toc/CODEDESIGN_BOOK.md) - [分布式基本概念](/src/main/java/com/toc/DISTRIBUTED_SYSTEM.md) - [领域驱动设计(DDD)](/src/main/java/com/toc/DDD.md) ### 设计案例 场景设计: - [秒杀系统](/src/main/java/com/toc/SECONDS_KILL_DESIGN.md) - [短链接](/src/main/java/com/toc/TINYURL.md) - [抢红包](/src/main/java/com/toc/SECONDKILL_REDPACKAGE.md) - [扫码登陆](/src/main/java/com/toc/SCAN_LOGIN.md) - [会议系统设计](/src/main/java/com/toc/MEETING_DESIGN.md) - [敏感数据过滤设计](/src/main/java/com/toc/SENSITIVE_FILTER.md) - [购物活动金额结算设计](/src/main/java/com/toc/SHOPPING_SETTLEMENT.md) - [本地缓存设计](/src/main/java/com/toc/LOCALCACHE.md) - [pvuv设计](/src/main/java/com/toc/PVUV_DESIGN.md) - [基于Feed流系统设计](/src/main/java/com/toc/PVUV_DESIGN.md) - [评论系统](/src/main/java/com/toc/COMMENT-SYSTEM.md) - [核酸系统](/src/main/java/com/toc/NCOV-SYSTEM.md) 拓展设计: - [接口设计](/src/main/java/com/toc/INTERFACE_DESIGN.md) - [延迟队列](/src/main/java/com/toc/DELAYQUEUE_DESIGN.md) - [RPC框架介绍与设计](/src/main/java/com/toc/RPC_DESIGN.md) - [JWT、MFA及相关应用](/src/main/java/com/toc/JWT_APPLICATION.md) - [OAUTH2、CAS、SSO](/src/main/java/com/toc/OAUTH2_CAS_SSO.md) - [Redis数据结构的设计应用](/src/main/java/com/toc/REDIS_APPLICATION.md) - [Spring侵入式数据库读写分离实现](/src/main/java/com/toc/READ_WRITE_DB.md) - [数据库表相关设计题](/src/main/java/com/toc/TABLE_DESIGN.md) ## 分布式与微服务 - [Spring Cloud相关知识](/src/main/java/com/toc/SPRING-CLOUD.md) - [Spring Cloud 微服务 sample](https://github.com/rbmonster/sanwu-microservice) - [Dubbo sample](https://github.com/rbmonster/sanwu-dubbo-demo) ## 大数据 - [Spark](/src/main/java/com/toc/SPARK.md) - [Flink](/src/main/java/com/toc/FLINK.md) ## 其他 ### 参考书籍及资料记录 - [【设计模式 head first】](/src/main/java/com/toc/CODEDESIGN_BOOK.md) - [【基于Redis的设计与实现】黄健宏](/src/main/java/com/toc/REDIS_BOOK.md) - [【MySql 45讲】丁奇](/src/main/java/com/toc/MYSQL_BOOK.md) - [【深入理解Java虚拟机】周志明](/src/main/java/com/toc/JVM_BOOK.md) - [【凤凰架构】周志明](https://icyfenix.cn/summary/) - [【计算机网络-自顶而下】](src/main/java/com/toc/NETWORK_BOOK.md) - [【重构-改善既有代码的设计】](src/main/java/com/toc/REFACTOR_BOOK.md) - [【图解kafka之实战指南】](src/main/java/com/book/KAFKA_IN_ACTION.md) ## 参考资料 技术博客: | 地址 | 简介 | | --- | --- | | [JavaGuide](https://github.com/Snailclimb/JavaGuide)| 「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识 | | [小林coding](https://xiaolincoding.com/) | 小林 x 图解计算机基础-图解计算机网络、操作系统、计算机组成、数据库,让天下没有难懂的八股文!| | [bugstack](https://bugstack.cn/) | 虫洞栈Java干货,设计模式 面试问题带着例子说明得明明白白 | | [advanced-java](https://github.com/doocs/advanced-java) | 互联网Java工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识 | | [AobingJava](https://github.com/AobingJava/JavaFamily) | 敖丙的Java面试总结 | | [CS-Notes](https://github.com/CyC2018/CS-Notes) | 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计 | | [日拱一兵](https://dayarch.top/) | 挺用心的一个Java博主,解读Java相关技术 | | [美团技术团队](https://tech.meituan.com/) | 美团技术团队永远的神,深度解读技术 | 算法资料: | 地址 | 简介 | | --- | --- | | [🌟 OI-wiki](https://oi-wiki.org/basic/) | OI-wiki 算法体系化宝典(强力推荐)| | [fucking-algorithm](https://github.com/labuladong/fucking-algorithm) | labuladong刷算法套路,提供算法题的工具方法思想 | | [leetcode-master](https://github.com/youngyangyang04/leetcode-master) | 代码随想录LeetCode 刷题攻略:配思维导图 | | [LogicStack-LeetCode](https://github.com/SharingSource/LogicStack-LeetCode) | 「宫水三叶的刷题日记」刷穿 LeetCode 系列文章源码 | 系统设计及大数据: | 地址 | 简介 | | --- | --- | | [BigData-Notes](https://github.com/heibaiying/BigData-Notes) | 大数据入门指南(基本的入门指引) | | [system-design-primer](https://github.com/donnemartin/system-design-primer/blob/master/README-zh-Hans.md) | 来自微软的系统设计笔记,国人翻译 | | [system-design](https://github.com/soulmachine/system-design/blob/master/cn/SUMMARY.md) | 一位博主的系统设计总结(很久未更新,可做参考) | Spring源码拆解资料: | 地址 | 简介 | | --- | --- | | [mini-spring](https://github.com/DerekYRC/mini-spring) | mini-spring是简化版的spring框架,建议先动手跟着实践一遍再去阅读源码,能帮助你快速熟悉spring源码和掌握spring的核心原理。| | [tiny-spring](https://github.com/code4craft/tiny-spring)| Spring的精简版。从使用功能的角度出发,参考Spring的实现,一步一步构建,便于无基础的逐步深入理解Spring| | [spring-analysis](https://github.com/seaswalker/spring-analysis) | Spring源码解读(很久未更新了,但是spring基本的精髓都讲到了,适合参考阅读源码) |
0
leotyndale/EnFloatingView
🔥应用内悬浮窗,无需一切权限,适配所有ROM和厂商,no permission floating view.
float-button floating floating-view floating-window floatview floatwindow permission-android x-f-c
[![Logo](https://raw.githubusercontent.com/leotyndale/EnFloatingView/master/preview/logo.png)](http://www.imuxuan.com/) EnFloatingView ========================== [![Jcenter](https://img.shields.io/badge/Jcenter-v1.5-brightgreen.svg?style=flat)](https://bintray.com/leotyndale/Muxuan/EnFloatingView) [![Muxuan](https://img.shields.io/badge/PoweredBy-Muxuan-green.svg?style=flat)](http://www.imuxuan.com/) [![Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=Blog)](http://blog.imuxuan.com) [![《移动开发架构设计实战》](https://upload-images.jianshu.io/upload_images/14802001-4864444c478c88ee.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)](https://item.jd.com/12730926.html) [🔥🔥🔥 马上重构你的架构思维](https://item.jd.com/12730926.html) ========================== [English](/README_EN.md) 无需一切权限,不受各种国产ROM限制,默认可以显示的应用内悬浮窗。 ### 传统方案 对于传统悬浮窗和一些古老的“黑科技”悬浮窗的实现,想必已经有很多成熟的案例了,实现策略基本为以下两种: 1. TYPE_SYSTEM_ALERT类型 ```java mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE); WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams() layoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; ``` ​ 需要权限: ```java <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" ></uses> ``` 2. TYPE_TOAST / TYPE_PHONE 类型 ​ 7.1.1以下不需要权限声明,在魅族、华为、小米等机型上默认隐藏,需要引导用户打开悬浮窗。 ### 传统方案的问题 第一种方案因为存在各种限制,不能被众多开发采纳,故而比较流行的悬浮窗实现方式是第二种。 但是,我们有自己的原则: - 不能接受7.1.1以上机型,使用第二种方式实现悬浮窗仍需要用户主动授予权限的操作? - 不能接受在魅族、华为、小米等机型上默认隐藏,需要引导用户打开悬浮窗,就像这样 ![权限管理](https://github.com/leotyndale/EnFloatingView/blob/master/preview/1.gif) ### 功能 - 应用内显示,无需申请任何权限 - 应用内显示,所有机型都可以默认显示悬浮窗,无需引导用户做更多设置 - 支持拖拽 - 超出屏幕限制移动 - 可自动吸附到屏幕边缘 ### 基本使用规则 1.在gralde的dependencies中加入 ```java compile 'com.imuxuan:floatingview:1.6' ``` 2.在基类Activity(注意必须是基类Activity)中的onStart和onStop(或者安卓原生ActivityLifeCycle监听)中添加如下代码 ```java @Override protected void onStart() { super.onStart(); FloatingView.get().attach(this); } @Override protected void onStop() { super.onStop(); FloatingView.get().detach(this); } ``` 3.展示悬浮窗 ```java FloatingView.get().add(); ``` ### 扩展用法 1.销毁悬浮窗 ```java FloatingView.get().remove(); ``` 2.添加点击事件 ```java FloatingView.get().listener(new MagnetViewListener() { @Override public void onRemove(FloatingMagnetView magnetView) { Toast.makeText(TestActivity.this, "我没了", Toast.LENGTH_SHORT).show(); } @Override public void onClick(FloatingMagnetView magnetView) { Toast.makeText(TestActivity.this, "点到我了", Toast.LENGTH_SHORT).show(); } }); ``` 3.获得悬浮窗View ```java FloatingView.get().getView(); ``` 4.设置悬浮窗icon ```java FloatingView.get().icon(R.drawable.XXXXX); ``` 5.设置悬浮窗View ```java FloatingView.get().customView(new View()); or FloatingView.get().customView(R.layout.XXXXX); ``` 6.设置悬浮窗位置等布局参数 ```java FloatingView.get().layoutParams(new ViewGroup.LayoutParams()); ``` ### 效果图 ![预览图](https://github.com/leotyndale/EnFloatingView/blob/master/preview/2.gif) ### 更新记录 1.6 修复横竖屏切换错位 & 添加到布局时偶发崩溃 1.5 修复内存泄露问题 1.4 适配折叠屏 1.3 增加自定义layout等API 1.2 修复拖拽失效 1.1 点击监听问题处理 1.0 创建项目
0
AutohomeCorp/frostmourne
Frostmourne(霜之哀伤监控平台)是基于Elasticsearch, Prometheus, SkyWalking, InfluxDB,Mysql/TiDB,ClickHouse, SqlServer, IoTDB数据的分布式监控报警系统. Monitor & alert & alarm for Elasticsearch,Prometheus data。主要使用springboot2 + vue-element-admin
alarm alert alertmanager clickhouse dingtalk-robot elastalert elasticsearch element-ui influxdb iotdb logging monitor mybatis mybatis-dynamic-sql prometheus skywalking springboot2 vue vue-element-admin wechat-message
<div align="center"><a href="https://github.com/AutohomeCorp/frostmourne"><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/logo/frostmourne_logo.jpg"></a></div> <p align="center"> <a href="https://github.com/AutohomeCorp/frostmourne/releases"><img src="https://img.shields.io/github/release/AutohomeCorp/frostmourne" alt="GitHub release"></a> <a href="https://github.com/AutohomeCorp/frostmourne/stargazers"><img src="https://img.shields.io/github/stars/AutohomeCorp/frostmourne" alt="GitHub Stars"></a> <a href="https://github.com/AutohomeCorp/frostmourne/fork"><img src="https://img.shields.io/github/forks/AutohomeCorp/frostmourne" alt="GitHub Forks"></a> <a href="https://github.com/AutohomeCorp/frostmourne/graphs/contributors"><img src="https://img.shields.io/github/contributors/AutohomeCorp/frostmourne" alt="GitHub Contributors"></a> <a href="https://github.com/AutohomeCorp/frostmourne/issues"><img src="https://img.shields.io/github/issues/AutohomeCorp/frostmourne" alt="GitHub issues"></a> <a href="https://openjdk.java.net/"><img src="https://img.shields.io/badge/Java-8,11,13-blue?logo=java&logoColor=white" alt="JDK support"></a> <a href="https://github.com/AutohomeCorp/frostmourne/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/svelte.svg" alt="LICENSE"></a> <a href="https://github.com/AutohomeCorp/frostmourne"><img src="https://img.shields.io/github/downloads/AutohomeCorp/frostmourne/total.svg" alt="Downloads"></a> </p> [Github地址](https://github.com/AutohomeCorp/frostmourne) | [Gitee地址](https://gitee.com/tim_guai/frostmourne) | [中文](./README.md) | [English](./README_en.md) # 📖 介绍 `Frostmourne`(霜之哀伤)是汽车之家经销商技术部监控系统的开源版本,用于帮助监控几乎所有数据库数据(包括`Elasticsearch`, `Prometheus`, `SkyWalking`, `MySql` 等等)。如果你已经建立起了日志系统, 指标体系,却苦恼于没有一个配套监控系统,也许它能帮到你。使用本系统得当,至少可以做到线上应用出了什么问题,相关开发能第一时间了解报错情况,知道问题出在哪里, 可以快速响应处理,几乎先于所有人知道线上的情况,也因为心中有数所以可以从容应对各种问询,一点都不慌,你们团队值得拥有。 ### 项目初衷 在用`ELK`建立起日志系统之后,我们发现应用日志监控这块除了`ElastAlert`之外,没有其他方案。我们初期使用`ElastAlert`来解决日志监控的问题, 但是随着配置的增加,不仅管理成本和使用成本较高,稳定性方面也不能让我们满意,所以为了更好的易用性,稳定性,我们决定自己做一套简单的监控系统, 来解决日志监控的问题。 项目并不局限于`Elasticsearch`数据,还支持`HTTP`, `PING`, `Telnet`监控,`Prometheus`, `SkyWalking`, `InfluxDB`,`MySQL`, `ClickHouse`, `IoTDB`, `SqlServer`数据监控, 后面还会加入更多的常用数据源(如:`Loki`, `MongoDB`, `Redis`, `Oracle` 等)纳入监控范畴,需要做的东西还有很多,需要更多相关开发加入进来,欢迎联系我们,一起做大做强。 # ✨ 主要功能 * 只需要写一条数据查询就可以轻松搞定监控 * 多种数据源支持:`Elasticsearch, HTTP, SkyWalking, Prometheus, InfluxDB, MySQL/TiDb, ClickHouse, SqlServer, PING, IotDB, Telnet` * 数值计算类型监控:`count, min, max, avg, sum, unique count, percentiles, standard deviation`; `Elasticsearch`数据支持分桶 * 多种报警消息发送方式:钉钉(机器人)、企业微信(机器人)、飞书机器人、Email、短信、HTTP * 多种消息格式:`text, markdown` * 灵活的报警消息`Freemarker`模板定制,支持变量占位符;消息模板管理 * 分布式调度实现,每个监控都是独立调度,互不影响 * 报警消息附带日志查询短链接,直达报警原因 * 数值同比,环比监控 * `HTTP`数据监控, `Javascript`表达式判断是否报警; `PING`连通监控, `Telnet`端口连通监控 * 前端简单易用:监控管理、测试、另存、执行日志和历史消息 * `Elasticsearch`数据查询、分享和下载 * 报警消息抑制功能,防止消息轰炸;也有报警升级功能,避免故障相关方长时间得不到通知。 * 自带账号,团队,部门信息管理模块,也可自己实现内部对接 * 集成`LDAP`登录认证 * 权限控制,数据隔离,各团队互不影响 #### 企业微信机器人报警截图展示: (<a href="./doc/wiki/feature_image.md" target="_blank">查看完整功能截图展示</a>) <img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/wiki/img/markdown_wechat_robot.png" /> <!-- TOC --> ## 目录 - [介绍](#-介绍) - [主要功能](#-主要功能) - [在线demo](#-在线demo) - [快速启动](#-快速启动) - [部署](#-部署) - [环境准备](#预备环境准备mysql数据库表创建) - [k8s部署方式](#一k8s部署方式) - [zip包部署方式](#二zip包部署方式) - [自构建部署方式](#三自构建部署方式) - [功能使用指南](#-功能使用指南) - [开发调试](#-开发调试) - [后续规划](#后续规划) - [发版历史](./ReleaseNotes.md) - [Contributors](#-contributors) <!-- /TOC --> # 💻 在线demo 为了更快的理解本项目的作用,提供了一个接口全`mock`的静态站点供大家预览功能: <a href="https://frostmourne-demo.github.io/">在线demo</a> 在线`demo`更新不及时,请以项目实际运行效果为准,`demo`只是用于快速浏览 # 📦 快速启动 提供`docker-compose`方式,让你更快运行起来便于更好理解项目作用。详细请看文档:<a href="./doc/wiki/quick-start.md" target="_blank">Quick-Start</a> # 🧰 部署 #### 预备环境准备:`MySQL`数据库表创建 > Frostmourne所有表的创建语句都在 [frostmourne.sql](./doc/mysql-schema/frostmourne.sql) 文件中。 数据库密码默认使用明文,没有加密策略。如果你需要对密码进行加密,请参考druid官方文档:[druid数据库密码加密](https://github.com/alibaba/druid/wiki/%E4%BD%BF%E7%94%A8ConfigFilter) #### 一、`k8s`部署方式 `k8s`部署参考以下三个配置文件 * [frostmourne-monitor-namespace.yaml](./doc/docker/k8s/frostmourne-monitor-namespace.yaml) * [frostmourne-monitor-deployment.yaml](./doc/docker/k8s/frostmourne-monitor-deployment.yaml) * [frostmourne-monitor-service.yaml](./doc/docker/k8s/frostmourne-monitor-service.yaml) 相关参数在 `frostmourne-monitor-deployment.yaml` 文件里配置。需要注意的是在`frostmourne-monitor-service.yaml`里指定对外映射端口,默认`nodePort=30054` ```bash kubectl applt -f frostmourne-monitor-namespace.yaml kubectl applt -f frostmourne-monitor-deployment.yaml kubectl apply -f frostmourne-monitor-service.yaml ``` #### 二、`zip`包部署方式 依赖环境 * `JDK 1.8` * `MySQL 5.7.8+` 最新的Release版本zip包,请到 [releases](https://github.com/AutohomeCorp/frostmourne/releases) 中下载,解压后然后根据自己的环境修改应用配置文件`application.properties`文件和环境变量配置文件`env`,然后执行如下命令启动: ```bash ./scripts/startup.sh ``` 执行如下命令停止应用: ```bash ./scripts/shutdown.sh ``` #### 三、自构建部署方式 依赖环境 * `JDK 1.8` * `Maven 3.2.x+` * `MySQL 5.7.8+` 在项目`frostmourne`主目录下执`maven`构建命令: ```bash mvn -U clean package -DskipTests=true ``` 前端项目`frostmourne-vue`会自动把资源构建到`frostmourne-monitor`的`resources/dist`下,所以你只需要部署`frostmourne-monitor`即可。 `frostmourne-monitor`已经配置了`assembly`打包,`target`目录下会生成`zip`包,你只需要将`zip`包解压,然后根据自己的 环境修改应用配置文件`application.properties`文件和环境变量配置文件env,然后执行如下命令启动: ```bash ./scripts/startup.sh ``` 执行如下命令停止应用: ```bash ./scripts/shutdown.sh ``` # 📚 功能使用指南 <table> <tr> <td><a href="./doc/wiki/es.md" target="_blank">Elasticsearch数据监控指南</a></td> <td><a href="./doc/wiki/http-alarm.md" target="_blank">HTTP监控使用说明</a></td> <td><a href="./doc/wiki/prometheus.md" target="_blank">Prometheus数据监控指南</a></td> </tr> <tr> <td><a href="./doc/wiki/skywalking.md" target="_blank">SkyWalking数据监控指南</a></td> <td><a href="./doc/wiki/jdbc-mysql.md" target="_blank">MySQL/TiDB数据监控指南</a></td> <td><a href="./doc/wiki/jdbc-clickhouse.md" target="_blank">ClickHouse数据监控指南</a></td> </tr> <tr> <td><a href="./doc/wiki/influxdb.md" target="_blank">InfluxDB数据监控指南</a></td> <td><a href="./doc/wiki/ping.md" target="_blank">PING监控指南</a></td> <td><a href="./doc/wiki/same-time-compare.md" target="_blank">数值同比监控使用指南</a></td> </tr> <tr> <td><a href="./doc/wiki/template.md" target="_blank">消息模板配置</a></td> <td><a href="./doc/wiki/ways.md" target="_blank">报警发送</a></td> <td><a href="./doc/wiki/supress.md" target="_blank">报警抑制</a></td> </tr> <tr> <td><a href="./doc/wiki/auth.md" target="_blank">用户管理和登录认证</a></td> <td><a href="./doc/wiki/note.md" target="_blank">注意事项</a></td> <td><a href="./doc/wiki/other.md" target="_blank">其他</a></td> </tr> <tr> <td><a href="./doc/wiki/ring-compare.md" target="_blank">数值环比监控使用指南</a></td> <td><a href="./doc/wiki/iotdb.md" target="_blank">iotdb数据监控使用指南</a></td> <td><a href="./doc/wiki/telnet.md" target="_blank">telnet端口连通监控指南</a></td> </tr> </table> # 🛠 开发调试 调试环境要求 * `JDK 8 ~ 14` * `Node 16.14.2 (推荐)` * `Yarn 1.22.10 (推荐) 或 Npm 8.7.0` * `MySQL 5.7.8+` * `Elasticsearch 6.3.2+` 启动`frostmourne-monitor`项目, 启动参数增加: ``` -Dmysql.host=localhost -Dmysql.user=root -Dmysql.password=example -Dlog.console.level=INFO ``` `MySQL`相关参数修改为自己环境的,`active profile`设置为`local`, 测试地址: http://localhost:10054 使用`VS Code`打开`frostmourne-vue`目录,进行前端调试。执行如下命令: ```bash # install dependency yarn install # 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 yarn install --registry=https://registry.npm.taobao.org # develop yarn dev ``` 会自动打开: http://localhost:9528 搭建本地开发调试环境或者需要做二次开发遇到什么困难的都可以加群沟通,欢迎各路英雄多多PR 技术说明项目基于`Java8`实现,详细请看:[技术说明](./doc/wiki/technical.md) # ⚙后续规划 * 发布1.0-RELEASE * 增加本项目内程序日志采集至MySQL并提供查询页面,方便排查问题和监控 * Elasticsearch数据名增加kibana链接配置,在数据查询页面增加kibana地址跳转链接,方便将数据查询切换至kibana * 短信报警方式实现,默认用阿里云短信实现 * 增加阿里云日志数据监控 * 增加腾讯云日志数据监控 * 增加华为云日志数据监控 * 完成英语国际化 * 增加 [loki](https://github.com/grafana/loki) 数据监控报警 * 增加邮箱在线配置页面功能 * 增加企业微信在线配置页面功能 * 将短链接id以16进制格式展示,解决id数字很大的时候较长的问题 * pom优化 * 员工换组增加是否迁移监控至新组的选项,如果勾选将该员工创建的监控也转移至新组 * 增加报警组支持 * Elasticsearch数据名增加traceid字段配置,可以配置跳转链接。例如: 配置skywalking的链接将跳转到skywalking对应的调用链 * 增加时序数据历史数据比较规则 * 监控增加报警消息允许发送时间段设置,非允许发送时间段内消息将只记录不发送,发送状态为FORBID * 增加企业钉钉发消息默认实现(本地没有环境,需要帮助,欢迎PR,或者提供示例代码,先行谢过) * 更多报警方式补充(欢迎PR) * 增加 [skywalking](https://github.com/apache/skywalking) `Database Layer` 数据监控报警支持 * 监控列表增加一个开关选项,只显示我的监控 * Elasticsearch数据名配置时自动提示索引名称 * 引入对象迭代器,迭代器代表从数据源中得到一个List数据列表,或者自定义输入;用于动态生成监控查询语句,例如: Level: ERROR AND Project: ${ITEM_VALUE};达到数据遍历监控的效果; * 发布1.0-RELEASE * 3-sigma离群点检测报警规则 * 加入时序数据异常检测算法规则(需要实验可行性 [基于时间序列的异常检测](https://blog.rexking6.top/2018/11/05/%E5%9F%BA%E4%BA%8E%E6%97%B6%E9%97%B4%E5%BA%8F%E5%88%97%E7%9A%84%E5%BC%82%E5%B8%B8%E6%A3%80%E6%B5%8B/)) * 总结项目用到的知识点 # 🗓 [发版历史](./ReleaseNotes.md) # 👍 [致谢](./doc/wiki/thank.md) # 👷 Contributors [@menong-chen](https://github.com/menong-chen) [@fox2zz](https://github.com/fox2zz) [@xyzj91](https://github.com/xyzj91) [@wxmclub](https://github.com/wxmclub) [@Aping](https://github.com/wuaping) [@limbo](https://github.com/limboinf) [![GitHub Contributors](https://contrib.rocks/image?repo=AutohomeCorp/frostmourne)](https://github.com/AutohomeCorp/frostmourne/graphs/contributors) # 💡️ 如何参与贡献 如果你觉得这个项目对你有所帮助想有所回馈,非常欢迎参与贡献。可以通过如下方式: * 从后续规划里选择合适的任务提交`PR` * 对文档进行必要补充 * 部署本项目使用起来并通过 [`github`](https://github.com/AutohomeCorp/frostmourne/issues/17) 或 [`gitee`](https://gitee.com/tim_guai/frostmourne/issues/I560YJ) 告知 * 帮忙扩散推广 * 在 [`issue`](https://github.com/AutohomeCorp/frostmourne/issues) 提出你的宝贵建议 * 加入交流群,解答交流问题。群内会不定时发布项目更新说明 * 开源不易,star鼓励 * [代码规范说明](./doc/wiki/code_format.md) # 💬 联系我们 有问题需要帮助或者交流可以添加下边的微信群或QQ群,请优先选择提 [issue](https://github.com/AutohomeCorp/frostmourne/issues) ,便于问题的讨论和记录追踪,也方便有类似问题的伙伴搜索解决。也欢迎对项目感兴趣的同僚加群交流。 特别提一下:关于文档觉得哪里写的不通畅,不好理解,或者有哪方面缺失,都欢迎提 [issue](https://github.com/AutohomeCorp/frostmourne/issues) 。 <div align="center"><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/frostmourne-contact.jpg" /></div> # 📌 项目事记 * 2019-12-16: 发布`github` * 2020-06-14: 发布`gitee` * 2020-07-02: 合并第一个`PR` * 2020-07-04: 被`elastic`中文社区收录 [Elastic日报988期](https://elasticsearch.cn/article/14018) * 2020-07-13: github项目设置为私有,丢失82个`star`,29个`fork` * 2020-07-15: 重新公开`github` * 2020-08-23: 上`gitee`推荐 * 2020-08-27: `gitee star`破百 * 2020-10-12: `github star`破百 # 👥 已注册使用者 通过 [`github`](https://github.com/AutohomeCorp/frostmourne/issues/17) 或 [`gitee`](https://gitee.com/tim_guai/frostmourne/issues/I560YJ) 登记的使用者 <table> <tr> <td><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/user/autohome.jpg" alt="汽车之家"></td> <td><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/user/zuiyou.jpg" alt="最右APP"></td> <td><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/user/jiajiayue.jpg" alt="家家悦"></td> <td><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/user/sungrow.jpg" alt="阳光电源"></td> <td><img src="https://gitee.com/tim_guai/frostmourne/raw/master/doc/img/user/etcp.jpg" alt="ETCP"></td> <td><img src="https://raw.githubusercontent.com/AutohomeCorp/frostmourne/master/doc/img/user/lingoace.png" alt="LingoAce"></td> </tr> <tr> <td><img src="https://www.ddky.com/images/logo_0120.png" alt="叮当快药"></td> <td><img src="https://www.aikucun.com//img/logo-red@2x.f98115f3.png" alt="爱库存"></td> <td></td> <td></td> <td></td> <td></td> </tr> </table> # ⭐️ Stargazers over time [![Stargazers over time](https://starchart.cc/AutohomeCorp/frostmourne.svg)](https://starchart.cc/AutohomeCorp/frostmourne)
0
real-logic/simple-binary-encoding
Simple Binary Encoding (SBE) - High Performance Message Codec
c-plus-plus codec encoder-decoder golang java
Simple Binary Encoding (SBE) ============================ [![Javadocs](https://www.javadoc.io/badge/uk.co.real-logic/sbe-tool.svg)](https://www.javadoc.io/doc/uk.co.real-logic/sbe-tool) [![GitHub](https://img.shields.io/github/license/real-logic/simple-binary-encoding.svg)](https://github.com/real-logic/simple-binary-encoding/blob/master/LICENSE) [![Actions Status](https://github.com/real-logic/simple-binary-encoding/workflows/Continuous%20Integration/badge.svg)](https://github.com/real-logic/simple-binary-encoding/actions) [![CodeQL Status](https://github.com/real-logic/simple-binary-encoding/workflows/CodeQL/badge.svg)](https://github.com/real-logic/simple-binary-encoding/actions) [SBE](https://github.com/FIXTradingCommunity/fix-simple-binary-encoding) is an OSI layer 6 presentation for encoding and decoding binary application messages for low-latency financial applications. This repository contains the reference implementations in Java, C++, Golang, C#, and Rust. More details on the design and usage of SBE can be found on the [Wiki](https://github.com/real-logic/simple-binary-encoding/wiki). An XSD for SBE specs can be found [here](https://github.com/real-logic/simple-binary-encoding/blob/master/sbe-tool/src/main/resources/fpl/sbe.xsd). Please address questions about the specification to the [SBE FIX community](https://github.com/FIXTradingCommunity/fix-simple-binary-encoding). For the latest version information and changes see the [Change Log](https://github.com/real-logic/simple-binary-encoding/wiki/Change-Log) with **downloads** at [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csbe). The Java and C++ SBE implementations work very efficiently with the [Aeron](https://github.com/real-logic/aeron) messaging system for low-latency and high-throughput communications. The Java SBE implementation has a dependency on [Agrona](https://github.com/real-logic/agrona) for its buffer implementations. Commercial support is available from [sales@real-logic.co.uk](mailto:sales@real-logic.co.uk?subject=SBE). Binaries -------- Binaries and dependency information for Maven, Ivy, Gradle, and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Csbe). Example for Maven: ```xml <dependency>     <groupId>uk.co.real-logic</groupId>     <artifactId>sbe-all</artifactId>     <version>${sbe.tool.version}</version> </dependency> ``` Build ----- Build the project with [Gradle](http://gradle.org/) using this [build.gradle](https://github.com/real-logic/simple-binary-encoding/blob/master/build.gradle) file. Full clean build: $ ./gradlew Run the Java examples $ ./gradlew runJavaExamples Distribution ------------ Jars for the executable, source, and javadoc for the various modules can be found in the following directories: sbe-benchmarks/build/libs sbe-samples/build/libs sbe-tool/build/libs sbe-all/build/libs An example to execute a Jar from command line using the 'all' jar which includes the Agrona dependency: java -Dsbe.generate.ir=true -Dsbe.target.language=Cpp -Dsbe.target.namespace=sbe -Dsbe.output.dir=include/gen -Dsbe.errorLog=yes -jar sbe-all/build/libs/sbe-all-${SBE_TOOL_VERSION}.jar my-sbe-messages.xml C++ Build using CMake --------------------- NOTE: Linux, Mac OS, and Windows only for the moment. See [FAQ](https://github.com/real-logic/simple-binary-encoding/wiki/Frequently-Asked-Questions). Windows builds have been tested with Visual Studio Express 12. For convenience, the `cppbuild` script does a full clean, build, and test of all targets as a Release build. $ ./cppbuild/cppbuild If you are comfortable using CMake, then a full clean, build, and test looks like: $ mkdir -p cppbuild/Debug $ cd cppbuild/Debug $ cmake ../.. $ cmake --build . --clean-first $ ctest __Note__: The C++ build includes the C generator. Currently, the C generator is a work in progress. Golang Build ------------ First build using Gradle to generate the SBE jar and then use it to generate the golang code for testing. $ ./gradlew $ ./gradlew generateGolangCodecs For convenience on Linux, a gnu Makefile is provided that runs some tests and contains some examples. $ cd gocode # make # test, examples, bench Users of golang generated code should see the [user documentation](https://github.com/real-logic/simple-binary-encoding/wiki/Golang-User-Guide). Developers wishing to enhance the golang generator should see the [developer documentation](https://github.com/real-logic/simple-binary-encoding/blob/master/gocode/README.md) C# Build -------- Users of CSharp generated code should see the [user documentation](https://github.com/real-logic/simple-binary-encoding/wiki/Csharp-User-Guide). Developers wishing to enhance the CSharp generator should see the [developer documentation](https://github.com/real-logic/simple-binary-encoding/blob/master/csharp/README.md) Rust Build ------------ The SBE Rust generator will produce 100% safe rust crates (no `unsafe` code will be generated). Generated crates do not have any dependencies on any libraries (including no SBE libraries). If you don't yet have Rust installed see [Rust: Getting Started](https://www.rust-lang.org/learn/get-started) Generate the Rust codecs $ ./gradlew generateRustCodecs Run the Rust test from Gradle $ ./gradlew runRustTests Or run test directly with `Cargo` $ cd rust $ cargo test License (See LICENSE file for full license) ------------------------------------------- Copyright 2013-2024 Real Logic Limited. Copyright 2017 MarketFactory Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
0
Jstarfish/JavaKeeper
✍️ Java 工程师必备架构体系知识总结:涵盖分布式、微服务、RPC等互联网公司常用架构,以及数据存储、缓存、搜索等必备技能
algorithms elasticsearch java jvm kafka linux mysql redis s3 zookeeper
<p align="center"> <a href="https://www.lazyegg.net/JavaKeeper"> <img src="https://i.loli.net/2020/03/13/WOJFBDIG6kocKxh.png"> </a> <br ><br > <img src="https://img.shields.io/badge/language-Java-blue.svg"> <img src="https://img.shields.io/badge/platform-Linux-red.svg"> <a href="https://juejin.im/user/5b8f1d426fb9a019d7477421"><img src="https://img.shields.io/badge/%E6%8E%98%E9%87%91-@lazyegg-FFA500.svg?style=flat&colorA=1970fe"></a> <a href="https://www.lazyegg.net"><img src="https://img.shields.io/badge/Blog-lazyegg-80d4f9.svg?style=flat"></a> <a href="https://blog.csdn.net/u011870547"><img src="https://img.shields.io/badge/CSDN-@大新之助-fd6f32.svg?style=flat&colorA=B22222"></a> </p> <h3 align="center">记录并分享每一次成长</h3> ------ 通过 gitbook 的形式整理了自己的工作和学习经验,[JavaKeeper](http://javakeeper.starfish.ink) 直接访问即可,也推荐大家采用这种形式创建属于自己的“笔记本”,让成长看的见。 > 欢迎关注公众号 [JavaKeeper](#公众号) ,有 500+ 本电子书,大佬云集的微信群,等你来撩~ ## ☕ Java | Project | Version | Article | | :-----: | :-----: | :----------------------------------------------------------- | | JVM | | [JVM与Java体系结构](https://javakeeper.starfish.ink/java/JVM/JVM-Java.html)<br/>[类加载子系统](https://javakeeper.starfish.ink/java/JVM/Class-Loading.html)<br/>[运行时数据区](https://javakeeper.starfish.ink/java/JVM/Runtime-Data-Areas.html)<br/>[看完这篇垃圾回收,和面试官扯皮没问题了](https://javakeeper.starfish.ink/java/JVM/GC.html)<br/>[垃圾回收-实战篇](https://javakeeper.starfish.ink/java/JVM/GC-%E5%AE%9E%E6%88%98.html)<br/>[你有认真了解过自己的Java“对象”吗](https://javakeeper.starfish.ink/java/JVM/Java-Object.html)<br/>[JVM 参数配置](https://javakeeper.starfish.ink/java/JVM/JVM%E5%8F%82%E6%95%B0%E9%85%8D%E7%BD%AE.html)<br/>[谈谈你对 OOM 的认识](https://javakeeper.starfish.ink/java/JVM/OOM.html)<br/>[阿里面试回顾: 说说强引用、软引用、弱引用、虚引用?](https://javakeeper.starfish.ink/java/JVM/Reference.html)<br/>[JVM 性能监控和故障处理工具](https://javakeeper.starfish.ink/java/JVM/JVM%E6%80%A7%E8%83%BD%E7%9B%91%E6%8E%A7%E5%92%8C%E6%95%85%E9%9A%9C%E5%A4%84%E7%90%86%E5%B7%A5%E5%85%B7.html)<br/> | | Java8 | | [Java8 通关攻略](https://javakeeper.starfish.ink/java/Java-8.html)<br/> | | JUC | | [不懂Java 内存模型,就先别扯什么高并发](https://javakeeper.starfish.ink/java/JUC/Java-Memory-Model.html)<br/>[面试必问的 volatile,你真的理解了吗](https://javakeeper.starfish.ink/java/JUC/volatile.html)<br/>[从 Atomic 到 CAS ,竟然衍生出这么多 20k+ 面试题](https://javakeeper.starfish.ink/java/JUC/CAS.html)<br/>[「阻塞队列」手写生产者消费者、线程池原理面试题真正的答案](https://javakeeper.starfish.ink/java/JUC/BlockingQueue.html)<br/>[线程池解毒](https://javakeeper.starfish.ink/java/JUC/Thread-Pool.html)<br/> | | NIO | | | ## 💾 数据存储、缓存和搜索 | Project | Version | Article | | :----------------------------------------------------------: | :-----: | :----------------------------------------------------------- | | ![](https://icongr.am/devicon//mysql-original.svg?size=20) **MySQL** | 5.7.25 | [1、MySQL架构概述](https://javakeeper.starfish.ink/data-management/MySQL/MySQL-Framework.html)<br/>[2、MySQL存储引擎](https://javakeeper.starfish.ink/data-management/MySQL/MySQL-Storage-Engines.html)<br/>[3、索引](https://javakeeper.starfish.ink/data-management/MySQL/MySQL-Index.html)<br/>[4、事务](https://javakeeper.starfish.ink/data-management/MySQL/MySQL-Transaction.html)<br/>5、表设计<br/>[6、性能优化](docs/data-store/MySQL/MySQL-Optimization.md)<br/>7、锁机制<br/>8、分区分表分库<br/>9 、主从复制<br/> | | ![](https://icongr.am/devicon//redis-original.svg?size=20) **Redis** | 5.0.6 | [1、NoSQL概述]()<br/>[2、Redis概述](https://javakeeper.starfish.ink/data-management/Redis/ReadRedis.html)<br/>[3、Redis数据类型](https://javakeeper.starfish.ink/data-management/Redis/Redis-Datatype.html)<br/>[4、Redis配置](https://javakeeper.starfish.ink/data-management/Redis/Redis-Conf.html)<br/>[5、深入理解 Redis 的持久化](https://javakeeper.starfish.ink/data-management/Redis/Redis-Persistence.html)<br/> | | **Elasticsearch** | | | | **Amazon S3** | | | | MongoDB | | | | FastDFS | | | ## 🖥️ 服务器 | Project | Version | Article | | :-------: | :-----------------: | :----------------------------------------------------------- | | **Linux** | CentOS release 6.10 | [Linux通关攻略]( <https://github.com/Jstarfish/JavaEgg/blob/master/docs/linux/linux.md>) | | **Nginx** | 1.16.1 | [Nginx通关攻略](https://mp.weixin.qq.com/s/jA-6tDcrNgd-Wtncj6D6DQ) | ## 🌱 Spring全家福和微服务 | Project | Version | Article | | :----------: | :------------: | :----------------------------------------------------------- | | Spring | 4.3.26.RELEASE | [1、Spring 概述](/docs/spring/Spring-Overview.md)<br/> | | Spring MVC | | | | Spring Boot | 2.1.8 | [Spring Boot入门](/docs/springboot/Hello-SpringBoot.md)<br>[Spingboot定时任务@Scheduled](/docs/springboot/Spingboot定时任务@Scheduled.md)<br> | | Spring Cloud | | | ## 🏡 必备框架 | Project | Version | Article | | :-----: | :-----: | :------ | | JPA | | | | MyBatis | | | | Shiro | | | ## ✉️ Message Queue | Project | Version | Article | | :-----: | :-----: | :----------------------------------------------------------- | | MQ | | [Hello MQ](/docs/message-queue/浅谈消息队列及常见的消息中间件.md)<br> | | Kafka | 2.12 | [Hello Kafka](/docs/message-queue/Kafka/Hello-Kafka.md)<br>[Kafka为什么能那么快的 6 个原因](https://mp.weixin.qq.com/s/dbnpPEF0FBB5A5xH21OoeQ)<br/> | ## :dog: RPC Learning | Project | Version | Article | | :-----: | :-----: | :----------------------------------------------------------- | | RPC | gRPC | [1 —— Hello protocol-buffers](/docs/rpc/Hello-Protocol-Buffers.md)<br> | ## ⚒️ 基础工具 | Project | Article | | :-----: | :----------------------------------------------------------- | | Maven | [头条一面竟然问我maven?](/docs/tools/Maven.md) | | Git | [github 竟然有这些骚操作,真是涨姿势](/docs/tools/github.md) | | IDEA | [IDEA总结——磨刀霍霍向代码](/docs/tools/IDEA.md) | | Jenkins | | ## 🎨 设计模式 | Project | Article | | :------------------: | :----------------------------------------------------------- | | GoF 的 23 种设计模式 | [设计模式前传——要学设计模式你要先知道这些](/docs/design-pattern/Design-Pattern-Overview.md) <br/>[单例模式——我只有一个对象](/docs/design-pattern/Singleton-Pattern.md)<br/>[工厂模式——我有好多对象](/docs/design-pattern/Factory-Pattern.md)<br/>[观察者模式——暗中观察](/docs/design-pattern/Observer-Pattern.md)<br />[装饰者模式——拒绝继承滥用](/docs/design-pattern/Decorator-Pattern.md)<br />[责任链模式——更灵活的 if else](/docs/design-pattern/Chain-of-Responsibility-Pattern)<br>[代理模式——面试官问我Spring AOP中两种代理的区别](https://mp.weixin.qq.com/s/U7eR5Mpu4VBbtPP1livLnA)<br/>[原型模式——浅拷贝和深拷贝](http://mp.weixin.qq.com/s?__biz=MzIyNDI3MjY0NQ==&mid=2247485400&idx=1&sn=b83ef5d8d81e54bc46207bf540fc9cf9&chksm=e810cfb2df6746a41e10904fe43611e1385d406a95f680472e72620b91973f8724af9a4d8c37&token=1569764147&lang=zh_CN#rd)<br/> | ## 🌍 SOA 架构 | Project | Version | Article | | :-------: | :-----: | :----------------------------------------------------------- | | Zookeeper | 3.5.6 | [从Paxos到ZooKeeper——Hello ZK](/docs/soa/zookeeper/Hello-Zookeeper.md)<br/>[ZooKeeper实战——Curator](/docs/soa/zookeeper/Zookeeper实战与源码.md)<br/> | ## 👨🏿‍💻 Big Data | Project | Version | Article | | :------: | :-----: | :------------------------------------------------ | | Big Data | | [Hello Big Data](/docs/big-data/Hello-BigData.md) | ## 🔢 算法 - Algorithms | Project | Article | | :------: | :----------------------------------------------------------- | | LeetCode | [时间复杂度详解](/docs/leetcode/complexity.md)<br/>[两数之和](/docs/leetcode/两数之和.md) | ## 📖 **数据结构 - Data Structures** | Project | Article | | :--------: | :------ | | 数组与链表 | | | 栈与队列 | | | 树与图 | | | 哈希表 | | | 堆 | | | 字符串 | | ## 🏆 直击面试 | Project | Article | | :-----: | :----------------------------------------------------------- | | Spring | 「 直击面试」—— Spring高频面试题 | | 网络 | [「 直击面试」—— 搞定计算机网络](/docs/network/Network-FAQ.md) | | 基础 | [「 直击面试」—— 搞定 Java 集合](/docs/java/Collections/Collections-FAQ.md) | | MySQL | [「 直击面试」—— MySQL三文字总结+面试100问](https://mp.weixin.qq.com/s/MCFHNOQnTtJ6MGVjM3DP4A) | ## ❗️ 勘误 + 文章只是记录自己的学习,如果在文章中发现错误或者侵权问题,欢迎指出,谢谢 ## ©️ 转载 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />本<span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" rel="dct:type">作品</span>由 <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/Jstarfish/Technical-Learning" property="cc:attributionName" rel="cc:attributionURL">STARFISH</a> 创作,遵循<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC 4.0 BY-SA </a>版权协议。 ## 公众号 扫一扫《亚威农少女》,寻找你要的“宝藏” ![](https://tva1.sinaimg.cn/large/007S8ZIlly1gf8izv6q5jj30ft0ft4ir.jpg)
0
frank-lam/fullstack-tutorial
🚀 fullstack tutorial 2022,后台技术栈/架构师之路/全栈开发社区,春招/秋招/校招/面试
computer-science fullstack-developer interview java java-interview skill-tree
<div align="center"><img src="assets/logo-2021.svg" width="80%"/></div><br/> | I | II | III | IV | V | VI | VII | VIII | IX | X | XI | XII | | :--------------------------: | :-------------------: | :----------------------: | :---------------------: | :--------------: | :---------------: | :----------------------: | :----------------------: | :----------------------: | :----------------------: | :----------------------: | :----------------------: | | 算法<br />[📝](#一数据结构与算法) | Java<br/>[☕️](#二java) | Python<br />[🐍](#三python) | 前端<br />[🔗](#四前端) | 数据库<br/>[💾](#五数据库) | 操作系统<br/>[💻](#六操作系统) | 网络通信<br/>[☁️](#七网络通信) | 分布式<br/>[📃](#八分布式) | 机器学习<br/> [🔍](#九机器学习) |工具<br/>[🔨](#十工具) |Learn<br />[📖](#learn-) |Talking<br />[💡](#talking-bulb) | <div align="center"> <p> ✨✨✨ </p> <p> 和 500+ 技术达人在线交流: <a href="notes/技术交流群.md">🤟 快来吧,和大家一起技术互动交流</a> </p> <p> 『技术博客』:<a href="https://www.frankfeekr.cn">www.frankfeekr.cn</a> | 『开源贡献』:<a href="notes/开源贡献.md">⊱ 英雄招募令</a> | 『微信订阅号』:全栈开发社区 </p> </div> <div align="center"><img src="assets/zhishixingqiu.JPG" width="40%"/></div><br/> 🔥🔥🔥 欢迎光临 LinTools 开发者的在线导航: https://tools.frankfeekr.cn 如果你有更好的在线工具,[请点击留言](https://github.com/frank-lam/fullstack-tutorial/issues/65),持续更新! ## 前言 - [谈谈技术学习的一些方法论](https://www.frankfeekr.cn/2019/05/09/谈谈技术学习的一些方法论/) 在学习技术这条路上并不是一帆风顺,也一直在探索一条适合自己的学习方法。从一开始的技术小白,到现在还比较上道的老鸟,在这个过程中走了太多的弯路,想在这里和大家分享一些我的经历和学习方法。 - [如何选择自己的技术栈](https://www.frankfeekr.cn/2019/05/27/如何选择自己的技术栈/) 在编程的世界里,该如何选择自己的技术栈呢。学前端?学 APP 开发?对于 Java、C++、C#、Python、PHP 又如何选择呢?人工智能现如今这么火,是不是机器学习、深度学习更高级一些呢?那么程序员又如何修炼内功呢? - [全栈开发神兵利器](notes/全栈开发神兵利器.md) 工欲善其事,必先利其器。这里我将推荐开发过程中的提效工具、开发利器、协作工具、文档技术等等。 - [XP 极限编程](notes/XP极限编程.md) 敏捷软件开发中可能是最富有成效的几种方法学之一 ## 技能图谱 - [backend skill](notes/SkillTree/backend-skill.md) 后台开发技能图谱,从程序员的内功修炼到后台语言,分布式系统架构 ## 一、数据结构与算法 - [数据结构与算法](notes/数据结构与算法.md)   排序算法、动态规划、递归、回溯法、贪心算法等 - [海量数据处理](notes/海量数据处理.md) 数据处理典型案例,逐渐更新 ## 二、Java - [Java 基础概念](notes/JavaArchitecture/01-Java基础.md)   基本概念、面向对象、关键字、基本数据类型与运算、字符串与数组、异常处理、Object 通用方法 - [Java 集合框架](notes/JavaArchitecture/02-Java集合框架.md)   数据结构 & 源码分析:ArrayList、Vector、LinkedList、HashMap、ConcurrentHashMap、HashSet、LinkedHashSet and LinkedHashMap - [Java 并发编程](notes/JavaArchitecture/03-Java并发编程.md)   线程状态、线程机制、线程通信、J.U.C 组件、JMM、线程安全、锁优化 - [Java I/O](notes/JavaArchitecture/04-Java-IO.md)   磁盘操作、字节操作、字符操作、对象操作、网络操作、NIO - [Java 虚拟机](notes/JavaArchitecture/05-Java虚拟机.md)   运行时数据区域、垃圾收集、内存分配机制、类加载机制、性能调优监控工具 - [Java 设计模式](notes/JavaArchitecture/06-Java设计模式.md)   Java 常见的 10 余种设计模式,全 23 种设计模式逐步更新 - [Java Web](notes/JavaArchitecture/07-JavaWeb.md)   包含 Servlet & JSP、Spring、SpringMVC、Mybatis、Hibernate、Structs2 核心思想,如 IOC、AOP 等思想。SSM 更详细请转向:[Spring](notes/JavaWeb/Spring.md) | [SpringMVC](https://github.com/frank-lam/SpringMVC_MyBatis_Learning) | [MyBatis](https://github.com/frank-lam/SpringMVC_MyBatis_Learning) ## 三、Python - [Python 语言基础](notes/Python/Python简介及基础语法.md) ## 四、前端 - [前端知识体系](notes/Frontend/前端知识体系.md) - [Angular 基础知识](notes/Frontend/Angular.md) - [ES6+ 语法全解析](https://notes.frankfeekr.cn/docs/frontend/es6/%E9%A1%B9%E7%9B%AE%E5%87%86%E5%A4%87/%E5%89%8D%E8%A8%80) <details> <summary>TODO LIST</summary> - HTML5 - CSS3 - CSS 预处理 - sass(scss) - less - stylus - CSS 框架 - BootStarp - LayUI - JavaScript 基础语法、进阶、ES6 - JavaScript 框架 - Vue - React - Angular - jQuery - Node 常用 api、对象池、异常处理、进程通信、高并发 - 静态类型检查 - TypeScript - Flow - 构建/打包工具 - webpack - gulp - rollup - 包管理工具 - npm - yarn - 服务端渲染 - koa2 - express - nuxt - next </details> ## 五、数据库 - [MySQL](notes/MySQL.md) 存储引擎、事务隔离级别、索引、主从复制 - [Redis](notes/Redis.md) Redis 核心知识 - [SQL](notes/SQL.md) 常用 SQL 语句 - [PostgreSQL](notes/PostgreSQL.md) 一个开源的关系数据库,是从伯克利写的 POSTGRES 软件包发展而来的 - [InfluxDB](https://www.frankfeekr.cn/2019/07/24/influxdb-tutorial-start/) 玩转时序数据库 ## 六、操作系统 - [操作系统原理](notes/操作系统.md)   进程管理、死锁、内存管理、磁盘设备 - [Linux](notes/Linux.md)   基础核心概念、常用命令使用 ## 七、网络通信 - [计算机网络](notes/计算机网络.md)   传输层、应用层(HTTP)、网络层、网络安全 - [RESTful API](notes/RESTful%20API.md) 软件架构风格、格设计原则和约束条件 - [Web网络安全](notes/网络安全.md) web前后端漏洞分析与防御,XSS 攻击、CSRF 攻击、DDoS 攻击、SQL 注入 ## 八、分布式 - [Docker](notes/Docker基础.md) 容器化引擎服务 - [微服务](notes/微服务.md) 微服务简介、API 网关、服务注册发现、服务通信 - [Zookeeper](notes/分布式/Zookeeper.md) 分布式协调服务,服务注册发现 - [Kafka](notes/MicroService/kafka/README.md) 深入浅出 Kafka,将用最极简的语言带你走进 Kafka 的消息中间件世界 【说明】**分布式专题** 笔者也在学习中,这里列举了一些技能列表,笔者将局部更新。敬请期待 <details> <summary>TODO LIST</summary> - Kubernetes(k8s) 容器化部署,管理云平台中多个主机上的容器化的应用 - 云计算 SaaS(软件即服务) 、PaaS(平台即服务) 、IaaS(基础架构即服务) - Zookeeper 分布式协调服务,服务注册发现 - Dubbo、Thrift(RPC 框架) 分布式服务治理 - 分布式事务解决方案 - ActiveMQ、Kafka、RabbitMQ 分布式消息通信 - 熔断,限流,降级机制 - Redis 分布式缓存 - Mycat 数据库路由 - Nginx 反向代理 - Tomcat Web Server 服务 - DevOps 自动化运维,持续集成、持续交付、持续部署 - 分布式锁 基于 Redis、MySQL、Zookeeper 的分布式锁实现 - FastDFS 轻量级分布式文件管理系统 - Go 并发的、带垃圾回收的、快速编译的语言 </details> ## 九、机器学习 - [深度学习初识](notes/DeepLearning/深度学习初识.md) - 经典机器学习算法 K 近邻算法、线性回归、梯度下降法、逻辑回归、支持向量机、决策树、集成学习 ## 十、工具 - [Git](notes/git-tutorial.md) 学习指引,将用最极简的语言带你进入 Git 版本控制的世界 - [Git 工作流](notes/Git工作流.md) 集中式工作流,功能分支工作流, GitFlow 工作流,Forking 工作流,Pull Requests - [正则表达式](notes/正则表达式.md) 常见符号含义,速查表 - [手把手教你搭建内网穿透服务](https://github.com/frank-lam/lanproxy-nat) 基于 lanproxy 穿透服务,为你定了一键启动的服务端和客户端 Docker 镜像 - [基于 SpringBoot & IDEA & JRebel 玩转远程热部署与远程调试](https://www.frankfeekr.cn/2019/07/17/springboot-idea-jrebel-hotswap/) 手把手带你玩转,远程调试与远程热部署 - [什么是 TDD 及常见的测试方法](notes/软件测试.md) ## Learn 📖 - [LEARN_LIST](notes/LEARNLIST.md)   包含阅读清单,学习课程两部分 - [web应用开发标准流程](notes/web应用开发标准流程.md) ## Talking :bulb: 本仓库致力于成为一个全栈开发爱好者的学习指南,给初学者一个更明确的学习方向,同时也是对自己技能的强化和巩固。在架构师这条路上,希望和大家一起成长,帮助更多的计算机爱好者能够有一个明确的学习路径。持续不间断的维护本仓库,也欢迎有更多的极客们加入。 都说好记性不如烂笔头,定期的学习和整理必然对学习巩固有所帮助,这里通过索引的方式对全栈开发技术做一个系统分类,方便随时巩固和学习,当然还有面试。在学习这条路上难免会有很多盲点和学不完的知识。有道无术,术尚可求,掌握好思维能力才能应对千变万化的技术。不要把大脑当成硬盘,也不要做高速运转的 CPU,而修行自己的大脑成为一个搜索引擎,学会分析解决问题。 Since 20,May,2018 ## Reference 个人的能力有限,在编写的过程中引用了诸多优秀的 GitHub 仓库。本项目的启发来自 [@CyC2018](https://github.com/CyC2018) 的学习笔记,是一个非常优秀的开源项目,在本仓库中部分内容引用文字和图例;引用了 [@计算所的小鼠标](https://github.com/CarpenterLee) 中对于 JCF 的源码分析和理解;引用了 [阿里面试题总结](https://www.nowcoder.com/discuss/5949) 中全部的面试题,并对面经进行了整理勘误,并进行了知识拓展和修改;引用了 [牛客网](https://www.nowcoder.com) 上的面试经验贴。也引用了知乎上的热门回答和优秀博客的回答。在这里特别鸣谢,我将每篇文章中做外链引用说明。 文中我也推荐了学习的书籍和学习课程,都将附着上最高清、最形象的配图进行讲解。在文中的配图都来自自己绘制的、博客、Github、PDF书籍等等,这里没法一一感谢,谢谢你们。 推荐一些优秀的开源项目,供大家参考,[reference](notes/reference.md)。 ## Contributors Thank you to all the people who already contributed to fullstack-tutorial ! Please make sure to read the [Contributing Guide/如何给我的仓库贡献](notes/docs/如何给我的仓库贡献.md) before making a pull request. <a href="https://github.com/frank-lam/fullstack-tutorial/graphs/contributors"><img src="https://opencollective.com/fullstack-tutorial/contributors.svg?width=890&button=false" /></a> ## Stargazers over time ![Stargazers over time](https://starcharts.herokuapp.com/frank-lam/fullstack-tutorial.svg) ## License <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a> Copyright (c) 2021-present, Frank Lam ## 关于作者 :boy: <div align="center"> <p> 『作者简介』:<a href="https://www.frankfeekr.cn/author">https://www.frankfeekr.cn/author</a> </p> </div> <div align="center"> <p> 在颠覆世界的同时,也要好好关照自己。 </p> <a target="_blank" href="https://frankfeekr.cn" rel="nofollow"><img src="https://img.shields.io/badge/BLOG-frankfeekr.cn-blue.svg" alt="BLOG" data-canonical-src="" style="max-width:100%;"></a> <a target="_blank" href="mailto:frank_lin@whu.edu.cn" rel="nofollow"><img src="https://img.shields.io/badge/Email-frank__lin@whu.edu.cn-lightgrey.svg" alt="邮箱" data-canonical-src="" style="max-width:100%;"></a> <a target="_blank" href="https://jq.qq.com/?_wv=1027&k=593WvX0" rel="nofollow" ><img src="https://img.shields.io/badge/QQ群-862619503-green.svg" alt="QQ群" data-canonical-src="" style="max-width:100%;"></a> <br/><br/> <p> from zero to hero. </p> </div> <div align="center"> <img src="assets/wechat/wx-green.png" width="70%"/></div>
1
apache/incubator-hugegraph
A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
big-data database graph graph-database graphdb gremlin
<h1 align="center"> <img width="720" alt="hugegraph-logo" src="https://github.com/apache/incubator-hugegraph/assets/38098239/e02ffaed-4562-486b-ba8f-e68d02bb0ea6" style="zoom:100%;" /> </h1> <h3 align="center">A graph database that supports more than 10 billion data, high performance and scalability</h3> <div align="center"> [![License](https://img.shields.io/badge/license-Apache%202-0E78BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![HugeGraph-CI](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/ci.yml) [![License checker](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml/badge.svg)](https://github.com/apache/incubator-hugegraph/actions/workflows/licence-checker.yml) [![GitHub Releases Downloads](https://img.shields.io/github/downloads/apache/hugegraph/total.svg)](https://github.com/apache/hugegraph/releases) </div> ## What is Apache HugeGraph? [HugeGraph](https://hugegraph.apache.org/) is a fast-speed and highly-scalable [graph database](https://en.wikipedia.org/wiki/Graph_database). Billions of vertices and edges can be easily stored into and queried from HugeGraph due to its excellent OLTP ability. As compliance to [Apache TinkerPop 3](https://tinkerpop.apache.org/) framework, various complicated graph queries can be achieved through [Gremlin](https://tinkerpop.apache.org/gremlin.html)(a powerful graph traversal language). ## Features - Compliance to [Apache TinkerPop 3](https://tinkerpop.apache.org/), support [Gremlin](https://tinkerpop.apache.org/gremlin.html) & [Cypher](https://en.wikipedia.org/wiki/Cypher) language - Schema Metadata Management, including VertexLabel, EdgeLabel, PropertyKey and IndexLabel - Multi-type Indexes, supporting exact query, range query and complex conditions combination query - Plug-in Backend Store Driver Framework, support `RocksDB`, `Cassandra`, `HBase`, `ScyllaDB`, and `MySQL/Postgre` now and easy to add another backend store driver if needed - Integration with `Flink/Spark/HDFS`, and friendly to connect other big data platforms ## Quick Start ### 1. Docker Way (Convenient for Test) We can use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to quickly start an inner HugeGraph server with `RocksDB` (in backgrounds) for **test/dev**. You can visit [doc page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#3-deploy) or the [README](hugegraph-server/hugegraph-dist/docker/READEME.md) for more details. ([Docker Compose](./hugegraph-server/hugegraph-dist/docker/example)) > Note: > > 1. The docker image of hugegraph is a convenience release, but not **official distribution** artifacts. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub). > > 2. Recommend to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development. ### 2. Download Way Visit [Download Page](https://hugegraph.apache.org/docs/download/download/) and refer the [doc](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#32-download-the-binary-tar-tarball) to download the latest release package and start the server. ### 3. Source Building Way Visit [Source Building Page](https://hugegraph.apache.org/docs/quickstart/hugegraph-server/#33-source-code-compilation) and follow the steps to build the source code and start the server. The project [doc page](https://hugegraph.apache.org/docs/) contains more information on HugeGraph and provides detailed documentation for users. (Structure / Usage / API / Configs...) And here are links of other **HugeGraph** component/repositories: 1. [hugegraph-toolchain](https://github.com/apache/hugegraph-toolchain) (graph tools **[loader](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-loader)/[dashboard](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-hubble)/[tool](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-tools)/[client](https://github.com/apache/incubator-hugegraph-toolchain/tree/master/hugegraph-client)**) 2. [hugegraph-computer](https://github.com/apache/hugegraph-computer) (integrated **graph computing** system) 3. [hugegraph-commons](https://github.com/apache/hugegraph-commons) (**common & rpc** libs) 4. [hugegraph-website](https://github.com/apache/hugegraph-doc) (**doc & website** code) 5. [hugegraph-ai](https://github.com/apache/incubator-hugegraph-ai) (integrated **Graph AI/LLM/KG** system) ## License HugeGraph is licensed under [Apache 2.0 License](LICENSE). ## Contributing - Welcome to contribute to HugeGraph, please see [`How to Contribute`](CONTRIBUTING.md) & [Guidelines](https://hugegraph.apache.org/docs/contribution-guidelines/) for more information. - Note: It's recommended to use [GitHub Desktop](https://desktop.github.com/) to greatly simplify the PR and commit process. - Thank you to all the people who already contributed to HugeGraph! [![contributors graph](https://contrib.rocks/image?repo=apache/hugegraph)](https://github.com/apache/incubator-hugegraph/graphs/contributors) ## Thanks HugeGraph relies on the [TinkerPop](http://tinkerpop.apache.org) framework, we refer to the storage structure of Titan and the schema definition of DataStax. Thanks to TinkerPop, thanks to Titan, thanks to DataStax. Thanks to all other organizations or authors who contributed to the project. You are welcome to contribute to HugeGraph, and we are looking forward to working with you to build an excellent open-source community. ## Contact Us - [GitHub Issues](https://github.com/apache/incubator-hugegraph/issues): Feedback on usage issues and functional requirements (quick response) - Feedback Email: [dev@hugegraph.apache.org](mailto:dev@hugegraph.apache.org) ([subscriber](https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/) only) - WeChat public account: Apache HugeGraph, welcome to scan this QR code to follow us. <img src="https://github.com/apache/incubator-hugegraph-doc/blob/master/assets/images/wechat.png?raw=true" alt="QR png" width="300"/>
0
apache/ignite
Apache Ignite
big-data cache cloud data-management-platform database distributed-sql-database hadoop ignite in-memory-computing in-memory-database iot network-client network-server osgi sql
# Apache Ignite <a href="https://ignite.apache.org/"><img src="https://github.com/apache/ignite-website/blob/master/assets/images/apache_ignite_logo.svg" hspace="20"/></a> [![Build Status](https://travis-ci.org/apache/ignite.svg?branch=master)](https://travis-ci.org/apache/ignite) [![GitHub](https://img.shields.io/github/license/apache/ignite?color=blue)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.ignite/ignite-core/badge.svg)](https://search.maven.org/search?q=org.apache.ignite) [![GitHub release](https://img.shields.io/badge/release-download-brightgreen.svg)](https://ignite.apache.org/download.cgi) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/apache/ignite) [![Twitter Follow](https://img.shields.io/twitter/follow/ApacheIgnite?style=social)](https://twitter.com/ApacheIgnite) ## What is Apache Ignite? Apache Ignite is a distributed database for high-performance computing with in-memory speed. <p align="center"> <a href="https://ignite.apache.org"> <img src="https://github.com/apache/ignite-website/blob/master/docs/2.9.0/images/ignite_clustering.png" width="400px"/> </a> </p> * [Technical Documentation](https://ignite.apache.org/docs/latest/) * [JavaDoc](https://ignite.apache.org/releases/latest/javadoc/) * [C#/.NET APIs](https://ignite.apache.org/releases/latest/dotnetdoc/api/) * [C++ APIs](https://ignite.apache.org/releases/latest/cppdoc/) ## Multi-Tier Storage Apache Ignite is designed to work with memory, disk, and Intel Optane as active storage tiers. The memory tier allows using DRAM and Intel® Optane™ operating in the Memory Mode for data storage and processing needs. The disk tier is optional with the support of two options -- you can persist data in an external database or keep it in the Ignite native persistence. SSD, Flash, HDD, or Intel Optane operating in the AppDirect Mode can be used as a storage device. [Read More](https://ignite.apache.org/arch/multi-tier-storage.html) ## Ignite Native Persistence Even though Apache Ignite is broadly used as a caching layer on top of external databases, it comes with its native persistence - a distributed, ACID, and SQL-compliant disk-based store. The native persistence integrates into the Ignite multi-tier storage as a disk tier that can be turned on to let Ignite store more data on disk than it can cache in memory and to enable fast cluster restarts. [Read More](https://ignite.apache.org/arch/persistence.html) ## ACID Compliance Data stored in Ignite is ACID-compliant both in memory and on disk, making Ignite a **strongly consistent** system. Ignite transactions work across the network and can span multiple servers. [Read More](https://ignite.apache.org/features/transactions.html) ## ANSI SQL Support Apache Ignite comes with a ANSI-99 compliant, horizontally scalable, and fault-tolerant SQL engine that allows you to interact with Ignite as with a regular SQL database using JDBC, ODBC drivers, or native SQL APIs available for Java, C#, C++, Python, and other programming languages. Ignite supports all DML commands, including SELECT, UPDATE, INSERT, and DELETE queries as well as a subset of DDL commands relevant for distributed systems. [Read More](https://ignite.apache.org/features/sql.html) ## High-Performance Computing High-performance computing (HPC) is the ability to process data and perform complex calculations at high speeds. Using Apache Ignite as a [high-performance compute cluster](https://ignite.apache.org/use-cases/hpc.html), you can turn a group of commodity machines or a cloud environment into a distributed supercomputer of interconnected Ignite nodes. Ignite enables speed and scale by processing records in memory and reducing network utilization with APIs for data and compute-intensive calculations. Those APIs implement the MapReduce paradigm and allow you to run arbitrary tasks across the cluster of nodes.
0
changmingxie/tcc-transaction
tcc-transaction是TCC型事务java实现
null
# TCC-TRANSACTION ## TCC-TRANSACTION是什么 [TCC-TRANSACTION](https://changmingxie.github.io)是一款开源的微服务架构下的TCC型分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务。 - Try: 尝试执行业务,完成所有业务检查(一致性),预留必须业务资源(准隔离性) - Confirm: 确认执行业务,不作任何业务检查,只使用Try阶段预留的业务资源,满足幂等性 - Cancel: 取消执行业务,释放Try阶段预留的业务资源,满足幂等性 ## 微服务架构中分布式事务问题 随着传统的单体架的构微服务化,原本单体架构中不同模块,被拆分为若干个功能简单、松耦合的服务。 系统微服务化后,内部可能需要调用多个服务并操作多个数据库实现,服务调用的分布式事务问题变的非常突出。 比如支付退款场景需要从各分账方退回平台收益户(退分账),再退还给付款方。其中**退分账**阶段, 涉及从多个分账方(商家1收益户,商家2收益户,商家3收益户,平台手续费账户)扣款,这些账户分布在不同数据库, 比如商家3收益户扣款失败,其他成功扣款需要回滚,这里需要分布式事务保证一致性。 ![支付退款流程](material/tcc_use_at_refund.jpg) ## 如何解决 如何解决上面**退分账**中分布式事务问题呢? 选择使用tcc-transaction框架,执行流程如下: - Try: 商家1收益户->冻结分账金额 商家2收益户->冻结分账金额 商家3收益户->冻结分账金额 平台手续费->冻结手续费 - Try成功 => Confirm: 商家1收益户->扣除分账金额 商家2收益户->扣除分账金额 商家3收益户->扣除分账金额 平台手续费->扣除手续费 平台收益户-> 增加金额(总分账金额+手续费) - Try失败 => Cancel: 商家1收益户->解冻分账金额 商家2收益户->解冻分账金额 商家3收益户->解冻分账金额 平台手续费->解冻手续费 ## 工作原理 ![TCC原理](material/tcc-invoke.webp) 第一阶段:主业务服务分别调用所有从业务的 try 操作,并在活动管理器中登记所有从业务服务。当所有从业务服务的 try 操作都调用成功或者某个从业务服务的 try 操作失败,进入第二阶段。 第二阶段:活动管理器根据第一阶段的执行结果来执行 confirm 或 cancel 操作。 如果第一阶段所有 try 操作都成功,则活动管理器调用所有从业务活动的 confirm操作。否则调用所有从业务服务的 cancel 操作。 需要注意的是第二阶段 confirm 或 cancel 操作本身也是满足最终一致性的过程,在调用 confirm 或 cancel 的时候也可能因为某种原因(比如网络)导致调用失败,所以需要活动管理支持重试的能力,同时这也就要求 confirm 和 cancel 操作具有幂等性。 ## 快速开始 [官网](https://changmingxie.github.io) [快速开始](https://changmingxie.github.io/zh-cn/docs/tutorial/quickstart.html) [最新可用版本2.x](https://changmingxie.github.io/zh-cn/blog/tcc-transaction-2.x-release.html) ## 常见问题 [常见问题](https://changmingxie.github.io/zh-cn/docs/faq.html) ## 讨论群 钉钉扫码入群 ![钉钉扫码入群](https://raw.githubusercontent.com/changmingxie/tcc-transaction/master-1.6.x/material/tcc-transaction-dingdingtalk.jpg)
0
RichardWarburton/java-8-lambdas-exercises
Exercises and Answers for Java 8 Lambdas book
null
java-8-lambdas-exercises ======================== This git repository contains support material for the [Java 8 Lambdas](https://www.oreilly.com/library/view/java-8-lambdas/9781449370831/) book. Project Structure ----------------- The overall code layout is: * Code is in `src/main/java` * Tests are in `src/test/java` Within these directories things are organised by package: * Exercises which involve code in `com.insightfullogic.java8.exercises` * Answers are in `com.insightfullogic.java8.answers` Coding questions are all in the form of failing tests, and the package-info.java contains the correct answer to questions which don't involve writing code, such as yes/no questions. For example here are the chapter 2 answers: https://github.com/RichardWarburton/java-8-lambdas-exercises/blob/master/src/main/java/com/insightfullogic/java8/answers/chapter2/package-info.java * Code Examples/Listings are in `com.insightfullogic.java8.examples` The sub-packages then correspond to the chapter number, so the examples for chapter 4 are in `com.insightfullogic.java8.examples.chapter4`. Reporting Issues ---------------- If you find any issues with the exercises or examples then please submit them via the [O'Reilly Errata Page](http://www.oreilly.com/catalog/errata.csp?isbn=0636920030713).
0
JakeWharton/ProcessPhoenix
Process Phoenix facilitates restarting your application process.
null
Process Phoenix =============== Process Phoenix facilitates restarting your application process. This should only be used for things like fundamental state changes in your debug builds (e.g., changing from staging to production). Usage ----- Start the default activity in a new process: ```java ProcessPhoenix.triggerRebirth(context); ``` Or, if you want to launch with a specific `Intent`: ```java Intent nextIntent = //... ProcessPhoenix.triggerRebirth(context, nextIntent); ``` To check if your application is inside the Phoenix process to skip initialization in `onCreate`: ```java if (ProcessPhoenix.isPhoenixProcess(this)) { return; } ``` Download -------- ```groovy implementation 'com.jakewharton:process-phoenix:3.0.0' ``` Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. License ------- Copyright (C) 2015 Jake Wharton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. [snap]: https://oss.sonatype.org/content/repositories/snapshots/
0
thombergs/code-examples
A collection of code examples from blog posts etc.
null
# Example Code Repository [![CI](https://github.com/thombergs/code-examples/workflows/CI/badge.svg)](https://github.com/thombergs/code-examples/actions?query=workflow%3ACI) This repo contains example projects which show how to use different (not only) Java technologies. The examples are usually accompanied by a blog post on [https://reflectoring.io](https://reflectoring.io). See the READMEs in each subdirectory of this repo for more information on each module.
0
FabricMC/fabric-example-mod
Example Fabric mod
fabric
# Fabric Example Mod ## Setup For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using. ## License This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.
1
testcontainers/testcontainers-java
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
docker docker-compose hacktoberfest java junit jvm test-automation testing
# Testcontainers [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.testcontainers/testcontainers/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.testcontainers/testcontainers) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=33816473&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs) [![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.testcontainers.org/scans) > Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. ![Testcontainers logo](docs/logo.png) # [Read the documentation here](https://java.testcontainers.org) ## License See [LICENSE](LICENSE). ## Copyright Copyright (c) 2015 - 2021 Richard North and other authors. MS SQL Server module is (c) 2017 - 2021 G DATA Software AG and other authors. Hashicorp Vault module is (c) 2017 - 2021 Capital One Services, LLC and other authors. See [contributors](https://github.com/testcontainers/testcontainers-java/graphs/contributors) for all contributors.
0