full_name
stringlengths
7
104
description
stringlengths
4
725
topics
stringlengths
3
468
readme
stringlengths
13
565k
label
int64
0
1
apache/logging-flume
Mirror of Apache Flume
big-data flume java
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --> # Welcome to Apache Flume! Apache Flume is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data. It has a simple and flexible architecture based on streaming data flows. It is robust and fault tolerant with tunable reliability mechanisms and many failover and recovery mechanisms. The system is centrally managed and allows for intelligent dynamic management. It uses a simple extensible data model that allows for online analytic application. The Apache Flume 1.x (NG) code line is a refactoring of the first generation Flume to solve certain known issues and limitations of the original design. Apache Flume is open-sourced under the Apache Software Foundation License v2.0. ## Documentation Documentation is included in the binary distribution under the docs directory. In source form, it can be found in the flume-ng-doc directory. The Flume 1.x guide and FAQ are available here: * https://cwiki.apache.org/FLUME * https://cwiki.apache.org/confluence/display/FLUME/Getting+Started ## Contact us! * Mailing lists: https://cwiki.apache.org/confluence/display/FLUME/Mailing+Lists * IRC channel #flume on irc.freenode.net Bug and Issue tracker. * https://issues.apache.org/jira/browse/FLUME ## Compiling Flume Compiling Flume requires the following tools: * Oracle Java JDK 1.8 * Apache Maven 3.x Note: The Apache Flume build requires more memory than the default configuration. We recommend you set the following Maven options: `export MAVEN_OPTS="-Xms512m -Xmx1024m"` To compile Flume and build a distribution tarball, run `mvn install` from the top level directory. The artifacts will be placed under `flume-ng-dist/target/`.
0
apache/cassandra-java-driver
Java Driver for Apache Cassandra®
null
# Java Driver for Apache Cassandra® :warning: The java-driver has recently been donated by Datastax to The Apache Software Foundation and the Apache Cassandra project. Bear with us as we move assets and coordinates. [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.datastax.oss/java-driver-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.datastax.oss/java-driver-core) *If you're reading this on github.com, please note that this is the readme for the development version and that some features described here might not yet have been released. You can find the documentation for latest version through [DataStax Docs] or via the release tags, e.g. [4.17.0](https://github.com/datastax/java-driver/tree/4.17.0).* A modern, feature-rich and highly tunable Java client library for [Apache Cassandra®] \(2.1+) and [DataStax Enterprise] \(4.7+), and [DataStax Astra], using exclusively Cassandra's binary protocol and Cassandra Query Language (CQL) v3. [DataStax Docs]: http://docs.datastax.com/en/developer/java-driver/ [Apache Cassandra®]: http://cassandra.apache.org/ ## Getting the driver The driver artifacts are published in Maven central, under the group id [com.datastax.oss]; there are multiple modules, all prefixed with `java-driver-`. ```xml <dependency> <groupId>org.apache.cassandra</groupId> <artifactId>java-driver-core</artifactId> <version>${driver.version}</version> </dependency> <dependency> <groupId>org.apache.cassandra</groupId> <artifactId>java-driver-query-builder</artifactId> <version>${driver.version}</version> </dependency> <dependency> <groupId>org.apache.cassandra</groupId> <artifactId>java-driver-mapper-runtime</artifactId> <version>${driver.version}</version> </dependency> ``` Note that the query builder is now published as a separate artifact, you'll need to add the dependency if you plan to use it. Refer to each module's manual for more details ([core](manual/core/), [query builder](manual/query_builder/), [mapper](manual/mapper)). [com.datastax.oss]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.datastax.oss%22 ## Compatibility The driver is compatible with Apache Cassandra® 2.1 and higher, DataStax Enterprise 4.7 and higher, and DataStax Astra. It requires Java 8 or higher. Disclaimer: Some DataStax/DataStax Enterprise products might partially work on big-endian systems, but DataStax does not officially support these systems. ## Migrating from previous versions Java Driver 4 is **not binary compatible** with previous versions. However, most of the concepts remain unchanged, and the new API will look very familiar to 2.x and 3.x users. See the [upgrade guide](upgrade_guide/) for details. ## Error Handling See the [Cassandra error handling done right blog](https://www.datastax.com/blog/cassandra-error-handling-done-right) for error handling with the Java Driver for Apache Cassandra&trade;. ## Useful links * [Manual](manual/) * [API docs] * Bug tracking: [JIRA]. Make sure to select the "Client/java-driver" component when filing new tickets! * [Mailing list] * [Changelog] * [FAQ] [API docs]: https://docs.datastax.com/en/drivers/java/4.17 [JIRA]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20CASSANDRA%20AND%20component%20%3D%20%22Client%2Fjava-driver%22%20ORDER%20BY%20key%20DESC [Mailing list]: https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user [Changelog]: changelog/ [FAQ]: faq/ ## License &copy; The Apache Software Foundation 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. ---- Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, TinkerPop, and Cassandra are trademarks of the [Apache Software Foundation](http://www.apache.org/) or its subsidiaries in Canada, the United States and/or other countries. Binary artifacts of this product bundle Java Native Runtime libraries, which is available under the Eclipse Public License version 2.0.
0
sksamuel/scrimage
JVM - Java, Kotlin, Scala image processing library
filters gif gif-animation image java jpeg kotlin png scala webp
![logo](docs/logo.png) ======= ![build_test](https://github.com/sksamuel/scrimage/workflows/build_test/badge.svg) [<img src="https://img.shields.io/maven-central/v/com.sksamuel.scrimage/scrimage-core.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22scrimage-core) [<img src="https://img.shields.io/nexus/s/https/s01.oss.sonatype.org/com.sksamuel.scrimage/scrimage-core.svg?label=latest%20snapshot"/>](https://s01.oss.sonatype.org/content/repositories/snapshots/com/sksamuel/scrimage/) [![scrimage @ kotlinlang.slack.com](https://img.shields.io/static/v1?label=slack&message=scrimage&color=yellow&logo=slack)](https://kotlinlang.slack.com/archives/C01CEL2JCQJ) Scrimage is an immutable, functional, and performant JVM library for manipulation of images. The aim of this library is to provide a simple and concise way to do common image operations, such as resizing to fit a required width and height, converting between formats, applying filters and so on. It is easy to use from any language on the JVM. To begin, head over to the [microsite](https://sksamuel.github.io/scrimage). To see latest changes, view the [changelog](https://sksamuel.github.io/scrimage/changelog/).
0
bethrobson/Head-First-Design-Patterns
Code for Head First Design Patterns book (2020)
null
# Head First Design Patterns (2020 2nd Edition) I have recently updated all the code for Head First Design Patterns for the 2nd edition of the book, released in December, 2020. Download the code and compile and run from the command line, or load the code into project in Eclipse using Java 8 or higher. Other links for the book are available on the book page at <a href="http://wickedlysmart.com/head-first-design-patterns/">wickedlysmart.com</a>.
0
tdunning/t-digest
A new data structure for accurate on-line accumulation of rank-based statistics such as quantiles and trimmed means
accuracy online-algorithms quantile t-digest
t-digest &middot; [![Java CI](https://github.com/tdunning/t-digest/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/tdunning/t-digest/actions/workflows/maven.yml) ======== A new data structure for accurate online accumulation of rank-based statistics such as quantiles and trimmed means. The t-digest algorithm is also very friendly to parallel programs making it useful in map-reduce and parallel streaming applications implemented using, say, Apache Spark. The t-digest construction algorithm uses a variant of 1-dimensional k-means clustering to produce a very compact data structure that allows accurate estimation of quantiles. This t-digest data structure can be used to estimate quantiles, compute other rank statistics or even to estimate related measures like trimmed means. The advantage of the t-digest over previous digests for this purpose is that the _t_-digest handles data with full floating point resolution. With small changes, the _t_-digest can handle values from any ordered set for which we can compute something akin to a mean. The accuracy of quantile estimates produced by t-digests can be orders of magnitude more accurate than those produced by alternative digest algorithms in spite of the fact that t-digests are much more compact, particularly when serialized. In summary, the particularly interesting characteristics of the t-digest are that it * has smaller summaries when serialized * works on double precision floating point as well as integers. * provides part per million accuracy for extreme quantiles and typically <1000 ppm accuracy for middle quantiles * is very fast (~ 140 ns per add) * is very simple (~ 5000 lines of code total, <1000 for the most advanced implementation alone) * has a reference implementation that has > 90% test coverage * can be used with map-reduce very easily because digests can be merged * requires no dynamic allocation after initial creation (`MergingDigest` only) * has no runtime dependencies Recent News ----------- There is a [new article (open access!)](https://www.sciencedirect.com/science/article/pii/S2665963820300403) in Software Impacts on the t-digest, focussed particularly on this reference implementation. Lots has happened in t-digest lately. Most recently, with the help of people posting their observations of subtle misbehavior over the last 2 years, I figured out that the sort in the `MergingDigest` really needed to be stable. This helps particularly with repeated values. Stabilizing the sort appears to have no negative impact on accuracy nor significant change in speed, but testing is continuing. As part of introducing this change to the sort, I made the core implementation pickier about enforcing the size invariants which forced updates to a number of tests. The basic gist of other recent changes is that the core algorithms have been made much more rigorous and the associated papers in the docs directory have been updated to match the reality of the most advanced implementations. The general areas of improvement include substantial speedups, a new framework for dealing with scale functions, real proofs of size bounds and invariants for all current scale functions, much improved interpolation algorithms, better accuracy testing and splitting the entire distribution into parts for the core algorithms, quality testing, benchmarking and documentation. I am working on a 4.0 release that incorporates all of these improvements. The remaining punch list for the release is roughly: * ~~verify all tests are clean and not disabled~~ (done!) * ~~integrate all scale functions into AVLTreeDigest~~ (done!) * describe accuracy using the quality suite * extend benchmarks to include `AVLTreeDigest` as first-class alternative * measure merging performance * consider [issue #87](https://github.com/tdunning/t-digest/issues/87) * review all outstanding issues (add unit tests if necessary or close if not) Publication work is now centered around comparisons with the KLL digest (spoiler, the t-digest is much smaller and possibly 2 orders of magnitude more accurate than KLL). I would still like to see potential co-authors who could accelerate these submissions are encouraged to speak up! In the meantime, an [archived pre-print of the main paper is available](https://arxiv.org/abs/1902.04023). In research areas, there are some ideas being thrown around about how to bring strict guarantees similar to the GK or KLL algorithms to the t-digest. There is some promise here, but nothing real yet. If you are interested in a research project, this could be an interesting one. ### Scale Functions The idea of scale functions is the heart of the t-digest. But things don't quite work the way that we originally thought. Originally, it was presumed that accuracy should be proportional to the square of the size of a cluster. That isn't true in practice. That means that scale functions need to be much more aggressive about controlling cluster sizes near the tails. We now have 4 scale functions supported for both major digest forms (`MergingDigest` and `AVLTreeDigest`) to allow different trade-offs in terms of accuracy. These scale functions now have associated proofs that they all [preserve the key invariants](https://github.com/tdunning/t-digest/blob/master/docs/proofs/invariant-preservation.pdf) necessary to build an accurate digest and that they all give [tight bounds on the size of a digest](https://github.com/tdunning/t-digest/blob/master/docs/proofs/sizing.pdf). Having new scale functions means that we can get much better tail accuracy than before without losing much in terms of median accuracy. It also means that insertion into a `MergingDigest` is faster than before since we have been able to eliminate all fancy functions like sqrt, log or sin from the critical path (although sqrt _is_ faster than you might think). There are also suggestions that asymmetric scale functions would be useful. These would allow good single-tailed accuracy with (slightly) smaller digests. A paper has been submitted on this by the developer who came up with the idea and feedback from users about the utility of such scale functions would be welcome. ### Better Interpolation The better accuracy achieved by the new scale functions partly comes from the fact that the most extreme clusters near _q_=0 or _q_=1 are limited to only a single sample. Handling these singletons well makes a huge difference in the accuracy of tail estimates. Handling the transition to non-singletons is also very important. Both cases are handled much better than before. The better interpolation has been fully integrated and tested in both the `MergingDigest` and `AVLTreeDigest` with very good improvements in accuracy. The bug detected in the `AVLTreeDigest` that affected data with many repeated values has also been fixed. ### Two-level Merging We now have a trick for the `MergingDigest` that uses a higher value of the compression parameter (delta) while we are accumulating a t-digest and a lower value when we are about to store or display a t-digest. This two-level merging has a small (negative) effect on speed, but a substantial (positive) effect on accuracy because clusters are ordered more strictly. This better ordering of clusters means that the effects of the improved interpolation are much easier to observe. Extending this to `AVLTreeDigest` is theoretically possible, but it isn't clear the effect it will have. ### Repo Reorg The t-digest repository is now split into different functional areas. This is important because it simplifies the code used in production by extracting the (slow) code that generates data for accuracy testing, but also because it lets us avoid any dependencies on GPL code (notably the jmh benchmarking tools) in the released artifacts. The major areas are * core - this is where the t-digest and unit tests live * docs - the main paper and auxiliary proofs live here * benchmarks - this is the code that tests the speed of the digest algos * quality - this is the code that generates and analyzes accuracy information Within the docs sub-directory, proofs of invariant preservation and size bounds are moved to `docs/proofs` and all figures in `docs/t-digest-paper` are collected into a single directory to avoid cluster. LogHistogram and FloatHistogram -------------- This package also has an implementation of `FloatHistogram` which is another way to look at distributions where all measurements are positive and where you want relative accuracy in the measurement space instead of accuracy defined in quantiles. This `FloatHistogram` makes use of the floating point hardware to implement variable width bins so that adding data is very fast (5ns/data point in benchmarks) and the resulting sketch is small for reasonable accuracy levels. For instance, if you require dynamic range of a million and are OK with about bins being about ±10%, then you only need 80 counters. Since the bins for `FloatHistogram`'s are static rather than adaptive, they can be combined very easily. Thus you can store a histogram for short periods of time and combined them at query time if you are looking at metrics for your system. You can also reweight histograms to avoid errors due to structured omission. Another class called `LogHistogram` is also available in `t-digest`. The `LogHistogram` is very much like the `FloatHistogram`, but it incorporates a clever quadratic update step (thanks to Otmar Ertl) so that the bucket widths vary more precisely and thus the number of buckets can be decreased by about 40% while getting the same accuracy. This is particularly important when you are maintaining only modest accuracy and want small histograms. In the future, I will incorporate some of the interpolation tricks from the main _t_-digest into the `LogHistogram` implementation. Compile and Test ================ You have to have Java 1.8 to compile and run this code. You will also need maven (3+ preferred) to compile and test this software. In order to build the figures that go into the theory paper, you will need R. In order to format the paper, you will need latex. Pre-built pdf versions of all figures and papers are provided so you won't need latex if you don't need to make changes to these documents. On Ubuntu, you can get the necessary pre-requisites for compiling the code with the following: sudo apt-get install openjdk-8-jdk git maven Once you have these installed, use this to build and test the software: cd t-digest; mvn test Most of the very slow tests are in the `quality` module so if you just run the tests in `core` module, you can save considerable time. Testing Accuracy and Comparing to Q-digest ================ The normal test suite produces a number of diagnostics that describe the scaling and accuracy characteristics of t-digests. In order to produce nice visualizations of these properties, you need to have many more samples. To get this enhanced view, run the tests in the `quality` module by running the full test suite once or, subsequently, by running just the tests in the quality sub-directory. cd quality; mvn test The data from these tests are stored in a variety of data files in the `quality` directory. Some of these files are quite large. I have prepared [detailed instructions on producing all of the figures](https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/figure-doc.pdf) used in the main paper. Most of these scripts will complete almost instantaneously; one or two will take a few tens of seconds. The output of these scripts are a collection of PDF files that can be viewed with any suitable viewer such as Preview on a Mac. Many of these images are used as figures in the [main t-digest paper](https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf). Implementations in Other Languages ================= The t-digest algorithm has been ported to other languages: - Python: [tdigest](https://github.com/CamDavidsonPilon/tdigest) - Go: [github.com/spenczar/tdigest](https://github.com/spenczar/tdigest) [github.com/influxdata/tdigest](https://github.com/influxdata/tdigest) - JavaScript: [tdigest](https://github.com/welch/tdigest) - C++: [CPP TDigest](https://github.com/gpichot/cpp-tdigest), [FB's Folly Implementation (high performance)](https://github.com/facebook/folly/blob/master/folly/stats/TDigest.h) - C++: [TDigest](https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/tdigest.h ) as part of [Apache Arrow](https://arrow.apache.org/) - CUDA C++: [tdigest.cu](https://github.com/rapidsai/cudf/blob/branch-22.10/cpp/src/quantiles/tdigest/tdigest.cu) as part of `libcudf` in [RAPIDS](https://rapids.ai/) powering the [`approx_percentile` and `percentile_approx`](https://github.com/NVIDIA/spark-rapids/blob/b35311f7c6950fd5d8f7f6ed66aeffa87c480850/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuApproximatePercentile.scala#L123-L130) expressions in Spark SQL with [RAPIDS Accelerator for Apache Spark](https://nvidia.github.io/spark-rapids/) - Rust: [t-digest](https://github.com/MnO2/t-digest) and its modified version in [Apache Arrow Datafusion](https://github.com/apache/arrow-datafusion/blob/ca952bd33402816dbb1550debb9b8cac3b13e8f2/datafusion-physical-expr/src/tdigest/mod.rs#L19-L28) - Scala: [TDigest.scala](https://github.com/stripe-archive/brushfire/blob/master/brushfire-training/src/main/scala/com/stripe/brushfire/TDigest.scala) - C: [tdigestc (w/ bindings to Go, Java, Python, JS via wasm)](https://github.com/ajwerner/tdigestc) - C: [t-digest-c](https://github.com/RedisBloom/t-digest-c) as part of [RedisBloom](https://redisbloom.io/) - Clojure: [t-digest for Clojure](https://github.com/henrygarner/t-digest) - C#: [t-digest-csharp (.NET Core)](https://github.com/Cyral/t-digest-csharp) - Kotlin multiplatform: [tdigest_kotlin_multiplatform](https://github.com/beyondeye/tdigest_kotlin_multiplatform) - OCaml: [tdigest](https://github.com/SGrondin/tdigest). Purely functional, can also compile to JS via js_of_ocaml. - Redis: [Redis Stack](https://redis.io/docs/data-types/probabilistic/t-digest/) supports t-digest. Continuous Integration ================= The t-digest project makes use of Travis integration with Github for testing whenever a change is made. You can see the reports at: https://travis-ci.org/tdunning/t-digest travis update Installation =============== The t-Digest library Jars are released via [Maven Central Repository](http://repo1.maven.org/maven2/com/tdunning/). The current version is 3.3. ```xml <dependency> <groupId>com.tdunning</groupId> <artifactId>t-digest</artifactId> <version>3.3</version> </dependency> ```
0
MohistMC/Mohist
Minecraft Forge Hybrid server implementing the Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+
bukkit cauldron craftbukkit forge java mcpc minecraft minecraft-server minecraftforge mohist neoforge spigot thermos
<div align="center"> <h1>Mohist 1.20.1</h1> ### Minecraft Forge Hybrid server implementing the Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+ [![](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.codemc.io%2Fjob%2FMohistMC%2Fjob%2FMohist-1.20.1)](https://ci.codemc.io/job/MohistMC/job/Mohist-1.20.1) [![](https://img.shields.io/github/stars/MohistMC/Mohist.svg?label=Stars&logo=github)](https://github.com/MohistMC/Mohist/stargazers) [![](https://img.shields.io/badge/Forge-1.20.1--47.2.23-brightgreen.svg?colorB=26303d&logo=Conda-Forge)](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.20.1.html) [![](https://img.shields.io/badge/NeoForge-1.20.1--47.1.79-brightgreen.svg?colorB=26303d)](https://neoforged.net/) [![](https://img.shields.io/badge/JDK-17.0.10-brightgreen.svg?colorB=469C00&logo=java)](https://www.azul.com/downloads/?version=java-17-lts#zulu) [![](https://img.shields.io/badge/Gradle-8.3-brightgreen.svg?colorB=469C00&logo=gradle)](https://docs.gradle.org/8.3/release-notes.html) [![](https://img.shields.io/bstats/servers/6762?label=bStats)](https://bstats.org/plugin/server-implementation/Mohist/6762) [![](https://badges.crowdin.net/mohist/localized.svg)](https://crowdin.com/project/mohist) [![](https://img.shields.io/discord/311256119005937665.svg?color=%237289da&label=Discord&logo=discord&logoColor=%237289da)](https://discord.gg/mohistmc) [![](https://bstats.org/signatures/server-implementation/Mohist.svg)](https://bstats.org/plugin/server-implementation/Mohist/6762) </div> <img height="400px" alt="Mohist Project Status" src="https://mohistmc.com/api/v2/projects/mohist/table?" /> Progress ------ - [x] Rectify Forge([**a8b243c0c**](https://github.com/MinecraftForge/MinecraftForge/commit/a8b243c0c)) - [x] Rectify NeoForge([**55133ebdb**](https://github.com/neoforged/NeoForge/commit/55133ebdb)) - [x] Start patch * [x] Bukkit([**997de31d**](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/997de31d)) * [x] CraftBukkit([**ddc9a2dad**](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/ddc9a2dad)) * [x] Spigot ([**d2eba2c8**](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/commits/d2eba2c8)) * [x] Bukkit-Patches * [x] CraftBukkit-Patches Getting Help ------ [MohistWiki](https://wiki.mohistmc.com/) (Here is everything you need related to Mohist) Upstream Projects ------ * [**MinecraftForge**](https://github.com/MinecraftForge/MinecraftForge.git) - mod support. * [**Bukkit**](https://hub.spigotmc.org/stash/scm/spigot/bukkit.git) - plugin support. * [**CraftBukkit**](https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git) - plugin support. * [**Spigot**](https://hub.spigotmc.org/stash/scm/spigot/spigot.git) - plugin support. * [**Paper**](https://github.com/PaperMC/Paper.git) - plugin support. * [**Purpur**](https://github.com/PurpurMC/Purpur.git) - plugin support. * [**Pufferfish**](https://github.com/pufferfish-gg/Pufferfish.git) - plugin support. * [**Mirai**](https://github.com/etil2jz/Mirai.git) - plugin support. * [**Arclight**](https://github.com/IzzelAliz/Arclight.git) - Remapper support. Special Thanks To: ------------- <a href="https://ci.codemc.io/"><img src="https://i.loli.net/2020/03/11/YNicj3PLkU5BZJT.png" width="172"></a> <a href="https://www.bisecthosting.com/mohistmc"><img src="https://www.bisecthosting.com/partners/custom-banners/118608b8-6e45-4301-b244-41934cdac6d1.png"></a> ![YourKit-Logo](https://www.yourkit.com/images/yklogo.png) [YourKit](http://www.yourkit.com/), makers of the outstanding java profiler, support open source projects of all kinds with their full featured [Java](https://www.yourkit.com/java/profiler/index.jsp) and [.NET](https://www.yourkit.com/.net/profiler/index.jsp) application profilers. We thank them for granting Mohist an OSS license so that we can make our software the best it can be. [<img src="https://user-images.githubusercontent.com/21148213/121807008-8ffc6700-cc52-11eb-96a7-2f6f260f8fda.png" alt="" width="100">](https://www.jetbrains.com) [JetBrains](https://www.jetbrains.com/), creators of the IntelliJ IDEA, supports Paper with one of their [Open Source Licenses](https://www.jetbrains.com/opensource/). IntelliJ IDEA is the recommended IDE for working with Paper, and most of the Paper team uses it.
0
apache/servicecomb-java-chassis
ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features
servicecomb
# Java Chassis [中文](README_ZH.md) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.servicecomb/java-chassis-core/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Corg.apache.servicecomb) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) Apache ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features. # releases | Release Train | Latest Version | Compiled JDK Version | Tested JDK Version | Open API | Notes | |----------------|----------------|----------------------|--------------------|----------|--------------------------| | Java Chassis 3 | 3.0.1 | OpenJDK 17 | OpenJDK 17 | 3.0.x | Depends on Spring Boot 3 | | Java Chassis 2 | 2.8.14 | OpenJDK 8 | OpenJDK 8, 11, 17 | 2.0.x | Depends on Spring 5 | | Java Chassis 1 | 1.3.11 | OpenJDK 8 | OpenJDK 8 | 2.0.x | End of Support | >>>NOTICE: Since Open API 3.0.x is not compatible with 2.0.x, Java Chassis 2 and Java Chassis 1 can not > work together with Java Chassis 3. All related consumers, providers and edge service need use Java Chassis 3 when upgrading. >>>NOTICE: Java Chassis 1 reached its end of support now after it's first release from 2018. # Why use Java Chassis - **High performance** The transport capability of Java Chassis is based on [Vert.x](https://vertx.io), which enables Java Chassis to process massive requests with relatively less hardware resources, and support [reactive develop style](https://www.reactivemanifesto.org). - **Native support for OpenAPI** Java Chassis describes the APIs of the microservices via [Swagger](https://swagger.io) natively, to help developers to design microservices that comply to [OpenAPI standard](https://swagger.io/specification/v3/). - **Flexible develop style** Java Chassis allows developers to develop their microservice APIs in `SpringMVC`/`JAX-RS`/`Transparent RPC` styles, and to send the request in `RPC`/`RestTemplate` styles. And there are three kind of build-in transport mode: `Rest over Vertx`/`Rest over Servlet`/`Highway`. All of these features can be combined and replaced easily, because they are decoupled and all based on the Swagger schema, which can provide high flexibility. - **Out-of-box microservice governance features** Java Chassis provides a lot of features for microservice governance and monitor. # Quick Start (Spring MVC) Provider service: ```java @RestSchema(schemaId = "ProviderController") @RequestMapping(path = "/") public class ProviderController { @GetMapping("/sayHello") public String sayHello(@RequestParam("name") String name) { return "Hello " + name; } } ``` Consumer service: Declare Provider service interface to match the Provider method signature. (Method name, return type, parameter name, parameter type) ```java public interface ProviderService { String sayHello(String name); } ``` Invoke Provider service with RPC ```java @RestSchema(schemaId = "ConsumerController") @RequestMapping(path = "/") public class ConsumerController { @RpcReference(schemaId = "ProviderController", microserviceName = "provider") private ProviderService providerService; // consumer service which delegate the implementation to provider service. @GetMapping("/sayHello") public String sayHello(@RequestParam("name") String name) { return providerService.sayHello(name); } } ``` Try out this example [here](https://servicecomb.apache.org/references/java-chassis/zh_CN/start/first-sample.html) . # Documentation Project documentation is available on the [ServiceComb Java Chassis Developer Guide][java-chassis-developer-guide]. [java-chassis-developer-guide]: https://servicecomb.apache.org/references/java-chassis/en_US/ # Building You don’t need to build from source to use Java Chassis (binaries in apache nexus ), but if you want to try out the latest and greatest, Java Chassis can be easily built with the maven. You also need JDK 17. mvn clean install The first build may take a longer than expected as Maven downloads all the dependencies. # Automated Testing To build the docker image and run the integration tests with docker, you can use maven docker profile mvn clean install -Pdocker -Pit If you are using docker machine, please use the following command mvn clean install -Pdocker -Pit -Pdocker-machine # Contact Bugs: [issues](https://issues.apache.org/jira/browse/SCB) mailing list: [subscribe](mailto:dev-subscribe@servicecomb.apache.org) [dev](https://lists.apache.org/list.html?dev@servicecomb.apache.org) # Contributing See [CONTRIBUTING](http://servicecomb.apache.org/developers/contributing) for details on submitting patches and the contribution workflow. # License Licensed under an [Apache 2.0 license](LICENSE).
0
jojoldu/freelec-springboot2-webservice
null
null
# 스프링부트2로 웹서비스 출시하기 (프리렉) 예제 코드 ## 주의 이 프로젝트는 실제로 실행하면 정상작동 하지 않습니다. **구글/네이버 토큰 정보가 없기 떄문**입니다. 테스트 코드 수행만 정상적으로 되니 **코드만 참고하세요** ## 오타 & 오류 제보 상단의 [Issue 탭](https://github.com/jojoldu/freelec-springboot2-webservice/issues)에서 검색 혹은 추가 이슈등록을 부탁드립니다! ### 질문 올리는 법 * 페이지 번호 * 문제가 된 프로젝트가 올라간 Github 저장소 주소 * 문제가 된 로그 혹은 콘솔 출력 화면 을 함께 포함해서 남겨주세요. 그렇지 않으면 확인 하기가 너무 어렵습니다. * [이슈 참고](https://github.com/jojoldu/freelec-springboot2-webservice/issues/100) ## 프로젝트 환경 점검 이 책의 모든 예제는 다음의 환경에서 진행됩니다. * Java 8 * Gradle 4.x * Spring Boot 2.1.x 즉, 현재 spring.io 에서 만들어주는 기본 환경인 **Spring Boot 2.2.x**와 **Gradle 5.x**에서는 정상작동 하지 않습니다. > Spring Boot 2.2와 Gradle 5로 오면서 너무 많은 설정들이 변경되었습니다. > 현재 실무에서 가장 많이 사용되는 버전들인 2.1.x와 Gradle 4를 선택할 수 밖에 없는 이유입니다. 아래를 따라 본인의 프로젝트 환경을 점검해보세요. ### Gradle 버전 체크 먼저 현재 프로젝트의 그레이들 버전을 체크해봅니다. ![1](./image/1.png) 위와 같이 5 버전을 사용중인게 확인된다면 인텔리제이에서 ```alt+F12``` (윈도우/맥 동일) 을 눌러 해당 프로젝트 기준으로 터미널을 열어봅니다. 거기서 아래와 같이 명령어를 실행하시면 됩니다. ```bash gradlew wrapper --gradle-version 4.10.2 ``` ### Spring Boot 버전 체크 Spring Boot 버전은 다음과 같이 되어있어야 합니다. **build.gradle** ```groovy buildscript { ext { springBootVersion = '2.1.7.RELEASE' // 2.1.7, 2.1.8, 2.1.9 다 괜찮습니다. } repositories { mavenCentral() jcenter() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } ``` 아래와 같이 되어있으면 안됩니다. ```groovy plugins { id 'org.springframework.boot' version '2.2.1.RELEASE' ... } ``` 이외 나머지는 프로젝트 코드와 책 내용을 참고하시면 됩니다.
0
wsk1103/Used-Trading-Platform
basice of SSM,基于Java的校园二手交易平台
null
# 基于SSM的校园二手交易平台 ## 另外一个 spring boot 一键式启动项目地址: https://github.com/wsk1103/Used-Trading-Platform2 **完整的设计报告在后面** 喜欢就点一下star哟,谢谢亲的支持 https://github.com/wsk1103/mySSM 个人主页 https://wsk1103.github.io/ Java版本:1.8 数据库:MySQL 框架:Spring + Spring MVC + MyBatis 服务器:Tomcat 前端解析框架:Thymeleaf 开发工具:Idea 2017 版本管理工具:Maven 版本控制工具:GitHub ## 3.2 实现过程 ### 3.2.1 商品首页实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142520732?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142530664?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 其他部分实现效果 ![这里写图片描述](https://img-blog.csdn.net/20180506142550165?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142617150?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.2 二手商城实现 ![这里写图片描述](https://img-blog.csdn.net/2018050614262516?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 商城商品展示 ![这里写图片描述](https://img-blog.csdn.net/20180506142641307?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142650930?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142655874?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.3 商品详情实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142702750?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 留言 ![这里写图片描述](https://img-blog.csdn.net/20180506142707609?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.4 站内搜索引擎实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142713316?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 搜索结果 ![这里写图片描述](https://img-blog.csdn.net/20180506142717344?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.5 发布商品实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142725661?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142737493?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142751872?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.6 发布求购信息实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142803686?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.7 个人信息页面实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142810540?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142815483?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.8 我发布的商品实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142820866?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 点击修改 ![这里写图片描述](https://img-blog.csdn.net/2018050614282592?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.9我发布的求购信息实现 ![这里写图片描述](https://img-blog.csdn.net/2018050614284365?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142847753?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.10购物车实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142855913?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 点击添加数量和减少 ![这里写图片描述](https://img-blog.csdn.net/20180506142901134?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.11登录注册实现 ![这里写图片描述](https://img-blog.csdn.net/20180506142908919?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142916295?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142923392?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 搭建数据库 MySQL driver=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/c2c username=root password=123456 initiaSize=0 maxActive=20 maxIdle=20 minIdle=1 maxWait=60000 、 先在数据中创建名为c2c的数据库,使用Navicat for MySQL运行 c2c.sql文件创建表和导入数据 将图片解压到任意一个盘,然后配置Tomcat,将图片路径引用到本地配置的图片路径下。 ![这里写图片描述](https://img-blog.csdn.net/2018070112373963?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) # 一、设计概要   本次设计的是一个校园二手交易平台(C2C),C2C指个人与个人之间的电子商务,买家可以查看所有卖家发布的商品,并且根据分类进行商品过滤,也可以根据站内搜索引擎进行商品的查询,并且与卖家联系,达成交易的意向,也可以发布求购的信息,让卖家查看之后,与之联系,进行交易。而此次主要是针对校园用户所设计的网站,对于数据的分类应该更多的考虑校园用户的需求,例如二手书籍、二手数码等的分类应该更加细致。本次设计的主要难度在于数据的详细分类,对于数据的过滤必须要严谨,应当考虑敏感字体和敏感图片的过滤。   可能遇到的问题有,在数据交互过程中,出现由于属性名的差距导致的数据交互失败。由于Css属性设置的问题,导致界面不完整等等。设计的算法都是自己编写的,可能存在不是最优算法的情况。 # 二、设计正文 ## 1 需求分析   建立一个用户可以自由交易的平台,通过ajax实现局部刷新,实现网站更具人性化,具有更良好的互动。以下是总体需求 ### 1.1 通过手机号码注册账号并且登陆   每个手机号码只可以注册一个账号,并且通过账号完善个人信息和浏览商品,发布商品等,注册时需要通过手机号码获取验证码进行验证才能注册。 ### 1.2 实现二手商城   商城主要显示总的商品信息,并且可以通过侧边栏点击进行信息过滤。商品点击之后可以查看详细信息。 ### 1.3 站内搜索引擎   实现本站内特有的搜索引擎,可以输入字段,模糊查询合适的商品并且显示出来。 ### 1.4 求购信息发布   根据需求输入相应的信息,发布求购商品。 ### 1.5 求购商城   卖东西的用户,也可以通过求购商城查看是否有用户对自己拥有的二手物品有需求,查看详细的需求,有的话可以跟买家联系进行交易。 ### 1.6 货物出售信息发布   卖家可以发布二手商品的信息,对商品进行描述,并且添加图片增加可信度,也方便买家查看相应的信息。 ### 1.7 购物车   将想要的物品添加到购物车,可以修改数量,选择是否要支付,移除商品。选择收货地址,并且进行结算。 ### 1.8 个人信息   用户发表求购信息和发布商品时需要先进行信息的完善,用户可以查看自己发布的商品,对发布的商品进行修改或删除,查看已发布求购信息,对求购的商品进行修改或删除。 ## 2 概要设计   系统的整体结构流程图如下 ![这里写图片描述](https://img-blog.csdn.net/20180506142214677?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 2.1 系统模块   本系统的可以分为以下几个模块。 #### 2.1.1 商品首页   负责显示热门的商品信息,以及显示本网站的网站信息,导航栏负责跳转到各个页面,没有登录显示按钮可以让用户进行登陆和注册。已登录的用户显示用户名,并且可以发布商品信息,查看个人信息等。进入首页的时候,通过Ajax获取数据库中存在的热门商品数据集合,并且刷新页面的内容,点击商品之后跳转到商品详细信息模块。 #### 2.1.2 二手商城模块   负责显示所有的二手商品,提供类别的侧边栏给用户点击之后显示对应的商品信息。类别侧边栏的实现后,需要为每一个类别的元素都添加一个id,通过id来获取数据库中的数据,用Ajax获取数据并且刷新页面的信息。采用分页技术,防止数据过多的时候,显示在同一个页面,给用户带来不好的体验,分页支持点击下一页上一页或者直接点击指定页面,跳转到指定的页面。商品点击之后就要跳转到商品详情。 #### 2.1.3 商品详情模块   负责显示指定的商品详细信息,包括图片、名字、价格、数量等,当一个商品被点击之后,通过返回的id查询到这个数据集合,跳转到商品详细信息的页面,商品发布者可以在下方查看留言,并且与有意者打成交易意向。将对应的信息显示出来,并且提供加入到购物车的功能。商品详细信息下方显示其他用户的留言,并且已经登录的用户可以对这件商品进行评论,商品发布者可以在下方查看留言,并且与有意者打成交易意向。商品发布者可以在下方查看留言,并且与有意者打成交易意向。 #### 2.1.4 站内搜索引擎   每一个页面顶部都存在一个搜索输入框,用户通过输入模糊的商品信息,后台数据库通过查询过滤相关的商品信息,并且显示出来给用户查看,显示出来的商品点击之后可以显示商品的详细信息。 #### 2.1.5 发布商品   用户输入指定的信息,以及选择商品的图片,之后将这些信息结合当前登陆的用户,通过Ajax发表到后台,并且通过框架存储数据到数据库指定表。 #### 2.1.6 发布求购信息   用户输入指定的信息,以及选择商品的图片,之后将这些信息结合当前登陆的用户,通过Ajax发表到后台,并且通过框架存储数据到数据库指定的求购信息表。 #### 2.1.7 个人信息模块   显示个人信息,例如用户名、真实姓名、宿舍号、学号等,显示之后还需要支持对于数据进行修改,修改之后,要同步修改页面的信息,这需要用到Ajax进行数据的提交,并且进行页面的局部刷新。 #### 2.1.8 我发布的商品模块   显示个人发表的商品信息,支持点击之后对数据进行修改,例如修改商品名字,修改商品的单价和数量等,修改之后将新的数据提交到数据库,数据库执行相应的修改操作,也可以直接下架某件商品,点击删除按钮之后,直接在后台数据库删除这一件商品,并且刷新当前页面上显示的个人发布的商品。给用户带来更好的体验效果。 #### 2.1.9 我发布的求购信息模块   显示个人发表的求购商品信息,支持点击之后对数据进行修改,例如修改商品名字,修改商品的单价和数量等,修改之后将新的数据提交到数据库,数据库执行相应的修改操作,也可以直接下架某件商品,点击删除按钮之后,直接在后台数据库删除这一件商品,并且刷新当前页面上显示的个人求购的商品。 #### 2.1.10 购物车模块   显示用户加入购物车的商品,计算总的价格,提供全选和取消全选的按钮,从后台获取商品的单价,判断当前剩余的数量,当用户点击数量添加或者减少之后,对于总价要实时刷新,采用jQuery对数据进行修改,当用户取消选中其中的某一个商品,要相应的减少价格并且刷新,提供选择收货地址,对收获地址进行管理,选好收货地址之后,结算购物车,弹出支付页面,让用户选择付款方式,并且提交。 #### 2.1.11 登录注册模块   用户通过手机号码和密码进行登录,登录之后显示首页。当用户没有账号的时候,提示用户进行注册,从登录界面切换到注册界面,注册需要通过手机号码获取验证码,后台通过页面传递的手机号码,随机生成4位数的验证码并且缓存,之后通过发送139邮箱的方式发送到指定的手机,手机收取到验证码之后输入验证码提交,判断是否正确,正确则注册成功,失败则注册失败。用户注册完之后直接跳转到首页。 ## 2.2 数据结构设计   首页需要的数据是热门商品的信息,商品信息需要建立一个Bean对象,存储内容是商品的id、商品名称、商品单价、商品类别、商品数量、商品详细信息、商品成色、商品附带的图片地址、热门程度、发表用户的id、留言的集合,当用户发表之后,保存数据到Bean对象中,并将它存储到数据库。首页请求数据之后,根据热门度返回多个数据,将数据存储到list集合中,并且将它转换为JSON格式数据,返回到页面,页面解析数据并且显示。   商场则负责显示所有的商品数据,实现侧边栏点击指定的类别之后,显示对应类别的数据,需要的是类别的id,因此类别Bean对象的数据是类别id、类别名称,点击之后,通过类别id获取到商品详情集合,并且将它转为JSON格式的数据,返回到前端页面,显示数据。   点击商品之后,需要显示商品详细信息,通过商品的id返回指定商品的Bean对象,转化为JSON格式的数据,返回到前端页面显示,需要显示商品的留言信息,因此需要留言的Bean对象,包括数据留言id、留言的商品id、留言内容、留言时间,结合商品的详情返回JSON格式数据,前端解析之后显示。   求购商城,负责显示所有的求购商品,需要求购商品的Bean,内容包括求购商品id、求购商品名称、求购商品数量、求购商品单价、求购商品详细信息、求购商品留言集合。页面显示时从后台返回对象集合转变的JSON数据,前端解析数据并且显示出来。   登陆界面需要验证用户信息,用户信息包括内容用户id、用户名、用户的手机号码、用户密码、用户真实姓名、用户地址、用户email、用户性别、用户学号。验证的时候只需要判断手机号码和密码是否符合,符合则验证通过,返回验证结果,用JSON存储数据。失败则返回失败信息。   主要用到的数据结构是ArrayList负责组合各种信息,并且转换为JSON格式数据返回。数据需要排序的时候,用到的是快速排序,负责排列热门商品等的信息,并且返回数据到前端页面进行显示。 # 3 详细设计 ## 3.1 数据字典 用户信息表 | 字段名 | 字段类型| 是否可为空| 备注| |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键| |Modify |Datetime| 是| 修改时间| |Username| Varchar(50) | 否| 用户昵称| |Phone| Char(11)| 否 | 用户手机号码| |realName| Varchar(20) | 是| 用户真实姓名| |Clazz| Varchar(20) |是| 用户所在班级| |Sno| Char(12)| 是| 用户学号| |Dormitory| Varchar(20) | 是| 宿舍号| |Gender| Char(2)| 是| 性别| |Createtime |Datetime| 是| 创建时间| |Avatar| Varchar(200)| 是 | 头像| 用户密码表 |字段名 |字段类型| 是否可为空| 备注| |:------:|:------:|:------:|:------:| |Id| Int | 否| 主键| |Modify |Datetime| 是 |修改时间| |Password| Varchar(24) | 否| 用户密码| |Uid| Int| 否| 用户id| 商品表 |字段名 |字段类型| 是否可为空| 备注| |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Name| Varchar(50) | 否| 商品名称 |Level| Int |否| 商品成色 |Remark |Varchar(255)| 是| 商品详细信息 |Price| Decimal(0.00)| 否| 商品价格 |Sort| Int | 否| 商品类别 |Count| Int | 否| 商品数量 |Display| Int | 否| 商品是否被下架 |Transaction |Int| 否 | 交易方式 |Sales| Int | 否| 商品销量| |Uid |Int | 否| 发表的用户id| |Image| Varchar(255)| 否| 商品的图片地址 商品留言 |字段名 |字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11)| 否| 主键 |Modify| Datetime| 是| 修改时间 |Sid| Int | 否| 商品的id |Content| Varchar(122)| 否| 留言内容 |Display |Int| 否| 是否可见 |Uid |Int | 否| 评论的用户id 我的收藏 |字段名 |字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Sid |Int | 否 |商品的id |Display |Int| 否| 是否可见 |Uid |Int | 否| 评论的用户id 求购商品 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Name| Varchar(50) |否| 求购商品名称 |Remark| Varchar(255)| 是| 求购商品详情 |Price| Decimal(0.00)| 否| 求购商品价格 |Sort| Int | 否| 求购商品类别 |Count| Int | 否| 求购商品数量 |Display| Int | 否| 信息是否被删除 |Transaction| Int | 否| 交易方式 |Uid |Int | 否| 发表的用户id |Image| Varchar(255)| 否| 商品的图片地址 求购商品留言 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Qid |Int | 否| 求购商品的id |Content| Varchar(122)| 否| 留言内容 |Display| Int| 否| 是否可见 |Uid |Int | 否| 评论的用户id 我发布的商品 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Display |Int | 否| 是否被删除 |Uid |Int | 否| 用户id |Sid |Int| 否| 对应商品id 我求购的商品 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime| 是| 修改时间 |Display| Int | 否| 是否被删除 |Uid| Int | 否| 用户id |Qid| Int | 否 |求购商品id 已购买的商品 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否 |主键 |Modify| Datetime| 是| 修改时间 |State| Int | 否| 商品当前的状态 |Uid |Int | 否| 用户id |Sid| Int | 否| 商品id |Quantity| Int | 否| 商品数量 购物车 |字段名| 字段类型| 是否可为空| 备注 |:------:|:------:|:------:|:------:| | Id| Int(11) | 否| 主键 |Modify| Datetime | 是| 修改时间 |Display| Int| 否| 商品是否被删除 |Uid| Int| 否| 用户id |Sid| Int| 否| 商品id |Quantity| Int | 否| 商品数量 ## 3.2 实现过程 ### 3.2.1 商品首页实现   负责显示热门的商品信息,以及显示本网站的网站信息,导航栏负责跳转到各个页面,没有登录显示按钮可以让用户进行登陆和注册。已登录的用户显示用户名,并且可以发布商品信息,查看个人信息等。进入首页的时候,通过Ajax获取数据库中存在的热门商品数据集合,并且刷新页面的内容,点击商品之后跳转到商品详细信息模块。   首页的前端设计大体如下   顶部实现导航栏,导航栏包括网站logo支持点击之后返回到首页、输入框和按钮负责站内搜索引擎的实现、以及一个span包裹的数据,当有用户登陆时将它替换为用户名,没有用户登录时,则将它设置为登录注册按钮,方便用户进行登录和注册。用户登陆之后,显示出来的用户名可以通过绑定鼠标进入事件,弹出选择框让用户选择相应的操作,例如显示个人信息、查看发布的商品、查看求购的商品、发布商品、发布求购商品信息。导航栏与其他页面共用。 ![这里写图片描述](https://img-blog.csdn.net/20180506142520732?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   显示热门商品信息,采用轮播图实现,主要是先定义一个顶级的div指定position是绝对位置,将除了当前显示的页面之外的轮播图div都隐藏起来,为当前的div添加一个current类,判断点击的方向,如果是右则先获取到current的下一个div,并且将它准备在右侧等候进入,当前的div移出之后,就将下一个进入,并且删除原来的current类,将它添加给新的div。在此过程中控制动画,就可以实现一个精美的轮播图。 ![这里写图片描述](https://img-blog.csdn.net/20180506142530664?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   其他部分实现效果 ![这里写图片描述](https://img-blog.csdn.net/20180506142550165?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142617150?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.2 二手商城实现   负责显示所有的二手商品,提供类别的侧边栏给用户点击之后显示对应的商品信息。类别侧边栏的实现后,需要为每一个类别的元素都添加一个id,通过id来获取数据库中的数据,用Ajax获取数据并且刷新页面的信息。采用分页技术,防止数据过多的时候,显示在同一个页面,给用户带来不好的体验,分页支持点击下一页上一页或者直接点击指定页面,跳转到指定的页面。商品点击之后就要跳转到商品详情。   二手商城前端实现   主要是设计侧边栏比较有难度,首先获取后台返回的三级类别,并且将顶级类别显示在侧边栏中,当鼠标移动上去的时候,显示其余两级目录,显示次级目录作为标题,而第三级的目录则是可点击的按钮,点击之后显示相应类别的商品信息。 ![这里写图片描述](https://img-blog.csdn.net/2018050614262516?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) 商城商品展示 ![这里写图片描述](https://img-blog.csdn.net/20180506142641307?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   其次是底部分页按钮的实现,左右切换需要通过jQuery来控制,下一页则判断是否已经到达当前显示的页数倒数第二个,如果是就删除第一个页数,并且添加下一页的页数(前提是还有页数可以继续),如果不是倒数第二个,就将当前元素的current类名删除并将它赋给下一个元素。 ![这里写图片描述](https://img-blog.csdn.net/20180506142650930?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142655874?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.3 商品详情实现   负责显示指定的商品详细信息,包括图片、名字、价格、数量等,当一个商品被点击之后,通过返回的id查询到这个数据集合,跳转到商品详细信息的页面,商品发布者可以在下方查看留言,并且与有意者打成交易意向。将对应的信息显示出来,并且提供加入到购物车的功能。商品详细信息下方显示其他用户的留言,并且已经登录的用户可以对这件商品进行评论,商品发布者可以在下方查看留言,并且与有意者打成交易意向。商品发布者可以在下方查看留言,并且与有意者打成交易意向。   显示商品的详细信息,并且添加可以留言的模块,用户发表留言之后,会在下方的留言板通过ajax进行实时的刷新。 ![这里写图片描述](https://img-blog.csdn.net/20180506142702750?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   留言 ![这里写图片描述](https://img-blog.csdn.net/20180506142707609?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.4 站内搜索引擎实现   每一个页面顶部都存在一个搜索输入框,用户通过输入模糊的商品信息,后台数据库通过查询过滤相关的商品信息,并且显示出来给用户查看,显示出来的商品点击之后可以显示商品的详细信息。 ![这里写图片描述](https://img-blog.csdn.net/20180506142713316?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   搜索结果 ![这里写图片描述](https://img-blog.csdn.net/20180506142717344?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.5 发布商品实现   用户输入指定的信息,以及选择商品的图片,之后将这些信息结合当前登陆的用户,通过Ajax发表到后台,并且通过框架存储数据到数据库指定表。   三级联动的实现,用Ajax获取到三级的类别JSON数据,之后解析JSON数据,将第一级的添加到第一个下拉框,第二级的添加到第二个下拉框,第三级的添加到第三个下拉框,当第一个或者是第二个发生改变的时候,通过获取父容器的子集合修改后两级或者一级的下拉框内容,用jQuery的html替换即可。 ![这里写图片描述](https://img-blog.csdn.net/20180506142725661?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142737493?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)  点击图片后显示缩略图,需要先采用一个file的input,获取到file的文件集合,并且获取它的网页缓存地址,获取后将它设置到img的src中,可以添加一个渐变的动画效果,给用户带来更好的视觉体验。 ![这里写图片描述](https://img-blog.csdn.net/20180506142751872?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.6 发布求购信息实现  用户输入指定的信息,以及选择商品的图片,之后将这些信息结合当前登陆的用户,通过Ajax发表到后台,并且通过框架存储数据到数据库指定的求购信息表。三级联动采用前一个的即可。 ![这里写图片描述](https://img-blog.csdn.net/20180506142803686?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.7 个人信息页面实现   显示个人信息,例如用户名、真实姓名、宿舍号、学号等,显示之后还需要支持对于数据进行修改,修改之后,要同步修改页面的信息,这需要用到Ajax进行数据的提交,并且进行页面的局部刷新。   所有信息采用jQuery的EasyUI中的accordion显示,标题显示信息,而底部内容则显示修改的组件,之后Ajax修改具体信息后需要将对应的新的内容,采用jQuery显示到标题中。 ![这里写图片描述](https://img-blog.csdn.net/20180506142810540?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142815483?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.8 我发布的商品实现   显示个人发表的商品信息,支持点击之后对数据进行修改,例如修改商品名字,修改商品的单价和数量等,修改之后将新的数据提交到数据库,数据库执行相应的修改操作,也可以直接下架某件商品,点击删除按钮之后,直接在后台数据库删除这一件商品,并且刷新当前页面上显示的个人发布的商品。给用户带来更好的体验效果。 ![这里写图片描述](https://img-blog.csdn.net/20180506142820866?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   点击修改 ![这里写图片描述](https://img-blog.csdn.net/2018050614282592?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.9我发布的求购信息实现   显示个人发表的求购商品信息,支持点击之后对数据进行修改,例如修改商品名字,修改商品的单价和数量等,修改之后将新的数据提交到数据库,数据库执行相应的修改操作,也可以直接下架某件商品,点击删除按钮之后,直接在后台数据库删除这一件商品,并且刷新当前页面上显示的个人求购的商品。 ![这里写图片描述](https://img-blog.csdn.net/2018050614284365?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142847753?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.10购物车实现 显示用户加入购物车的商品,计算总的价格,提供全选和取消全选的按钮,从后台获取商品的单价,判断当前剩余的数量,当用户点击数量添加或者减少之后,对于总价要实时刷新,采用jQuery对数据进行修改,当用户取消选中其中的某一个商品,要相应的减少价格并且刷新,提供选择收货地址,对收获地址进行管理,选好收货地址之后,结算购物车,弹出支付页面,让用户选择付款方式,并且提交。 ![这里写图片描述](https://img-blog.csdn.net/20180506142855913?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   点击添加数量和减少 ![这里写图片描述](https://img-blog.csdn.net/20180506142901134?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ### 3.2.11登录注册实现   用户通过手机号码和密码进行登录,登录之后显示首页。当用户没有账号的时候,提示用户进行注册,从登录界面切换到注册界面,注册需要通过手机号码获取验证码,后台通过页面传递的手机号码,随机生成4位数的验证码并且缓存,之后通过发送139邮箱的方式发送到指定的手机,手机收取到验证码之后输入验证码提交,判断是否正确,正确则注册成功,失败则注册失败。用户注册完之后直接跳转到首页。   登录界面需要4个页面,第一个是登录界面,显示手机号码和密码的组件,并且需要底部添加注册按钮,以及忘记密码。第二个是注册界面,注册界面首先提供用户输入手机号码以及验证码,获取验证码的按钮,获取之后跳转到下一步,也就是输入密码界面。输入密码界面需要两次确认密码,输入确认之后就是跳转到首页。最后一个界面是忘记密码,同样通过输入手机号码获取验证码即可。之后将这四个界面通过CSS3的transform属性,将四个界面组合成一个立方体,当用户点击切换到各自界面的按钮时,就采用transform的rotateY,将切换的效果实现成立体翻转的效果。 ![这里写图片描述](https://img-blog.csdn.net/20180506142908919?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142916295?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ![这里写图片描述](https://img-blog.csdn.net/20180506142923392?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70) ##### 后台实现的过程   1. 总述:本次后台使用的编程语言为Java,使用的框架是Spring+SpringMVC+Mybatis,前端网页渲染的语言不使用JSP,而我选择使用的是thymeleaf框架,     原因如下:   a. thymeleaf可以直接渲染出HTML5和CSS3的效果。   b.前端写的网页合并到后台处理的时候不需要转换成jsp页面,方便快捷。   c. thymeleaf可以很方便的解析后台传输到前端的值。   d. thymeleaf,我个人认为是个比较好的模板,性能也比一般的,比如freemaker的要高,而且把将美工和程序员能够结合起来,美工能够在浏览器中查看静态效果,程序员可以在应用服务器查看带数据的效果。   e. thymeleaf是一个支持html原型的自然引擎,它在html标签增加额外的属性来达到模板+数据的展示方式,由于浏览器解释html时,忽略未定义的标签属性,因此thymeleaf的模板可以静态运行。   2. 后台结构总图 ![这里写图片描述](https://img-blog.csdn.net/20180506142931448?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dzazExMDM=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)   java:存放Java代码   bean:用于序列化到前端,然后解析的实体类。   controller:spring和springMVC的控制器,用于处理请求的链接   dao:,和数据库进行交互   pojo:普通的Java实体类   service:定义接口,用于连接controller和dao   token:生成唯一标识,用于防止用户重复提交。   tool:工具类,例如处理文件,文本敏感词过滤,图片色情鉴别等等。   resources:存放资源文件,例如Mybatis生成的xml文件,spring,springMVC,mybatis配置文件等等   css:网站样式   img:网站部分图片   js:JavaScript文件   templates:网站html文件   3.后台实现了一个只能单用户登录的功能:如果有两个用户使用同一个账号分别登录,那么后一个登录的用户会踢掉第一个用户登录的账号,也就是说先登录的用户会被强制退出。实现细节:主要使用的是websockt和spring websockt。首先前端判断用户有没有登录,如果有登录的话,就将用户的手机号码,当前时间发送到后台,后台接收到信息,解析信息,将信息存储到Map中,前台循环提交这些信息,并判断Map中手机号码对应的时间是否相等,如果不相等,证明有其他用户登录了该账号,后台发送下线信息到前端,前端收到信息后,触发退出当前账号事件。   4.常规数据库增删查改:考虑到密码是重要的信息,所以当操作密码的时候,都是先使用MD5对其进行加密后处理。例如修改密码,注册用户等等。各个数据表之间的关联都是通过逻辑处理进行数据联系的。   5.防止用户重复提交:在每个界面,都会由后台生成一个token,然后前端页面存储该token,如果用户进行提交按钮等事件时,就会连这个token一起发送到后台进行处理,后台若获取不到token或者token不相匹配,那么就判定该用户重复提交这个事件,后台直接返回原本页面。   6.敏感词过滤:管理员将敏感词编入到数据库中,用户发布商品时附带的商品名称,商品备注等等,都会被过滤,将其中的敏感词替代成**。然后返回对应的数值。用户在填写商品名称,详情的时候,还会ajax自动和后台进行验证判断,并实时提醒用户有没有输入敏感词。   7.图片色情鉴别:使用的是百度的百度开发者平台中的色情图片识别功能。通过提交一张图片到百度的这个功能中,该项目功能就会返回一个数字,姑且称该值为色情值,如果该色情值超过一个给定的数值,那么就可以判定该图片为色情图片,如果用户上传的是色情图片,那么就无法插入,修改,后台会直接返回一个错误值给前端,提示使用了非法的图片。 ## 4.问题分析   4.1 在实现只能单用户登录的时候,由于是第一次编写,以前没有经验,刚开始的想法是设计2个Map(m1,m2),用于存储前一次登录(m1)和再次登录(m2)的手机号码和对应的时间。首先,当用户第一次登录的时候,m1和m2必定都为空,m2先通过手机号码存储当前的时间,然后前端通过websockt发送定时信息过来请求判断,在后台处理前端发送过来的信息的时,先判断m1是否存在m2中该的该手机,如果不存在,则证明为第一次登录,那么m1存储m2中对应手机的对应时间。如果存在,那么将m1中时间和m2中的时间进行比较,若比较结果一致,是单用户登录;若不一致,该手机为前一次登录,强迫下线。当用户再次登录的时候,m2中存储手机对应的当前的时间,那么前一次登录的时候m1中存储的手机对应的时间必然小于再次登录中m2中存储的时间,此时,前一次登录强迫下线,m1中的时间刷新为m2中对应的时间。但是这个思路出现了一个严重的问题,在测试的时候,首次登录后,第二次登录确实会踢掉第一次登录,但是第三次登录的时候,所有的用户都平安无事,不会互相排挤,此时出现的问题应该是线程不安全导致的结果。m1,m2这2个map都可能会出现这种情况。   解决方法:设计一个Map(m),用于存储手机号码和其对应的时间。首先,用户登录后,将当前的时间,手机号码通过websockt发送到后台,后台进行判断处理,如果发送过来的时间和m中存储的时间进行比较,若一致,证明没有其他用户登录,若不一致,证明其他用户登录过,那么当前这次用户就会被迫下线   4.2 设计的工具类中,因为存在很多个类和包,如果没有使用工厂模式进行设计的时候,那么在启动项目的时候,多用户登录时,就会导致线程不安全或者线程堵塞,并且将类中的所有方法声明为static时,会占用了许多的内存。   解决方法:使用静态工厂模式-静态内部类。将所有的工具类集中到一个总类中,然后为给总类设计一个静态内部类,其他将要调用的方法设计为public非静态方法,如果调用的时候用工厂调用就可以了。   4.3 当使用多个参数通过mybatis获取数据库数据时,出现了参数未定义的情况,这是因为多个参数的时候,要将这些参数封装为一个Map。   解决方法:将多个参数封装为一个Map,然后将该Map作为参数传递给mybatis的处理方法。   4.4 发送手机验证码出现的错误:一开始像使用邮箱验证用户的,但是在通过邮箱给用法发送信息的时候,这个时候就有多个邮箱作发送者供选择-QQ,163,127,sina等等。原先使用的是163邮箱进行发送信息,但是由于发送的内容过于少,被系统认定为垃圾邮件不给发送或者接收。其他邮箱也类似。后来感觉使用邮箱发送验证码已经被淘汰了,现在流行手机验证了,所以改为发送手机验证码。但是手机发送验证码的话,不想使用网上别人提供的服务,打算自己写一个,关键是怎么将验证码发送到手机上。   解决方法:将验证码发送到139邮箱上就可以了,一般的手机用户都会默认绑定139邮箱的,如果139邮箱收到信息,那么就会通过发送短信的形式提示到对应的手机上,这样就可以实现手机验证码的发送了。   4.5 前端使用Ajax局部刷新时,有可能会导致新显示的内容无法绑定点击事件,最终导致在点击相应的按钮(例如加入购物车按钮)时,页面没有反应。   解决方法:在Ajax的for循环显示结果内容后,为按钮等绑定相应的事件。这样就可以解决该问题。 ## 6.用户使用说明 ### 6.1 首页   首先访问本站网址,进入首页,可以浏览首页的商品信息,首页轮播图可以左右切换查看商品信息,如果没有主动切换,那么每3.5s之后会自动往右切换一张,往下滑动显示的是其他的一些热门商品缩略信息,点击商品名字之后可以查看该商品的详细信息和留言。再下方是一些其他信息,可以忽略。 ### 6.2 普通游客的限制   普通游客可以随意访问首页,可以通过导航栏访问商城,求购商城等。但是如要要发布求购、发布商品则需要先登录。 ### 6.3 没有账号?   如果用户还没有账号,那么点击右上角的注册按钮,之后会跳转到注册界面,用户需要输入手机号,再通过它获取验证码,注意输入的手机号必须要格式正确并且有效,获取验证码之后,便点击下一步,此时到达的界面是确认密码界面,重复输入密码,两次输入的密码必须一致。确认完毕之后就会进入首页。如果用户忘记了自己注册过的账号密码,那么点击登录界面的忘记密码选项,输入注册时使用的手机号码,通过此手机号码获取验证码,输入验证码之后,点击下一步开始重置密码,重置完毕之后就会重新进入到首页。 ### 6.4 商城   用户想要查看其他用户发布的商品,需要通过点击导航栏处的商城进入到商城页面,在此可以浏览所有的商品,每页显示12个,底部的分页按钮,可以点击之后切换到用户想找的页面。而用户如果需要过滤信息,找到自己想要的类别,左侧悬浮的悬浮框,鼠标移动到指定的类别中,查看详细的类别,点击自己想要找的商品类别,网站便会过滤出指定的商品呈现给用户。   商城显示的商品信息只是一部分,通过点击商品名可以跳转到商品详细信息页面,用户可以在此查看商品的所有信息,可以将它添加到购物车,或者查看下方其他用户的留言,也可以针对自己的意见,对商品做出评价。 ### 6.5 模糊查询   如果想要模糊查询商品,最顶部有一个输入框,输入商品的信息,点击搜索按钮,系统会自动过滤合适的商品呈现给用户。 ### 6.6 求购商城   如果用户有商品想要出售,可以进入求购商城,浏览其他用户的求购信息,通过点击顶部的导航栏 求购商城 进入查看所有的求购信息,同样有分页和侧边栏的功能。 ### 6.7 发布商品信息   如果已经登录过,那么右上角显示的是用户名,将鼠标移动到上面,会弹出一个下拉框,点击发布商品信息,按照提示输入各自的信息,之后确认信息无误之后点击发布按钮即可。 ### 6.8 发布求购信息   发布求购信息的过程跟发布商品信息一样,主要是点击下拉框的发布求购信息,在发表即可。 ### 6.9 查看我发布的商品   鼠标移动到左上角的用户名,点击显示出来的下拉框的我发布的商品,就可以进入到自己发布过的商品,可以点击每一个商品下方的修改图标可以对商品进行修改,点击删除图片可以下架这个商品。 ### 6.10 查看我的求购商品   跟查看我发布的商品基本一致,只是点击的是我的求购商品。 ### 6.11 购物车   用户浏览到合适的商品,可以点击添加至购物车的按钮,之后可以将鼠标移动至右上角用户名处,点击显示出来的下拉列表,点击我的购物车,进入到我的购物车查看自己有意向购买的商品。此时可以选择收货地址,或者修改购物车中的一些信息,例如修改数量,或者删除某一件商品。也可以同时选中所有的商品,或者是取消选中所有的商品,之后便可以结算。 # 三、设计总结或结论   该C2C校园二手交易平台,界面简洁明了,能给用户一种美的视觉上的享受。并且操作简单易懂,可以大胆但是毫不夸张的说,本系统适用于99%的青少年愉快的使用,对于不是很了解智能科技的人来说,只要看看就基本可以掌握然后熟练的使用该系统了。并且本系统的动画效果做得非常的完美,前端工作人员争取使用最少的代码实现最炫酷的动态效果,例如3D页面转换,动态加入购物车效果,搜索的时候动态自动提示商品名字功能等等,无一不是本系统的亮点。由于前端本着使用最少的代码,实现最炫酷的动态效果,所以其性能可以来说是杠杠的。并且前端所构建的网站为响应式网站,当页面的大小发送变化的时候,页面会随着变化,但是我们的变化不会出现任何的纰漏。在兼容性方面,本网站可以完美的兼容ie8+,Firefox8+,chrome6+等等,虽然目前比较少用户使用这些版本以下的浏览器,但是要做的话,我们就要力争做到完美,前端人员通过查询资料,目前可以最完美的兼容上诉浏览器的以下版本。   前端页面缺点:对于那些不兼容HTML5和CSS3的浏览器,使用的是JavaScript来动态实现这些3D效果的,所以可能展示的效果不如支持HTML5和CSS3的本身效果好。对应浏览器版本真的是过低的用户,无法完美的显示本系统的动态网页。JavaScript实现的那些动画效果可能存在某些目前未知的bug,导致性能上的加载可能会出现瑕疵。   后台实现的优点:后台为了提高性能,使用了一些目前属于比较好的设计模式,例如工厂方法模式,代理模式,备忘录模式,单例模式等等。数据库表的设计思想主要是参考阿里巴巴的开发手册进行设计的,在性能上,建立了适当的索引,增强了查询速度,并且自己设计了许多的算法对后台数据的处理进行优化等等。本来想使用集群和分布式来实现后台,但是考虑到现在如果使用集群,分布式来实现,那么开发周期得提升不止一个档次的时间。   网站加载图片的时候,通常耗费的主要流量和影响速度的原因之一就是这个,所以后台设计了一个比较有意思的算法对图片进行适当的压缩,在前端显示的时候,主要显示的压缩后的图片,当鼠标移到图片上的时候,那么通过ajax显示未被压缩过的图片的放大版。这样,既可以节省带宽,又可以提高用户的体验。   为了防止XSS攻击,可以使用消毒和HttpOnly防止该现象;对于注入攻击,使用的方法为错误回显,盲注,参数绑定;对于CSRF攻击,可以使用表单token,验证码和Rererfer check。   对于密码,手机号码,真实信息等等敏感信息,通常都需要对其进行信息加密,我使用的是单向散列表加密和对称加密,还有就是使用公钥密钥配对核实认证。但是如果使用到密钥的话,那么一般会要求用户下载安全证书到本机。   信息过滤和反垃圾是目前一个比较主流的问题。我使用的主要是文本匹配来过滤敏感词的。当用户发布的信息很长的时候,使用的过滤算法是双数组Trie算法进行敏感词过滤,该算法利用两个稀疏数组存储树结构,base数组存储Trie树的节点,check数组进行状态检查。该算法需要根据业务场景和经验确定数组大小,避免数组过大或者冲突过多。   简而言之,前端效果简洁炫酷,操作简单易懂。   没有实现的功能:秒杀系统,前端反向代理,CDN加速。 ## 参考文献 [1] 李智慧. 大型网站技术架构 核心原理与案例分析[M].北京,工业机械出版社,2013. [2] 马丁著 韩磊译.代码整洁之道[Clean Code A Handbook of Agile Software Craftsmanship] [M]. 北京,人们邮电出版社,2010. [3] Craig Walls 著 张卫滨译. Spring In Action[M]. 北京,人民邮电出版社,2016 [4] Thomas H.Cormen , Charles E.Leiserson, Ronald L.Rivest, Clifford Stein著,徐云,王刚等译. 算法导论(原书第3版)[M]. 北京,机械工业出版社,2015 [5] Joshua Bloch 著 杨春花 俞黎敏 译. Effective Java(Second Edition) [M]. 北京,机械工业出版社,2016 [6] 本·弗莱恩(Ben Frain)著奇舞团 译. 响应式Web设计 HTML5和CSS3实战(第2版)[M]. 人民邮电出版社,2017 [7] 达科特(Jon Duckett) 著 刘涛,陈学敏 译. JavaScript&jQuery交互式Web前端开发[M]. 清华大学出版社,2015 [8] NicholasC.Zakas著 李松峰曹力 译. JavaScript高级程序设计(第3版)[M]. 人民邮电出版社,2016
0
apilayer/restcountries
Get information about countries via a RESTful API
countries java rest rest-api rest-countries
REST Countries ======= Get information about countries via a RESTful API https://restcountries.eu [![Build Status](https://travis-ci.org/fayder/restcountries.svg?branch=master)](https://travis-ci.org/fayder/restcountries) Donate! --------------- The restcountries project has been acquired by apilayer, one of the leading providers of API microservices. We will keep supporting restcountries and providing it as a free solution for developers. We will finance this project fully and have turned off the donations feature. Users --------------- RESTCountries has over 1200 users, including: [TTÜ] [Spotify International Pricing Index] [Gorillaz] [Wanderlust] [Xero] [FxPro] [SKROSS] [onefinestay] [Much Better Adventures] Stay up-to-date --------------- Follow RESTCountries on [Twitter] Or subscribe to the [mailing list] API Endpoints ======= Below are described the REST endpoints available that you can use to search for countries All --------------- ``` html https://restcountries.eu/rest/v2/all ``` Name --------------- Search by country name. It can be the native name or partial name ``` javascript https://restcountries.eu/rest/v2/name/{name} ``` ``` html https://restcountries.eu/rest/v2/name/eesti ``` ``` html https://restcountries.eu/rest/v2/name/united ``` Full Name --------------- Search by country full name ``` javascript https://restcountries.eu/rest/v2/name/{name}?fullText=true ``` ``` html https://restcountries.eu/rest/v2/name/aruba?fullText=true ``` Code --------------- Search by ISO 3166-1 2-letter or 3-letter country code ``` javascript https://restcountries.eu/rest/v2/alpha/{code} ``` ``` html https://restcountries.eu/rest/v2/alpha/co ``` ``` html https://restcountries.eu/rest/v2/alpha/col ``` List of codes --------------- Search by list of ISO 3166-1 2-letter or 3-letter country codes ``` javascript https://restcountries.eu/rest/v2/alpha?codes={code};{code};{code} ``` ``` html https://restcountries.eu/rest/v2/alpha?codes=col;no;ee ``` Currency --------------- Search by ISO 4217 currency code ``` javascript https://restcountries.eu/rest/v2/currency/{currency} ``` ``` html https://restcountries.eu/rest/v2/currency/cop ``` Language --------------- Search by ISO 639-1 language code ``` javascript https://restcountries.eu/rest/v2/lang/{et} ``` ``` html https://restcountries.eu/rest/v2/lang/es ``` Capital city --------------- Search by capital city ``` javascript https://restcountries.eu/rest/v2/capital/{capital} ``` ``` html https://restcountries.eu/rest/v2/capital/tallinn ``` Calling code --------------- Search by calling code ``` javascript https://restcountries.eu/rest/v2/callingcode/{callingcode} ``` ``` html https://restcountries.eu/rest/v2/callingcode/372 ``` Region --------------- Search by region: Africa, Americas, Asia, Europe, Oceania ``` javascript https://restcountries.eu/rest/v2/region/{region} ``` ``` html https://restcountries.eu/rest/v2/region/europe ``` Regional Bloc --------------- Search by regional bloc: - EU (European Union) - EFTA (European Free Trade Association) - CARICOM (Caribbean Community) - PA (Pacific Alliance) - AU (African Union) - USAN (Union of South American Nations) - EEU (Eurasian Economic Union) - AL (Arab League) - ASEAN (Association of Southeast Asian Nations) - CAIS (Central American Integration System) - CEFTA (Central European Free Trade Agreement) - NAFTA (North American Free Trade Agreement) - SAARC (South Asian Association for Regional Cooperation) ``` javascript https://restcountries.eu/rest/v2/regionalbloc/{regionalbloc} ``` ``` html https://restcountries.eu/rest/v2/regionalbloc/eu ``` Response Example --------------- ``` html https://restcountries.eu/rest/v2/alpha/col ``` ``` json [[{ "name": "Colombia", "topLevelDomain": [".co"], "alpha2Code": "CO", "alpha3Code": "COL", "callingCodes": ["57"], "capital": "Bogotá", "altSpellings": ["CO", "Republic of Colombia", "República de Colombia"], "region": "Americas", "subregion": "South America", "population": 48759958, "latlng": [4.0, -72.0], "demonym": "Colombian", "area": 1141748.0, "gini": 55.9, "timezones": ["UTC-05:00"], "borders": ["BRA", "ECU", "PAN", "PER", "VEN"], "nativeName": "Colombia", "numericCode": "170", "currencies": [{ "code": "COP", "name": "Colombian peso", "symbol": "$" }], "languages": [{ "iso639_1": "es", "iso639_2": "spa", "name": "Spanish", "nativeName": "Español" }], "translations": { "de": "Kolumbien", "es": "Colombia", "fr": "Colombie", "ja": "コロンビア", "it": "Colombia", "br": "Colômbia", "pt": "Colômbia" }, "flag": "https://restcountries.eu/data/col.svg", "regionalBlocs": [{ "acronym": "PA", "name": "Pacific Alliance", "otherAcronyms": [], "otherNames": ["Alianza del Pacífico"] }, { "acronym": "USAN", "name": "Union of South American Nations", "otherAcronyms": ["UNASUR", "UNASUL", "UZAN"], "otherNames": ["Unión de Naciones Suramericanas", "União de Nações Sul-Americanas", "Unie van Zuid-Amerikaanse Naties", "South American Union"] }] }] ``` Filter Response ======= You can filter the output of your request to include only the specified fields. ``` javascript https://restcountries.eu/rest/v2/{service}?fields={field};{field};{field} ``` ``` html https://restcountries.eu/rest/v2/all?fields=name;capital;currencies ``` Sources ======= * [@mledoze] * [List of countries] * [Languages] * [Currencies] * [Area] Similar projects ======= * [Countries of the world] * [REST Countries Node.js] * [REST Countries Ruby] * [REST Countries Go] * [REST Countries Python] * [world-currencies] * [REST Countries C#](https://github.com/egbakou/RESTCountries.NET) License ======= [Mozilla Public License] MPL 2.0 [dist]: https://github.com/fayder/restcountries/ [Twitter]: https://twitter.com/restcountries [mailing list]: http://eepurl.com/cC-h2v [Donate]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=V5AJAEMKE6A3E [@mledoze]: https://github.com/mledoze/countries [List of countries]: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes [Languages]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes [Currencies]: https://en.wikipedia.org/wiki/List_of_circulating_currencies [Area]: https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_area [Population]: https://en.wikipedia.org/wiki/List_of_countries_by_population [Gini coefficient]: http://en.wikipedia.org/wiki/List_of_countries_by_income_equality [Mozilla Public License]: https://www.mozilla.org/en-US/MPL/2.0/ [world-currencies]: https://github.com/wiredmax/world-currencies [REST Countries Node.js]: https://github.com/aredo/restcountries [REST Countries Ruby]: https://github.com/davidesantangelo/restcountry [REST Countries Go]: https://github.com/alediaferia/gocountries [REST Countries Python]: https://github.com/SteinRobert/python-restcountries [Countries of the world]: http://countries.petethompson.net [TTÜ]: https://www.ttu.ee/studying/tut_admission/programmes-in-tut/ask-us/ [Spotify International Pricing Index]: http://mts.io/2014/05/07/spotify-pricing-index/ [Gorillaz]: http://www.gorillaz.com/ [Wanderlust]: https://wanderlust.com/ [Xero]: https://www.xero.com/ [FxPro]: http://www.fxpro.com/ [onefinestay]: https://www.onefinestay.com/ [Much Better Adventures]: https://www.muchbetteradventures.com [SKROSS]: http://www.skross.com/en
0
saulmm/Material-Movies
[Deprecated] An application about movies with material design
null
This projects support a series of articles about how to setup an android environment to develop an scalable, maintainable and testable projects. ### A useful stack on android - [Architecture](http://saulmm.github.io/2015/02/02/A-useful-stack-on-android-1,-architecture) - [User interface](http://saulmm.github.io/a-useful-stack-on-android-2-user-interface) - [Compatibility](http://saulmm.github.io/a-useful-stack-on-android-3-compatibility) ### Screenshots ![](http://androcode.es/wp-content/uploads/2015/03/family2.png) ![](http://androcode.es/wp-content/uploads/2015/03/detailFamily-e1426180053215.png) ### License ``` Copyright 2015 Saúl Molinero 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
youseries/urule
URULE是一款基于RETE算法的纯Java规则引擎,提供规则集、决策表、决策树、评分卡,规则流等各种规则表现工具及基于网页的可视化设计器,可快速开发出各种复杂业务规则。
chinese-rule java java-rule java-rule-engine rule spring springboo
# 简介 URule是一款纯Java规则引擎,它以RETE算法为基础,提供了向导式规则集、脚本式规则集、决策表、交叉决策表(PRO版提供)、决策树、评分卡及决策流共六种类型的规则定义方式,配合基于WEB的设计器,可快速实现规则的定义、维护与发布。 URule提供了两个版本:一个是基于Apache-2.0协议开源免费版本,URule开源版本第一款基于Apache-2.0协议开源的中式规则引擎;另一个是商用PRO版本,点击http://www.bstek.com 了解更多关于URule商用Pro版更多信息。 <table><thead> <tr> <td colspan="3">URULE PRO版与开源版主要功能比较</td> </tr> </thead> <tbody> <tr><td>特性</td><td>URULE PRO版</td><td>URULE开源版</td></tr>    <tr><td>向导式决策集</td><td>有</td><td>有</td></tr ><tr><td>脚本式决策集</td><td>有</td><td>有</td></tr> <tr><td>决策树</td><td>有</td><td>有</td></tr> <tr><td>决策流</td><td>有</td><td>有</td></tr> <tr><td>决策表</td><td>有</td><td>有</td></tr>    <tr><td>交叉决策表</td><td>有</td><td><font color="Hotpink">无</font></td></tr> <tr><td>复杂评分卡</td><td>有</td><td><font color="Hotpink">无</font></td></tr> <tr><td>文件名、项目名重构</td><td>有</td><td>无</td></tr> <tr><td>参数名、变量常量名重构</td><td>有</td><td>无</td></tr> <tr><td>Excel决策表导入</td><td>有</td><td>无</td></tr> <tr><td>规则集模版保存与加载</td><td>有</td><td>无</td></tr> <tr><td>中文项目名和文件名支持</td><td>有</td><td>无</td></tr> <tr><td>服务器推送知识包到客户端功能的支持</td><td>有</td><td>无</td></tr> <tr><td>知识包优化与压缩的支持</td><td>有</td><td>无</td></tr> <tr><td>客户端服务器模式下大知识包的推拉支持</td><td>有</td><td>无</td></tr> <tr><td>规则集中执行组的支持</td><td>有</td><td>无</td></tr> <tr><td>规则流中所有节点向导式条件与动作配置的支持</td><td>有</td><td>无</td></tr> <tr><td>循环规则多循环单元支持</td><td>有</td><td>无</td></tr> <tr><td>循环规则中无条件执行的支持</td><td>有</td><td>无</td></tr> <tr><td>导入项目自动重命名功能</td><td>有</td><td>无</td></tr>    <tr><td>规则树构建优化</td><td>有</td><td>无</td></tr> <tr><td>对象查找索引支持</td><td>有</td><td>无</td></tr> <tr><td>规则树中短路计算的支持</td><td>有</td><td>无</td></tr> <tr><td>规则条件冗余计算缓存支持</td><td>有</td><td>无</td></tr> <tr><td>基于方案的批量场景测试功能</td><td>有</td><td>无</td></tr> <tr><td>知识包调用监控</td><td>有</td><td>无</td></tr> <tr><td>更为完善的文件读写权限控制</td><td>有</td><td>无</td></tr> <tr><td>知识包版本控制</td><td>有</td><td>无</td></tr> <tr><td>SpringBean及Java类的热部署</td><td>有</td><td>无</td></tr>    <tr><td>技术支持</td><td>有</td><td>无</td></tr> </tbody></table> # 链接 文档视频教程地址:[http://www.bstek.com/resources/doc/](http://www.bstek.com/resources/doc/) URule PRO版在线示例:[http://112.124.15.63:8084/index.html](http://112.124.15.63:8084/index.html) # QQ群 群号:423339793 #### ![](https://github.com/youseries/assets/blob/master/images/qq-qrcode.png) # License Apache-2.0
0
LaiFeng-Android/SopCastComponent
该项目不再维护,仅供学习参考
null
## SopCastComponentSDK ![license-bsd](https://img.shields.io/badge/license-BSD-red.svg)&nbsp; [English Document](https://github.com/LaiFeng-Android/SopCastComponent/blob/master/document/en/README.md) 欢迎关注来疯手机安卓直播开源项目,这是一个由纯java编写的项目,但是性能方面依然不错。整个项目完成了采集、 视音频处理、编码、数据发送前处理、数据发送的功能。整个项目支持flv封包,rtmp上传,当然也向外面提供了封包和上传的相关接口。 整个项目是我们来疯安卓团队的努力结果,但是可能某些地方依然会有一些不足之处,欢迎您提出宝贵的意见和建议。 ![sopcast](sopcast.jpg) ### 技术文档 [Android手机直播(一)总览](http://www.jianshu.com/p/7ebbcc0c5df7) [Android手机直播(二)摄像机](http://www.jianshu.com/p/39a015f2996e) [Android手机直播(三)声音采集](http://www.jianshu.com/p/2cb75a71009f) ### 支持功能 >* 硬编码 >* 弱网络环境处理 >* 动态码率调整 >* 摄像头参数设置 >* 音频参数设置 >* 视频参数设置 >* 支持不同窗口尺寸 >* 支持基于Gpu的视频特处理 >* 支持静音 >* 支持rtmp上传 >* 支持水印 >* 支持截屏录制 >* 支持摄像头切换 >* 支持flv封包 >* 支持摄像头自动对焦和手动对焦切换 >* 支持摄像头缩放 >* 支持闪光灯操作 >* 支持音频回声消除 ### 要求 >* 摄像头相关操作: Android sdk 版本 14+ >* 视频直播: Android sdk 版本 18+ ### 如何使用 #### 1. 下载 使用起来非常方便, Gradle: ``` compile 'com.laifeng:sopcast-sdk:1.0.4' ``` #### 2. 权限 在使用前需要添加相应的权限: ``` <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.FLASHLIGHT" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.autofocus" /> ``` **注意:** 在Android 6.0以后很多权限需要动态申请. 如果你想快速使用,可以将项目的targetSdkVersion设置在23一下。 #### 3. 预览窗口大小 CameraLivingView支持View固定大小(EXACTLY)的模式,当然也可以在xml中定义窗口的长宽比, 这样的话一个参数要设为固定大小,另外一个参数设为"wrap_content"。 参考代码如下: ``` <com.laifeng.sopcastsdk.ui.CameraLivingView android:id="@+id/liveView" android:layout_width="match_parent" android:layout_height="wrap_content" app:aspect_ratio="0.8"/> ``` #### 4. 摄像头参数设置 ``` CameraConfiguration.Builder cameraBuilder = new CameraConfiguration.Builder(); cameraBuilder.setOrientation(CameraConfiguration.Orientation.LANDSCAPE) .setFacing(CameraConfiguration.Facing.BACK).setPreview(720, 1280) .setFps(24).setFocusMode(CameraConfiguration.FocusMode.TOUCH); CameraConfiguration cameraConfiguration = cameraBuilder.build(); mLFLiveView.setCameraConfiguration(cameraConfiguration); ``` 在Activity的onCreate方法中设置摄像头参数信息,那么摄像头就会按照你的设置进行打开。如果你在横屏界面,需要将摄像头设置为横屏模式。 你可以传入一个摄像头预览尺寸的大小,内部会找出和这个设置的大小最匹配的尺寸进行使用。如果摄像头预览大小和屏幕显示大小不一致,则会先泽中间部分进行缩放显示。 如果你使用默认的设置的话,则不需要进行任何设置。**很多手机前置摄像头需要设置fps为15,否则在弱光下会很黑。** 默认设置如下: ``` public static final int DEFAULT_HEIGHT = 1280; public static final int DEFAULT_WIDTH = 720; public static final int DEFAULT_FPS = 15; public static final Facing DEFAULT_FACING = Facing.FRONT; public static final Orientation DEFAULT_ORIENTATION = Orientation.PORTRAIT; public static final FocusMode DEFAULT_FOCUSMODE = FocusMode.AUTO; ``` #### 5. 视频参数设置 ``` VideoConfiguration.Builder videoBuilder = new VideoConfiguration.Builder(); videoBuilder.setSize(640, 360).setMime(DEFAULT_MIME) .setFps(15).setBps(300, 800).setIfi(2); mVideoConfiguration = videoBuilder.build(); mLFLiveView.setVideoConfiguration(mVideoConfiguration); ``` 在直播之前可以进行视频参数设置,可以通过setSize()方法来设置视频输出的尺寸大小,如果设置的尺寸比例不符合预览尺寸比例,则会选择中间区域进行缩放输出。 在直播之前可以设置视频的最大和最小码率,直播的时候先使用最大码率,后来根据网络环境进行调整,但是码率始终在最大和最小码率之间。mime参数将会设置到硬编 编码器,请确保mime的正确性,ifi参数也会传递到硬编编码器。如果你使用默认参数,则不需要进行任何设置。 默认设置如下: ``` public static final int DEFAULT_HEIGHT = 640; public static final int DEFAULT_WIDTH = 360; public static final int DEFAULT_FPS = 15; public static final int DEFAULT_MAX_BPS = 1300; public static final int DEFAULT_MIN_BPS = 400; public static final int DEFAULT_IFI = 2; public static final String DEFAULT_MIME = "video/avc"; ``` #### 6. 音频参数设置 ``` AudioConfiguration.Builder audioBuilder = new AudioConfiguration.Builder(); audioBuilder.setAec(true).setBps(32, 64).setFrequency(16000).setMime(DEFAULT_MIME). setAacProfile(DEFAULT_AAC_PROFILE).setAdts(DEFAULT_ADTS). setChannelCount(1).setEncoding(DEFAULT_AUDIO_ENCODING); AudioConfiguration audioConfiguration = audioBuilder.build(); mLFLiveView.setAudioConfiguration(audioConfiguration); ``` 通过'setAec(true)'方法可以打开回声消除功能,回声消除功能仅仅在(8000, 16000)采样率并且单声道下支持。 mime参数将会设置到硬编编码器,请使用正确的mime参数。如果使用默认参数,则不需要进行任何设置。 默认设置如下: ``` public static final int DEFAULT_FREQUENCY = 44100; public static final int DEFAULT_MAX_BPS = 64; public static final int DEFAULT_MIN_BPS = 32; public static final int DEFAULT_ADTS = 0; public static final String DEFAULT_MIME = "audio/mp4a-latm"; public static final int DEFAULT_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT; public static final int DEFAULT_AAC_PROFILE = MediaCodecInfo.CodecProfileLevel.AACObjectLC; public static final int DEFAULT_CHANNEL_COUNT = 1; public static final boolean DEFAULT_AEC = false; ``` #### 7. 设置打包器 ``` RtmpPacker packer = new RtmpPacker(); packer.initAudioParams(AudioConfiguration.DEFAULT_FREQUENCY, 16, false); mLFLiveView.setPacker(packer); ``` 我们内部提供了flv和rtmp的打包器,你也可以定义自己的打包器。打包器负责将硬编后的视音频进行打包,然后传递给发送者进行发送。 #### 8. 设置发送器 ``` String url = "rtmp://[host]:1935/[app]/[stream]"; mRtmpSender = new RtmpSender(url); mRtmpSender.setVideoParams(640, 360); mRtmpSender.setAudioParams(AudioConfiguration.DEFAULT_FREQUENCY, 16, false); mRtmpSender.setSenderListener(mSenderListener); mLFLiveView.setSender(mRtmpSender); ``` 我们提供了本地和rtmp的发送器,本地发送器就是保持文件到本地,你也可以定义自己的发送器。 #### 9. 视频特效 我们提供了无特效和灰色两种特效,你也可以定义符合自己风格的视频特效。 ``` mLFLiveView.setEffect(mGrayEffect); ``` #### 10. 水印 在这往视频上添加水印也非常方便,设置水印后预览和输出都会显示相应尺寸的水印。设置水印的大小和位置是居于输出视频的, 预览界面会根据输出视频的情况等比例显示水印。请设置视频水印的长宽比和水印图片的长宽比一致。 ``` Bitmap watermarkImg = BitmapFactory.decodeResource(getResources(), R.mipmap.watermark); Watermark watermark = new Watermark(watermarkImg, 50, 25, WatermarkPosition.WATERMARK_ORIENTATION_BOTTOM_RIGHT, 8, 8); mLFLiveView.setWatermark(watermark); ``` #### 11. CameraListener 设置一个摄像头监听器,这样的话会受到摄像头的回调。 ``` //设置预览监听 mLFLiveView.setCameraOpenListener(new CameraListener() { @Override public void onOpenSuccess() { Toast.makeText(LandscapeActivity.this, "Camera open success", Toast.LENGTH_LONG).show(); } @Override public void onOpenFail(int error) { Toast.makeText(LandscapeActivity.this, "Camera open fail", Toast.LENGTH_LONG).show(); } @Override public void onCameraChange() { Toast.makeText(LandscapeActivity.this, "Camera switch", Toast.LENGTH_LONG).show(); } }); ``` #### 12. LivingStartListener 设置直播开始的监听器,这样的话会收到开播的相关监听。 ``` mLFLiveView.setLivingStartListener(new CameraLivingView.LivingStartListener() { @Override public void startError(int error) { Toast.makeText(LandscapeActivity.this, "Start fail", Toast.LENGTH_SHORT).show(); mLFLiveView.stop(); } @Override public void startSuccess() { Toast.makeText(LandscapeActivity.this, "Start success", Toast.LENGTH_SHORT).show(); } }); ``` The errors: ``` public static final int NO_ERROR = 0; public static final int VIDEO_TYPE_ERROR = 1; public static final int AUDIO_TYPE_ERROR = 2; public static final int VIDEO_CONFIGURATION_ERROR = 3; public static final int AUDIO_CONFIGURATION_ERROR = 4; public static final int CAMERA_ERROR = 5; public static final int AUDIO_ERROR = 6; public static final int AUDIO_AEC_ERROR = 7; public static final int SDK_VERSION_ERROR = 8; ``` ## License **SopCastComponent is released under the BSD license. See LICENSE for details.**
0
modesty/pdf2json
A PDF file parser that converts PDF binaries to text based JSON, powered by a fork of PDF.JS
null
null
0
klausw/hackerskeyboard
Hacker's Keyboard (official)
null
## Overview ## **WARNING:** *This is a rather ancient project that was originally developed back in 2011 based on the Android 2.3 (Gingerbread) AOSP keyboard. While it still works as-is for many users, it would need some major rewrites to work with newer APIs, and some features such as language switching or popup keys don't work right on modern Android systems. I'm not currently planning on significant updates, and it's possible that it will stop working on modern devices or will no longer be updateable via the Google Play store due to minimum API level requirements. Play Store requires targeting API level 29 (Android 10), while the code was written for API level 9 (Android 2.3) from 2011.* Are you missing the key layout you're used to from your computer when using an Android device? This software keyboard has separate number keys, punctuation in the usual places, and arrow keys. It is based on the AOSP Gingerbread soft keyboard, so it supports multitouch for the modifier keys. This keyboard is especially useful if you use ConnectBot for SSH access. It provides working Tab/Ctrl/Esc keys, and the arrow keys are essential for devices such as the Xoom tablet or Nexus S that don't have a trackball or D-Pad. The supported keyboard layouts include Armenian (Հայերեն), Arabic (العربية), British (en\_GB), Bulgarian (български език), Czech (Čeština), Danish (dansk), Carpalx English (language "en-CX"), Dvorak English (language "en-DV"), English (QWERTY), Finnish (Suomi), French (Français, AZERTY), German (Deutsch, QWERTZ), German Neo2 (Deutsch, language "de-NE"), Greek (ελληνικά), Hebrew (עברית), Hungarian (Magyar), Italian (Italiano), Lao (ພາສາລາວ), Norwegian (Norsk bokmål), Persian (فارسی), Portuguese (Português), Romanian (Română), Russian (Русский), Russian phonetic (Русский, ru-rPH), Serbian (Српски), Slovak (Slovenčina), Slovenian (Slovenščina)/Bosnian/Croatian/Latin Serbian, Spanish (Español, Español Latinoamérica), Swedish (Svenska), Tamil (தமிழ்), Thai (ไทย), Turkish (Türkçe), and Ukrainian (українська мова). To install, get **[Hacker's Keyboard](https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard)** from the Play Store, plus optional [dictionary packs](https://play.google.com/store/apps/developer?id=Klaus+Weidner). ## Additional resources ## See the **[Release Notes](https://github.com/klausw/hackerskeyboard/wiki/ReleaseNotes)** for changes in the Play Store released versions. Having problems? See the **[User's Guide](https://github.com/klausw/hackerskeyboard/wiki/UsersGuide)** and **[FAQ](https://github.com/klausw/hackerskeyboard/wiki/FrequentlyAskedQuestions)**, and check the [issue tracker](https://github.com/klausw/hackerskeyboard/issues) for known bugs or filing new ones. Comments, requests, or contributions? Join the [discussion group](http://groups.google.com/group/hackerskeyboard/). Application developers: see [the page about keyboard support in applications](https://github.com/klausw/hackerskeyboard/wiki/KeyboardSupportInApplications) if you want to enable the additional keys in your Android application, the same method also works for hardware USB or Bluetooth keyboards. ![hk-5row-en-s.png](hk-5row-en-s.png)
0
OpenHFT/Java-Thread-Affinity
Bind a java thread to a given core
affintiy bind core java low-latency
null
0
thombergs/buckpal
An example approach for implementing a Clean/Hexagonal Architecture
null
# Get Your Hands Dirty on Clean Architecture This repository implements a small web app in the Hexagonal Architecture style, as discussed in the book "Get Your Hands Dirty on Clean Architecture". The code has been updated to the 2nd edition of the book. ## Get the print book [![Get Your Hands Dirty on Clean Architecture cover](img/cover-packt-450.png)](https://www.amazon.com/Your-Hands-Dirty-Clean-Architecture/dp/180512837X?keywords=get+your+hands+dirty+on+clean+architecture&amp;qid=1689324075&amp;sprefix=Get+Your+Hands+Dirty+on+Clean+,aps,424&amp;sr=8-2&_encoding=UTF8&tag=reflectorin0c-20&linkCode=ur2&linkId=c04a12e6dd6d399747b0cdce328650a5&camp=1789&creative=9325) ## Get the e-book This is the self-published version, which is only available electronically. [![Get Your Hands Dirty on Clean Architecture cover](img/cover-430.png)](https://thombergs.gumroad.com/l/gyhdoca) ## Companion Articles * [Hexagonal Architecture with Java and Spring](https://reflectoring.io/spring-hexagonal/) * [Building a Multi-Module Spring Boot Application with Gradle](https://reflectoring.io/spring-boot-gradle-multi-module/) ## Prerequisites * JDK 17 * this project uses Lombok, so enable annotation processing in your IDE ## About the book ### All About Hexagonal Architecture * Learn the concepts behind "Clean Architecture" and "Hexagonal Architecture". * Explore a hands-on approach of implementing a Hexagonal architecture with example code [on GitHub](https://github.com/thombergs/buckpal). * Develop your domain code independent of database or web concerns. ![Hexagonal Architecture](img/hexagonal-architecture.png) ### Get a Grip on Your Layers * Learn about potential problems of the common layered architecture style. * Free your domain layer of oppressive dependencies using dependency inversion. * Structure your code in an architecturally expressive way. * Use different methods to enforce architectural boundaries. * Learn the consequences of shortcuts and when to accept them. * ... and [more](#table-of-contents). ![Dependencies](img/dependencies.png) ### What Readers Say > Tom Hombergs has done a terrific job in explaining clean architecture - from concepts to code. Really wish more technical books would be as clear as that one! Gernot Starke - Fellow at [INNOQ](https://www.innoq.com/en/staff/gernot-starke/), Founder of [arc42](https://arc42.org/), Author of Software Architecture Books, Coach, and Consultant > Love your book. One of the most practical books on hexagonal architecture I have seen/read so far. Marten Deinum - Spring Framework Contributor and Author of ["Spring 5 Recipes"](https://www.amazon.com/Spring-5-Recipes-Problem-Solution-Approach/dp/1484227891&tag=reflectorin0c-20) and ["Spring Boot 2 Recipes"](https://www.amazon.com/Spring-Boot-Recipes-Problem-Solution-Approach/dp/1484239628&tag=reflectorin0c-20) > A book taken right out of the machine room of software development. Tom talks straight from his experience and guides you through the day-to-day trade-offs necessary to deliver clean architecture. Sebastian Kempken - Software Architect at Adcubum > Thank you for the great book, it helped me gain significant insight into how one would go about implementing hexagonal and DDD in a modern Spring project. Spyros Vallianos - Java Developer at Konnekt-able > After reading it I had one of these 'aha' moments when things finally click in your brain. Manos Tzagkarakis - Java Developer at Datawise ### Table of Contents 1. Maintainability 2. What's Wrong with Layers? 3. Inverting Dependencies 4. Organizing Code 5. Implementing a Use Case 6. Implementing a Web Adapter 7. Implementing a Persistence Adapter 8. Testing Architecture Elements 9. Mapping Between Boundaries 10. Assembling the Application 11. Taking Shortcuts Consciously 12. Enforcing Architecture Boundaries 13. Managing Multiple Bounded Contexts 14. A Component-Based Approach to Software Architecture 15. Deciding on an Architecture Style
1
yangzongzhuan/RuoYi-Cloud
:tada: (RuoYi)官方仓库 基于Spring Boot、Spring Cloud & Alibaba的分布式微服务架构权限管理系统
docker elasticsearch elk fastdfs feign java nacos oauth2 seata sentinel skywalking springboot springboot-admin springcloud springcloud-alibaba springcloud-gateway springsecurity swagger vue zipkin
<p align="center"> <img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png"> </p> <h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.4</h1> <h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4> <p align="center"> <a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a> <a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.4-brightgreen.svg"></a> <a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a> </p> ## 平台简介 若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。 * 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。 * 后端采用Spring Boot、Spring Cloud & Alibaba。 * 注册中心、配置中心选型Nacos,权限认证使用Redis。 * 流量控制框架选型Sentinel,分布式事务选型Seata。 * 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Cloud-Vue3](https://github.com/yangzongzhuan/RuoYi-Cloud-Vue3),保持同步更新。 * 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) * 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp; * 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)&nbsp;&nbsp; #### 友情链接 [若依/RuoYi-Cloud](https://gitee.com/zhangmrit/ruoyi-cloud) Ant Design版本。 ## 系统模块 ~~~ com.ruoyi ├── ruoyi-ui // 前端框架 [80] ├── ruoyi-gateway // 网关模块 [8080] ├── ruoyi-auth // 认证中心 [9200] ├── ruoyi-api // 接口模块 │ └── ruoyi-api-system // 系统接口 ├── ruoyi-common // 通用模块 │ └── ruoyi-common-core // 核心模块 │ └── ruoyi-common-datascope // 权限范围 │ └── ruoyi-common-datasource // 多数据源 │ └── ruoyi-common-log // 日志记录 │ └── ruoyi-common-redis // 缓存服务 │ └── ruoyi-common-seata // 分布式事务 │ └── ruoyi-common-security // 安全模块 │ └── ruoyi-common-swagger // 系统接口 ├── ruoyi-modules // 业务模块 │ └── ruoyi-system // 系统模块 [9201] │ └── ruoyi-gen // 代码生成 [9202] │ └── ruoyi-job // 定时任务 [9203] │ └── ruoyi-file // 文件服务 [9300] ├── ruoyi-visual // 图形化管理模块 │ └── ruoyi-visual-monitor // 监控中心 [9100] ├──pom.xml // 公共依赖 ~~~ ## 架构图 <img src="https://oscimg.oschina.net/oscnet/up-82e9722ecb846786405a904bafcf19f73f3.png"/> ## 内置功能 1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。 3. 岗位管理:配置系统用户所属担任职务。 4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。 7. 参数管理:对系统动态配置常用参数。 8. 通知公告:系统通知公告信息发布维护。 9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 10. 登录日志:系统登录日志记录查询包含登录异常。 11. 在线用户:当前系统中活跃用户状态监控。 12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。 13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。 14. 系统接口:根据业务代码自动生成相关的api接口文档。 15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。 16. 在线构建器:拖动表单元素生成相应的HTML代码。 17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 ## 在线体验 - admin/admin123 - 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。 演示地址:http://ruoyi.vip 文档地址:http://doc.ruoyi.vip ## 演示图 <table> <tr> <td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td> <td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-4148b24f58660a9dc347761e4cf6162f28f.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td> <td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-ece3fd37a3d4bb75a3926e905a3c5629055.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td> </tr> <tr> <td><img src="https://oscimg.oschina.net/oscnet/up-ff9e3066561574aca73005c5730c6a41f15.png"/></td> <td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td> </tr> </table> ## 若依微服务交流群 QQ群: [![加入QQ群](https://img.shields.io/badge/已满-42799195-blue.svg)](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [![加入QQ群](https://img.shields.io/badge/已满-170157040-blue.svg)](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [![加入QQ群](https://img.shields.io/badge/已满-130643120-blue.svg)](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [![加入QQ群](https://img.shields.io/badge/已满-225920371-blue.svg)](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [![加入QQ群](https://img.shields.io/badge/已满-201705537-blue.svg)](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [![加入QQ群](https://img.shields.io/badge/已满-236543183-blue.svg)](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [![加入QQ群](https://img.shields.io/badge/已满-213618602-blue.svg)](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [![加入QQ群](https://img.shields.io/badge/已满-148794840-blue.svg)](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [![加入QQ群](https://img.shields.io/badge/已满-118752664-blue.svg)](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) [![加入QQ群](https://img.shields.io/badge/已满-101038945-blue.svg)](https://jq.qq.com/?_wv=1027&k=FqImHgH2) [![加入QQ群](https://img.shields.io/badge/已满-128355254-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G4jZ4EtdT50PhnMBudTnEwgonxkXOscJ&authKey=FkGHYfoTKlGE6wHdKdjH9bVoOgQjtLP9WM%2Fj7pqGY1msoqw9uxDiBo39E2mLgzYg&noverify=0&group_code=128355254) [![加入QQ群](https://img.shields.io/badge/179219821-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=irnwcXhbLOQEv1g-TwGifjNTA_f4wZiA&authKey=4bpzEwhcUY%2FvsPDHvzYn6xfoS%2FtOArvZ%2BGXzfr7O0%2FEqLfkKA%2BuCDXlzHIFg8t93&noverify=0&group_code=179219821) 点击按钮入群。
0
WeBankBlockchain/WeIdentity
基于区块链的符合W3C DID和Verifiable Credential规范的分布式身份解决方案
blockchain certificate consortium data-exchange did digital-signature distributed distributed-identity dpki identity kyc privacy-preserving privacy-protection selective-disclosure verifiable-credentials verifiable-presentation w3c weid weid-java-sdk weidentity
null
0
ChrisRM/material-theme-jetbrains
JetBrains theme of Material Theme
null
# Material Theme UI for JetBrains (Archived) <div align="center"> <a href="https://www.material-theme.com"> <img src="logo.svg" width="320" height="320" alt="logo"></img> </a> </div> [![GitHub issues](https://img.shields.io/github/issues/mallowigi/material-theme-issues.svg)](https://github.com/mallowigi/material-theme-issues/issues) [![GitHub stars](https://img.shields.io/github/stars/ChrisRM/material-theme-jetbrains.svg)](https://github.com/ChrisRM/material-theme-jetbrains/stargazers) [![Twitter](https://img.shields.io/twitter/url/https/github.com/mallowigi/material-theme-issues.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FChrisRM%2Fmaterial-theme-jetbrains) ![GitHub tag](https://img.shields.io/github/tag/ChrisRM/material-theme-jetbrains.svg) ![JetBrains IntelliJ Plugins](https://img.shields.io/jetbrains/plugin/v/8006-material-theme-ui.svg) ![Github All Releases](https://img.shields.io/github/downloads/ChrisRM/material-theme-jetbrains/total.svg) ![JetBrains IntelliJ plugins](https://img.shields.io/jetbrains/plugin/d/8006-material-theme-ui.svg?label=plugin%20downloads) This is a port of the famous [Material Theme](https://github.com/equinusocio/vsc-material-theme) for JetBrains IDEs, allowing a total customization of the IDE including Themes, Color Schemes, Icons and many other features. ![laptop-full](laptop-full.png) -------- ## Documentation: <https://www.material-theme.com> -------- ## DEPRECATION NOTE This repository is now archived, as the Material Theme Plugin has become closed-source since February 2021. This repository only serve as a historical record of the work done throughout the years, but the development is now done elsewhere. Please report any issues or questions at the [Material Theme Issues Repo](https://github.com/mallowigi/material-theme-issues). **Thank you for your support!** ------ #### Plugin pages: - <https://plugins.jetbrains.com/plugin/8006-material-theme-ui> - <https://plugins.jetbrains.com/plugin/12124-material-theme-ui-lite> - <https://plugins.jetbrains.com/plugin/10044-atom-material-icons> #### Donate via Paypal: _@ChrisRM_: [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LSF7K29JBPMWU&lc=US&item_name=Material%20Theme%20JetBrains%20Development&item_number=m1&currency_code=NOK&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) _@Mallowigi_: [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/mallowigi) #### OpenCollective Backers <img src="https://opencollective.com/atom-material-themes-and-plugins/tiers/backer/badge.svg?label=Backers&color=brightgreen" /> <object type="image/svg+xml" data="https://opencollective.com/atom-material-themes-and-plugins/tiers/backer.svg?avatarHeight=36&width=600"></object> [![Sponsors on Open Collective](https://opencollective.com/atom-material-themes-and-plugins/sponsors/badge.svg)](#sponsors) -------------------- # Authors: Twitter: [@crmag](https://twitter.com/crmag) [@mallowigi](https://twitter.com/mallowigi) Official page: [@AtomMaterialUI](https://twitter.com/AtomMaterialUI) GitHub: [@ChrisRM](https://github.com/chrisrm) [@Mallowigi](https://github.com/mallowigi) **Thanks to [@equinusocio](https://github.com/equinusocio) and his original [Material Theme](https://github.com/equinusocio/vsc-material-theme) for the inspiration.** # Contact You can contact us or ask questions on our [Slack community!](https://join.slack.com/t/material-theme-ui/shared_invite/zt-4w78iblt-cHXYRYERpuGNbD~TqsD8rg) Come say hello! ## Other ports The Material Theme has been ported to many other editors, applications, websites and other platforms: - [Visual Studio Code](https://github.com/equinusocio/vsc-material-theme/) (by [@equinusocio](https://github.com/equinusocio) - [Sublime Text](https://github.com/equinusocio/material-theme/) (also by [@equinusocio](https://github.com/equinusocio) - [Hyper](https://github.com/equinusocio/hyper-material-theme) (also by [@equinusocio](https://github.com/equinusocio). - [Atom](https://github.com/silvestreh/atom-material-ui) (by [@silvestreh](https://github.com/silvestreh)) - [Vim](https://github.com/kristijanhusak/vim-hybrid-material) (by [@kristijanhusak](https://github.com/kristijanhusak)). - [Terminal OSX](https://gist.github.com/mvaneijgen/4c56701215847dd5ddcf) (by [@mvaneijgen](https://github.com/mvaneijgen)). - [iTerm2](https://gist.github.com/Revod/3f3115f8d4b90fc986fd4b61441c2567) (by [@Revod](https://github.com/Revod)) and [iTerm2 Palenight](https://github.com/JonathanSpeek/palenight-iterm2) (by [@jonathanspeek](https://github.com/jonathanspeek)). - [ConEmu](https://gist.github.com/rajadain/b306b2ba71bd58a1df41) (by [@rajadain](https://github.com/rajadain)). - [Nylas N1](https://github.com/jackiehluo/n1-material) (thanks to [@jackiehluo](https://github.com/jackiehluo)) - [Base16](https://github.com/ntpeters/base16-materialtheme-scheme) (by [@ntpeters](https://github.com/ntpeters)) - [Notepad++](https://github.com/Codextor/npp-material-theme) (by [@Codextor](https://github.com/Codextor)) - [Chrome Devtools](https://chrome.google.com/webstore/detail/material-devtools-theme-c/jmefikbdhgocdjeejjnnepgnfkkbpgjo) - [Bear](https://github.com/r3volution11/material-theme-bear-notes) (by [Doug C. Hardester](https://github.com/r3volution11)) - [Slack Themes](https://github.com/mallowigi/slack-themes) - Porting of the Material Theme to Slack - [Gmail](https://userstyles.org/styles/174257/material-dark-gmail) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) - [Google Calendar](https://userstyles.org/styles/174228/material-dark-google-calendar) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) - [Google Keep](https://userstyles.org/styles/174291/material-dark-google-keep) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) - [Trello](https://userstyles.org/styles/167605/material-dark-trello) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) - [GitHub](https://github.com/CharlieEtienne/material-github) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) - [Google](https://github.com/CharlieEtienne/material-google) (by [@Charlie Etienne](https://github.com/CharlieEtienne)) ## Icon Reference - All file icons have been built using the tools provided by [A File Icon](https://github.com/SublimeText/AFileIcon). Great thanks to them! - And of course many thanks to the SVG creators: * [**File-Icons**](https://github.com/file-icons/source/blob/master/charmap.md) * [**FontAwesome 4.7.0**](http://fontawesome.io/cheatsheet/) * [**Mfizz**](https://github.com/file-icons/MFixx/blob/master/charmap.md) * [**Devicons**](https://github.com/file-icons/DevOpicons/blob/master/charmap.md) * [**Octicons**](https://octicons.github.com) * [**Material Design Icons**](https://materialdesignicons.com/) * [**Many FlatIcons authors**](https://www.flaticon.com/) * [**Philipp Kief**](https://github.com/PKief/vscode-material-icon-theme) Thanks also for [@yonnyz](https://twitter.com/yonnyz) for the theme icons! Also many thanks to other plugin developers for helping me solving A LOT of issues: * [Nyan Progress Bar](https://plugins.jetbrains.com/plugin/8575-nyan-progress-bar) * [Afterglow Theme](https://plugins.jetbrains.com/plugin/8066-afterglow-theme) * [Git Toolbox](https://plugins.jetbrains.com/plugin/7499-gittoolbox) * [Browse Word At Caret](https://plugins.jetbrains.com/plugin/201-browsewordatcaret) * [GitIgnore](https://github.com/hsz/idea-gitignore) * [Project Label](https://github.com/drinchev/project-label) Thanks to all [original plugin contributors](https://github.com/ChrisRM/material-theme-jetbrains/graphs/contributors), [EAP contributors](https://github.com/mallowigi/material-theme-jetbrains-docs/graphs/contributors) and a special thanks to the guys at [JetBrains](https://www.jetbrains.com/) for contributing and showing interest in the project! ## Other Projects Check out my other projects: - [Image Icon Plugin](https://plugins.jetbrains.com/plugin/11096-image-icon-viewer) - A previewer for small images and svgs directly in the Project View - [Atom Material Icons](https://plugins.jetbrains.com/plugin/10044-atom-material-icons) - A mix of the Atom File Icons and the Material Icons, or if you prefer, the Icons component of this plugin :) - [Custom Syntax Highlighter](https://github.com/mallowigi/Custom-Syntax-Highlighter) - Proof of concept for defining custom keywords highlighting. - [Material Theme UI for Chrome](https://chrome.google.com/webstore/detail/material-devtools-theme-c/jmefikbdhgocdjeejjnnepgnfkkbpgjo) - Porting of the Material Theme for Chrome - [Slack Themes](https://github.com/mallowigi/slack-themes) - Porting of the Material Theme to Slack ## Contributors This project exists thanks to all the people who contribute. <a href="graphs/contributors"><img src="https://opencollective.com/atom-material-themes-and-plugins/contributors.svg?width=890&button=false" /></a> ## Backers Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/atom-material-themes-and-plugins#backer)] <a href="https://opencollective.com/atom-material-themes-and-plugins#backers" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/backers.svg?width=890"></a> Check also : <https://www.material-theme.com/docs/support-us/> ## Sponsors Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/atom-material-themes-and-plugins#sponsor)] <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/0/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/1/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/2/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/3/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/4/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/5/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/6/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/7/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/8/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/atom-material-themes-and-plugins/sponsor/9/website" target="_blank"><img src="https://opencollective.com/atom-material-themes-and-plugins/sponsor/9/avatar.svg"></a>
0
topjohnwu/libsu
A complete solution for apps using root permissions
null
# libsu [![](https://jitpack.io/v/topjohnwu/libsu.svg)](https://jitpack.io/#topjohnwu/libsu) An Android library providing a complete solution for apps using root permissions. `libsu` comes with 2 main components: the `core` module handles the creation of the Unix (root) shell process and wraps it with high level, robust Java APIs; the `service` module handles the launching, binding, and management of root services over IPC, allowing you to run Java/Kotlin and C/C++ code (via JNI) with root permissions. ## [Changelog](./CHANGELOG.md) ## [Javadoc](https://topjohnwu.github.io/libsu/) ## Download ```groovy android { compileOptions { // The library uses Java 8 features sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } repositories { maven { url 'https://jitpack.io' } } dependencies { def libsuVersion = '5.2.2' // The core module that provides APIs to a shell implementation "com.github.topjohnwu.libsu:core:${libsuVersion}" // Optional: APIs for creating root services. Depends on ":core" implementation "com.github.topjohnwu.libsu:service:${libsuVersion}" // Optional: Provides remote file system support implementation "com.github.topjohnwu.libsu:nio:${libsuVersion}" } ``` ## Quick Tutorial Please note that this is a quick demo going through the key features of `libsu`. Please read the full Javadoc and check out the example app (`:example`) in this project for more details. ### Configuration Similar to threads where there is a special "main thread", `libsu` also has the concept of the "main shell". For each process, there is a single globally shared "main shell" that is constructed on-demand and cached. Set default configurations before the main `Shell` instance is created: ```java public class SplashActivity extends Activity { static { // Set settings before the main shell can be created Shell.enableVerboseLogging = BuildConfig.DEBUG; Shell.setDefaultBuilder(Shell.Builder.create() .setFlags(Shell.FLAG_REDIRECT_STDERR) .setTimeout(10) ); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Preheat the main root shell in the splash screen // so the app can use it afterwards without interrupting // application flow (e.g. root permission prompt) Shell.getShell(shell -> { // The main shell is now constructed and cached // Exit splash screen and enter main activity Intent intent = new Intent(this, MainActivity.class); startActivity(intent); finish(); }); } } ``` ### Shell Operations `Shell` operations can be performed through static `Shell.cmd(...)` methods that directly use the main root shell: ```java Shell.Result result; // Execute commands synchronously result = Shell.cmd("find /dev/block -iname boot").exec(); // Aside from commands, you can also load scripts from InputStream. // This is NOT like executing a script like "sh script.sh", but rather // more similar to sourcing the script (". script.sh"). result = Shell.cmd(getResources().openRawResource(R.raw.script)).exec(); List<String> out = result.getOut(); // stdout int code = result.getCode(); // return code of the last command boolean ok = result.isSuccess(); // return code == 0? // Async APIs Shell.cmd("setenforce 0").submit(); // submit and don't care results Shell.cmd("sleep 5", "echo hello").submit(result -> updateUI(result)); // Run tasks and output to specific Lists List<String> mmaps = new ArrayList<>(); Shell.cmd("cat /proc/1/maps").to(mmaps).exec(); List<String> stdout = new ArrayList<>(); List<String> stderr = new ArrayList<>(); Shell.cmd("echo hello", "echo hello >&2").to(stdout, stderr).exec(); // Receive output in real-time List<String> callbackList = new CallbackList<String>() { @Override public void onAddElement(String s) { updateUI(s); } }; Shell.cmd("for i in $(seq 5); do echo $i; sleep 1; done") .to(callbackList) .submit(result -> updateUI(result)); ``` ### Initialization Optionally, a similar concept to `.bashrc`, initialize shells with custom `Shell.Initializer`: ```java public class ExampleInitializer extends Shell.Initializer { @Override public boolean onInit(Context context, Shell shell) { InputStream bashrc = context.getResources().openRawResource(R.raw.bashrc); // Here we use Shell instance APIs instead of Shell.cmd(...) static methods shell.newJob() .add(bashrc) /* Load a script */ .add("export ENV_VAR=VALUE") /* Run some commands */ .exec(); return true; // Return false to indicate initialization failed } } Shell.Builder builder = /* Create a shell builder */ ; builder.setInitializers(ExampleInitializer.class); ``` ### Root Services If interacting with a root shell is too limited for your needs, you can also implement a root service to run complex code. A root service is similar to [Bound Services](https://developer.android.com/guide/components/bound-services) but running in a root process. `libsu` uses Android's native IPC mechanism, binder, for communication between your root service and the main application process. In addition to running Java/Kotlin code, loading native libraries with JNI is also supported (`android:extractNativeLibs=false` **is** allowed). For more details, please read the full Javadoc of `RootService` and check out the example app for more details. Add `com.github.topjohnwu.libsu:service` as a dependency to access `RootService`: ```java public class RootConnection implements ServiceConnection { ... } public class ExampleService extends RootService { @Override public IBinder onBind(Intent intent) { // return IBinder from Messenger or AIDL stub implementation } } RootConnection connection = new RootConnection(); Intent intent = new Intent(context, ExampleService.class); RootService.bind(intent, connection); ``` ##### Debugging Root Services If the application process creating the root service has a debugger attached, the root service will automatically enable debugging mode and wait for the debugger to attach. In Android Studio, go to **"Run > Attach Debugger to Android Process"**, tick the **"Show all processes"** box, and you should be able to manually attach to the remote root process. Currently, only the **"Java only"** debugger is supported. ### I/O Add `com.github.topjohnwu.libsu:nio` as a dependency to access remote file system APIs: ```java // Create the file system service in the root process // For example, create and send the service back to the client in a RootService public class ExampleService extends RootService { @Override public IBinder onBind(Intent intent) { return FileSystemManager.getService(); } } // In the client process IBinder binder = /* From the root service connection */; FileSystemManager remoteFS; try { remoteFS = FileSystemManager.getRemote(binder); } catch (RemoteException e) { // Handle errors } ExtendedFile bootBlock = remoteFS.getFile("/dev/block/by-name/boot"); if (bootBlock.exists()) { ExtendedFile bootBackup = remoteFS.getFile("/data/boot.img"); try (InputStream in = bootBlock.newInputStream(); OutputStream out = bootBackup.newOutputStream()) { // Do I/O stuffs... } catch (IOException e) { // Handle errors } } ``` ## License This project is licensed under the Apache License, Version 2.0. Please refer to `LICENSE` for the full text.
0
graphhopper/graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
astar dijkstra directions geospatial graphhopper isochrones java map-matching openstreetmap pathfinding public-transportation routing routing-engine
# GraphHopper Routing Engine ![Build Status](https://github.com/graphhopper/graphhopper/actions/workflows/build.yml/badge.svg?branch=master) GraphHopper is a fast and memory-efficient routing engine released under Apache License 2.0. It can be used as a Java library or standalone web server to calculate the distance, time, turn-by-turn instructions and many road attributes for a route between two or more points. Beyond this "A-to-B" routing it supports ["snap to road"](README.md#Map-Matching), [Isochrone calculation](README.md#Analysis), [mobile navigation](README.md#mobile-apps) and [more](README.md#Features). GraphHopper uses OpenStreetMap and GTFS data by default and it can import [other data sources too](README.md#OpenStreetMap-Support). # Community We have an open community and welcome everyone. Let us know your problems, use cases or just [say hello](https://discuss.graphhopper.com/). Please see our [community guidelines](https://graphhopper.com/agreements/cccoc.html). ## Questions All questions go to our [forum](https://discuss.graphhopper.com/) where we also have subsections specially for developers, mobile usage, and [our map matching component](./map-matching). You can also search [Stackoverflow](http://stackoverflow.com/questions/tagged/graphhopper) for answers. Please do not use our issue section for questions :) ## Contribute Read through [how to contribute](CONTRIBUTING.md) for information on topics like finding and fixing bugs and improving our documentation or translations! We even have [good first issues](https://github.com/graphhopper/graphhopper/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to get started. ## Get Started To get started you can try [GraphHopper Maps](README.md#graphhopper-maps), read through our documentation and install the GraphHopper Web Service locally. * 8.x: [documentation](https://github.com/graphhopper/graphhopper/blob/8.x/docs/index.md) , [web service jar](https://repo1.maven.org/maven2/com/graphhopper/graphhopper-web/8.0/graphhopper-web-8.0.jar) , [announcement](https://www.graphhopper.com/blog/2023/10/18/graphhopper-routing-engine-8-0-released/) * unstable master: [documentation](https://github.com/graphhopper/graphhopper/blob/master/docs/index.md) <details><summary>Click to see older releases</summary> * See our [changelog file](./CHANGELOG.md) for Java API Changes. * 7.x: [documentation](https://github.com/graphhopper/graphhopper/blob/7.x/docs/index.md) , [web service jar](https://repo1.maven.org/maven2/com/graphhopper/graphhopper-web/7.0/graphhopper-web-7.0.jar) , [announcement](https://www.graphhopper.com/blog/2023/03/14/graphhopper-routing-engine-7-0-released/) * 6.x: [documentation](https://github.com/graphhopper/graphhopper/blob/6.x/docs/index.md) , [web service jar](https://repo1.maven.org/maven2/com/graphhopper/graphhopper-web/6.2/graphhopper-web-6.2.jar) , [announcement](https://www.graphhopper.com/blog/2022/09/19/graphhopper-routing-engine-6-0-released/) * 5.x: [documentation](https://github.com/graphhopper/graphhopper/blob/5.x/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/5.3/graphhopper-web-5.3.jar) , [announcement](https://www.graphhopper.com/blog/2022/03/23/graphhopper-routing-engine-5-0-released/) * 4.x: [documentation](https://github.com/graphhopper/graphhopper/blob/4.x/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/4.0/graphhopper-web-4.0.jar) , [announcement](https://www.graphhopper.com/blog/2021/09/29/graphhopper-routing-engine-4-0-released/) * 3.x: [documentation](https://github.com/graphhopper/graphhopper/blob/3.x/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/3.2/graphhopper-web-3.2.jar) , [announcement](https://www.graphhopper.com/blog/2021/05/18/graphhopper-routing-engine-3-0-released/) * 2.x: [documentation](https://github.com/graphhopper/graphhopper/blob/2.x/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/2.4/graphhopper-web-2.4.jar) , [announcement](https://www.graphhopper.com/blog/2020/09/30/graphhopper-routing-engine-2-0-released/) * 1.0: [documentation](https://github.com/graphhopper/graphhopper/blob/1.0/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/1.0/graphhopper-web-1.0.jar) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/1.0/graphhopper-android-1.0.apk) , [announcement](https://www.graphhopper.com/blog/2020/05/25/graphhopper-routing-engine-1-0-released/) * 0.13.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.13/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/0.13.0/graphhopper-web-0.13.0.jar) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.13.0/graphhopper-android-0.13.0.apk) , [announcement](https://www.graphhopper.com/blog/2019/09/18/graphhopper-routing-engine-0-13-released/) * 0.12.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.12/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/0.12.0/graphhopper-web-0.12.0.jar) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.12.0/graphhopper-android-0.12.0.apk) , [announcement](https://www.graphhopper.com/blog/2019/03/26/graphhopper-routing-engine-0-12-released/) * 0.11.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.11/docs/index.md) , [web service jar](https://github.com/graphhopper/graphhopper/releases/download/0.11.0/graphhopper-web-0.11.0.jar) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.11.0/graphhopper-android-0.11.0.apk) , [announcement](https://www.graphhopper.com/blog/2018/09/17/graphhopper-routing-engine-0-11-release-open-sourcing-the-isochrone-module/) * 0.10.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.10/docs/index.md) , [web service zip](https://github.com/graphhopper/graphhopper/releases/download/0.10.3/graphhopper-web-0.10.3-bin.zip) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.10.3/graphhopper-android-0.10.3.apk) , [announcement](https://www.graphhopper.com/blog/2018/03/08/graphhopper-routing-engine-0-10-released/) * 0.9.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.9/docs/index.md) , [web service zip](https://github.com/graphhopper/graphhopper/releases/download/0.9.0/graphhopper-web-0.9.0-bin.zip) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.9.0/graphhopper-android-0.9.0.apk) , [announcement](https://www.graphhopper.com/blog/2017/05/31/graphhopper-routing-engine-0-9-released/) * 0.8.2: [documentation](https://github.com/graphhopper/graphhopper/blob/0.8/docs/index.md) , [web service zip](https://github.com/graphhopper/graphhopper/releases/download/0.8.2/graphhopper-web-0.8.2-bin.zip) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.8.2/graphhopper-android-0.8.2.apk) , [announcement](https://www.graphhopper.com/blog/2016/10/18/graphhopper-routing-engine-0-8-released/) * 0.7.0: [documentation](https://github.com/graphhopper/graphhopper/blob/0.7/docs/index.md) , [web service zip](https://github.com/graphhopper/graphhopper/releases/download/0.7.0/graphhopper-web-0.7.0-bin.zip) , [Android APK](https://github.com/graphhopper/graphhopper/releases/download/0.7.0/graphhopper-android-0.7.0.apk) , [announcement](https://www.graphhopper.com/blog/2016/06/15/graphhopper-routing-engine-0-7-released/) </details> ## Installation To install the [GraphHopper Maps](https://graphhopper.com/maps/) UI and the web service locally you [need a JVM](https://adoptium.net) (>= Java 17) and do: ```bash wget https://repo1.maven.org/maven2/com/graphhopper/graphhopper-web/8.0/graphhopper-web-8.0.jar https://raw.githubusercontent.com/graphhopper/graphhopper/8.x/config-example.yml http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf java -D"dw.graphhopper.datareader.file=berlin-latest.osm.pbf" -jar graphhopper*.jar server config-example.yml ``` After a while you see a log message with 'Server - Started', then go to http://localhost:8989/ and you'll see a map of Berlin. You should be able to right click on the map to create a route. See the [documentation](./docs/index.md) that contains e.g. [the elevation guide](./docs/core/elevation.md) and the [deployment guide](./docs/core/deploy.md). ### Docker The Docker images created by the community from the `master` branch can be found [here](https://hub.docker.com/r/israelhikingmap/graphhopper) (currently daily). See the [Dockerfile](https://github.com/IsraelHikingMap/graphhopper-docker-image-push) for more details. ## GraphHopper Maps To see the road routing feature of GraphHopper in action please go to [GraphHopper Maps](https://graphhopper.com/maps). [![GraphHopper Maps](https://www.graphhopper.com/wp-content/uploads/2022/10/maps2-1024x661.png)](https://graphhopper.com/maps) GraphHopper Maps is an open source user interface, which you can find [here](https://github.com/graphhopper/graphhopper-maps). It can use this open source routing engine or the [GraphHopper Directions API](https://www.graphhopper.com), which provides the Routing API, a Route Optimization API (based on [jsprit](http://jsprit.github.io/)), a fast Matrix API and an address search (based on [photon](https://github.com/komoot/photon)). The photon project is also supported by the GraphHopper GmbH. Additionally to the GraphHopper Directions API, map tiles from various providers are used where the default is [Omniscale](http://omniscale.com/). All this is available for free, via encrypted connections and from German servers for a nice and private route planning experience! ## Public Transit [Get started](./reader-gtfs/README.md#quick-start) [![Realtime Demo](https://www.graphhopper.com/wp-content/uploads/2018/05/Screen-Shot-2018-05-16-at-21.23.25-600x538.png)](./reader-gtfs/README.md#quick-start) ## Mobile Apps ### Online There is a [web service](./navigation) that can be consumed by [our navigation Android client](https://github.com/graphhopper/graphhopper-navigation-example). [![android navigation demo app](https://raw.githubusercontent.com/graphhopper/graphhopper-navigation-example/master/files/graphhopper-navigation-example.png)](https://github.com/graphhopper/graphhopper-navigation-example) ### Offline Offline routing is [no longer officially supported](https://github.com/graphhopper/graphhopper/issues/1940) but should still work. See [version 1.0](https://github.com/graphhopper/graphhopper/blob/1.0/docs/android/index.md) with still an Android demo and [this pull request](http://github.com/graphhopper/graphhopper-ios) of the iOS fork including a demo for iOS. [![simple routing](https://www.graphhopper.com/wp-content/uploads/2016/10/android-demo-screenshot-2.png)](./android/README.md) ## Analysis Use isochrones to calculate and visualize the reachable area for a certain travel mode ### [Isochrone Web API](./docs/web/api-doc.md#isochrone) [![Isochrone API image](./docs/isochrone/images/isochrone.png)](./docs/web/api-doc.md#isochrone) ### [Shortest Path Tree API](//www.graphhopper.com/blog/2018/07/04/high-precision-reachability/) [![high precision reachability image](https://www.graphhopper.com/wp-content/uploads/2018/06/berlin-reachability-768x401.png)](https://www.graphhopper.com/blog/2018/07/04/high-precision-reachability/) To support these high precision reachability approaches there is the /spt endpoint (shortest path tree). [See #1577](https://github.com/graphhopper/graphhopper/pull/1577) ### [Map Matching](./map-matching) There is the map matching subproject to snap GPX traces to the road. [![map-matching-example](https://raw.githubusercontent.com/graphhopper/directions-api-doc/master/web/img/map-matching-example.gif)](./map-matching) # Technical Overview GraphHopper supports several routing algorithms, such as <a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">Dijkstra</a> and <a href="https://en.wikipedia.org/wiki/A*_search_algorithm">A</a>`*` and its bidirectional variants. Furthermore, it allows you to use <a href="https://en.wikipedia.org/wiki/Contraction_hierarchies">Contraction Hierarchies</a> (CH) very easily. We call this **speed mode**; without this CH preparation, we call it **flexible mode**. The speed mode comes with very fast and lightweight (less RAM) responses and it does not use heuristics. However, only predefined vehicle profiles are possible and this additional CH preparation is time and resource consuming. Then there is the **hybrid mode** which also requires more time and memory for the preparation, but it is much more flexible regarding changing properties per request or e.g. integrating traffic data. Furthermore, this hybrid mode is slower than the speed mode, but it is an order of magnitude faster than the flexible mode and uses less RAM for one request. If the preparations exist you can switch between all modes at request time. Read more about the technical details [here](./docs/core/technical.md). ## License We chose the Apache License to make it easy for you to embed GraphHopper in your products, even closed source. We suggest that you contribute back your changes, as GraphHopper evolves fast. ## OpenStreetMap Support OpenStreetMap is directly supported by GraphHopper. Without the amazing data from OpenStreetMap, GraphHopper wouldn't be possible at all. Other map data will need a custom import procedure, see e.g. <a href="https://github.com/graphhopper/graphhopper/issues/277">Ordnance Survey</a>, <a href="https://github.com/graphhopper/graphhopper-reader-shp">Shapefile like ESRI</a> or <a href="https://github.com/OPTITOOL/morituri">Navteq</a>. ## Written in Java GraphHopper is written in Java and officially runs on Linux, Mac OS X and Windows. ### Maven Embed GraphHopper with OpenStreetMap support into your Java application via the following snippet: ```xml <dependency> <groupId>com.graphhopper</groupId> <artifactId>graphhopper-core</artifactId> <version>[LATEST-VERSION]</version> </dependency> ``` See [our example application](./example/src/main/java/com/graphhopper/example/RoutingExample.java) to get started fast. ## Customizable You can customize GraphHopper with Java knowledge (with a high and low level API) and also without Java knowledge using the [custom models](./docs/core/custom-models.md). ### Web API With the web module, we provide code to query GraphHopper over HTTP and decrease bandwidth usage as much as possible. For that we use an efficient polyline encoding, the Ramer–Douglas–Peucker algorithm, and a simple GZIP servlet filter. On the client side, we provide a [Java](./client-hc) and [JavaScript](https://github.com/graphhopper/directions-api-js-client) client. ### Desktop GraphHopper also runs on the Desktop in a Java application without internet access. For debugging purposes GraphHopper can produce vector tiles, i.e. a visualization of the road network in the browser (see #1572). Also a more low level Swing-based UI is provided via MiniGraphUI in the tools module, see some visualizations done with it [here](https://graphhopper.com/blog/2016/01/19/alternative-roads-to-rome/). A fast and production ready map visualization for the Desktop can be implemented via [mapsforge](https://github.com/mapsforge/mapsforge) or [mapsforge vtm](https://github.com/mapsforge/vtm). # Features Here is a list of the more detailed features: * Works out of the box with OpenStreetMap (osm/xml and pbf) and can be adapted to custom data * OpenStreetMap integration: stores and considers road type, speed limit, the surface, barriers, access restrictions, ferries, [conditional access restrictions](https://github.com/graphhopper/graphhopper/pull/621), ... * GraphHopper is fast. And with the so called "Contraction Hierarchies" it can be even faster (enabled by default). * Memory efficient data structures, algorithms and [the low and high level API](./docs/core/low-level-api.md) is tuned towards ease of use and efficiency * Pre-built routing profiles: car, bike, racing bike, mountain bike, foot, hike, motorcycle, ... * [Customization of these profiles](./docs/core/profiles.md#custom-profiles) are possible and e.g. get truck routing or support for cargo bikes and [many other changes](https://www.graphhopper.com/blog/2020/05/31/examples-for-customizable-routing/) * Provides a powerful [web API](./docs/web/api-doc.md) that exposes the data from OpenStreetMap and allows customizing the vehicle profiles per request. With JavaScript and Java clients. * Does [map matching](./map-matching) * Supports public transit routing and [GTFS](./reader-gtfs/README.md). * Offers turn instructions in more than 45 languages, contribute or improve [here](./docs/core/translations.md) * Displays and takes into account [elevation data](./docs/core/elevation.md) * [Alternative routes](https://discuss.graphhopper.com/t/alternative-routes/424) * [Turn costs and restrictions](./docs/core/turn-restrictions.md) * Country specific routing via country rules * Allows customizing routing behavior using custom areas * The core uses only a few dependencies (hppc, jts, janino and slf4j) * Scales from small indoor-sized to world-wide-sized graphs * Finds nearest point on street e.g. to get elevation or 'snap to road' or being used as spatial index (see [#1485](https://github.com/graphhopper/graphhopper/pull/1485)) * Calculates isochrones and [shortest path trees](https://github.com/graphhopper/graphhopper/pull/1577) * Shows the whole road network in the browser for debugging purposes ("vector tile support") [#1572](https://github.com/graphhopper/graphhopper/pull/1572) * Shows details along a route like road_class or max_speed ("path details") [#1142](https://github.com/graphhopper/graphhopper/pull/1142) * Written Java and simple start for developers via Maven.
0
jzyong/game-server
Distributed Java game server, including cluster management server, gateway server, hall server, game logic server, background monitoring server and a running web version of fishing. State machine, behavior tree, A* pathfinding, navigation mesh and other AI tools
ai astar-algorithm behavior-tree chess distributed fish game gate java mina mmo mmorpg-server navmesh netty quad-tree rpg server
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jzyong/game-server/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/jzyong/game-server?style=social)](https://github.com/jzyong/game-server/stargazers) [![GitHub forks](https://img.shields.io/github/forks/jzyong/game-server?style=social)](https://github.com/jzyong/game-server/network) 简介 ==== 一个基于棋牌、MMORPG游戏的分布式java游戏服务器,理论上可以无限水平扩展网关服,大厅服、游戏服达到人数承载。实现了集群注册中心,网关、登陆、后台服务器监控等通用服务器;封装了redis集群、mongodb等数据库处理;封装了消息队列、线程模型、及导表等常用工具类。网关服务器使用mina封装了TCP、UDP、WebSocket、HTTP通信,使该框架能同时支持多种协议的客户端进行游戏。每个以scripts名字结尾的目录都为相应项目的脚本文件。 ![项目架构图](https://raw.githubusercontent.com/jzyong/game-server/master/game-config/src/main/resources/image/server-architecture.jpg) 文档 --------- 详细请查看[wiki](https://github.com/jzyong/game-server/wiki) 项目已停止维护: * 新版本服务器 可参考 [GameServer4j](https://github.com/jzyong/GameServer4j) * game-ai 移动到[GameAi4j](https://github.com/jzyong/GameAi4j) 交流 --------- * QQ群:144709243(已满) 143469012 感谢 --------- <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width = "150" height = "150" div align=left /> [![contributors](https://contributors-img.web.app/image?repo=jzyong/game-server)](https://github.com/jzyong/game-server/graphs/contributors)
0
flyingsaucerproject/flyingsaucer
XML/XHTML and CSS 2.1 renderer in pure Java
null
# Flying Saucer [![Download](https://api.bintray.com/packages/flyingsaucerproject/maven/org.xhtmlrenderer%3Aflying-saucer/images/download.svg)](https://bintray.com/flyingsaucerproject/maven/org.xhtmlrenderer%3Aflying-saucer/_latestVersion) [![License: LGPL v2.1](https://img.shields.io/badge/license-LGPL--2.1-blue.svg)](https://www.gnu.org/licenses/lgpl-2.1) ## OVERVIEW Flying Saucer is a pure-Java library for rendering arbitrary well-formed XML (or XHTML) using CSS 2.1 for layout and formatting, output to Swing panels, PDF, and images. Comprehensive documentation available in [The Flying Saucer User's Guide](https://flyingsaucerproject.github.io/flyingsaucer/r8/guide/users-guide-R8.html). If you use Flying Saucer in a project, please tell us; it helps suggest directions for the code and may inspire other developers. ## LICENSE Flying Saucer is distributed under the LGPL. Flying Saucer itself is licensed under the GNU Lesser General Public License, version 2.1 or later, available at http://www.gnu.org/copyleft/lesser.html. You can use Flying Saucer in any way and for any purpose you want as long as you respect the terms of the license. A copy of the LGPL license is included as `LICENSE-LGPL-2.1.txt` or `LICENSE-LGPL-3.txt` in our distributions and in our source tree. Flying Saucer uses a couple of FOSS packages to get the job done. A list of these, along with the license they each have, is listed in the [`LICENSE`](https://github.com/flyingsaucerproject/flyingsaucer/blob/main/LICENSE) file in our distribution. ## GETTING FLYING SAUCER New releases of Flying Saucer are distributed through Maven. The available artifacts are: * `org.xhtmlrenderer:flying-saucer-core` - Core library and Java2D rendering * `org.xhtmlrenderer:flying-saucer-pdf` - PDF output using OpenPDF (ex. iText 2.x) * `org.xhtmlrenderer:flying-saucer-pdf-itext5` - PDF output using iText 5.x (iText 5 is EOL) * `org.xhtmlrenderer:flying-saucer-pdf-openpdf` - not supported anymore (replaced by `flying-saucer-pdf`) * `org.xhtmlrenderer:flying-saucer-swt` - SWT output * `org.xhtmlrenderer:flying-saucer-log4j` - Logging plugin for log4j Flying Saucer from version 9.5.0, requires Java 11 or later. Flying Saucer from version 9.6.0, requires Java 17 or later. ## GETTING STARTED See the sample code under the `flying-saucer-examples` directory. `flying-saucer-core`, `flying-saucer-pdf`, and `flying-saucer-swt` must be on the build path, as well as the SWT JAR for your OS. `org.xhtmlrenderer.demo.browser.BrowserStartup` will start the browser demo. Other notable entry points include: * `org.xhtmlrenderer.simple.XHTMLPanel` * `org.xhtmlrenderer.simple.PDFRenderer` * `org.xhtmlrenderer.simple.ImageRenderer` ## CONTACT See the [discussion group](https://groups.google.com/g/flying-saucer-users) for ongoing discussions. ## PROJECT STATUS Excerpt from the latest [merge/release policy](https://groups.google.com/forum/#!topic/flying-saucer-users/ySI8HrLI70A): > If you create a PR that can merge without conflicts, I'll merge it. I might ask for additional changes (or feedback from others), but I expect that will be extremely rare. > > The basic contract is this: If you're still using Flying Saucer, need something changed, and are willing to do the work yourself, the change will be accepted and released. > > Along that line, please also let me know if you need a release done right away. Otherwise, I'll bundle up the changes and do a release every four to six months as long as it's required. This is also the reason why Issues are currently deactivated on GitHub. ### HISTORIC LINKS * [Website](https://code.google.com/archive/p/flying-saucer/) * [Google Code project page (archived/read-only)](https://code.google.com/archive/p/flying-saucer/) * [Google Code Issues (archived/read-only)](https://code.google.com/archive/p/flying-saucer/issues)
0
pinterest/teletraan
Teletraan is Pinterest's deploy system.
null
### Teletraan Deploy Service ![](https://github.com/pinterest/teletraan/blob/master/docs/misc/images/TeletraanIntro.png) ### What is Teletraan? Teletraan is Pinterest's deploy system. It deploys thousands of Pinterest internal services, supports tens of thousands hosts, and has been running in production for over many years. It empowers Pinterest Engineers to deliver their code to pinners fast and safe. Check out the [wiki](https://github.com/pinterest/teletraan/wiki) or blog post [Under the hood: Teletraan Deploy System](https://medium.com/@Pinterest_Engineering/under-the-hood-teletraan-deploy-system-1e5caa774a63) for more details. The name Teletraan comes from a character in the Transformer TV series! [wikipedia](https://en.wikipedia.org/wiki/List_of_Transformers_supporting_characters#Teletran_3) ### Why use Teletraan? Teletraan is designed to do one thing and one thing only - deploy. It supports critical features such as 0 downtime deploy, rollback, staging, continuous deploy; and many convenient developer facing features such as showing commit details, comparing different deploys, notifying deploy state changes through email or slack, displaying metrics and more. Teletraan does not support container based deploy yet. Currently you can still use Teletraan Deploy Scripts to call docker or docker-compose to run containers. ### How to use Teletraan? Teletraan is designed to be a flexible building block. You can plug Teletraan into your existing release workflow given the following requirements met: * Run Deploy Agent on every host * Add Deploy Scripts to your application code * Publish Build Artifacts to Teletraan in the end of each build Check out [Integrate with Teletraan](https://github.com/pinterest/teletraan/wiki/Integrate-with-teletraan) for more details. ### Quick start [Quick start guide!](https://github.com/pinterest/teletraan/wiki/Quickstart-Guide) ### Documentation [Check out our wiki!](https://github.com/pinterest/teletraan/wiki) ### Help If you have any questions or comments, you can reach us at teletraan-users@googlegroups.com
0
eclipse/openvsx
An open-source registry for VS Code extensions
extension marketplace registry theia vscode
# Eclipse Open VSX [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/eclipse/openvsx) [![Join the chat at https://gitter.im/eclipse/openvsx](https://badges.gitter.im/eclipse/openvsx.svg)](https://gitter.im/eclipse/openvsx) [![CI](https://github.com/eclipse/openvsx/workflows/CI/badge.svg)](https://github.com/eclipse/openvsx/actions?query=workflow%3ACI) Open VSX is a [vendor-neutral](https://projects.eclipse.org/projects/ecd.openvsx) open-source alternative to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/vscode). It provides a server application that manages [VS Code extensions](https://code.visualstudio.com/api) in a database, a web application similar to the VS Code Marketplace, and a command-line tool for publishing extensions similar to [vsce](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce). A public instance of Open VSX is running at [open-vsx.org](https://open-vsx.org/). Please report issues related to that instance at [EclipseFdn/open-vsx.org](https://github.com/EclipseFdn/open-vsx.org). ## Getting Started See the [openvsx Wiki](https://github.com/eclipse/openvsx/wiki) for documentation of general concepts and usage of this project. ## Development The easiest way to get a development environment for this project is to open it in [Gitpod](https://gitpod.io/). [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/eclipse/openvsx) Click _Open Browser_ on port 3000 to see the running web application. ### cli * `yarn build` &mdash; build the library and `ovsx` command * `yarn watch` &mdash; watch (build continuously) The command line tool is available at `cli/lib/ovsx`. ### webui The default frontend is the one bundled in the Docker image, and is also used for testing in the development environment. It depends on the compiled library, so make sure to build or watch the library before you build or watch the default frontend. * `yarn build` &mdash; build the library * `yarn watch` &mdash; watch (build continuously) * `yarn build:default` &mdash; build the default frontend (run webpack) * `yarn watch:default` &mdash; run webpack in watch mode * `yarn start:default` &mdash; start Express to serve the frontend on port 3000 The Express server is started automatically in Gitpod. A restart is usually not necessary. ### server * `./gradlew build` &mdash; build and test the server * `./gradlew assemble -t` &mdash; build continuously (the server is restarted after every change) * `./gradlew runServer` &mdash; start the Spring server on port 8080 * `./scripts/test-report.sh` &mdash; display test results on port 8081 The Spring server is started automatically in Gitpod. It includes `spring-boot-devtools` which detects changes in the compiled class files and restarts the server. ### OAuth Setup If you would like to test authorization through GitHub, you need to [create an OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) with a callback URL pointing to the exposed port 8080 of your Gitpod workspace. You can get it by calling a script: ``` server/scripts/callback-url.sh github ``` Note that the callback URL needs to be [updated on GitHub](https://github.com/settings/developers) whenever you create a fresh Gitpod workspace. After you created the GitHub OAuth app, the next step is to copy the _Client ID_ and _Client Secret_ into [Gitpod environment variables](https://www.gitpod.io/docs/environment-variables/) named `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` and bound to this repository. If you change the variables in a running workspace, run `scripts/generate-properties.sh` in the `server` directory to update the application properties. With these settings in place, you should be able to log in by authorizing your OAuth app. ### Docker Compose Setup If you prefer to quickly get started with a local, docker-based development environment, you can use the approach described in our [docker compose setup](doc/development.md#using-docker-compose). You can use our docker compose profiles, allowing you the option to either run a service directly in a docker container or to manually build and run it on your local machine. ### Google Cloud Setup If you would like to test file storage via Google Cloud, follow these steps: * Create a [GCP](https://cloud.google.com/) project and a bucket. * Make the bucket public by granting the role "Storage Object Viewer" to `allUsers`. * [Configure CORS](https://cloud.google.com/storage/docs/configuring-cors#configure-cors-bucket) on the bucket with origin `"*"` and method `"GET"`. * Create environment variables named `GCP_PROJECT_ID` and `GCS_BUCKET_ID` containing your GCP project and bucket identifiers. If you change the variables in a running workspace, run `scripts/generate-properties.sh` in the `server` directory to update the application properties. * Create a GCP service account with role "Storage Object Admin" and copy its credentials file into your workspace. * Create an environment variable `GOOGLE_APPLICATION_CREDENTIALS` containing the path to the credentials file. ### Azure Setup If you would like to test file storage via Azure Blob, follow these steps: * Create a file [storage account](https://portal.azure.com/) and a container named `openvsx-resources` (a different name is possible if you change the `ovsx.storage.azure.blob-container` property). * Allow Blob public access in the storage account and set the container's public access level to "Blob". * Configure CORS in your storage account with origin `"*"`, method `"GET"` and allowed headers `"x-market-client-id, x-market-user-id, x-client-name, x-client-version, x-machine-id, x-client-commit"` * Create an environment variable `AZURE_SERVICE_ENDPOINT` with the "Blob service" URL of your storage account. If you change the variables in a running workspace, run `scripts/generate-properties.sh` in the `server` directory to update the application properties. * Generate a "Shared access signature" and put its token into an environment variable `AZURE_SAS_TOKEN`. If you also would like to test download count via Azure Blob, follow these steps: * Create an additional [storage account](https://portal.azure.com/) for diagnostics logging. * IMPORTANT: set the same location as the file storage account (e.g. North Europe). * Disable Blob public access. * In the file storage account * Open the diagnostic settings (`Monitoring` -> `Diagnostic settings (preview)`). * Click `blob`. * Click `Add diagnostic setting`. * Select `StorageRead`, `Transaction` and `Archive to a storage account`. * Select the diagnostic storage account you created in the previous step as `Storage account`. * Back to the diagnostic storage account * Navigate to `Data Storage`-> `Containers` * The `insights-logs-storageread` container should have been added (it might take a few minutes and you might need to do some test downloads or it won't get created). * Create a "Shared access token" for the `insights-logs-storageread` container. * Click on the `insights-logs-storageread` container. * Click on `Settings` -> `Shared access token` * Must have `Read` and `List` permissions. * Set the expiry date to a reasonable value * Set the "Allowed IP Addresses" to the server's IP address. * Go to `Data Management`-> `Lifecycle management` * Create a rule, so that logs don't pile up and the download count service stays performant. * Select `Limit blobs with filters`, `Block blobs` and `Base blobs`. * Pick number of days (e.g. 7). * Enter `insights-logs-storageread/resourceId=` blob prefix to limit the rule to the `insights-logs-storageread` container. * You need to add two environment variables to your server environment * `AZURE_LOGS_SERVICE_ENDPOINT` with the "Blob service" URL of your diagnostic storage account. The URL must end with a slash! * `AZURE_LOGS_SAS_TOKEN` with the shared access token for the `insights-logs-storageread` container. * If you change the variables in a running workspace, run `scripts/generate-properties.sh` in the `server` directory to update the application properties. ## License [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/)
0
lyrric/seckill
苗苗 约苗 九价 秒杀 脚本
null
# 约苗秒杀 (only小程序) ## 此项目已停止维护 非常抱歉,由于约苗后台做了限制,无法判断其逻辑,此项目已失效。 ## 须知 **共享资源,仅能用于学习,请勿用于商业。** **Sharing of resources, can only be used for learning, not for business!!!** ## 更新日志 - 2021.09.06 v1.5根据小程序的逻辑,修改了单线程版本的逻辑,使的单线程版本更加符合人为操作。 也修改了接口返回的cookie不会覆盖手工录入的cookie bug 在单线程版本未能成功抢到之前,不会再更新多线程版本 关于ecc-hs参数的猜想,ecc-hs参数的加密源来源于checkstock2接口返回的st时间,而该接口返回时会设置一个cookie,类似于b0612=afedbfbcd,其中b0612很明显是跟疫苗的id有关系的,疫苗id不同,key也不同 - 2021.05.25 v1.4长时间未抢到,目测是加密参数ecc-hs起作用了,之前忙一直用的是假的ecc-hs,所以完善了加密参数,增加了单线程版本在single-thread分支 - 2020.09.25 v1.3增加了加密参数ecc-hs(目前无用),秒杀时间提前至两秒,加大了并发数量 - 2020.09.17 v1.2增加了地区选择功能 - 2020.08.14 V1.1增加了控制台模式,通过java -jar sec-kill.jar -c 进入 优化了交互,减少了并发的数量避免操作频繁 - 2020.08.11 优化了req-header的解析,目测可以万能解析;优化了交互 - 2020.08.10 最终版,经测试已经成功抢到,不会添加新的功能了,不过后期还是会维护 - 2020.08.07 小程序版秒杀V1.0,基本测试99.99%(如果有BUG,那就是那0.01%) - 2020.08.07 小程序版秒杀V0.9,未测试,测试后转V1.0 - 2020.08.04 约苗秒杀功能转移至小程序,后期看能否抓包实现 - 2020.07.27 更新至V1.0版本,优化了秒杀逻辑,加入秒杀结果提示 - 2020.07.24 更新至V0.9版本,目前还差秒杀结果未展示 ## 界面 ### 主界面 ![markdown](https://raw.githubusercontent.com/lyrric/seckill/master/images/main.jpg "主界面图") ### 设置抓包数据 ![markdown](https://raw.githubusercontent.com/lyrric/seckill/master/images/header.jpg "设置抓包数据") ### 成员选择 ![markdown](https://raw.githubusercontent.com/lyrric/seckill/master/images/mamber.jpg "成员选择") ## 描述 约苗的秒杀太坑了,每次秒杀页面还没打开,就被抢光了,可恨!!!! ## 使用方法 前提: 一定要保证当前时间与互联网时间一致,精确到秒!!! 需要会用fiddler抓微信小程序的包,具体操作自行搜索(PC微信+fildder非常简单) ### 具体步骤 1. 抓取微信小程序的包header,格式大概如下: ``` GET https://miaomiao.scmttec.com/seckill/seckill/list.do?offset=0&limit=10&regionCode=5101 HTTP/1.1 Host: miaomiao.scmttec.com Connection: keep-alive accept: application/json, text/plain, */* tk: wxapptoken:10:56ce0d6ad845798561edd70a30d200d2207 cookie: _xzkj_=wxapptoken:10:56ce0db70a30dD charset: utf-8 x-requested-with: XMLHttpRequest content-type: application/json User-Agent: Mozilla/5.0 (Linux; Android 5.1.1; OPPO R17 Pro Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 MMWEBID/1042 MicroMessenger/7.0.17.1720(0x27001134) Process/appbrand0 WeChat/arm32 NetType/WIFI Language/zh_CN ABI/arm32 Accept-Encoding: gzip,compress,br,deflate Referer: https://servicewechat.com/wxff8cad2e9bf18719/4/page-frame.html ``` > 注意,这些并不是都是必须的,其实只需要包括tk、Cookie开头的的两行即可 2. 运行程序,点击设置Cookie,输入上一步抓取的包,点击解析,保存(如果格式与上面的例子的不一致,需要手动输入tk和cookie) 3. 点击设置成员,选中列表中的成员,点击确定(需要提前在约苗中填写) 4. 点击刷新疫苗列表,即可在列表中看到秒杀列表 5. 在秒杀开始的前一段时间(要保证cookie在有效期内),点击开始即可,程序会在距开始时间一定时间内启动并发秒杀 6. 抢购成功后,需要手动登录约苗小程序,选择接种日期(如果预约时间选择不了不用着急,系统会自动给你预约时间,有些秒杀无法选择接种时间,只能系统自动分配时间) ### 注意事项 1. 仅供交流使用,切勿用于商业用途 2. 并未测试小程序的Cookie的过期时间,大概是一个小时到两个小时之间 3. 目前代码只能在成都区域工作,后期考虑可能增加选择区域的功能 4. 同一个cookie和st可以多个程序使用,电脑配置高、带宽高的话,成功率高(限制了并发频率,不清楚是依据规则IP还是用户)
0
kaikramer/keystore-explorer
KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
null
# KeyStore Explorer [![Build Status](https://img.shields.io/github/actions/workflow/status/kaikramer/keystore-explorer/build_test.yml)](https://github.com/kaikramer/keystore-explorer/actions/workflows/build_test.yml) [![Release](https://img.shields.io/github/v/release/kaikramer/keystore-explorer)](https://github.com/kaikramer/keystore-explorer/releases) [![Downloads](https://img.shields.io/github/downloads/kaikramer/keystore-explorer/total)](https://tooomm.github.io/github-release-stats/?username=kaikramer&repository=keystore-explorer) [![License](https://img.shields.io/github/license/kaikramer/keystore-explorer)](https://github.com/kaikramer/keystore-explorer/blob/master/LICENSE) [![Packaging status](https://repology.org/badge/tiny-repos/keystore-explorer.svg)](https://repology.org/project/keystore-explorer/versions) KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner. Official website: https://keystore-explorer.org/ ![Screenshot](https://raw.githubusercontent.com/kaikramer/kaikramer.github.io/main/images/win10_mykeystore.png) ## Features: - Create, load, save and convert between various KeyStore types: JKS, JCEKS, PKCS#12, BKS (V1 and V2), UBER and BCFKS - Change KeyStore and KeyStore entry passwords - Delete or rename KeyStore entries - Cut/copy/paste KeyStore entries - Append certificates to key pair certificate chains - Generate RSA, ECC and DSA key pairs with self-signed X.509 certificates - Create CRLs - Apply X.509 certificate extensions to generated key pairs and Certificate Signing Requests (CSRs) - View X.509 Certificate, CRL and CRL entry X.509 V3 extensions - Import and export keys and certificates in many formats: PKCS#12, PKCS#8, PKCS#7, DER/PEM X.509 certificate files, Microsoft PVK, SPC, PKI Path, OpenSSL - Generate, view and sign CSRs in PKCS #10 and SPKAC formats - Sign JAR files - Configure a CA Certs KeyStore for use with KeyStore operations ## Building To do a clean build, issue the following command from the `kse` directory: $ ./gradlew clean build This runs the unit tests and builds the following artifacts: - `build/libs/kse.jar` - `build/distributions/kse-<version>.tar` - `build/distributions/kse-<version>.zip` You can then update an existing KSE installation by replacing its kse.jar (and if necessary the dependencies) with this one. Or extract the content of the ZIP/TAR file and use the start scripts from the `bin` directory to run KSE. The `build.gradle` file contains further instructions for building the platform specific distribution packages. Especially what the requirements are for executing the build commands. For the release ZIP package execute the following command (command works only under Windows because it generates kse.exe): $ ./gradlew zip For the Windows installer: $ ./gradlew innosetup For the macOS application: $ ./gradlew appbundler For the RPM package: $ ./gradlew buildRpm For the DEB package: $ ./gradlew buildDeb ## Running To run the application, issue the following command from the `kse` directory: $ ./gradlew run Or run `org/kse/KSE.java` directly from an IDE. ## Contributing We encourage you to contribute to KSE! Please check out the [Contributing to KSE guide](https://github.com/kaikramer/keystore-explorer/blob/master/CONTRIBUTING.md) for guidelines about how to proceed. ## License [GNU General Public License v3.0](https://github.com/kaikramer/keystore-explorer/blob/master/LICENSE)
0
motianhuo/wechat
A High Copy WeChat ,SNS APP (高仿微信)
null
WeChat === Social apps are popular all over the world, such as Facebook, Line, Whatsapp, and Kakao. Do you still worry about their own social project modules? Are you also thinking WeChat could be used to achieve it? Don't worry, come and look at this! This project is a high copy WeChat, and based on WeChat, due to some experience and UI optimization. Implementation features: - Text chat between friends, expressions, video calls, file transfer, etc. - Group chat - Add buddies from address book - Scan QR Code to add buddy, Scan QR Code to transfer between friends - WeChat public account information push - Circle of friends ** If you are interested in this project, please feel free to join our big open-source family! ** Image === <a href="https://github.com/motianhuo/wechat/tree/wechat2.0" alt="高仿微信2.0"> <img src="https://raw.githubusercontent.com/motianhuo/wechat/wechat2.0/pic_hd.jpg" /> </a> <a href="https://github.com/motianhuo/wechat/tree/wechat2.0" alt="高仿微信2.0"> 高仿微信2.0 点击图片进入 </a> Contact Me === <img src="http://worktests.oss-cn-hangzhou.aliyuncs.com/news/20180823153907.jpg" width="200" hegiht="200" align=center /> Download APK === <a href="https://raw.githubusercontent.com/motianhuo/wechat/master/WeChat/bin/WeChat.apk"> <img src="https://camo.githubusercontent.com/bdaf711a93d64d0bb5e5abfc346a8b84ea47f164/68747470733a2f2f706c61792e676f6f676c652e636f6d2f696e746c2f656e5f75732f6261646765732f696d616765732f67656e657269632f656e2d706c61792d62616467652e706e67" alt="Get on google play" height="60" border="0" data-canonical-src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" style="max-width:100%;"> </a> Usage === 1. SNS App (Travel Direction, Food Direction, Medical Direction, Game Direction, etc.) 2. Mobile Business Office 3. O2O (Online to Offline) Pull Requests === I will gladly accept pull requests for fixes and feature enhancements, but please do them in the develop branch. License ------- Copyright (c) 2015 Juns Alen 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
huaban/jieba-analysis
结巴分词(java版)
null
结巴分词(java版) jieba-analysis =============================== 首先感谢jieba分词原作者[fxsjy](https://github.com/fxsjy),没有他的无私贡献,我们也不会结识到结巴 分词. 同时也感谢jieba分词java版本的实现团队[huaban](https://github.com/huaban),他们的努力使得Java也能直接做出效果很棒的分词。 不过由于huaban已经没有再对java版进行维护,所以我自己对项目进行了开发。除了结巴分词(java版)所保留的原项目针对搜索引擎分词的功能(cut~forindex~、cut~forsearch~),我加入了tfidf的关键词提取功能,并且实现的效果和python的jieba版本的效果一模一样! (以下内容在基于[jieba-java版本README.md](https://github.com/huaban/jieba-analysis])的基础上,加入了对我新加入的tfidf关键词提取模块的相关说明) *** 简介 ==== 支持分词模式 ------------ - Search模式,用于对用户查询词分词 - Index模式,用于对索引文档分词 特性 ---- - 支持多种分词模式 - 全角统一转成半角 - 用户词典功能 - conf 目录有整理的搜狗细胞词库 - 因为性能原因,最新的快照版本去除词性标注,也希望有更好的 Pull Request 可以提供该功能。 **新特性:tfidf算法提取关键词** ```{.java} public static void main(String[] args) { String content="孩子上了幼儿园 安全防拐教育要做好"; int topN=5; TFIDFAnalyzer tfidfAnalyzer=new TFIDFAnalyzer(); List<Keyword> list=tfidfAnalyzer.analyze(content,topN); for(Keyword word:list) System.out.println(word.getName()+":"+word.getTfidfvalue()+","); // 防拐:0.1992,幼儿园:0.1434,做好:0.1065,教育:0.0946,安全:0.0924 } ``` <!-- 如何获取 ======== - 当前稳定版本 ``` {.xml} <dependency> <groupId>com.huaban</groupId> <artifactId>jieba-analysis</artifactId> <version>1.0.2</version> </dependency> ``` - 当前快照版本 ``` {.xml} <dependency> <groupId>com.huaban</groupId> <artifactId>jieba-analysis</artifactId> <version>1.0.3-SNAPSHOT</version> </dependency> ``` --> 如何使用 ======== - Demo ``` {.java} @Test public void testDemo() { JiebaSegmenter segmenter = new JiebaSegmenter(); String[] sentences = new String[] {"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。", "我不喜欢日本和服。", "雷猴回归人间。", "工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作", "结果婚的和尚未结过婚的"}; for (String sentence : sentences) { System.out.println(segmenter.process(sentence, SegMode.INDEX).toString()); } } ``` 算法(wiki补充...) ================= - \[ \] 基于 `trie` 树结构实现高效词图扫描 - \[ \] 生成所有切词可能的有向无环图 `DAG` - \[ \] 采用动态规划算法计算最佳切词组合 - \[ \] 基于 `HMM` 模型,采用 `Viterbi` (维特比)算法实现未登录词识别 性能评估 ======== - 测试机配置 ``` {.screen} Processor 2 Intel(R) Pentium(R) CPU G620 @ 2.60GHz Memory:8GB 分词测试时机器开了许多应用(eclipse、emacs、chrome...),可能 会影响到测试速度 ``` - *测试文本* - 测试结果(单线程,对测试文本逐行分词,并循环调用上万次) ``` {.screen} 循环调用一万次 第一次测试结果: time elapsed:12373, rate:2486.986533kb/s, words:917319.94/s 第二次测试结果: time elapsed:12284, rate:2505.005241kb/s, words:923966.10/s 第三次测试结果: time elapsed:12336, rate:2494.445880kb/s, words:920071.30/s 循环调用2万次 第一次测试结果: time elapsed:22237, rate:2767.593144kb/s, words:1020821.12/s 第二次测试结果: time elapsed:22435, rate:2743.167762kb/s, words:1011811.87/s 第三次测试结果: time elapsed:22102, rate:2784.497726kb/s, words:1027056.34/s 统计结果:词典加载时间1.8s左右,分词效率每秒2Mb多,近100万词。 2 Processor Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz 12G 测试效果 time elapsed:19597, rate:3140.428063kb/s, words:1158340.52/s time elapsed:20122, rate:3058.491639kb/s, words:1128118.44/s ``` 使用本库项目 ============ - [analyzer-solr](https://github.com/sing1ee/analyzer-solr) @sing1ee 许可证 ====== jieba(python版本)的许可证为MIT,jieba(java版本)的许可证为ApacheLicence 2.0 ``` {.screen} Copyright (C) 2013 Huaban 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. ```
0
spring-cloud/spring-cloud-openfeign
Support for using OpenFeign in Spring Cloud apps
feign openfeign spring spring-cloud
null
0
pengrad/java-telegram-bot-api
Telegram Bot API for Java
bot telegram telegram-api telegram-bot telegram-bot-api
# Java Telegram Bot API [![Maven Central](https://img.shields.io/maven-central/v/com.github.pengrad/java-telegram-bot-api.svg)](https://search.maven.org/artifact/com.github.pengrad/java-telegram-bot-api) [![codecov](https://codecov.io/gh/pengrad/java-telegram-bot-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pengrad/java-telegram-bot-api) Java library for interacting with [Telegram Bot API](https://core.telegram.org/bots/api) - Full support of all Bot API 7.2 methods - Telegram [Passport](https://core.telegram.org/passport) and Decryption API - Bot [Payments](https://core.telegram.org/bots/payments) - [Gaming Platform](https://telegram.org/blog/games) ## Download Gradle: ```groovy implementation 'com.github.pengrad:java-telegram-bot-api:7.2.1' ``` Maven: ```xml <dependency> <groupId>com.github.pengrad</groupId> <artifactId>java-telegram-bot-api</artifactId> <version>7.2.1</version> </dependency> ``` [JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases) ## Usage ```java // Create your bot passing the token received from @BotFather TelegramBot bot = new TelegramBot("BOT_TOKEN"); // Register for updates bot.setUpdatesListener(updates -> { // ... process updates // return id of last processed update or confirm them all return UpdatesListener.CONFIRMED_UPDATES_ALL; // Create Exception Handler }, e -> { if (e.response() != null) { // got bad response from telegram e.response().errorCode(); e.response().description(); } else { // probably network error e.printStackTrace(); } }); // Send messages long chatId = update.message().chat().id(); SendResponse response = bot.execute(new SendMessage(chatId, "Hello!")); ``` ## Documentation - [Creating your bot](#creating-your-bot) - [Making requests](#making-requests) - [Getting updates](#getting-updates) - [Available types](#available-types) - [Available methods](#available-methods) - [Updating messages](#updating-messages) - [Stickers](#stickers) - [Inline mode](#inline-mode) - [Payments](#payments) - [Telegram Passport](#telegram-passport) - [Games](#games) ### Creating your bot ```java TelegramBot bot = new TelegramBot("BOT_TOKEN"); ``` Network operations based on [OkHttp](https://github.com/square/okhttp) library. You can build bot with custom OkHttpClient, for specific timeouts or interceptors. ```java TelegramBot bot = new TelegramBot.Builder("BOT_TOKEN").okHttpClient(client).build(); ``` ### Making requests Synchronous ```java BaseResponse response = bot.execute(request); ``` Asynchronous ```java bot.execute(request, new Callback() { @Override public void onResponse(BaseRequest request, BaseResponse response) { } @Override public void onFailure(BaseRequest request, IOException e) { } }); ``` Request [in response to update](https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates) ```java String response = request.toWebhookResponse(); ``` ### Getting updates You can use **getUpdates** request, parse incoming **Webhook** request, or set listener to receive updates. Update object just copies Telegram's response. ```java class Update { Integer updateId(); Message message(); Message editedMessage(); InlineQuery inlineQuery(); ChosenInlineResult chosenInlineResult(); CallbackQuery callbackQuery(); } ``` #### Get updates Building request ```java GetUpdates getUpdates = new GetUpdates().limit(100).offset(0).timeout(0); ``` The getUpdates method returns the earliest 100 unconfirmed updates. To confirm an update, use the offset parameter when calling getUpdates like this: `offset = updateId of last processed update + 1` All updates with updateId less than offset will be marked as confirmed on the server and will no longer be returned. Executing ```java // sync GetUpdatesResponse updatesResponse = bot.execute(getUpdates); List<Update> updates = updatesResponse.updates(); ... Message message = update.message() // async bot.execute(getUpdates, new Callback<GetUpdates, GetUpdatesResponse>() { @Override public void onResponse(GetUpdates request, GetUpdatesResponse response) { List<Update> updates = response.updates(); } @Override public void onFailure(GetUpdates request, IOException e) { } }); ``` #### Webhook Building request ```java SetWebhook request = new SetWebhook() .url("url") .certificate(new byte[]{}) // byte[] .certificate(new File("path")); // or file ``` Executing ```java // sync BaseResponse response = bot.execute(request); boolean ok = response.isOk(); // async bot.execute(request, new Callback<SetWebhook, BaseResponse>() { @Override public void onResponse(SetWebhook request, BaseResponse response) { } @Override public void onFailure(SetWebhook request, IOException e) { } }); ``` Using Webhook you can parse request to Update ```java Update update = BotUtils.parseUpdate(stringRequest); // from String Update update = BotUtils.parseUpdate(reader); // or from java.io.Reader Message message = update.message(); ``` #### Updates Listener You can set a listener to receive incoming updates as if using Webhook. This will trigger executing getUpdates requests in a loop. ```java bot.setUpdatesListener(new UpdatesListener() { @Override public int process(List<Update> updates) { // process updates return UpdatesListener.CONFIRMED_UPDATES_ALL; } // Create Exception Handler }, new ExceptionHandler() { @override public void onException(TelegramException e) { if (e.response() != null) { // got bad response from telegram e.response().errorCode(); e.response().description(); } else { // probably network error e .printStackTrace(); } } }); ``` Listener should return id of the last processed (confirmed) update. To confirm all updates return `UpdatesListener.CONFIRMED_UPDATES_ALL`, this should be enough in most cases. To not confirm any updates return `UpdatesListener.CONFIRMED_UPDATES_NONE`, these updates will be redelivered. To set a specific update as last confirmed, just return the required updateId. To stop receiving updates ```java bot.removeGetUpdatesListener(); ``` ### Available types All types have the same name as original ones. Type's fields are methods in lowerCamelCase. Types used in responses **(Update, Message, User, Document...)** are in `com.pengrad.telegrambot.model` package. Types used in requests **(Keyboard, InlineQueryResult, ParseMode, InputMessageContent...)** are in `com.pengrad.telegrambot.model.request` package. When creating a request's type, required params should be passed in the constructor, optional params can be added in chains. #### Keyboards ForceReply, ReplyKeyboardRemove ```java Keyboard forceReply = new ForceReply(isSelective); // or just new ForceReply(); Keyboard replyKeyboardRemove = new ReplyKeyboardRemove(); // new ReplyKeyboardRemove(isSelective) ``` ReplyKeyboardMarkup ```java Keyboard replyKeyboardMarkup = new ReplyKeyboardMarkup( new String[]{"first row button1", "first row button2"}, new String[]{"second row button1", "second row button2"}) .oneTimeKeyboard(true) // optional .resizeKeyboard(true) // optional .selective(true); // optional ``` KeyboardButton ```java Keyboard keyboard = new ReplyKeyboardMarkup( new KeyboardButton[]{ new KeyboardButton("text"), new KeyboardButton("contact").requestContact(true), new KeyboardButton("location").requestLocation(true) } ); ``` InlineKeyboardMarkup ```java InlineKeyboardMarkup inlineKeyboard = new InlineKeyboardMarkup( new InlineKeyboardButton[]{ new InlineKeyboardButton("url").url("www.google.com"), new InlineKeyboardButton("callback_data").callbackData("callback_data"), new InlineKeyboardButton("Switch!").switchInlineQuery("switch_inline_query") }); ``` #### Chat Action ```java ChatAction action = ChatAction.typing; ChatAction action = ChatAction.upload_photo; ChatAction action = ChatAction.find_location; ``` ### Available methods All request methods have the same names as original ones. Required params should be passed in the constructor. Optional params can be added in chains. #### Send message All send requests **(SendMessage, SendPhoto, SendLocation...)** return **SendResponse** object that contains **Message**. ```java SendMessage request = new SendMessage(chatId, "text") .parseMode(ParseMode.HTML) .disableWebPagePreview(true) .disableNotification(true) .replyToMessageId(1) .replyMarkup(new ForceReply()); // sync SendResponse sendResponse = bot.execute(request); boolean ok = sendResponse.isOk(); Message message = sendResponse.message(); // async bot.execute(request, new Callback<SendMessage, SendResponse>() { @Override public void onResponse(SendMessage request, SendResponse response) { } @Override public void onFailure(SendMessage request, IOException e) { } }); ``` #### Formatting options ```java ParseMode parseMode = ParseMode.Markdown; ParseMode parseMode = ParseMode.HTML; ``` #### Get file ```java GetFile request = new GetFile("fileId") GetFileResponse getFileResponse = bot.execute(request); File file = getFileResponse.file(); // com.pengrad.telegrambot.model.File file.fileId(); file.filePath(); // relative path file.fileSize(); ``` To get downloading link as `https://api.telegram.org/file/<BOT_TOKEN>/<FILE_PATH>` ```java String fullPath = bot.getFullFilePath(file); // com.pengrad.telegrambot.model.File ``` #### Other requests All requests return BaseResponse if not mention here ```java class BaseResponse { boolean isOk(); int errorCode(); String description(); } ``` GetMe request returns GetMeResponse ```java class GetMeResponse { User user(); } ``` GetChatAdministrators ```java class GetChatAdministratorsResponse { List<ChatMember> administrators() } ``` GetChatMembersCount ```java class GetChatMembersCountResponse { int count() } ``` GetChatMember ```java class GetChatMemberResponse { ChatMember chatMember() } ``` GetChat ```java class GetChatResponse { Chat chat() } ``` GetUserProfilePhotos ```java class GetUserProfilePhotosResponse { UserProfilePhotos photos() } ``` StopPoll ```java class PollResponse { Poll poll() } ``` ### Updating messages Normal message ```java EditMessageText editMessageText = new EditMessageText(chatId, messageId, "new test") .parseMode(ParseMode.HTML) .disableWebPagePreview(true) .replyMarkup(new ReplyKeyboardRemove()); BaseResponse response = bot.execute(editMessageText); ``` Inline message ```java EditMessageText editInlineMessageText = new EditMessageText(inlineMessageId, "new text"); BaseResponse response = bot.execute(editInlineMessageText); ``` Delete message ```java DeleteMessage deleteMessage = new DeleteMessage(chatId, messageId); BaseResponse response = bot.execute(deleteMessage); ``` ### Stickers Send sticker ```java // File or byte[] or string fileId of existing sticker or string URL SendSticker sendSticker = new SendSticker(chatId, imageFile); SendResponse response = bot.execute(sendSticker); ``` Get sticker set ```java GetStickerSet getStickerSet = new GetStickerSet(stickerSet); GetStickerSetResponse response = bot.execute(getStickerSet); StickerSet stickerSet = response.stickerSet(); ``` Upload sticker file ```java // File or byte[] or string URL UploadStickerFile uploadStickerFile = new UploadStickerFile(chatId, stickerFile); GetFileResponse response = bot.execute(uploadStickerFile); ``` ### Inline mode Getting updates ```java GetUpdatesResponse updatesResponse = bot.execute(new GetUpdates()); List<Update> updates = updatesResponse.updates(); ... InlineQuery inlineQuery = update.inlineQuery(); ChosenInlineResult chosenInlineResult = update.chosenInlineResult(); CallbackQuery callbackQuery = update.callbackQuery(); ``` If using webhook, you can parse request to InlineQuery ```java Update update = BotUtils.parseUpdate(stringRequest); // from String Update update = BotUtils.parseUpdate(reader); // from java.io.Reader InlineQuery inlineQuery = update.inlineQuery(); ``` #### Inline query result ```java InlineQueryResult r1 = new InlineQueryResultPhoto("id", "photoUrl", "thumbUrl"); InlineQueryResult r2 = new InlineQueryResultArticle("id", "title", "message text").thumbUrl("url"); InlineQueryResult r3 = new InlineQueryResultGif("id", "gifUrl", "thumbUrl"); InlineQueryResult r4 = new InlineQueryResultMpeg4Gif("id", "mpeg4Url", "thumbUrl"); InlineQueryResult r5 = new InlineQueryResultVideo( "id", "videoUrl", InlineQueryResultVideo.MIME_VIDEO_MP4, "message", "thumbUrl", "video title") .inputMessageContent(new InputLocationMessageContent(21.03f, 105.83f)); ``` #### Answer inline query ```java BaseResponse response = bot.execute(new AnswerInlineQuery(inlineQuery.id(), r1, r2, r3, r4, r5)); // or full bot.execute( new AnswerInlineQuery(inlineQuery.id(), new InlineQueryResult[]{r1, r2, r3, r4, r5}) .cacheTime(cacheTime) .isPersonal(isPersonal) .nextOffset("offset") .switchPmParameter("pmParam") .switchPmText("pmText") ); ``` ### Payments Send invoice ```java SendInvoice sendInvoice = new SendInvoice(chatId, "title", "desc", "my_payload", "providerToken", "my_start_param", "USD", new LabeledPrice("label", 200)) .needPhoneNumber(true) .needShippingAddress(true) .isFlexible(true) .replyMarkup(new InlineKeyboardMarkup(new InlineKeyboardButton[]{ new InlineKeyboardButton("just pay").pay(), new InlineKeyboardButton("google it").url("www.google.com") })); SendResponse response = bot.execute(sendInvoice); ``` Answer shipping query ```java LabeledPrice[] prices = new LabeledPrice[]{ new LabeledPrice("delivery", 100), new LabeledPrice("tips", 50) }; AnswerShippingQuery answerShippingQuery = new AnswerShippingQuery(shippingQueryId, new ShippingOption("1", "VNPT", prices), new ShippingOption("2", "FREE", new LabeledPrice("free delivery", 0)) ); BaseResponse response = bot.execute(answerShippingQuery); // answer with error AnswerShippingQuery answerShippingError = new AnswerShippingQuery(id, "Can't deliver here!"); BaseResponse response = bot.execute(answerShippingError); ``` Answer pre-checkout query ```java AnswerPreCheckoutQuery answerCheckout = new AnswerPreCheckoutQuery(preCheckoutQueryId); BaseResponse response = bot.execute(answerPreCheckoutQuery); // answer with error AnswerPreCheckoutQuery answerCheckout = new AnswerPreCheckoutQuery(id, "Sorry, item not available"); BaseResponse response = bot.execute(answerPreCheckoutQuery); ``` ### Telegram Passport When the user confirms your request by pressing the ‘Authorize’ button, the Bot API sends an Update with the field `passport_data` to the bot that contains encrypted Telegram Passport data. [Telegram Passport Manual](https://core.telegram.org/passport#receiving-information) #### Receiving information You can get encrypted Passport data from Update (via UpdatesListener or Webhook) ```java PassportData passportData = update.message().passportData(); ``` PassportData contains anarray of `EncryptedPassportElement` and `EncryptedCredentials`. You need to decrypt `Credentials` using private key (public key you uploaded to `@BotFather`) ```java String privateKey = "..."; EncryptedCredentials encryptedCredentials = passportData.credentials(); Credentials credentials = encryptedCredentials.decrypt(privateKey); ``` These `Credentials` can be used to decrypt encrypted data in `EncryptedPassportElement`. ```java EncryptedPassportElement[] encryptedPassportElements = passportData.data(); for (EncryptedPassportElement element : encryptedPassportElements) { DecryptedData decryptedData = element.decryptData(credentials); // DecryptedData can be cast to specific type by checking instanceOf if (decryptedData instanceof PersonalDetails) { PersonalDetails personalDetails = (PersonalDetails) decryptedData; } // Or by checking type of passport element if (element.type() == EncryptedPassportElement.Type.address) { ResidentialAddress address = (ResidentialAddress) decryptedData; } } ``` `EncryptedPassportElement` also contains an array of `PassportFile` (file uploaded to Telegram Passport). You need to download them 1 by 1 and decrypt content. This library supports downloading and decryption, returns decrypted byte[] ```java EncryptedPassportElement element = ... // Combine all files List<PassportFile> files = new ArrayList<PassportFile>(); files.add(element.frontSide()); files.add(element.reverseSide()); files.add(element.selfie()); if (element.files() != null) { files.addAll(Arrays.asList(element.files())); } if (element.translation() != null) { files.addAll(Arrays.asList(element.translation())); } // Decrypt for (PassportFile file : files) { if (file == null) continue; byte[] data = element.decryptFile(file, credentials, bot); // GetFile request and decrypt content // save to file if needed new FileOutputStream("files/" + element.type()).write(data); } ``` #### Set Passport data errors ``` java SetPassportDataErrors setPassportDataErrors = new SetPassportDataErrors(chatId, new PassportElementErrorDataField("personal_details", "first_name", "dataHash", "Please enter a valid First name"), new PassportElementErrorSelfie("driver_license", "fileHash", "Can't see your face on photo") ); bot.execute(setPassportDataErrors); ``` ### Games Send game ```java SendResponse response = bot.execute(new SendGame(chatId, "my_super_game")); ``` Set game score ```java BaseResponse response = bot.execute(new SetGameScore(userId, score, chatId, messageId)); ``` Get game high scores ```java GetGameHighScoresResponse response = bot.execute(new GetGameHighScores(userId, chatId, messageId)); GameHighScore[] scores = response.result(); ```
0
moquette-io/moquette
Java MQTT lightweight broker
broker java moquette mqtt
ServerIntegrationOpenSSLTest![Java CI with Maven](https://github.com/moquette-io/moquette/workflows/Java%20CI%20with%20Maven/badge.svg?branch=main) ## Moquette Project [![Build Status](https://api.travis-ci.org/moquette-io/moquette.svg?branch=main)](https://travis-ci.org/moquette-io/moquette) * [Documentation reference guide](http://moquette-io.github.io/moquette/) Guide on how to use and configure Moquette * [Google Group](https://groups.google.com/forum/#!forum/moquette-mqtt) Google Group to participate in development discussions. Moquette aims to be a MQTT compliant broker. The broker supports QoS 0, QoS 1 and QoS 2. Its designed to be evented, uses Netty for the protocol encoding and decoding part. ## Embeddable [Freedomotic](https://www.freedomotic-iot.com/) is an home automation framework and uses Moquette embedded to interface with MQTT by a specific [plugin](https://freedomotic-user-manual.readthedocs.io/en/latest/plugins/mqtt-broker.html). Moquette is also used into [Atomize Spin](http://atomizesoftware.com/spin) a software solution for the logistic field. Part of moquette are used into the [Vertx MQTT module](https://github.com/giovibal/vertx-mqtt-broker-mod), into [MQTT spy](http://kamilfb.github.io/mqtt-spy/) and into [WSO2 Messge broker](http://techexplosives-pamod.blogspot.it/2014/05/mqtt-transport-architecture-wso2-mb-3x.html). ## 1 minute set up Start play with it, download the self distribution tar from [BinTray](https://bintray.com/artifact/download/andsel/generic/moquette-0.15.tar.gz) , the un untar and start the broker listening on `1883` port and enjoy! ``` tar xvf moquette-distribution-0.15.tar.gz cd bin ./moquette.sh ``` Or if you are on Windows shell ``` cd bin .\moquette.bat ``` ## Embedding in other projects Include dependency in your project: ``` <dependency> <groupId>io.moquette</groupId> <artifactId>moquette-broker</artifactId> <version>0.15</version> </dependency> ``` ## Build from sources After a git clone of the repository, cd into the cloned sources and: `./gradlew package`, at the end the distribution package is present at `distribution/target/distribution-0.17-SNAPSHOT-bundle.tar.gz` In distribution/target directory will be produced the selfcontained file for the broker with all dependencies and a running script.
0
broadinstitute/gatk
Official code repository for GATK versions 4 and up
bioinformatics dna gatk genome genomics ngs science sequencing spark
[![Build Status](https://github.com/broadinstitute/gatk/actions/workflows/gatk-tests.yml/badge.svg?branch=master)](https://github.com/broadinstitute/gatk/actions/workflows/gatk-tests.yml) [![Maven Central](https://img.shields.io/maven-central/v/org.broadinstitute/gatk.svg)](https://maven-badges.herokuapp.com/maven-central/org.broadinstitute/gatk) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ***Please see the [GATK website](http://www.broadinstitute.org/gatk), where you can download a precompiled executable, read documentation, ask questions, and receive technical support. For GitHub basics, see [here](https://software.broadinstitute.org/gatk/documentation/article?id=23405).*** ### GATK 4 This repository contains the next generation of the Genome Analysis Toolkit (GATK). The contents of this repository are 100% open source and released under the Apache 2.0 license (see [LICENSE.TXT](https://github.com/broadinstitute/gatk/blob/master/LICENSE.TXT)). GATK4 aims to bring together well-established tools from the [GATK](http://www.broadinstitute.org/gatk) and [Picard](http://broadinstitute.github.io/picard/) codebases under a streamlined framework, and to enable selected tools to be run in a massively parallel way on local clusters or in the cloud using [Apache Spark](http://spark.apache.org/). It also contains many newly developed tools not present in earlier releases of the toolkit. ## Table of Contents * [Requirements](#requirements) * [Quick Start Guide](#quickstart) * [Downloading GATK4](#downloading) * [Tools Included in Docker Image](#dockerSoftware) * [Building GATK4](#building) * [Running GATK4](#running) * [Passing JVM options to gatk](#jvmoptions) * [Passing a configuration file to gatk](#configFileOptions) * [Running GATK4 with inputs on Google Cloud Storage](#gcs) * [Running GATK4 Spark tools locally](#sparklocal) * [Running GATK4 Spark tools on a Spark cluster](#sparkcluster) * [Running GATK4 Spark tools on Google Cloud Dataproc](#dataproc) * [Using R to generate plots](#R) * [GATK Tab Completion for Bash](#tab_completion) * [For GATK Developers](#developers) * [General guidelines for GATK4 developers](#dev_guidelines) * [Testing GATK4](#testing) * [Using Git LFS to download and track large test data](#lfs) * [Creating a GATK project in the IntelliJ IDE](#intellij) * [Setting up debugging in IntelliJ](#debugging) * [Updating the Intellij project when dependencies change](#intellij_gradle_refresh) * [Setting up profiling using JProfiler](#jprofiler) * [Uploading Archives to Sonatype](#sonatype) * [Building GATK4 Docker images](#docker_building) * [Releasing GATK4](#releasing_gatk) * [Generating GATK4 documentation](#gatkdocs) * [Generating GATK4 WDL Wrappers](#gatkwdlgen) * [Using Zenhub to track github issues](#zenhub) * [Further Reading on Spark](#spark_further_reading) * [How to contribute to GATK](#contribute) * [Discussions](#discussions) * [Authors](#authors) * [License](#license) ## <a name="requirements">Requirements</a> * To run GATK: * Java 17 is needed to run or build GATK. We recommend one of the following: * Download the Eclipse Foundation's distribution of OpenJDK 17 from [adoptium.net](https://adoptium.net/). Navigate to the [release archive](https://adoptium.net/temurin/archive/?version=17) to find downloads for Java 17. * On Mac OS, you can install the [Homebrew package manager](https://brew.sh/) and run `brew tap homebrew/cask-versions` followed by `brew install --cask temurin17` to install the Eclipse Foundation's OpenJDK 17. * Python 2.6 or greater (required to run the `gatk` frontend script) * Python 3.6.2, along with a set of additional Python packages, is required to run some tools and workflows. See [Python Dependencies](#python) for more information. * R 3.2.5 (needed for producing plots in certain tools) * To build GATK: * A Java 17 JDK * Git 2.5 or greater * [git-lfs](https://git-lfs.github.com/) 1.1.0 or greater. Required to download the large files used to build GATK, and test files required to run the test suite. Run `git lfs install` after downloading, followed by `git lfs pull` from the root of your git clone to download all of the large files, including those required to run the test suite. The full download is approximately 5 gigabytes. Alternatively, if you are just building GATK and not running the test suite, you can skip this step since the build itself will use git-lfs to download the minimal set of large `lfs` resource files required to complete the build. The test resources will not be downloaded, but this greatly reduces the size of the download. * Gradle 5.6. We recommend using the `./gradlew` script which will download and use an appropriate gradle version automatically (see examples below). * R 3.2.5 (needed for running the test suite) * Pre-packaged Docker images with all needed dependencies installed can be found on [our dockerhub repository](https://hub.docker.com/r/broadinstitute/gatk/). This requires a recent version of the docker client, which can be found on the [docker website](https://www.docker.com/get-docker). * Python Dependencies:<a name="python"></a> * GATK4 uses the [Conda](https://conda.io/docs/index.html) package manager to establish and manage the Python environment and dependencies required by GATK tools that have a Python dependency. This environment also includes the R dependencies used for plotting in some of the tools. The ```gatk``` environment requires hardware with AVX support for tools that depend on TensorFlow (e.g. CNNScoreVariant). The GATK Docker image comes with the ```gatk``` environment pre-configured. * At this time, the only supported platforms are 64-bit Linux distributions. The required Conda environment is not currently supported on OS X/macOS. * To establish the environment when not using the Docker image, a conda environment must first be "created", and then "activated": * First, make sure [Miniconda or Conda](https://conda.io/docs/index.html) is installed (Miniconda is sufficient). * To "create" the conda environment: * If running from a zip or tar distribution, run the command ```conda env create -f gatkcondaenv.yml``` to create the ```gatk``` environment. * If running from a cloned repository, run ```./gradlew localDevCondaEnv```. This generates the Python package archive and conda yml dependency file(s) in the build directory, and also creates (or updates) the local ```gatk``` conda environment. * To "activate" the conda environment (the conda environment must be activated within the same shell from which GATK is run): * Execute the shell command ```source activate gatk``` to activate the ```gatk``` environment. * See the [Conda](https://conda.io/docs/user-guide/tasks/manage-environments.html) documentation for additional information about using and managing Conda environments. ## <a name="quickstart">Quick Start Guide</a> * Build the GATK: `./gradlew bundle` (creates `gatk-VERSION.zip` in `build/`) * Get help on running the GATK: `./gatk --help` * Get a list of available tools: `./gatk --list` * Run a tool: `./gatk PrintReads -I src/test/resources/NA12878.chr17_69k_70k.dictFix.bam -O output.bam` * Get help on a particular tool: `./gatk PrintReads --help` ## <a name="downloading">Downloading GATK4</a> You can download and run pre-built versions of GATK4 from the following places: * A zip archive with everything you need to run GATK4 can be downloaded for each release from the [github releases page](https://github.com/broadinstitute/gatk/releases). We also host unstable archives generated nightly in the Google bucket gs://gatk-nightly-builds. * You can download a GATK4 docker image from [our dockerhub repository](https://hub.docker.com/r/broadinstitute/gatk/). We also host unstable nightly development builds on [this dockerhub repository](https://hub.docker.com/r/broadinstitute/gatk-nightly/). * Within the docker image, run gatk commands as usual from the default startup directory (/gatk). ### <a name="dockerSoftware">Tools Included in Docker Image</a> Our docker image contains the following bioinformatics tools, which can be run by invoking the tool name from the command line: * bedtools (v2.30.0) * samtools (1.13) * bcftools (1.13) * tabix (1.13+ds) We also include an installation of Python3 (3.6.10) with the following popular packages included: * numpy * scipy * tensorflow * pymc3 * keras * scikit-learn * matplotlib * pandas * biopython * pyvcf * pysam We also include an installation of R (3.6.2) with the following popular packages included: * data.table * dplyr * ggplot2 For more details on system packages, see the GATK [Base Dockerfile](scripts/docker/gatkbase/Dockerfile) and for more details on the Python3/R packages, see the [Conda environment setup file](scripts/gatkcondaenv.yml.template). Versions for the Python3/R packages can be found there. ## <a name="building">Building GATK4</a> * **To do a full build of GATK4, first clone the GATK repository using "git clone", then run:** ./gradlew bundle Equivalently, you can just type: ./gradlew * This creates a zip archive in the `build/` directory with a name like `gatk-VERSION.zip` containing a complete standalone GATK distribution, including our launcher `gatk`, both the local and spark jars, and this README. * You can also run GATK commands directly from the root of your git clone after running this command. * Note that you *must* have a full git clone in order to build GATK, including the git-lfs files in src/main/resources. The zipped source code alone is not buildable. * **Other ways to build:** * `./gradlew installDist` * Does a *fast* build that only lets you run GATK tools from inside your git clone, and locally only (not on a cluster). Good for developers! * `./gradlew installAll` * Does a *semi-fast* build that only lets you run GATK tools from inside your git clone, but works both locally and on a cluster. Good for developers! * `./gradlew localJar` * Builds *only* the GATK jar used for running tools locally (not on a Spark cluster). The resulting jar will be in `build/libs` with a name like `gatk-package-VERSION-local.jar`, and can be used outside of your git clone. * `./gradlew sparkJar` * Builds *only* the GATK jar used for running tools on a Spark cluster (rather than locally). The resulting jar will be in `build/libs` with a name like `gatk-package-VERSION-spark.jar`, and can be used outside of your git clone. * This jar will not include Spark and Hadoop libraries, in order to allow the versions of Spark and Hadoop installed on your cluster to be used. * **To remove previous builds, run:** ./gradlew clean * For faster gradle operations, add `org.gradle.daemon=true` to your `~/.gradle/gradle.properties` file. This will keep a gradle daemon running in the background and avoid the ~6s gradle start up time on every command. * Gradle keeps a cache of dependencies used to build GATK. By default this goes in `~/.gradle`. If there is insufficient free space in your home directory, you can change the location of the cache by setting the `GRADLE_USER_HOME` environment variable. * The version number is automatically derived from the git history using `git describe`, you can override it by setting the `versionOverride` property. ( `./gradlew -DversionOverride=my_weird_version printVersion` ) ## <a name="running">Running GATK4</a> * The standard way to run GATK4 tools is via the **`gatk`** wrapper script located in the root directory of a clone of this repository. * Requires Python 2.6 or greater (this includes Python 3.x) * You need to have built the GATK as described in the [Building GATK4](#building) section above before running this script. * There are several ways `gatk` can be run: * Directly from the root of your git clone after building * By extracting the zip archive produced by `./gradlew bundle` to a directory, and running `gatk` from there * Manually putting the `gatk` script within the same directory as fully-packaged GATK jars produced by `./gradlew localJar` and/or `./gradlew sparkJar` * Defining the environment variables `GATK_LOCAL_JAR` and `GATK_SPARK_JAR`, and setting them to the paths to the GATK jars produced by `./gradlew localJar` and/or `./gradlew sparkJar` * `gatk` can run non-Spark tools as well as Spark tools, and can run Spark tools locally, on a Spark cluster, or on Google Cloud Dataproc. * ***Note:*** running with `java -jar` directly and bypassing `gatk` causes several important system properties to not get set, including htsjdk compression level! * For help on using `gatk` itself, run **`./gatk --help`** * To print a list of available tools, run **`./gatk --list`**. * Spark-based tools will have a name ending in `Spark` (eg., `BaseRecalibratorSpark`). Most other tools are non-Spark-based. * To print help for a particular tool, run **`./gatk ToolName --help`**. * To run a non-Spark tool, or to run a Spark tool locally, the syntax is: **`./gatk ToolName toolArguments`**. * Tool arguments that allow multiple values, such as -I, can be supplied on the command line using a file with the extension ".args". Each line of the file should contain a single value for the argument. * Examples: ``` ./gatk PrintReads -I input.bam -O output.bam ``` ``` ./gatk PrintReadsSpark -I input.bam -O output.bam ``` #### <a name="jvmoptions">Passing JVM options to gatk</a> * To pass JVM arguments to GATK, run `gatk` with the `--java-options` argument: ``` ./gatk --java-options "-Xmx4G" <rest of command> ./gatk --java-options "-Xmx4G -XX:+PrintGCDetails" <rest of command> ``` #### <a name="configFileOptions">Passing a configuration file to gatk</a> * To pass a configuration file to GATK, run `gatk` with the `--gatk-config-file` argument: ``` ./gatk --gatk-config-file GATKProperties.config <rest of command> ``` An example GATK configuration file is packaged with each release as `GATKConfig.EXAMPLE.properties` This example file contains all current options that are used by GATK and their default values. #### <a name="gcs">Running GATK4 with inputs on Google Cloud Storage:</a> * Many GATK4 tools can read BAM or VCF inputs from a Google Cloud Storage bucket. Just use the "gs://" prefix: ``` ./gatk PrintReads -I gs://mybucket/path/to/my.bam -L 1:10000-20000 -O output.bam ``` * ***Important:*** You must set up your credentials first for this to work! There are three options: * Option (a): run in a Google Cloud Engine VM * If you are running in a Google VM then your credentials are already in the VM and will be picked up by GATK, you don't need to do anything special. * Option (b): use your own account * Install [Google Cloud SDK](https://cloud.google.com/sdk/) * Log into your account: ``` gcloud auth application-default login ``` * Done! GATK will use the application-default credentials you set up there. * Option (c): use a service account * Create a new service account on the Google Cloud web page and download the JSON key file * Install [Google Cloud SDK](https://cloud.google.com/sdk/) * Tell gcloud about the key file: ``` gcloud auth activate-service-account --key-file "$PATH_TO_THE_KEY_FILE" ``` * Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to the file ``` export GOOGLE_APPLICATION_CREDENTIALS="$PATH_TO_THE_KEY_FILE" ``` * Done! GATK will pick up the service account. You can also do this in a VM if you'd like to override the default credentials. #### <a name="sparklocal">Running GATK4 Spark tools locally:</a> * GATK4 Spark tools can be run in local mode (without a cluster). In this mode, Spark will run the tool in multiple parallel execution threads using the cores in your CPU. You can control how many threads Spark will use via the `--spark-master` argument. * Examples: Run `PrintReadsSpark` with 4 threads on your local machine: ``` ./gatk PrintReadsSpark -I src/test/resources/large/CEUTrio.HiSeq.WGS.b37.NA12878.20.21.bam -O output.bam \ -- \ --spark-runner LOCAL --spark-master 'local[4]' ``` Run `PrintReadsSpark` with as many worker threads as there are logical cores on your local machine: ``` ./gatk PrintReadsSpark -I src/test/resources/large/CEUTrio.HiSeq.WGS.b37.NA12878.20.21.bam -O output.bam \ -- \ --spark-runner LOCAL --spark-master 'local[*]' ``` * Note that the Spark-specific arguments are separated from the tool-specific arguments by a `--`. #### <a name="sparkcluster">Running GATK4 Spark tools on a Spark cluster:</a> **`./gatk ToolName toolArguments -- --spark-runner SPARK --spark-master <master_url> additionalSparkArguments`** * Examples: ``` ./gatk PrintReadsSpark -I hdfs://path/to/input.bam -O hdfs://path/to/output.bam \ -- \ --spark-runner SPARK --spark-master <master_url> ``` ``` ./gatk PrintReadsSpark -I hdfs://path/to/input.bam -O hdfs://path/to/output.bam \ -- \ --spark-runner SPARK --spark-master <master_url> \ --num-executors 5 --executor-cores 2 --executor-memory 4g \ --conf spark.executor.memoryOverhead=600 ``` * You can also omit the "--num-executors" argument to enable [dynamic allocation](https://spark.apache.org/docs/latest/job-scheduling.html#dynamic-resource-allocation) if you configure the cluster properly (see the Spark website for instructions). * Note that the Spark-specific arguments are separated from the tool-specific arguments by a `--`. * Running a Spark tool on a cluster requires Spark to have been installed from http://spark.apache.org/, since `gatk` invokes the `spark-submit` tool behind-the-scenes. * Note that the examples above use YARN but we have successfully run GATK4 on Mesos as well. #### <a name="dataproc">Running GATK4 Spark tools on Google Cloud Dataproc:</a> * You must have a [Google cloud services](https://cloud.google.com/) account, and have spun up a Dataproc cluster in the [Google Developer's console](https://console.developers.google.com). You may need to have the "Allow API access to all Google Cloud services in the same project" option enabled (settable when you create a cluster). * You need to have installed the Google Cloud SDK from [here](https://cloud.google.com/sdk/), since `gatk` invokes the `gcloud` tool behind-the-scenes. As part of the installation, be sure that you follow the `gcloud` setup instructions [here](https://cloud.google.com/sdk/gcloud/). As this library is frequently updated by Google, we recommend updating your copy regularly to avoid any version-related difficulties. * Your inputs to the GATK when running on dataproc are typically in Google Cloud Storage buckets, and should be specified on your GATK command line using the syntax `gs://my-gcs-bucket/path/to/my-file` * You can run GATK4 jobs on Dataproc from your local computer or from the VM (master node) on the cloud. Once you're set up, you can run a Spark tool on your Dataproc cluster using a command of the form: **`./gatk ToolName toolArguments -- --spark-runner GCS --cluster myGCSCluster additionalSparkArguments`** * Examples: ``` ./gatk PrintReadsSpark \ -I gs://my-gcs-bucket/path/to/input.bam \ -O gs://my-gcs-bucket/path/to/output.bam \ -- \ --spark-runner GCS --cluster myGCSCluster ``` ``` ./gatk PrintReadsSpark \ -I gs://my-gcs-bucket/path/to/input.bam \ -O gs://my-gcs-bucket/path/to/output.bam \ -- \ --spark-runner GCS --cluster myGCSCluster \ --num-executors 5 --executor-cores 2 --executor-memory 4g \ --conf spark.yarn.executor.memoryOverhead=600 ``` * When using Dataproc you can access the web interfaces for YARN, Hadoop and HDFS by opening an SSH tunnel and connecting with your browser. This can be done easily using included `gcs-cluster-ui` script. ``` scripts/dataproc-cluster-ui myGCSCluster ``` Or see these [these instructions](https://cloud.google.com/dataproc/cluster-web-interfaces) for more details. * Note that the spark-specific arguments are separated from the tool-specific arguments by a `--`. * If you want to avoid uploading the GATK jar to GCS on every run, set the `GATK_GCS_STAGING` environment variable to a bucket you have write access to (eg., `export GATK_GCS_STAGING=gs://<my_bucket>/`) * Dataproc Spark clusters are configured with [dynamic allocation](https://spark.apache.org/docs/latest/job-scheduling.html#dynamic-resource-allocation) so you can omit the "--num-executors" argument and let YARN handle it automatically. #### <a name="R">Using R to generate plots</a> Certain GATK tools may optionally generate plots using the R installation provided within the conda environment. If you are uninterested in plotting, R is still required by several of the unit tests. Plotting is currently untested and should be viewed as a convenience rather than a primary output. #### <a name="tab_completion">Bash Command-line Tab Completion (BETA)</a> * A tab completion bootstrap file for the bash shell is now included in releases. This file allows the command-line shell to complete GATK run options in a manner equivalent to built-in command-line tools (e.g. grep). * This tab completion functionality has only been tested in the bash shell, and is released as a beta feature. * To enable tab completion for the GATK, open a terminal window and source the included tab completion script: ``` source gatk-completion.sh ``` * Sourcing this file will allow you to press the tab key twice to get a list of options available to add to your current GATK command. By default you will have to source this file once in each command-line session, then for the rest of the session the GATK tab completion functionality will be available. GATK tab completion will be available in that current command-line session only. * Note that you must have already started typing an invocation of the GATK (using gatk) for tab completion to initiate: ``` ./gatk <TAB><TAB> ``` * We recommend adding a line to your bash settings file (i.e. your ~/.bashrc file) that sources the tab completion script. To add this line to your bash settings / bashrc file you can use the following command: ``` echo "source <PATH_TO>/gatk-completion.sh" >> ~/.bashrc ``` * Where ```<PATH_TO>``` is the fully qualified path to the ```gatk-completion.sh``` script. ## <a name="developers">For GATK Developers</a> #### <a name="dev_guidelines">General guidelines for GATK4 developers</a> * **Do not put private or restricted data into the repo.** * **Try to keep datafiles under 100kb in size.** Larger test files should go into `src/test/resources/large` (and subdirectories) so that they'll be stored and tracked by git-lfs as described [above](#lfs). * GATK4 is Apache 2.0 licensed. The license is in the top level LICENSE.TXT file. Do not add any additional license text or accept files with a license included in them. * Each tool should have at least one good end-to-end integration test with a check for expected output, plus high-quality unit tests for all non-trivial utility methods/classes used by the tool. Although we have no specific coverage target, coverage should be extensive enough that if tests pass, the tool is guaranteed to be in a usable state. * All newly written code must have good test coverage (>90%). * All bug fixes must be accompanied by a regression test. * All pull requests must be reviewed before merging to master (even documentation changes). * Don't issue or accept pull requests that introduce warnings. Warnings must be addressed or suppressed. * Don't issue or accept pull requests that significantly decrease coverage (less than 1% decrease is sort of tolerable). * Don't use `toString()` for anything other than human consumption (ie. don't base the logic of your code on results of `toString()`.) * Don't override `clone()` unless you really know what you're doing. If you do override it, document thoroughly. Otherwise, prefer other means of making copies of objects. * For logging, use [org.apache.logging.log4j.Logger](https://logging.apache.org/log4j/2.0/log4j-api/apidocs/org/apache/logging/log4j/Logger.html) * We mostly follow the [Google Java Style guide](https://google.github.io/styleguide/javaguide.html) * Git: Don't push directly to master - make a pull request instead. * Git: Rebase and squash commits when merging. * If you push to master or mess up the commit history, you owe us 1 growler or tasty snacks at happy hour. If you break the master build, you owe 3 growlers (or lots of tasty snacks). Beer may be replaced by wine (in the color and vintage of buyer's choosing) in proportions of 1 growler = 1 bottle. #### <a name="testing">Testing GATK</a> * Before running the test suite, be sure that you've installed `git lfs` and downloaded the large test data, following the [git lfs setup instructions](#lfs) * To run the test suite, run **`./gradlew test`**. * Test report is in `build/reports/tests/test/index.html`. * What will happen depends on the value of the `TEST_TYPE` environment variable: * unset or any other value : run non-cloud unit and integration tests, this is the default * `cloud`, `unit`, `integration`, `conda`, `spark` : run only the cloud, unit, integration, conda (python + R), or Spark tests * `all` : run the entire test suite * Cloud tests require being logged into `gcloud` and authenticated with a project that has access to the cloud test data. They also require setting several certain environment variables. * `HELLBENDER_JSON_SERVICE_ACCOUNT_KEY` : path to a local JSON file with [service account credentials](https://cloud.google.com/storage/docs/authentication#service_accounts) * `HELLBENDER_TEST_PROJECT` : your google cloud project * `HELLBENDER_TEST_STAGING` : a gs:// path to a writable location * `HELLBENDER_TEST_INPUTS` : path to cloud test data, ex: gs://hellbender/test/resources/ * Setting the environment variable `TEST_VERBOSITY=minimal` will produce much less output from the test suite * To run a subset of tests, use gradle's test filtering (see [gradle doc](https://docs.gradle.org/current/userguide/java_plugin.html)): * You can use `--tests` with a wildcard to run a specific test class, method, or to select multiple test classes: * `./gradlew test --tests *SomeSpecificTestClass` * `./gradlew test --tests *SomeTest.someSpecificTestMethod` * `./gradlew test --tests all.in.specific.package*` * To run tests and compute coverage reports, run **`./gradlew jacocoTestReport`**. The report is then in `build/reports/jacoco/test/html/index.html`. (IntelliJ has a good coverage tool that is preferable for development). * We use [Github Actions](https://github.com/broadinstitute/gatk/actions/workflows/gatk-tests.yml) as our continuous integration provider. * Before merging any branch make sure that all required tests pass on Github. * Every Actions build will upload the test results to our GATK Google Cloud Storage bucket and a zipped artifact upload. A link to the uploaded report will appear at the very bottom of the github actions log. Look for the line that says `See the test report at`. Test github actions test artifacts will not show up on the webpage until the entire test has concluded. If TestNG itself crashes there will be no report generated. * We use [Broad Jenkins](https://gatk-jenkins.broadinstitute.org/view/Performance/) for our long-running tests and performance tests. * To add a performance test (requires Broad-ID), you need to make a "new item" in Jenkins and make it a "copy" instead of a blank project. You need to base it on either the "-spark-" jobs or the other kind of jobs and alter the commandline. * To output stack traces for `UserException` set the environment variable `GATK_STACKTRACE_ON_USER_EXCEPTION=true` #### <a name="lfs">Using Git LFS to download and track large test data</a> We use [git-lfs](https://git-lfs.github.com/) to version and distribute test data that is too large to check into our repository directly. You must install and configure it in order to be able to run our test suite. * After installing [git-lfs](https://git-lfs.github.com/), run `git lfs install` * This adds hooks to your git configuration that will cause git-lfs files to be checked out for you automatically in the future. * To manually retrieve the large test data, run `git lfs pull` from the root of your GATK git clone. * The download size is approximately 5 gigabytes. * To add a new large file to be tracked by git-lfs, simply: * Put the new file(s) in `src/test/resources/large` (or a subdirectory) * `git add` the file(s), then `git commit -a` * That's it! Do ***not*** run `git lfs track` on the files manually: all files in `src/test/resources/large` are tracked by git-lfs automatically. #### <a name="intellij">Creating a GATK project in the IntelliJ IDE (last tested with version 2016.2.4):</a> * Ensure that you have `gradle` and the Java 17 JDK installed * You may need to install the TestNG and Gradle plugins (in preferences) * Clone the GATK repository using git * In IntelliJ, click on "Import Project" in the home screen or go to File -> New... -> Project From Existing Sources... * Select the root directory of your GATK clone, then click on "OK" * Select "Import project from external model", then "Gradle", then click on "Next" * Ensure that "Gradle project" points to the build.gradle file in the root of your GATK clone * Select "Use auto-import" and "Use default gradle wrapper". * Make sure the Gradle JVM points to Java 17. You may need to set this manually after creating the project, to do so find the gradle settings by clicking the wrench icon in the gradle tab on the right bar, from there edit "Gradle JVM" argument to point to Java 17. * Click "Finish" * After downloading project dependencies, IntelliJ should open a new window with your GATK project * Make sure that the Java version is set correctly by going to File -> "Project Structure" -> "Project". Check that the "Project SDK" is set to your Java 17 JDK, and "Project language level" to 17 (you may need to add your Java 17 JDK under "Platform Settings" -> SDKs if it isn't there already). Then click "Apply"/"Ok". #### <a name="debugging">Setting up debugging in IntelliJ</a> * Follow the instructions above for creating an IntelliJ project for GATK * Go to Run -> "Edit Configurations", then click "+" and add a new "Application" configuration * Set the name of the new configuration to something like "GATK debug" * For "Main class", enter `org.broadinstitute.hellbender.Main` * Ensure that "Use classpath of module:" is set to use the "gatk" module's classpath * Enter the arguments for the command you want to debug in "Program Arguments" * Click "Apply"/"Ok" * Set breakpoints, etc., as desired, then select "Run" -> "Debug" -> "GATK debug" to start your debugging session * In future debugging sessions, you can simply adjust the "Program Arguments" in the "GATK debug" configuration as needed #### <a name="intellij_gradle_refresh">Updating the Intellij project when dependencies change</a> If there are dependency changes in `build.gradle` it is necessary to refresh the gradle project. This is easily done with the following steps. * Open the gradle tool window ( "View" -> "Tool Windows" -> "Gradle" ) * Click the refresh button in the Gradle tool window. It is in the top left of the gradle view and is represented by two blue arrows. #### <a name="jprofiler">Setting up profiling using JProfiler</a> * Running JProfiler standalone: * Build a full GATK4 jar using `./gradlew localJar` * In the "Session Settings" window, select the GATK4 jar, eg. `~/gatk/build/libs/gatk-package-4.alpha-196-gb542813-SNAPSHOT-local.jar` for "Main class or executable JAR" and enter the right "Arguments" * Under "Profiling Settings", select "sampling" as the "Method call recording" method. * Running JProfiler from within IntelliJ: * JProfiler has great integration with IntelliJ (we're using IntelliJ Ultimate edition) so the setup is trivial. * Follow the instructions [above](#intellij) for creating an IntelliJ project for GATK * Right click on a test method/class/package and select "Profile" #### <a name="sonatype">Uploading Archives to Sonatype (to make them available via maven central)</a> To upload snapshots to Sonatype you'll need the following: * You must have a registered account on the sonatype JIRA (and be approved as a gatk uploader) * You need to configure several additional properties in your `/~.gradle/gradle.properties` file * If you want to upload a release instead of a snapshot you will additionally need to have access to the gatk signing key and password ``` #needed for snapshot upload sonatypeUsername=<your sonatype username> sonatypePassword=<your sonatype password> #needed for signing a release signing.keyId=<gatk key id> signing.password=<gatk key password> signing.secretKeyRingFile=/Users/<username>/.gnupg/secring.gpg ``` To perform an upload, use ``` ./gradlew uploadArchives ``` Builds are considered snapshots by default. You can mark a build as a release build by setting `-Drelease=true`. The archive name is based off of `git describe`. #### <a name="docker_building">Building GATK4 Docker images</a> Please see the [the Docker README](scripts/docker/README.md) in ``scripts/docker``. This has instructions for the Dockerfile in the root directory. #### <a name="releasing_gatk">Releasing GATK4</a> Please see the [How to release GATK4](https://github.com/broadinstitute/gatk/wiki/How-to-release-GATK4) wiki article for instructions on releasing GATK4. #### <a name="gatkdocs">Generating GATK4 documentation</a> To generate GATK documentation, run `./gradlew gatkDoc` * Generated docs will be in the `build/docs/gatkdoc` directory. #### <a name="gatkwdlgen">Generating GATK4 WDL Wrappers</a> * A WDL wrapper can be generated for any GATK4 tool that is annotated for WDL generation (see the wiki article [How to Prepare a GATK tool for WDL Auto Generation](https://github.com/broadinstitute/gatk/wiki/How-to-Prepare-a-GATK-tool-for-WDL-Auto-Generation)) to learn more about WDL annotations. * To generate the WDL Wrappers, run `./gradlew gatkWDLGen`. The generated WDLs and accompanying JSON input files can be found in the `build/docs/wdlGen` folder. * To generate WDL Wrappers and validate the resulting outputs, run `./gradlew gatkWDLGenValidation`. Running this task requires a local [cromwell](https://github.com/broadinstitute/cromwell) installation, and environment variables `CROMWELL_JAR` and `WOMTOOL_JAR` to be set to the full pathnames of the `cromwell` and `womtool` jar files. If no local install is available, this task will run automatically on github actions in a separate job whenever a PR is submitted. * WDL wrappers for each GATK release are published to the [gatk-tool-wdls](https://github.com/broadinstitute/gatk-tool-wdls) repository. Only tools that have been annotated for WDL generation will show up there. #### <a name="zenhub">Using Zenhub to track github issues</a> We use [Zenhub](https://www.zenhub.com/) to organize and track github issues. * To add Zenhub to github, go to the [Zenhub home page](https://www.zenhub.com/) while logged in to github, and click "Add Zenhub to Github" * Zenhub allows the GATK development team to assign time estimates to issues, and to mark issues as Triaged/In Progress/In Review/Blocked/etc. ## <a name="spark_further_reading">Further Reading on Spark</a> [Apache Spark](https://spark.apache.org/) is a fast and general engine for large-scale data processing. GATK4 can run on any Spark cluster, such as an on-premise Hadoop cluster with HDFS storage and the Spark runtime, as well as on the cloud using Google Dataproc. In a cluster scenario, your input and output files reside on HDFS, and Spark will run in a distributed fashion on the cluster. The Spark documentation has a good [overview of the architecture](https://spark.apache.org/docs/latest/cluster-overview.html). Note that if you don't have a dedicated cluster you can run Spark in [standalone mode](https://spark.apache.org/docs/latest/spark-standalone.html) on a single machine, which exercises the distributed code paths, albeit on a single node. While your Spark job is running, the [Spark UI](http://spark.apache.org/docs/latest/monitoring.html) is an excellent place to monitor the progress. Additionally, if you're running tests, then by adding `-Dgatk.spark.debug=true` you can run a single Spark test and look at the Spark UI (on [http://localhost:4040/](http://localhost:4040/)) as it runs. You can find more information about tuning Spark and choosing good values for important settings such as the number of executors and memory settings at the following: * [Tuning Spark](https://spark.apache.org/docs/latest/tuning.html) * [How-to: Tune Your Apache Spark Jobs (Part 1)](http://blog.cloudera.com/blog/2015/03/how-to-tune-your-apache-spark-jobs-part-1/) * [How-to: Tune Your Apache Spark Jobs (Part 2)](http://blog.cloudera.com/blog/2015/03/how-to-tune-your-apache-spark-jobs-part-2/) ## <a name="contribute">How to contribute to GATK</a> (Note: section inspired by, and some text copied from, [Apache Parquet](https://github.com/apache/parquet-mr)) We welcome all contributions to the GATK project. The contribution can be a [issue report]( https://github.com/broadinstitute/gatk/issues) or a [pull request](https://github.com/broadinstitute/gatk/pulls). If you're not a committer, you will need to [make a fork](https://help.github.com/articles/fork-a-repo/) of the gatk repository and [issue a pull request](https://help.github.com/articles/be-social/) from your fork. For ideas on what to contribute, check issues labeled ["Help wanted (Community)"](https://github.com/broadinstitute/gatk/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted+%28Community%29%22). Comment on the issue to indicate you're interested in contibuting code and for sharing your questions and ideas. To contribute a patch: * Break your work into small, single-purpose patches if possible. It’s much harder to merge in a large change with a lot of disjoint features. * Submit the patch as a GitHub pull request against the master branch. For a tutorial, see the GitHub guides on [forking a repo](https://help.github.com/articles/fork-a-repo/) and [sending a pull request](https://help.github.com/articles/be-social/). If applicable, include the issue number in the pull request name. * Make sure that your code passes all our tests. You can run the tests with `./gradlew test` in the root directory. * Add tests for all new code you've written. We prefer unit tests but high quality integration tests that use small amounts of data are acceptable. * Follow the [**General guidelines for GATK4 developers**](https://github.com/broadinstitute/gatk#general-guidelines-for-gatk4-developers). We tend to do fairly close readings of pull requests, and you may get a lot of comments. Some things to consider: * Write tests for all new code. * Document all classes and public methods. * For all public methods, check validity of the arguments and throw `IllegalArgumentException` if invalid. * Use braces for control constructs, `if`, `for` etc. * Make classes, variables, parameters etc `final` unless there is a strong reason not to. * Give your operators some room. Not `a+b` but `a + b` and not `foo(int a,int b)` but `foo(int a, int b)`. * Generally speaking, stick to the [Google Java Style guide](https://google.github.io/styleguide/javaguide.html) Thank you for getting involved! ## <a name="discussions">Discussions</a> * [GATK forum](https://gatk.broadinstitute.org/hc/en-us/community/topics) for general discussions on how to use the GATK and support questions. * [Issue tracker](https://github.com/broadinstitute/gatk/issues) to report errors and enhancement ideas. * Discussions also take place in [GATK pull requests](https://github.com/broadinstitute/gatk/pulls) ## <a name="authors">Authors</a> The authors list is maintained in the [AUTHORS](https://github.com/broadinstitute/gatk/edit/master/AUTHORS) file. See also the [Contributors](https://github.com/broadinstitute/gatk/graphs/contributors) list at github. ## <a name="license">License</a> Licensed under the Apache 2.0 License. See the [LICENSE.txt](https://github.com/broadinstitute/gatk/blob/master/LICENSE.TXT) file.
0
MinecraftForge/MinecraftForge
Modifications to the Minecraft base files to assist in compatibility between mods. New Discord: https://discord.minecraftforge.net/
forge java minecraft mod
null
0
pinpoint-apm/pinpoint
APM, (Application Performance Management) tool for large-scale distributed systems.
agent apm distributed-tracing monitoring performance tracing
![Pinpoint](web/psd/logo.png) [![Maven](https://img.shields.io/github/actions/workflow/status/pinpoint-apm/pinpoint/maven.yml?branch=master&label=build&logo=github)](https://github.com/pinpoint-apm/pinpoint/actions?query=workflow%3AMaven) [![codecov](https://codecov.io/gh/pinpoint-apm/pinpoint/branch/master/graph/badge.svg)](https://codecov.io/gh/pinpoint-apm/pinpoint) ## Latest Release (2023/10/10) We're happy to announce the release of Pinpoint v2.5.3. Please check the release note at (https://github.com/pinpoint-apm/pinpoint/releases/tag/v2.5.3). The current stable version is [v2.5.3](https://github.com/pinpoint-apm/pinpoint/releases/tag/v2.5.3). ## Live Demo Take a quick look at Pinpoint with our [demo](http://223.130.142.103:8080/main/ApiGateway@SPRING_BOOT/5m?inbound=1&outbound=4&wasOnly=false&bidirectional=false)! ## PHP, PYTHON Pinpoint also supports application written in PHP, Python. [Check-out our agent repository](https://github.com/pinpoint-apm/pinpoint-c-agent). ## About Pinpoint **Pinpoint** is an APM (Application Performance Management) tool for large-scale distributed systems written in Java / [PHP](https://github.com/pinpoint-apm/pinpoint-c-agent)/[PYTHON]((https://github.com/pinpoint-apm/pinpoint-c-agent)). Inspired by [Dapper](http://research.google.com/pubs/pub36356.html "Google Dapper"), Pinpoint provides a solution to help analyze the overall structure of the system and how components within them are interconnected by tracing transactions across distributed applications. You should definitely check **Pinpoint** out If you want to * understand your *[application topology](https://pinpoint-apm.gitbook.io/pinpoint/want-a-quick-tour/overview)* at a glance * monitor your application in *Real-Time* * gain *code-level visibility* to every transaction * install APM Agents *without changing a single line of code* * have minimal impact on the performance (approximately 3% increase in resource usage) ## Getting Started * [Quick-start guide](https://pinpoint-apm.gitbook.io/pinpoint/getting-started/quickstart) for simple test run of Pinpoint * [Installation guide](https://pinpoint-apm.gitbook.io/pinpoint/getting-started/installation) for further instructions. ## Overview Services nowadays often consist of many different components, communicating amongst themselves as well as making API calls to external services. How each and every transaction gets executed is often left as a blackbox. Pinpoint traces transaction flows between these components and provides a clear view to identify problem areas and potential bottlenecks.<br/> For a more intimate guide, please check out our *[Introduction to Pinpoint](https://pinpoint-apm.gitbook.io/pinpoint/#want-a-quick-tour)* video clip. * **ServerMap** - Understand the topology of any distributed systems by visualizing how their components are interconnected. Clicking on a node reveals details about the component, such as its current status, and transaction count. * **Realtime Active Thread Chart** - Monitor active threads inside applications in real-time. * **Request/Response Scatter Chart** - Visualize request count and response patterns over time to identify potential problems. Transactions can be selected for additional detail by **dragging over the chart**. ![Server Map](doc/images/ss_server-map.png) * **CallStack** - Gain code-level visibility to every transaction in a distributed environment, identifying bottlenecks and points of failure in a single view. ![Call Stack](doc/images/ss_call-stack.png) * **Inspector** - View additional details on the application such as CPU usage, Memory/Garbage Collection, TPS, and JVM arguments. ![Inspector](doc/images/ss_inspector.png) * **URI-metric** ![URI-Metric](doc/images/ss-uri-metric.png) * **Infrastructure** ![Infrastructure](doc/images/ss-Infrastructure-metric.png) ## Supported Modules * JDK 8+ * [Tomcat](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/tomcat), [Jetty](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jetty), [JBoss EAP](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jboss), [Resin](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/resin), [Websphere](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/websphere), [Vertx](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/vertx), [Weblogic](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/weblogic), [Undertow](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/undertow), [Akka HTTP](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/akka-http) * [Spring](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/spring), [Spring Boot](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/spring-boot) ([Embedded Tomcat](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/tomcat), [Jetty](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jetty), [Undertow](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/undertow), [Reactor Netty](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/reactor-netty)), [Spring WebFlux](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/spring-webflux) * Apache HttpClient [3](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/httpclient3) / [4](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/httpclient4) / [5](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/httpclient5), [JDK HttpConnector](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jdk-http), [GoogleHttpClient](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/google-httpclient), [OkHttpClient](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/okhttp), [NingAsyncHttpClient](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/ning-asynchttpclient) * [Thrift](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/thrift), [DUBBO](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/dubbo), [GRPC](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/grpc), [Apache CXF](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/cxf) * [ActiveMQ](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/activemq-client), [RabbitMQ](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/rabbitmq), [Kafka](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/kafka), [RocketMQ](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/rabbitmq), [Paho MQTT](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/paho-mqtt) * [MySQL](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mysql-jdbc), [Oracle](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/oracle-jdbc), [MSSQL](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mssql-jdbc), [JTDS](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jtds), [CUBRID](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/cubrid-jdbc), [POSTGRESQL](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/postgresql-jdbc), [MARIA](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mariadb-jdbc), [Informix](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/informix-jdbc), [Spring Data R2DBC](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/spring-data-r2dbc) * [Arcus](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/arcus), [Memcached](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/arcus), Redis([Jedis](https://github.com/pinpoint-apm/pinpoint/blob/master/plugins/redis), [Lettuce](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/redis-lettuce), [Redisson](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/redis-redisson)), [CASSANDRA](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/cassandra), [MongoDB](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mongodb), [Hbase](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/hbase), [Elasticsearch](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/elasticsearch) * [iBATIS](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/ibatis), [MyBatis](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mybatis) * [DBCP](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/dbcp), [DBCP2](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/dbcp2), [HIKARICP](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/hikaricp), [DRUID](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/druid) * [Gson](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/gson), [Jackson](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/jackson), [Json Lib](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/json-lib), [Fastjson](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/fastjson) * [log4j](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/log4j), [Logback](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/logback), [log4j2](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/log4j2) * [OpenWhisk](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/openwhisk), [Kotlin Coroutines](https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/kotlin-coroutines) ## Compatibility Java version required to run Pinpoint: <!-- <compatibilityJava.md> --> | Pinpoint Version | Agent | Collector | Web | Flink | |------------------|-------|-----------|-----|-------| | 2.0.x | 6-13 | 8 | 8 | 8 | | 2.1.x | 6-14 | 8 | 8 | 8 | | 2.2.x | 7-14 | 8 | 8 | 8 | | 2.3.x | 7-17 | 8 | 8 | 8 | | 2.4.x | 7-18 | 11 | 11 | 11 | | 2.5.x | 8-19 | 11 | 11 | 11 | | 3.0.x | 8-21 | 17 | 17 | 17 | <!-- </compatibilityJava.md> --> HBase compatibility table: <!-- <compatibilityHbase.md> --> | Pinpoint Version | HBase 1.x | HBase 2.x | |------------------|-----------|-----------------------------------------------------------------------------------------------------------------------| | 2.0.x | yes | [optional](https://pinpoint-apm.gitbook.io/pinpoint/documents/hbase-upgrade#do-you-like-to-use-hbase-2x-for-pinpoint) | | 2.1.x | yes | [optional](https://pinpoint-apm.gitbook.io/pinpoint/documents/hbase-upgrade#do-you-like-to-use-hbase-2x-for-pinpoint) | | 2.2.x | yes | [optional](https://pinpoint-apm.gitbook.io/pinpoint/documents/hbase-upgrade#do-you-like-to-use-hbase-2x-for-pinpoint) | | 2.3.x | yes | [hbase2-module](https://github.com/pinpoint-apm/pinpoint/tree/2.3.x/hbase2-module) | | 2.4.x | yes | [hbase2-module](https://github.com/pinpoint-apm/pinpoint/tree/2.4.x/hbase2-module) | | 2.5.x | yes | [hbase2-module](https://github.com/pinpoint-apm/pinpoint/tree/2.5.x/hbase2-module) | | 3.0.x | no | yes | <!-- </compatibilityHbase.md> --> Agent - Collector compatibility table: <!-- <compatibilityPinpoint.md> --> | Agent Version | Collector 2.0.x | Collector 2.1.x | Collector 2.2.x | Collector 2.3.x | Collector 2.4.x | Collector 2.5.x | Collector 3.0.x | |---------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------| | 2.0.x | yes | yes | yes | yes | yes | yes | yes | | 2.1.x | no | yes | yes | yes | yes | yes | yes | | 2.2.x | no | no | yes | yes | yes | yes | yes | | 2.3.x | no | no | no | yes | yes | yes | yes | | 2.4.x | no | no | no | no | yes | yes | yes | | 2.5.x | no | no | no | no | no | yes | yes | | 3.0.x | no | no | no | no | no | no | yes | <!-- </compatibilityPinpoint.md> --> Flink compatibility table: <!-- <compatibilityFlink.md> --> | Pinpoint Version | Flink 1.3.X | Flink 1.4.X | Flink 1.5.X | Flink 1.6.X | Flink 1.7.X | Flink 1.14.X | Flink 1.18.X | |------------------|-------------|-------------|-------------|-------------|-------------|--------------|--------------| | 2.0.x | yes | yes | yes | yes | yes | no |no | | 2.1.x | yes | yes | yes | yes | yes | no |no | | 2.2.x | yes | yes | yes | yes | yes | no |no | | 2.3.x | yes | yes | yes | yes | yes | no |no | | 2.4.x | yes | yes | yes | yes | yes | yes |no | | 2.5.x | yes | yes | yes | yes | yes | yes |no | | 3.0.x | no | no | no | no | no | no |yes | <!-- </compatibilityFlink.md> --> Pinot compatibility table: <!-- <compatibilityPinot.md> --> | Pinpoint Version | Pinot 0.11.0 | Pinot 0.12.0 | Pinot 1.0.0 | |------------------|--------------|--------------|----------------| | 2.5.x | yes | yes | yes | | 3.0.x | no | no | yes | <!-- </compatibilityPinot.md> --> ## Community [Github issues](https://github.com/pinpoint-apm/pinpoint/issues) [Google group](https://groups.google.com/forum/#!forum/pinpoint_user) [Gitter](https://gitter.im/naver/pinpoint) We have Chinese community now, welcome to join! <details> <summary> 👆 click me </summary> QQ Group1: 897594820 | QQ Group2: 812507584 | QQ Group3: 882020485| DING Group : 21981598 :----------------: |:----------------: | :-----------: | :-----------: ![QQ Group1](doc/images/NAVERPinpoint.png) | ![QQ Group2](doc/images/NAVERPinpoint2.png)| ![QQ Group3](doc/images/NAVERPinpoint3.png)| ![DING Group](doc/images/NaverPinpoint交流群-DING.jpg) </details> ## License Pinpoint is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for full license text. ``` Copyright 2018 NAVER Corp. 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
LWJGL/lwjgl3
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
bindings fmod freetype glfw harfbuzz java kotlin lwjgl openal opencl opengl opengl-es openxr vr vulkan
[![Maven Central](https://img.shields.io/maven-central/v/org.lwjgl/lwjgl.svg?label=maven%20central)](https://search.maven.org/search?q=g:org.lwjgl) [![API Javadoc](https://img.shields.io/badge/API-docs-blue.svg)](https://javadoc.lwjgl.org/) [![License](https://img.shields.io/badge/license-BSD-blue.svg?colorB=lightgray)](https://github.com/LWJGL/lwjgl3/blob/master/LICENSE.md) ![Size](https://img.shields.io/github/repo-size/LWJGL/lwjgl3.svg?label=size&colorB=lightgray) [![Build Status](https://img.shields.io/github/actions/workflow/status/LWJGL-CI/lwjgl3/CI.yml?branch=master)](https://github.com/LWJGL-CI/lwjgl3/actions/workflows/CI.yml) ## LWJGL - Lightweight Java Game Library 3 LWJGL (https://www.lwjgl.org) is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL/Vulkan), audio (OpenAL) and parallel computing (OpenCL) applications. This access is direct and high-performance, yet also wrapped in a type-safe and user-friendly layer, appropriate for the Java ecosystem. LWJGL is an enabling technology and provides low-level access. It is not a framework and does not provide higher-level utilities than what the native libraries expose. As such, novice programmers are encouraged to try one of the frameworks or game engines that make use of LWJGL, before working directly with the library. LWJGL is open source software and freely available at no charge. Useful links: - [Wiki](https://github.com/LWJGL/lwjgl3-wiki/wiki) - [Release Notes](https://github.com/LWJGL/lwjgl3/tree/master/doc/notes) - [JavaDoc](https://javadoc.lwjgl.org) - [Blog](https://blog.lwjgl.org) Contact: - [![Twitter Follow](https://img.shields.io/twitter/follow/LWJGL?style=social)](https://twitter.com/LWJGL) - [Discord](https://discord.gg/6CywMCs) - [Forum](http://forum.lwjgl.org) If you'd like to contribute, see [doc/README](https://github.com/LWJGL/lwjgl3/tree/master/doc) for a quick overview of the project structure, installation instructions and configuration options. ### Getting Started As of version `3.1.0`, LWJGL is distributed as a set of modules. Only the core module is required and all bindings are optional (but some bindings depend on other bindings). The easiest way to download LWJGL is to use the [build configurator](https://www.lwjgl.org/customize) on the website. The build configurator generates **Maven & Gradle** declarations that can be added to existing projects. This is the easiest way to use LWJGL while developing. LWJGL can also be downloaded as a simple set of JAR files. Each module consists of the following files: * lwjgl-&lt;module&gt;.jar * lwjgl-&lt;module&gt;-sources.jar * lwjgl-&lt;module&gt;-javadoc.jar * lwjgl-&lt;module&gt;-natives-&lt;platform&gt;.jar (for some bindings) To compile and run an LWJGL application, the base and natives JAR files of the core module and each binding used should be added to the classpath. LWJGL extracts the natives to a temporary folder and loads them automatically, so no further configuration is necessary. If more customization is required (e.g. when creating a platform-specific installer) the natives may be extracted manually and loaded via `java.library.path`. See the [Configuration](https://github.com/LWJGL/lwjgl3/blob/master/modules/lwjgl/core/src/main/java/org/lwjgl/system/Configuration.java) class for more options. LWJGL 3 requires Java 8 or later to build and run and currently supports the following platforms/architectures: - FreeBSD x64 - Linux x64 - Linux arm64 (ARMv8/AArch64) - Linux arm32 (ARMv7/armhf) - Linux ppc64le - Linux riscv64 - macOS x64 - macOS arm64 - Windows x64 - Windows x86 - Windows arm64 Example code: - [Samples](https://github.com/LWJGL/lwjgl3/tree/master/modules/samples/src/test/java/org/lwjgl/demo) (simple samples covering basic usage of LWJGL bindings) - [Demo suite](https://github.com/LWJGL/lwjgl3-demos) (includes advanced OpenGL and Vulkan demos) - [Wiki tutorials](https://github.com/LWJGL/lwjgl3-wiki/wiki/2.6.-Tutorial-Index) For migrating LWJGL 2 code to LWJGL 3, see the [Migration Guide](https://github.com/LWJGL/lwjgl3-wiki/wiki/2.6.6-LWJGL3-migration). ### Troubleshooting Most common issues faced by LWJGL users are trivially addressed with the following: - [Installation guide](https://github.com/LWJGL/lwjgl3-wiki/wiki/1.2.-Install) (lwjgl3-wiki) - [Troubleshooting guide](https://github.com/LWJGL/lwjgl3-wiki/wiki/2.5.-Troubleshooting) (lwjgl3-wiki) - [Memory FAQ](https://github.com/LWJGL/lwjgl3-wiki/wiki/1.3.-Memory-FAQ) (lwjgl3-wiki) [LWJGLX/debug](https://github.com/LWJGLX/debug) is a Java Agent that will automatically detect a lot of these issues. It can also generate a trace log that's useful when reporting issues to LWJGL. When asking for help or when you suspect a bug in LWJGL, preparing an [MVCE](https://stackoverflow.com/help/mcve) (Minimal, Complete, and Verifiable example) that reproduces the issue will improve the chances of a quick and useful response. ## List of Supported Bindings #### Khronos APIs | Library | Description | |-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [EGL](https://www.khronos.org/egl) | An interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system. | | [KTX (Khronos Texture)](https://www.khronos.org/ktx/) | A lightweight container for textures for OpenGL®, Vulkan® and other GPU APIs. | | [OpenCL](https://www.khronos.org/opencl/) | An open, royalty-free standard for cross-platform, parallel programming of diverse processors found in personal computers, servers, mobile devices and embedded platforms. | | [OpenGL](https://www.khronos.org/opengl/) | The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms. | | [OpenGL ES](https://www.khronos.org/opengles/) | A royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles. | | [OpenXR](https://www.khronos.org/openxr/) | A royalty-free, open standard that provides high-performance access to Augmented Reality (AR) and Virtual Reality (VR)—collectively known as XR—platforms and devices. | | [Vulkan](https://www.khronos.org/vulkan/) | A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms. | #### Display and Input | Library | Description | |---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [GLFW](https://www.glfw.org/) | Create multiple windows, handle user input (keyboard, mouse, gaming peripherals) and manage contexts. Also features multi-monitor support, clipboard access, file drag-n-drop, and [much more](http://www.glfw.org/docs/latest/news.html). | | [JAWT](http://docs.oracle.com/javase/8/docs/technotes/guides/awt/AWT_Native_Interface.html) | The AWT native interface. | | [Native File Dialog Extended](https://github.com/btzy/nativefiledialog-extended) | A small C library that portably invokes native file open, folder select and file save dialogs. | | [tinyfd](https://sourceforge.net/projects/tinyfiledialogs/) | A native dialog library. | #### Audio | Library | Description | |-----------------------------------------|------------------------------------------------------------------------------------------------------------------------| | [FMOD](https://www.fmod.com) | An end-to-end solution for adding sound and music to any game. | | [OpenAL](https://www.openal.org/) | A cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications. | | [OpenAL Soft](https://openal-soft.org/) | An LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. | | [Opus](https://opus-codec.org/) | A totally open, royalty-free, highly versatile audio codec. | #### Graphics | Library | Description | |----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Assimp](https://www.assimp.org/) | A portable Open Source library to import various well-known 3D model formats in a uniform manner. | | [bgfx](https://bkaradzic.github.io/bgfx/) | Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library, licensed under permissive BSD-2 clause open source license. | | [FreeType](https://freetype.org/) | A freely available software library to render fonts. | | [HarfBuzz](https://harfbuzz.github.io/) | A text shaping library that allows programs to convert a sequence of Unicode input into properly formatted and positioned glyph output — for any writing system and language. | | [meshoptimizer](https://github.com/zeux/meshoptimizer) | A mesh optimization library that makes meshes smaller and faster to render. | | [NanoSVG](https://github.com/memononen/nanosvg) | A simple stupid SVG parser. | | [NanoVG](https://github.com/memononen/nanovg) | A small antialiased vector graphics rendering library for OpenGL. | | [Nuklear](https://github.com/vurtun/nuklear) | A minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. | | [par_octasphere](https://prideout.net/blog/octasphere) | Generates triangle meshes for spheres, rounded boxes, and capsules. | | [par_shapes](https://prideout.net/shapes) | Generate parametric surfaces and other simple shapes. | | [par_streamlines](https://prideout.net/blog/par_streamlines/) | Triangulate wide lines and curves. | | [Shaderc](https://github.com/google/shaderc) | A collection of libraries for shader compilation. | | [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross) | A library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. | | [Tiny OpenEXR](https://github.com/syoyo/tinyexr) | A small, single header-only library to load and save OpenEXR(.exr) images. | | [Tootle (AMD)](https://github.com/GPUOpen-Tools/amd-tootle) | A 3D triangle mesh optimization library that improves on existing mesh preprocessing techniques. | | [Vulkan Memory Allocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) | An easy to integrate Vulkan memory allocation library. | | [Yoga](https://facebook.github.io/yoga/) | An open-source, cross-platform layout library that implements Flexbox. | #### AR/VR | Library | Description | |-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [LibOVR](https://developer.oculus.com/documentation/) | The API of the Oculus SDK. | | [OpenVR](https://github.com/ValveSoftware/openvr) | An API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. | #### [stb](https://github.com/nothings/stb) - single-file public domain libraries for C/C++ | Library | Description | |------------------|---------------------------------------------------------------------------------| | stb_easy_font | Quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc. | | stb_image | Image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC | | stb_image_resize | Resize images larger/smaller with good quality. | | stb_image_write | Image writing to disk: PNG, TGA, BMP | | stb_perlin | Revised Perlin noise (3D input, 1D output). | | stb_rect_pack | Simple 2D rectangle packer with decent quality. | | stb_truetype | Parse, decode, and rasterize characters from truetype fonts. | | stb_vorbis | Decode ogg vorbis files from file/memory to float/16-bit signed output. | #### Other | Library | Description | |---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [CUDA](https://developer.nvidia.com/cuda-zone/) | A parallel computing platform and programming model developed by NVIDIA for general computing on GPUs. | | [hwloc](https://www.open-mpi.org/projects/hwloc/) | A portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. | | [jemalloc](https://jemalloc.net/) | A general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support. | | [libffi](https://sourceware.org) | A portable, high level programming interface to various calling conventions. | | [libdivide](https://libdivide.com/) | A library that replaces expensive integer divides with comparatively cheap multiplication and bitshifts. | | [LLVM](https://llvm.org/) | A collection of modular and reusable compiler and toolchain technologies. | | [LMDB](https://www.symas.com/lmdb) | An extraordinarily fast, memory-efficient database. With memory-mapped files, it has the read performance of a pure in-memory database while retaining the persistence of standard disk-based databases. | | [LZ4](https://lz4.org/) | A lossless data compression algorithm that is focused on compression and decompression speed. | | [Meow hash](https://github.com/cmuratori/meow_hash) | An extremely fast non-cryptographic hash. | | [ODBC](https://docs.microsoft.com/en-us/sql/odbc/microsoft-open-database-connectivity-odbc) | A C programming language interface that makes it possible for applications to access data from a variety of database management systems (DBMSs). | | [Remotery](https://github.com/Celtoys/Remotery) | A realtime CPU/GPU profiler hosted in a single C file with a viewer that runs in a web browser. | | [rpmalloc](https://github.com/mjansson/rpmalloc) | A public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C. | | [xxHash](https://github.com/Cyan4973/xxHash) | An Extremely fast Hash algorithm, running at RAM speed limits. | | [Zstandard](http://facebook.github.io/zstd/) (zstd) | A fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios. | Use of a binding is subject to the terms of the [corresponding license](https://github.com/LWJGL/lwjgl3/tree/master/doc/3rdparty). ## Supporting this project LWJGL exists thanks to [all the people](https://github.com/LWJGL/lwjgl3/blob/master/BACKERS.md) who [contribute](https://github.com/LWJGL/lwjgl3/blob/master/.github/CONTRIBUTING.md) and donate to our collective. <a href="https://opencollective.com/lwjgl/donate" target="_blank"> <img src="https://opencollective.com/lwjgl/donate/button@2x.png?color=white" width=300 /> </a>
0
guang19/framework-learning
计算机学习资料(Java , Jvm , Linux , Mysql , Netty , Redis , Netty , Spring , SpringBoot , Mybatis , Rabbitmq ,计算机网络 , 数据结构与算法 , 设计模式 )Github网页阅读:https://guang19.github.io/framework-learning , Gitee网页版阅读: https://qsjzwithguang19forever.gitee.io/framework-learning
amqp datastructur-algorithm framework-learning jvm linux mybatis netty nosql orm rdbms redis spring springboot
# framework-learning 以下是我在学习计算机相关知识的过程中整理的一些资料,部分参考了网上一些大神的文章。 我把它们都做成Markdown的文章供各位同学参考,其中一部分我也以XMind的方式来进行梳理总结。 为了良好的阅读体验,可以移步到本项目的GitBook网页阅读版: [framework-learning](https://qsjzwithguang19forever.gitee.io/framework-learning) 。 网页阅读版的内容与本项目是同步的,请放心阅读。 目前有很多知识我个人也在学习和复习之中,后面的push可能会比较慢,所以请各位同学理解。 # 目录 * [架构设计](#架构设计) * [编程语言](#编程语言) * [Jdk&Jvm&Juc(待JVM第三版修改)](#Jdk&Jvm&Juc(待JVM第三版修改)) * [计算机基础](#计算机基础) * [Linux](#linux) * [数据结构与算法](#数据结构与算法) * [计算机网络](#计算机网络) * [设计模式](#设计模式) * [数据库](#数据库) * [关系型数据库](#关系型数据库) * [非关系型数据库](#非关系型数据库) * [Elasticsearch](#elasticsearch) * [中间件](#中间件) * [AMQP](#amqp) * [Zookeeper](#zookeeper) * [Tomcat](#tomcat) * [开发框架与库](#开发框架与库) * [Netty](#netty) * [Spring框架](#spring框架) * [ORM](#orm) * [待办](#待办) * [如何对本文档做出补充?](#如何对本文档做出补充?) * [LICENSE](#license) ## 架构设计 - [系统架构设计](system_architecture_design/系统架构设计简介.md) - [站内消息系统的设计](system_architecture_design/站内消息系统的设计.md) ## 编程语言 ### Jdk&Jvm&Juc(待JVM第三版修改) - [Java常见基础知识点](jdk-jvm-juc/Java常见基础知识点.md) - [Linux IO](jdk-jvm-juc/Linux_IO.md) - [Java集合](jdk-jvm-juc/Java集合.md) - [Java多线程](jdk-jvm-juc/Java多线程.md) - [Java并发](jdk-jvm-juc/Java并发.md) - [AQS](jdk-jvm-juc/AQS.md) - [对象在内存中的布局](jdk-jvm-juc/对象在内存中的布局.md) - [JVM](jdk-jvm-juc/JVM.md) - [简单了解类文件结构](jdk-jvm-juc/简单了解类文件结构.md) - [类的生命周期(类加载)](jdk-jvm-juc/类的生命周期.md) - [JVM常量池](jdk-jvm-juc/JVM常量池.md) - [GC](jdk-jvm-juc/GC.md) - [JVM调优相关内容](jdk-jvm-juc/JVM调优相关内容.md) - [Jdk新特性](jdk-jvm-juc/Jdk新特性.md) [JDK&JVM&JUC - XMind](xmind_file/JDK&JVM&JUC.xmind) ## 计算机基础 ### Linux - [Linux简介](linux-learning/Linux简介.md) - [操作系统的内核](linux-learning/操作系统的内核.md) - [进程间通信](linux-learning/进程间通信.md) - [Linux文件系统](linux-learning/Linux文件系统.md) - [Linux用户权限](linux-learning/Linux用户权限.md) - [Linux运行级别](linux-learning/Linux运行级别.md) - [Shell](linux-learning/Shell.md) - [Linux命令大全](linux-learning/Linux命令大全.md) - [完全使用GNU/Linux学习](linux-learning/完全使用GNU_Linux学习.md) [非关系型数据库 - XMind](xmind_file/非关系型数据库.xmind) ### 数据结构与算法 - [数据结构与算法简介](datastructure-algorithm/数据结构与算法简介.md) - [数据结构](datastructure-algorithm/数据结构.md) - [算法](datastructure-algorithm/算法.md) 推荐一个数据结构与算法的可视化网站,希望能够帮到正在学习数据结构与算法的同学: [数据结构与算法可视化](https://www.cs.usfca.edu/~galles/visualization/Algorithms.html) ### 计算机网络 - [OSI七层模型](computer_network/OSI七层模型.md) - [TCP/IP](computer_network/TCP_IP.md) - [HTTP](computer_network/HTTP.md) [计算机网络 - XMind](xmind_file/计算机网络.xmind) ### 设计模式 - [设计模式简介](design_pattern/设计模式简介.md) - [七大原则](design_pattern/七大原则.md) - [二十三种设计模式](design_pattern/二十三种设计模式.md) ## 数据库 ### 关系型数据库 - [RDBMS简介](rdbms-learning/RDBMS简介.md) - [RDBMS常见知识点](rdbms-learning/RDBMS常见知识点.md) - [索引](rdbms-learning/索引.md) - [Mysql](rdbms-learning/Mysql简介.md) - [Mysql存储引擎](rdbms-learning/Mysql存储引擎.md) - [事务](rdbms-learning/事务.md) - [数据库锁](rdbms-learning/数据库锁.md) - [Mysql日志](rdbms-learning/Mysql日志.md) - [Mysql优化](rdbms-learning/Mysql优化.md) - [Mysql数据类型](rdbms-learning/Mysql数据类型.md) [关系型数据库 - XMind](xmind_file/关系型数据库.xmind) ### 非关系型数据库 - [NoSQL简介](nosql-learning/NoSQL简介.md) - [Redis简介](nosql-learning/Redis简介.md) - [Redis常见知识点](nosql-learning/Redis常见知识点.md) - [Redis数据结构](nosql-learning/Redis数据结构.md) - [Redis事务](nosql-learning/Redis事务.md) - [Redis缓存淘汰策略](nosql-learning/Redis缓存淘汰策略.md) - [Redis持久化策略](nosql-learning/Redis持久化策略.md) ### Elasticsearch [ElasticSearch](elasticsearch-learning/ElasticSearch.md) ## 中间件 ### AMQP - [AMQP简介](amqp-learning/AMQP简介.md) - [RabbitMQ常见知识点](amqp-learning/RabbitMQ常见知识点.md) [AMQP - XMind](xmind_file/AMQP.xmind) ### Zookeeper [Zookeeper](zookeeper-learning/Zookeeper.md) ### Tomcat [Tomcat](tomcat9.0-source/Tomcat.md) ## 开发框架与库 ### Netty - [Netty简介](netty-learning/Netty简介.md) - [Netty特性](netty-learning/Netty特性.md) - [Netty组件](netty-learning/Netty组件.md) - [Transport传输](netty-learning/Transport传输.md) - [ByteBuf容器](netty-learning/ByteBuf容器.md) - [ChannelHandler和ChannelPipeline](netty-learning/ChannelHandler和ChannelPipeline.md) - [Netty线程模型和EventLoop事件循环](netty-learning/Netty线程模型和EventLoop.md) - [Bootstrap引导](netty-learning/Bootstrap引导.md) - [Codec编码与解码](netty-learning/Codec编码与解码.md) ### Spring框架 - [SpringFramework常见知识点](spring-learning/SpringFramework常见知识点.md) - [SpringMVC常见知识点](spring-learning/SpringMVC常见知识点.md) - [SpringMVC源码分析](spring-learning/SpringMVC源码分析.md) - [SpringBoot常见知识点](spring-learning/SpringBoot常见知识点.md) [Spring - XMind](xmind_file/Spring.xmind) ### ORM - [ORM简介](orm-learning/ORM简介.md) - [Mybatis简介](orm-learning/Mybatis简介.md) - [Mybatis常见知识点](orm-learning/Mybatis常见知识点.md) - [Mybatis源码分析](orm-learning/Mybatis源码分析.md) [ORM - XMind](xmind_file/ORM.xmind) ## 待办 - [ ] JVM部分后续会根据《深入理解Java虚拟机 - 第三版》更新 - [ ] PostgreSQL - [ ] ~~Netty~~ (暂完) ## 如何对本文档做出补充? 这里主要讲讲本项目的目录结构吧。 - img: 此目录存放所有的图片,这个各位同学稍微看看就知道了。Github有一个特点(好处)就是: 当我们在markdown文件之中指定了本地图片时, 它能自动把我们的图片上传到它的服务器上,这也是为什么你会在我的markdown之中看到这样的内容: ````text ![图片名](../img/图片名.png) ```` - xmind_file: 此目录存放了每个模块对应的xmind文件。 - 本项目的每一个模块就是一块知识内容,每个模块下都有对应知识点的md文件,如: - jdk-jvm-juc ... - Java常见基础知识点.md ... **各位同学如果要纠错,可以在对应知识点的模块下修改对应的md文件。** 其他的目录或文件,如:gitbook_doc/* 由我亲自修改,并不需要改动。 各位同学有好的建议可以提issue或pr,感谢各位同学的支持! ## LICENSE **GNU**
0
newbee-ltd/newbee-mall
🔥 🎉newbee-mall是一套电商系统,包括基础版本(Spring Boot+Thymeleaf)、前后端分离版本(Spring Boot+Vue 3+Element-Plus+Vue-Router 4+Pinia+Vant 4) 、秒杀版本、Go语言版本、微服务版本(Spring Cloud Alibaba+Nacos+Sentinel+Seata+Spring Cloud Gateway+OpenFeign+ELK)。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。
adminlte java mall microservice mybatis shop spring-boot spring-cloud spring-cloud-alibaba springboot springboot-learning springboot-mybatis springboot-sample springboot-vue springboot2 springcloud vue vue3 vuejs3 wangeditor
![newbee-logo](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/newbee-logo.png?x-oss-process=image/resize,h_240,w_480) ![Build Status](https://img.shields.io/badge/build-passing-green.svg) ![Version 1.0.0](https://img.shields.io/badge/version-1.0.0-yellow.svg) [![License](https://img.shields.io/badge/license-GPL3.0-blue.svg)](https://github.com/newbee-ltd/newbee-mall/blob/master/LICENSE) newbee-mall 项目是一套电商系统,包括 newbee-mall 商城系统及 newbee-mall-admin 商城后台管理系统,基于 Spring Boot 及相关技术栈开发。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。 当前分支的 Spring Boot 版本为 2.7.5,想要学习和使用其它版本可以直接点击下方的分支名称跳转至对应的仓库分支中。 | 分支名称 | Spring Boot Version | | ------------------------------------------------------------ | ------------------- | | [spring-boot-2.3.7](https://github.com/newbee-ltd/newbee-mall/tree/spring-boot-2.3.7) | 2.3.7-RELEASE | | [spring-boot-2.6.x](https://github.com/newbee-ltd/newbee-mall/tree/spring-boot-2.6.x) | 2.6.3 | | [main](https://github.com/newbee-ltd/newbee-mall) | 2.7.5 | | [spring-boot-3.x](https://github.com/newbee-ltd/newbee-mall/tree/spring-boot-3.x) | 3.1.0 | 新蜂商城线上预览地址:[http://mall.newbee.ltd](http://mall.newbee.ltd?from=github),账号可自行注册。 **坚持不易,如果觉得项目还不错的话可以给项目一个 Star 吧,也是对我自 2019 年开始一直更新这个项目的一种鼓励啦,谢谢各位的支持。** ![newbee-mall-info](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/store/newbee-mall-star.png) - newbee-mall 对新手开发者十分友好,无需复杂的操作步骤,**仅需 2 秒就可以启动这个完整的商城项目;** - newbee-mall **也是一个企业级别的 Spring Boot 大型项目,对于各个阶段的 Java 开发者都是极佳的选择;** - 你可以把它作为 Spring Boot 技术栈的综合实践项目,**newbee-mall 足够符合要求,且代码开源、功能完备、流程完整、页面交互美观;** - 技术栈新颖且知识点丰富,学习后可以提升大家对于知识的理解和掌握,**可以进一步提升你的市场竞争力;** - 对于部分求职中的 Java 开发者,**你也可以将该项目放入求职简历中以丰富你的工作履历;** - **newbee-mall 还有一些不完善的地方,鄙人才疏学浅,望见谅;** - **有任何问题都可以反馈给我,我会尽量完善该项目。** ![](https://raw.githubusercontent.com/newbee-ltd/newbee-mall-vue-app/master/static-files/newbee-mall.png) ## newbee-mall (新蜂商城)系列项目概览 ![newbee-mall-course-2022](https://github.com/newbee-ltd/newbee-mall-cloud/raw/main/static-files/newbee-mall-course-2022.png) | 项目名称 | 仓库地址 | 备注 | | :------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | newbee-mall | [newbee-mall in GitHub](https://github.com/newbee-ltd/newbee-mall)<br>[newbee-mall in Gitee](https://gitee.com/newbee-ltd/newbee-mall) | 初始版本、Spring Boot、Thymeleaf、MyBatis、MySQL | | newbee-mall-plus | [newbee-mall-plus in GitHub](https://github.com/newbee-ltd/newbee-mall-plus)<br/>[newbee-mall-plus in Gitee](https://gitee.com/newbee-ltd/newbee-mall-plus) | 升级版本、优惠券、秒杀、支付、Spring Boot、Thymeleaf、MyBatis、MySQL、Redis | | newbee-mall-cloud | [newbee-mall-cloud in GitHub](https://github.com/newbee-ltd/newbee-mall-cloud)<br/>[newbee-mall-cloud in Gitee](https://gitee.com/newbee-ltd/newbee-mall-cloud) | 微服务版本、分布式事务、Spring Cloud Alibaba、Nacos、Sentinel、OpenFeign、Seata | | newbee-mall-api | [newbee-mall-api in GitHub](https://github.com/newbee-ltd/newbee-mall-api)<br/>[newbee-mall-api in Gitee](https://gitee.com/newbee-ltd/newbee-mall-api) | 前后端分离、Spring Boot、MyBatis、Swagger、MySQL | | newbee-mall-api-go | [newbee-mall-api-go in GitHub](https://github.com/newbee-ltd/newbee-mall-api-go)<br/>[newbee-mall-api-go in Gitee](https://gitee.com/newbee-ltd/newbee-mall-api-go) | 前后端分离、Go、Gin、MySQL | | newbee-mall-vue-app | [newbee-mall-vue-app in GitHub](https://github.com/newbee-ltd/newbee-mall-vue-app)<br/>[newbee-mall-vue-app in Gitee](https://gitee.com/newbee-ltd/newbee-mall-vue-app) | 前后端分离、Vue2、Vant | | newbee-mall-vue3-app | [newbee-mall-vue3-app in GitHub](https://github.com/newbee-ltd/newbee-mall-vue3-app)<br/>[newbee-mall-vue3-app in Gitee](https://gitee.com/newbee-ltd/newbee-mall-vue3-app) | 前后端分离、Vue3、Vue-Router4、Vuex4、Vant3 | | vue3-admin | [vue3-admin in GitHub](https://github.com/newbee-ltd/vue3-admin)<br/>[vue3-admin in Gitee](https://gitee.com/newbee-ltd/vue3-admin) | 前后端分离、Vue3、Element-Plus、Vue-Router4、Vite | > 更多 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) ## 项目演示 - [视频1:商城项目总览](https://edu.csdn.net/course/play/26258/326466) - [视频2:商城系统介绍](https://edu.csdn.net/course/play/26258/326467) - [视频3:商城后台管理系统介绍](https://edu.csdn.net/course/play/26258/328801) ## 开发及部署文档 - [**Spring Boot 大型线上商城项目实战教程**](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [项目须知和课程约定](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [2021年12月小册全新优化升级](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [技术选型之 Spring Boot](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [前期准备工作及基础环境搭建](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 项目初体验--项目搭建及启动](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 之 Web 开发讲解](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Thymeleaf 模板引擎技术介绍及整合](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Thymeleaf 语法详解及编码实践](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 实践之数据库操作](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 实践之整合 Mybatis 操作数据库](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [项目初体验:启动和使用新蜂商城](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城功能模块和流程设计详解](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [前端页面设计及技术选型](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [页面布局制作及跳转逻辑实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 实现验证码功能](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城后台管理系统登录功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [登陆拦截器设置并完善身份验证](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [通用分页功能设计与开发实践](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [jqGrid 插件整合制作分页效果](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 实践之文件上传处理-1](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot 实践之文件上传处理-2](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城轮播图管理模块开发](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城分类管理模块开发-1](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城分类管理模块开发-2](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城商品类目三级联动功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [富文本编辑器 wangEditor 介绍及整合详解](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城商品编辑页面制作](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城商品添加功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城商品管理模块功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城首页制作-1](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城首页制作-2](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城首页模块配置及功能完善](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城会员的注册/登录功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城搜索商品功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城购物车功能实现](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城订单确认页和订单生成功能实践](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城个人订单列表和订单详情页制作](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城订单流程功能完善](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [课程总结及展望](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [Spring Boot中的事务处理](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [新蜂商城错误页面制作](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) - [常见问题汇总讲解](https://juejin.cn/book/6844733814074245133?suid=1996368849416216&source=android) ## 联系作者 > 大家有任何问题或者建议都可以在 [issues](https://github.com/newbee-ltd/newbee-mall/issues) 中反馈给我,我会慢慢完善这个项目。 - 我的邮箱:2449207463@qq.com - QQ技术交流群:791509631 784785001 > newbee-mall 在 GitHub 和国内的码云都创建了代码仓库,如果有人访问 GitHub 比较慢的话,建议在 Gitee 上查看该项目,两个仓库会保持同步更新。 - [newbee-mall in GitHub](https://github.com/newbee-ltd/newbee-mall) - [newbee-mall in Gitee](https://gitee.com/newbee-ltd/newbee-mall) ![newbee-mall-info](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/store/newbee-mall-info-3.png) ## 软件著作权 >本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护! ![](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/store/newbee-mall-copyright.png) ## 页面展示 以下为商城项目的部分页面,由于篇幅所限,无法一一列举,重要节点及重要功能的页面都已整理在下方。 ### 商城页面预览 - 商城首页 1 ![index](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/index-01-2023.gif) - 商城首页 2 ![index](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/index-02-2023.png) - 商品搜索 ![search](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/search-2023.png) - 购物车 ![cart](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/cart-2023.png) - 订单结算 ![settle](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/settle-2023.png) - 订单列表 ![orders](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/orders-2023.png) - 支付页面 ![settle](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/wx-pay.png) ### 后台管理页面 - 登录页 ![login](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-login.png) - 轮播图管理 ![carousel](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-carousel-2023.png) - 新品上线 ![config](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-index-config-2023.png) - 分类管理 ![category](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-category.png) - 商品管理 ![goods](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-goods-2023.png) - 商品编辑 ![edit](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/goods-edit-2023.png) - 订单管理 ![order](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/product/manage-order-2023.png) ![newbee-mall-info](https://newbee-mall.oss-cn-beijing.aliyuncs.com/poster/store/newbee-mall-info-3.png) ## 感谢 - [spring-projects](https://github.com/spring-projects/spring-boot) - [thymeleaf](https://github.com/thymeleaf/thymeleaf) - [mybatis](https://github.com/mybatis/mybatis-3) - [ColorlibHQ](https://github.com/ColorlibHQ/AdminLTE) - [tonytomov](https://github.com/tonytomov/jqGrid) - [sweetalert2](https://github.com/sweetalert2/sweetalert2) - [skytotwo](https://github.com/skytotwo/Alipay-WeChat-HTML) - [hutool](https://github.com/dromara/hutool) - [wangeditor-team](https://github.com/wangeditor-team/wangEditor) - [VincentGarreau](https://github.com/VincentGarreau/particles.js) - [Vue](https://github.com/vuejs/vue) - [Vant](https://github.com/youzan/vant)
0
lxy-go/SpringBoot
这是一个SpringBoot的从入门程序集锦
null
由于github下载太慢,所以大家可以在码云下载~ https://gitee.com/lixiyan4633/SpringBoot # SpringBoot ## 这是一个B站的SpringBoot的从入门程序集锦     终于,终于,把这块骨头给啃了,B站上是16小时的教程,我看了整整10天,哈哈,有点笨,因为我是真的菜,必须一点点看,不会的还得倒回去在看,而且边看边记录文档,反反复复,感觉这辈子都看不完的感觉了,哈哈,不过老师讲的真的好,我没有理由放弃,这个文档是我纯手敲的,看了下21796个字,妈的,比毕业论文还多,没错,我这个文档感觉绝对比老师的多,有很多我的血的教训,虽然一路磕磕碰碰,但是也侥幸过来了。为努力的自己点个赞     路过的同学,虽然知道你们主要是来拿文档的,但是能不能看在我这种傻傻的黄牛精神点个**star**或**Fork**,谢谢  各位大佬     哈哈,希望大家一起进步!!!     > ps:文档中的图片,需要把对应的图片下载下来【springBoot上--images | springBoot下--images2】,下载后把图片路径名更改成你电脑中图片的路径,建议用编译器,搜索替换全部     **SpringBoot高级功能书写中。。。**     已完成     - ElasticSearch 全文检索     - SpringCould 分布式管理     - RabbitMQ中间件 - Cache缓存 ## 我是法律小白,我自己照着写的文档,如果侵权的话,请给我发邮箱告知一下lixiyan4633@163.com
0
jacoco/jacoco
:microscope: Java Code Coverage Library
bytecode coverage groovy instrumentation jacoco java java-agent java-virtual-machine java11 java17 java18 java19 java20 java21 java22 java5 java8 kotlin
JaCoCo Java Code Coverage Library ================================= [![Build Status](https://dev.azure.com/jacoco-org/JaCoCo/_apis/build/status/JaCoCo?branchName=master)](https://dev.azure.com/jacoco-org/JaCoCo/_build/latest?definitionId=1&branchName=master) [![Maven Central](https://img.shields.io/maven-central/v/org.jacoco/jacoco.svg)](http://search.maven.org/#search|ga|1|g%3Aorg.jacoco) JaCoCo is a free Java code coverage library distributed under the Eclipse Public License. ## Starting Points * I want to use JaCoCo → [Download](https://www.jacoco.org/jacoco/), [Maven](https://www.jacoco.org/jacoco/trunk/doc/maven.html), [Ant](https://www.jacoco.org/jacoco/trunk/doc/ant.html), [CLI](https://www.jacoco.org/jacoco/trunk/doc/cli.html), [Other](https://www.jacoco.org/jacoco/trunk/doc/integrations.html) * I want to know how JaCoCo works → [Documentation](http://www.jacoco.org/jacoco/trunk/doc/) * I have a question → [FAQ](http://www.jacoco.org/jacoco/trunk/doc/faq.html), [Documentation](http://www.jacoco.org/jacoco/trunk/doc/), [User Forum](https://groups.google.com/forum/?fromgroups=#!forum/jacoco) * I found a bug → [Bug Report](https://github.com/jacoco/jacoco/issues/new/choose) * I have an idea → [User Forum](https://groups.google.com/forum/?fromgroups=#!forum/jacoco), [Feature Request](https://github.com/jacoco/jacoco/issues/new/choose)
0
Zephery/newblog
:octocat: 个人博客,个人网站,blog
blog java javablog mybatis personal-website spring springmvc
微信捐赠: <div align="center"> ![](http://image.wenzhihuai.com/images/202004271142001592625207.png?imageView2/2/w/300) </div> # 个人博客技术选型 [![GitHub stars](https://img.shields.io/github/stars/Zephery/newblog.svg)](https://github.com/Zephery/newblog/stargazers) [![GitHub forks](https://img.shields.io/github/forks/Zephery/newblog.svg)](https://github.com/Zephery/newblog/network) [![GitHub issues](https://img.shields.io/github/issues/Zephery/newblog.svg)](https://github.com/Zephery/newblog/issues) [![Twitter](https://img.shields.io/twitter/url/https/github.com/Zephery/newblog.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FZephery%2Fnewblog) **网站站点**:[http://www.wenzhihuai.com/](http://www.wenzhihuai.com/) **Java后端框架**:Spring、Spring MVC、Mybatis、WebSocket(实时推送)、Lucene(搜索系统)、JMX **前端框架**:Bootstrap、Jquery、Highcharts、Echarts、WaterFall(瀑布流)、WowSlider(图片切换) **分布式相关**:Redisson(分布式锁)、dubbo **缓存**:Redis(日志系统等) **数据库**:MySQL **部署**:Tomcat、Nginx、阿里云服务器、七牛云CDN **Python相关**:百度统计的获取、Flask提供文本分析API **其他**:MongoDB(目前只用来记录数据库启动)、RabbitMQ(目前只用来记录请求)、畅言 ### 注意 **本网站只是前台,还有个[博客管理系统](https://github.com/Zephery/newblogback),由于是个人使用,没怎么整,有兴趣可以看看** **此项目涉及到的依赖(例如:百度统计账号、文本分析API等)实在太多,不能直接copy。自己折腾吧,加油,建站(特别是自己的网站)是个锻炼自己的好机会。如果有疑问,可以联系我哦** **BTW,如果可以,希望给个star或者fork奖励** ### 相关博客文章:<br/> 1. [建站故事与网站架构](https://github.com/Zephery/newblog/blob/master/doc/1.%E5%8E%86%E5%8F%B2%E4%B8%8E%E6%9E%B6%E6%9E%84.md)<br/> 2. [lucene搜索的使用](https://github.com/Zephery/newblog/blob/master/doc/2.Lucene%E7%9A%84%E4%BD%BF%E7%94%A8.md)<br/> 3. [使用quartz来定时备份数据库](https://github.com/Zephery/newblog/blob/master/doc/3.%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1.md)<br/> 4. [使用百度统计api做日志系统](https://github.com/Zephery/baidutongji/blob/master/README.md)<br/> 5. [Nginx小集群的搭建](https://github.com/Zephery/newblog/blob/master/doc/6.%E5%B0%8F%E9%9B%86%E7%BE%A4%E9%83%A8%E7%BD%B2.md)<br/> 6. [数据库备份](https://github.com/Zephery/newblog/blob/master/doc/7.%E6%95%B0%E6%8D%AE%E5%BA%93%E5%A4%87%E4%BB%BD.md)<br/> 7. [那些牛逼的插件]() 8. 使用机器学习对微博进行分析<br/> 9. 网站性能优化<br/> 10. SEO优化<br/> ### 网站首页 首页耗了很多时间在里面,包括加载速度,毕竟影响用户的体验。一直都想做的炫酷一点,不过代价是速度越来越慢,光是初次加载到看到页面就需要7秒,加载完需要30秒。这种速度实在不能忍,直到现在全部换成了CDN,去掉了不能访问的链接(谷歌服务)等,不能说特别快,但是至少不会让用户等7秒了。 <div align="center"> ![](http://image.wenzhihuai.com/home.png?imageView2/2/w/600) </div> ### 技术架构图如下(已过时,有空再更新) 一直想在选型上采用点新技术,有些用上确实是完美,但是有些却不知用来干什么好,比如RabbitMQ和MongoDB,毕竟个人网站没有这些业务,有网友说没必要用,毕竟没必要为了业务而业务,等以后有需求了再优化这些技术在博客中的嵌入吧。↖( ^ω^)↗ <div align="center"> ![](http://image.wenzhihuai.com/awfawefwefwef.png) </div> ### 缓存架构如下 起先访问速度实在是太慢了,即使开启了Mybatis的一二级缓存,后来慢慢的加入Ehcache,速度好多了,不过为了模仿大型网站中的多级缓存的概念,还是继续引入Redis作为二级缓存,很好很开心,哈哈哈,不过偶尔网速不好,服务器有点卡的时候,首页的访问还是不能达到满意,后来看开涛的《亿级流量》,感觉把首页每个一段时间抓取,存成静态页面,写到redis,然后每次访问的时候,直接在nginx使用lua访问redis读取然后返回给客户端,奇思妙想还真成了。 <div align="center"> ![](https://upyuncdn.wenzhihuai.com/201803170219421253122648.png) </div> ### 日志系统架构如下 [日志系统](http://www.wenzhihuai.com/log.html)曾经尝试采用过ELK,实时监控实在是让人不能不称赞,本地也跑起来了,但是一到服务器,卡卡卡,毕竟(1Ghz CPU、1G内存),只能放弃ELK,采用百度统计。百度统计提供了Tongji API供开发者使用,只是有次数限制,2000/日,实时的话实在有点低,只能统计前几天的PV、UV等开放出来。其实这个存放在mysql也行,不过这些零碎的数据还是放在redis中,方便管理。 除了日志系统,自己对服务器的一些使用率也是挺关心的,毕竟服务器配置太低,于是利用了使用了tomcat的JMX来对CPU和jvm使用情况进行监控,这两个都是实时的。出了这两个,对内存的分配做了监控,Eden、Survivor、Tenured的使用情况。 <div align="center"> ![](https://upyuncdn.wenzhihuai.com/201803170304371892629314.png) </div> ### 文本分类 本人大学里的毕业设计就是基于AdaBoost算法的情感分类,学到的东西还是要经常拿出来看看,要不然真的浪费了我这么久努力做的毕业设计啊。构建了一个基本的情感分类小系统,每天抓取微博进行分类存储在MySql上,并使用flask提供Restful API给java调用,可以点击[这里](http://www.wenzhihuai.com/weibonlp.html)尝试(请忽略Google的图片)。目前分类效果不是很明显,准确率大概只有百分之70%,因为训练样本只有500条(找不到训练样本),机器学习真的太依赖样本的标注。这个,只能请教各位路人大神指导指导了。 <div align="center"> ![](http://image.wenzhihuai.com/QQ%E6%88%AA%E5%9B%BE20170825141127.png) </div> ### 切换至spring boot 3.0 https://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r ### 更新日志 **2016-3-21**:学完ssh,感觉不扎实,心想要整个自己的博客网站 **2016-4-10**:前端采用原生的html、css、js,后端使用ssh,增删改查,至少博客能写了。 **2016-5-11**:后悔了,实在太丑了,要不改用PHP? **2016-5-12**:看到了杨青、java1234的博客,嗯,还是继续java吧,即使页面会low一点 **2016-5-13**:据说ssh落后了,好吧,弃用ssh,改用ssm,继续 **2016-5-15**:由于页面low爆了,抛弃之前所有前端页面。换模板,整了个旅游的高大上的模板,开始改 **2016-5-28**:后端根据java1234的Lucene整合进个人网站 **2016-6-3**:在腾讯云上线,唉,没人访问 **2016-6-3至6-30**:考试,项目暂停 **2016-7-1**:Mybatis分页真头疼,到底是采用逻辑上分页还是物理上? **2016-7-1**:引入PageHelper分页插件 **2016-7-1**:后台编辑器换成editor.md,数据库中保存之后的html,没选择保存原生的md **2016-7-10**:处理MyBatis一对一,一对多的关系 **2016-7-15**:修改Lucene,修改前端模板,好像首页图片切换效果不太好哦 **2016-7-29**:抛弃之前的首页图片切换效果使用WOWSlider,加上多说,6666,好看一点点了 **2016-8-3**:更新版上下,额,,,还是没人访问。。。。 **2016-8-3至8-30**:好好建站居然没人访问。。信心受挫,专注并发去,项目暂停。 **2016-9-1**:整理整理网站,如果面试有问到的话,可以展示展示 **2016-9-20至2016-12-31**:好好实习,认真工作,项目暂停 **2017-1-10**:在家无聊,想起自己还有腾讯云服务器,好吧再看看吧。 **2017-1-15**:editor.md存储,选择数据库中保存原生md和html **2017-1-20**:引入Masonry瀑布流,让网站更炫,呵呵,结果感觉变丑了 **2017-1-24**:瀑布流换成waterfall,无线加载,好像不太对啊 **2017-2至3月**:准备春招,专注JVM,项目暂停 **2017-4-3**:多说要关闭了,换成畅言吧 **2017-4-5**:日志系统建一个吧,ELK还是Kafka+flume? **2017-4-8**:本地都跑起来了,但是服务器,1GHz CPU+1GHz的内存卡死了,根本跑不起ELK **2017-4-10**:想到百度统计? **2017-5至6-15**:准备毕业设计,项目继续暂停 **2017-6-20**:面试失败,绝望,想起面试的时候说到了自己博客,决定重构项目 **2017-6-21**:右键欲思,保存网页,布局就使用这个了 **2017-6-22**:决定前台后台分析,给用户看的用ssm,后台管理系统采用spring boot **2017-6-23**:上传GitHub,前台的觉[newblog](),后台管理系统叫[newblogback]() **2017-6-24**:修改布局,标签云那个效果整了好久。后台使用Themyleaf **2017-6-25**:引入微博秀、天气控件、social-share等前端插件,顺眼了好多 **2017-6-26**:引入百度统计,哈哈,我真是天才 **2017-6-27**:Themyleaf,后台改改改,想着反正只有我一个人用,那就随便点吧 **2017-6-30**:结合Highcharts,日志系统基本框架完毕 **2017-7-1**:瀑布流怎么办?整合整合,还是没达到预期的效果 **2017-7-2**:大学的毕业设计怎么办?文本分类还是蛮有意思的,好,结合进去 **2017-7-3**:使用Flask提供一个RESTFUL API,能够给Java调用 **2017-7-4至7月20**:继续优化优化界面 **2017-7-21**:新域名([www.wenzhihuai.com](http://www.wenzhihuai.com))通过,初步上线 **2017-7-22**:highcharts的地域图好像不太好,用echarts,毕竟国产 **2017-7-23**:SSO,百度搜我的名字,排名第一了哈哈哈哈 **2017-7-24**:想起百度,搜索的时候输入一个词就弹出相关词,可以可以,我要整这个 **2017-7-28**:Lucene Suggest+Autocomplete结合进去,效果还可以 **2017-8-13**:社交分享抛弃JiaThis,真的low,换成baidu-share.js **2017-8-15**:Nginx集群、MySQL集群、Tomcat集群 **2017-8-24**:数据库连接池换成Druid **2017-9-12**:引入RabbitMQ,额,好像个人网站没这个需求,用来记录访问的吧 **2017-10-14**:引入MongoDB,额,这个也没需求啊,用来记录数据库的连接情况吧 **2017-10-27**:分布式下Tomcat Session好像不一致,换成Spring-Session **2017-11-14**:网友建议ajax轮询不好,最好用WebSocket,OK,一天之内整完 **2017-12-4**:服务器被黑,好吧,换成JDK9.0,加油↖(^ω^)↗ **2018-1-3**:增加周报页面,引入dubbo,更新kafka **2018-1-13**:增加切面,对service.impl下的所有方法监测耗时 **2018-1-18**:唉,终于换成了Spring-Redis作为缓存 **2018-2-9**:感觉缓存还是不够快,nginx中加上openresty **2018-3-4**:加入Redisson分布式锁,减去使用ip来判断的麻烦 **2018-3-20**:七牛云流量不够,加上又拍云吧 **2018-4-29**:logback打到kafka里面去 **2020-2-23**:由spring改为springboot **2021-1-1**:去掉了一些脏代码,只做博客,迁回腾讯云重新上线 **2021-2-28**:优化了日志模块,增加了jprofiler **2021-7-17**:迁移至tke,并改成war包运行 **2022-4-2**:升级spring boot版本,切换成mybatis plus,切换cdn **2023-3-26**:升级spring boot 3,考虑要不要改掉jsp #### 持续更新...
0
awaitility/awaitility
Awaitility is a small Java DSL for synchronizing asynchronous operations
asynchronous awaitility java testing
![Awaitility](resources/Awaitility_logo_red_small.png) [![Build Status](https://github.com/awaitility/awaitility/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/awaitility/awaitility/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.awaitility/awaitility/badge.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A"org.awaitility"%20AND%20a%3A"awaitility") Testing asynchronous systems is hard. Not only does it require handling threads, timeouts, and concurrency issues, but the intent of the test code can be obscured by all these details. Awaitility is a DSL that allows you to express expectations of an asynchronous system in a concise and easy-to-read manner. For example: ```java @Test public void updatesCustomerStatus() { // Publish an asynchronous message to a broker (e.g. RabbitMQ): messageBroker.publishMessage(updateCustomerStatusMessage); // Awaitility lets you wait until the asynchronous operation completes: await().atMost(5, SECONDS).until(customerStatusIsUpdated()); ... } ``` ## News * 2024-03-15: Awaitility `4.2.1` is released. It allows for easier use of logging and some bug fixes and improvements. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. * 2022-03-04: Awaitility `4.2.0` is released. It allows the use of assertion libraries such as Hamcrest or Assertj in [fail-fast conditions](https://github.com/awaitility/awaitility/wiki/Usage#fail-fast-conditions) as well as various improvements and bug fixes. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. * 2021-10-25: Awaitility `4.1.1` is released. This release includes some bug fixes and small improvements. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. [Older news](https://github.com/awaitility/awaitility/wiki/OldNews) ## Documentation * [Getting started](https://github.com/awaitility/awaitility/wiki/Getting_started) * [Usage Guide](https://github.com/awaitility/awaitility/wiki/Usage) * [Awaitility Javadoc](http://www.javadoc.io/doc/org.awaitility/awaitility/4.2.1) ## Links * [Change log](https://github.com/awaitility/awaitility/raw/master/changelog.txt) * Awaitility on [Open Hub](https://www.openhub.net/p/awaitility) * [Mailing list](http://groups.google.com/group/awaitility) for questions and support <a href="https://www.buymeacoffee.com/johanhaleby" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/arial-blue.png" alt="Buy Me A Coffee" style="height: 42px !important;width: 180px !important;" height="42px" width="180px"></a>
0
Snailclimb/spring-security-jwt-guide
从零入门 !Spring Security With JWT(含权限验证)后端部分代码。
jpa register spring-security spring-security-5 spring-security-jwt springbooy
# spring-security-jwt-guide **如果国内访问缓慢的话,可以通过码云查看:** https://gitee.com/SnailClimb/spring-security-jwt-guide 。 ## 前言 [Spring Security](https://spring.io/projects/spring-security ) 是 Spring 全家桶中非常强大的一个用来做身份验证以及权限控制的框架,我们可以轻松地扩展它来满足我们当前系统安全性这方面的需求。 但是 Spring Security 相比于其他一些技术比如 JPA 来说更难上手,很多人初学的时候很难通过看视频或者文档发就很快能独立写一个 Demo 出来,于是后面可能就放弃了学习这个东西。 刚来公司的时候的入职培训实战项目以及现在正在做的项目都用到了 Spring Security 这个强大的安全验证框架,可以看出这个框架在身份验证以及权限验证领域可以说应该是比较不错的选择。由于之前经历项目的这部分模块都不是自己做的,所以对于 Spring Security 并不是太熟悉。于是自/己抽时间对这部分知识学习了一下,并实现了一个简单的 Demo 。这个 Demo 主要用到了 **Spring Security** 和 **Spring Boot** 这两门技术,并且所有的依赖采用的都是最新的稳定版本。初次之外,这个项目还用到了 JPA 这门技术。 由于自己的能力以及时间有限,所以一定还有很多可以优化的地方,有兴趣的朋友可以一起完善,期待你的 PR。 ## 介绍 **项目用到的一些框架/服务:** - **数据库**: H2内存数据库,无需手动安装。 - **缓存**: Redis - **权限框架** :Spring Security - **ORM框架** :JPA (低SQL) - **接口文档** : swagger。在线 API 文档地址:[http://localhost:9333/api/swagger-ui/](http://localhost:9333/api/swagger-ui/) 。目前使用 knife4j 增强了 swagger 功能,地址: [http://localhost:9333/api/doc.html](http://localhost:9333/api/doc.html) (推荐👍) **你能从这个项目中学习到什么?** 1. Spring Security +JWT 实现登入登出以及权限校验 2. JPA 实现审计功能、多对多的映射关系如何通过关联表实现 ## 教程 1. [项目讲解/分析](./docs/SpringSecurity介绍.md) (内容待重构) 2. [swagger3.0整合](./docs/swagger.md) ## 代办 - [x] 增加H2内存数据库支持,无须MySQL,一键启动项目启动后访问 [http://localhost:9333/api/h2-console](http://localhost:9333/api/h2-console) (用户名:root,密码:123456) - [x] 增加Swagger,方便调用接口 - [x] 异常处理部分代码重构,优化返回结构 - [x] 新建一个role表,然后通过新建一个role_user表的形式,将用户与角色关联起来 - [x] 文件结构重构 - [x] 增加jpa审计功能 - [x] login(登录)接口在controller层暴露出来 - [x] 登出功能:redis保存token信息(key->user id,value->token),登出后将 redis中的token信息删除 - [x] 重新登录将上一次登录生成的token弄失效(解决未过期的token还是可以用的问题):重新登录会将 redis 中保存的 token 信息进行更新 - [ ] 重构详解文章 ## 项目概览 为了区分,我把 Spring Security相关的都单独放在了一个文件夹下面。 ![](./pictures/structure.png) ## 如何运行项目 1. git clone https://github.com/Snailclimb/spring-security-jwt-guide.git 2. 打开项目并且等待 Maven 下载好相关依赖。建议使用 Intellij IDEA 打开,并确保你的 Intellij IDEA 下载了 lombok 插件。 3. 下载 redis 并`application.yaml`中redis的配置 4. 运行项目(相关数据表会被自动创建,不了解的看一下 JPA) ## 示例 ### 1.注册一个账号 **URL:** `POST http://localhost:9333/api/users/sign-up` **RequestBody:** ```json {"userName":"123456","fullName":"shuangkou","password":"123456"} ``` ![注册](./pictures/sign-up.png) 新注册的用户默认绑定的角色为:用户(USER)和管理者(MANAGER)。 ### 2.登录 **URL:** `POST http://localhost:9333/api/auth/login` **RequestBody:** ```json {"username": "123456", "password": "123456","rememberMe":true} ``` ![登录](./pictures/login.png) ### 3.使用正确 Token 访问需要进行身份验证的资源 我们使用 GET 请求访问 `/api/users`,这个接口的访问权限是 ```java @PreAuthorize("hasAnyRole('ROLE_USER','ROLE_MANAGER','ROLE_ADMIN')") ``` ![Access resources that require authentication](./pictures/access-resources-that-require-authentication.png) ### 4.不带 Token 或者使用无效 Token 访问 我们使用 GET 请求访问 `/api/users`,但是不带token或者带上无效token。 ![Access resources that require authentication without token or with invalid token](./pictures/access-resources-that-require-authentication2.png) ### 5.带了正确Token但是访问权限 我们使用 DELETE 请求访问 `/api/users?username=xxx`,携带有效的 token ,但是 token 的访问权限不够。 ![](./pictures/not-have-enough-permission.png) ## 参考 - https://dev.to/keysh/spring-security-with-jwt-3j76
0
arduino/Arduino
Arduino IDE 1.x
arduino ide
<p align="center"> <img src="http://content.arduino.cc/brand/arduino-color.svg" width="50%" /> </p> Arduino is an open-source physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing and MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free at [https://arduino.cc](https://www.arduino.cc/en/Main/Software) ![Github](https://img.shields.io/github/v/release/arduino/Arduino) ## More info at - [Our website](https://www.arduino.cc/) - [The forums](https://forum.arduino.cc/) - Follow us on [Twitter](https://twitter.com/arduino) - And like us at [Facebook](https://www.facebook.com/official.arduino) ## Bug reports and technical discussions - To report a *bug* in the software or to request *a simple enhancement* go to [Github Issues](https://github.com/arduino/Arduino/issues) - More complex requests and technical discussion should go on the [Arduino Developers mailing list](https://groups.google.com/a/arduino.cc/forum/#!forum/developers) - If you're interested in modifying or extending the Arduino software, we strongly suggest discussing your ideas on the [Developers mailing list](https://groups.google.com/a/arduino.cc/forum/#!forum/developers) *before* starting to work on them. That way you can coordinate with the Arduino Team and others, giving your work a higher chance of being integrated into the official release ### Security If you think you found a vulnerability or other security-related bug in this project, please read our [security policy](https://github.com/arduino/Arduino/security/policy) and report the bug to our Security Team 🛡️ Thank you! e-mail contact: security@arduino.cc ## Installation Detailed instructions for installation in popular operating systems can be found at: - [Linux](https://www.arduino.cc/en/Guide/Linux) (see also the [Arduino playground](https://playground.arduino.cc/Learning/Linux)) - [macOS](https://www.arduino.cc/en/Guide/macOS) - [Windows](https://www.arduino.cc/en/Guide/Windows) ## Contents of this repository This repository contains just the code for the Arduino IDE itself. Originally, it also contained the AVR and SAM Arduino core and libraries (i.e. the code that is compiled as part of a sketch and runs on the actual Arduino device), but those have been moved into their own repositories. They are still automatically downloaded as part of the build process and included in built releases, though. The repositories for these extra parts can be found here: - Non-core specific Libraries are listed under: <https://github.com/arduino-libraries/> (and also a few other places, see `build/build.xml`). - The AVR core can be found at: <https://github.com/arduino/ArduinoCore-avr> - Other cores are not included by default but installed through the board manager. Their repositories can also be found under <https://github.com/arduino/>. ## Building and testing Instructions for building the IDE and running unit tests can be found on the wiki: - <https://github.com/arduino/Arduino/wiki/Building-Arduino> - <https://github.com/arduino/Arduino/wiki/Testing-Arduino> ## Credits Arduino is an open source project, supported by many. The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe and David A. Mellis. Arduino uses [GNU avr-gcc toolchain](https://gcc.gnu.org/wiki/avr-gcc), [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), [avr-libc](https://www.nongnu.org/avr-libc/), [avrdude](https://www.nongnu.org/avrdude/), [bossac](http://www.shumatech.com/web/products/bossa), [openOCD](http://openocd.org/) and code from [Processing](https://www.processing.org) and [Wiring](http://wiring.org.co). Icon and about image designed by [ToDo](https://www.todo.to.it/)
0
ssssssss-team/magic-api
magic-api 是一个接口快速开发框架,通过Web页面编写脚本以及配置,自动映射为HTTP接口,无需定义Controller、Service、Dao、Mapper、XML、VO等Java对象
api api-framework automatic-api http-api http-api-generator magic-api magic-script restful-api sql
<p align="center"> <img src="https://www.ssssssss.org/images/logo-magic-api.png" width="256"> </p> <p align="center"> <a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"><img src="https://img.shields.io/badge/JDK-1.8+-green.svg" /></a> <a href="https://search.maven.org/search?q=g:org.ssssssss%20AND%20a:magic-api"> <img alt="maven" src="https://img.shields.io/maven-central/v/org.ssssssss/magic-api.svg?style=flat-square"> </a> <a target="_blank" href="https://www.ssssssss.org"><img src="https://img.shields.io/badge/Docs-latest-blue.svg"/></a> <a target="_blank" href="https://github.com/ssssssss-team/magic-api/releases"><img src="https://img.shields.io/github/v/release/ssssssss-team/magic-api?logo=github"></a> <a target="_blank" href="https://gitee.com/ssssssss-team/magic-api"><img src="https://gitee.com/ssssssss-team/magic-api/badge/star.svg?theme=white" /></a> <a target="_blank" href="https://github.com/ssssssss-team/magic-api"><img src="https://img.shields.io/github/stars/ssssssss-team/magic-api.svg?style=social"/></a> <a target="_blank" href="LICENSE"><img src="https://img.shields.io/:license-MIT-blue.svg"></a> </p> [特性](#特性) | [快速开始](#快速开始) | [文档/演示](#文档演示) | [示例项目](#示例项目) | <a target="_blank" href="http://ssssssss.org/changelog.html">更新日志</a> | [项目截图](#项目截图) | [交流群](#交流群) # 简介 magic-api 是一个基于Java的接口快速开发框架,编写接口将通过magic-api提供的UI界面完成,自动映射为HTTP接口,无需定义Controller、Service、Dao、Mapper、XML、VO等Java对象即可完成常见的HTTP API接口开发 【已有上千家中小型公司使用,上万名开发者用于接口配置开发。上百名开发者参与提交了功能建议,接近20多名贡献者参与。已被gitee长期推荐。从首个版本开始不断优化升级,目前版本稳定,开发者交流群活跃。参与交流QQ群④700818216】 # 特性 - 支持MySQL、MariaDB、Oracle、DB2、PostgreSQL、SQLServer 等支持jdbc规范的数据库 - 支持非关系型数据库Redis、Mongodb - 支持集群部署、接口自动同步。 - 支持分页查询以及自定义分页查询 - 支持多数据源配置,支持在线配置数据源 - 支持SQL缓存,以及自定义SQL缓存 - 支持自定义JSON结果、自定义分页结果 - 支持对接口权限配置、拦截器等功能 - 支持运行时动态修改数据源 - 支持Swagger接口文档生成 - 基于[magic-script](https://gitee.com/ssssssss-team/magic-script)脚本引擎,动态编译,无需重启,实时发布 - 支持Linq式查询,关联、转换更简单 - 支持数据库事务、SQL支持拼接,占位符,判断等语法 - 支持文件上传、下载、输出图片 - 支持脚本历史版本对比与恢复 - 支持脚本代码自动提示、参数提示、悬浮提示、错误提示 - 支持导入Spring中的Bean、Java中的类 - 支持在线调试 - 支持自定义工具类、自定义模块包、自定义类型扩展、自定义方言、自定义列名转换等自定义操作 # 快速开始 ## maven引入 ```xml <!-- 以spring-boot-starter的方式引用 --> <dependency> <groupId>org.ssssssss</groupId> <artifactId>magic-api-spring-boot-starter</artifactId> <version>2.1.1</version> </dependency> ``` ## 修改application.properties ```properties server.port=9999 #配置web页面入口 magic-api.web=/magic/web #配置文件存储位置。当以classpath开头时,为只读模式 magic-api.resource.location=/data/magic-api ``` ## 在线编辑 访问`http://localhost:9999/magic/web`进行操作 # 文档/演示 - 文档地址:[https://ssssssss.org](https://ssssssss.org) - 在线演示:[https://magic-api.ssssssss.org](https://magic-api.ssssssss.org) # 示例项目 - [magic-api-example](https://gitee.com/ssssssss-team/magic-api-example) # 项目截图 | ![整体截图](https://images.gitee.com/uploads/images/2021/0711/105714_c1cacf2c_297689.png "整体截图") | ![代码提示](https://images.gitee.com/uploads/images/2021/0711/110448_11b6626b_297689.gif "代码提示") | |---|---| | ![DEBUG](https://images.gitee.com/uploads/images/2021/0711/110515_755f178a_297689.gif "DEBUG") | ![参数提示](https://images.gitee.com/uploads/images/2021/0711/110322_9dd6d149_297689.gif "参数提示") | | ![远程推送](https://images.gitee.com/uploads/images/2021/0711/105803_b53e0d7e_297689.png "远程推送") | ![历史记录](https://images.gitee.com/uploads/images/2021/0711/105910_f2440ea4_297689.png "历史记录") | | ![数据源](https://images.gitee.com/uploads/images/2021/0711/105846_7ec51a50_297689.png "数据源") | ![全局搜索](https://images.gitee.com/uploads/images/2021/0711/105823_ac18ada7_297689.png "全局搜索") | # 交流群 | 微信群 | QQ群 | | ----- | --- | | <img src="https://www.ssssssss.org/magic-api/images/wxcode.png" alt="作者微信"> | <img src="https://www.ssssssss.org/magic-api/images/qq-group-qrcode.png" alt="QQ群"> | | 备注:加群,邀您加入群聊| <a href="https://qm.qq.com/cgi-bin/qm/qr?k=38qddUeqrk_x29Xril9a_jxnoCGTmPRF&jump_from=webapi" target="_blank">点击加入QQ群:700818216</a> |
0
FasterXML/jackson-databind
General data-binding package for Jackson (2.x): works on streaming API (core) implementation(s)
hacktoberfest jackson jackson-databind json
# Overview This project contains the general-purpose data-binding functionality and tree-model for [Jackson Data Processor](../../../jackson). It builds on [Streaming API](../../../jackson-core) (stream parser/generator) package, and uses [Jackson Annotations](../../../jackson-annotations) for configuration. Project is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). While the original use case for Jackson was JSON data-binding, it can now be used to read content encoded in other data formats as well, as long as parser and generator implementations exist. Naming of classes uses word 'JSON' in many places even though there is no actual hard dependency to JSON format. ## Status | Type | Status | | ---- | ------ | | Build (CI) | [![Build (github)](https://github.com/FasterXML/jackson-databind/actions/workflows/main.yml/badge.svg)](https://github.com/FasterXML/jackson-databind/actions/workflows/main.yml) | | Artifact | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-databind/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-databind) | | OSS Sponsorship | [![Tidelift](https://tidelift.com/badges/package/maven/com.fasterxml.jackson.core:jackson-databind)](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind?utm_source=maven-com-fasterxml-jackson-core-jackson-databind&utm_medium=referral&utm_campaign=readme) | | Javadocs | [![Javadoc](https://javadoc.io/badge/com.fasterxml.jackson.core/jackson-databind.svg)](http://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind) | | Code coverage (2.17) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-databind/coverage.svg?branch=2.17)](https://codecov.io/github/FasterXML/jackson-databind?branch=2.17) | | OpenSSF Score | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/FasterXML/jackson-databind/badge)](https://securityscorecards.dev/viewer/?uri=github.com/FasterXML/jackson-databind) | # Get it! ## Maven Functionality of this package is contained in Java package `com.fasterxml.jackson.databind`, and can be used using following Maven dependency: ```xml <properties> ... <!-- Use the latest version whenever possible. --> <jackson.version>2.16.0</jackson.version> ... </properties> <dependencies> ... <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> ... </dependencies> ``` Package also depends on `jackson-core` and `jackson-annotations` packages, but when using build tools like Maven or Gradle, dependencies are automatically included. You may, however, want to use [jackson-bom](../../../jackson-bom) to ensure compatible versions of dependencies. If not using build tool that can handle dependencies using project's `pom.xml`, you will need to download and include these 2 jars explicitly. ## Non-Maven dependency resolution For use cases that do not automatically resolve dependencies from Maven repositories, you can still download jars from [Central Maven repository](https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/). Databind jar is also a functional OSGi bundle, with proper import/export declarations, so it can be use on OSGi container as is. Jackson 2.10 and above include `module-info.class` definitions so the jar is also a proper Java Module (JPMS). Jackson 2.12 and above include additional Gradle 6 Module Metadata for version alignment with Gradle. ----- ## Compatibility ### JDK Jackson-databind package baseline JDK requirements are as follows: * Versions 2.0 - 2.7 require JDK 6 * Versions 2.8 - 2.12 require JDK 7 to run (but 2.11 - 2.12 require JDK 8 to build) * Versions 2.13 and above require JDK 8 ### Android List is incomplete due to compatibility checker addition being done for Jackson 2.13. * 2.13: Android SDK 24+ * 2.14: Android SDK 26+ * 2.15: Android SDK 26+ * 2.16: Android SDK 26+ for information on Android SDK versions to Android Release names see [https://en.wikipedia.org/wiki/Android_version_history] ----- # Use It! More comprehensive documentation can be found from [Jackson-docs](../../../jackson-docs) repository; as well as from [Wiki](../../wiki) of this project. But here are brief introductionary tutorials, in recommended order of reading. ## 1 minute tutorial: POJOs to JSON and back The most common usage is to take piece of JSON, and construct a Plain Old Java Object ("POJO") out of it. So let's start there. With simple 2-property POJO like this: ```java // Note: can use getters/setters as well; here we just use public fields directly: public class MyValue { public String name; public int age; // NOTE: if using getters/setters, can keep fields `protected` or `private` } ``` we will need a `com.fasterxml.jackson.databind.ObjectMapper` instance, used for all data-binding, so let's construct one: ```java ObjectMapper mapper = new ObjectMapper(); // create once, reuse ``` The default instance is fine for our use -- we will learn later on how to configure mapper instance if necessary. Usage is simple: ```java MyValue value = mapper.readValue(new File("data.json"), MyValue.class); // or: value = mapper.readValue(new URL("http://some.com/api/entry.json"), MyValue.class); // or: value = mapper.readValue("{\"name\":\"Bob\", \"age\":13}", MyValue.class); ``` And if we want to write JSON, we do the reverse: ```java mapper.writeValue(new File("result.json"), myResultObject); // or: byte[] jsonBytes = mapper.writeValueAsBytes(myResultObject); // or: String jsonString = mapper.writeValueAsString(myResultObject); ``` So far so good? ## 3 minute tutorial: Generic collections, Tree Model Beyond dealing with simple Bean-style POJOs, you can also handle JDK `List`s, `Map`s: ```java Map<String, Integer> scoreByName = mapper.readValue(jsonSource, Map.class); List<String> names = mapper.readValue(jsonSource, List.class); // and can obviously write out as well mapper.writeValue(new File("names.json"), names); ``` as long as JSON structure matches, and types are simple. If you have POJO values, you need to indicate actual type (note: this is NOT needed for POJO properties with `List` etc types): ```java Map<String, ResultValue> results = mapper.readValue(jsonSource, new TypeReference<Map<String, ResultValue>>() { } ); // why extra work? Java Type Erasure will prevent type detection otherwise ``` (note: no extra effort needed for serialization, regardless of generic types) But wait! There is more! (enters Tree Model...) ### Tree Model While dealing with `Map`s, `List`s and other "simple" Object types (Strings, Numbers, Booleans) can be simple, Object traversal can be cumbersome. This is where Jackson's [Tree model](https://github.com/FasterXML/jackson-databind/wiki/JacksonTreeModel) can come in handy: ```java // can be read as generic JsonNode, if it can be Object or Array; or, // if known to be Object, as ObjectNode, if array, ArrayNode etc: JsonNode root = mapper.readTree("{ \"name\": \"Joe\", \"age\": 13 }"); String name = root.get("name").asText(); int age = root.get("age").asInt(); // can modify as well: this adds child Object as property 'other', set property 'type' root.withObject("/other").put("type", "student"); String json = mapper.writeValueAsString(root); // prints below /* with above, we end up with something like as 'json' String: { "name" : "Bob", "age" : 13, "other" : { "type" : "student" } } */ ``` Tree Model can be more convenient than data-binding, especially in cases where structure is highly dynamic, or does not map nicely to Java classes. Finally, feel free to mix and match, and even in the same json document (useful when only part of the document is known and modeled in your code) ```java // Some parts of this json are modeled in our code, some are not JsonNode root = mapper.readTree(complexJson); Person p = mapper.treeToValue(root.get("person"), Person.class); // known single pojo Map<String, Object> dynamicmetadata = mapper.treeToValue(root.get("dynamicmetadata"), Map.class); // unknown smallish subfield, convert all to collections int singledeep = root.get("deep").get("large").get("hiearchy").get("important").intValue(); // single value in very deep optional subfield, ignoring the rest int singledeeppath = root.at("/deep/large/hiearchy/important").intValue(); // json path int singledeeppathunique = root.findValue("important").intValue(); // by unique field name // Send an aggregate json from heterogenous sources ObjectNode root = mapper.createObjectNode(); root.putPOJO("person", new Person("Joe")); // simple pojo root.putPOJO("friends", List.of(new Person("Jane"), new Person("Jack"))); // generics Map<String, Object> dynamicmetadata = Map.of("Some", "Metadata"); root.putPOJO("dynamicmetadata", dynamicmetadata); // collections root.putPOJO("dynamicmetadata", mapper.valueToTree(dynamicmetadata)); // same thing root.set("dynamicmetadata", mapper.valueToTree(dynamicmetadata)); // same thing root.withObject("deep").withObject("large").withObject("hiearchy").put("important", 42); // create as you go root.withObject("/deep/large/hiearchy").put("important", 42); // json path mapper.writeValueAsString(root); ``` **Supported for Jackson 2.16+ versions** ```java // generics List<Person> friends = mapper.treeToValue(root.get("friends"), new TypeReference<List<Person>>() { }); // create as you go but without trying json path root.withObjectProperty("deep").withObjectProperty("large").withObjectProperty("hiearchy").put("important", 42); ``` ## 5 minute tutorial: Streaming parser, generator As convenient as data-binding (to/from POJOs) can be; and as flexible as Tree model can be, there is one more canonical processing model available: incremental (aka "streaming") model. It is the underlying processing model that data-binding and Tree Model both build upon, but it is also exposed to users who want ultimate performance and/or control over parsing or generation details. For in-depth explanation, look at [Jackson Core component](https://github.com/FasterXML/jackson-core). But let's look at a simple teaser to whet your appetite. ```java ObjectMapper mapper = ...; // First: write simple JSON output File jsonFile = new File("test.json"); // note: method added in Jackson 2.11 (earlier would need to use // mapper.getFactory().createGenerator(...) JsonGenerator g = f.createGenerator(jsonFile, JsonEncoding.UTF8); // write JSON: { "message" : "Hello world!" } g.writeStartObject(); g.writeStringField("message", "Hello world!"); g.writeEndObject(); g.close(); // Second: read file back try (JsonParser p = mapper.createParser(jsonFile)) { JsonToken t = p.nextToken(); // Should be JsonToken.START_OBJECT t = p.nextToken(); // JsonToken.FIELD_NAME if ((t != JsonToken.FIELD_NAME) || !"message".equals(p.getCurrentName())) { // handle error } t = p.nextToken(); if (t != JsonToken.VALUE_STRING) { // similarly } String msg = p.getText(); System.out.printf("My message to you is: %s!\n", msg); } ``` ## 10 minute tutorial: configuration There are two entry-level configuration mechanisms you are likely to use: [Features](https://github.com/FasterXML/jackson-databind/wiki/JacksonFeatures) and [Annotations](https://github.com/FasterXML/jackson-annotations). ### Commonly used Features Here are examples of configuration features that you are most likely to need to know about. Let's start with higher-level data-binding configuration. ```java // SerializationFeature for changing how JSON is written // to enable standard indentation ("pretty-printing"): mapper.enable(SerializationFeature.INDENT_OUTPUT); // to allow serialization of "empty" POJOs (no properties to serialize) // (without this setting, an exception is thrown in those cases) mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); // to write java.util.Date, Calendar as number (timestamp): mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); // DeserializationFeature for changing how JSON is read as POJOs: // to prevent exception when encountering unknown property: mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); // to allow coercion of JSON empty String ("") to null Object value: mapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT); ``` In addition, you may need to change some of low-level JSON parsing, generation details: ```java // JsonParser.Feature for configuring parsing settings: // to allow C/C++ style comments in JSON (non-standard, disabled by default) // (note: with Jackson 2.5, there is also `mapper.enable(feature)` / `mapper.disable(feature)`) mapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true); // to allow (non-standard) unquoted field names in JSON: mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); // to allow use of apostrophes (single quotes), non standard mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); // JsonGenerator.Feature for configuring low-level JSON generation: // to force escaping of non-ASCII characters: mapper.configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); ``` Full set of features are explained on [Jackson Features](https://github.com/FasterXML/jackson-databind/wiki/JacksonFeatures) page. ### Annotations: changing property names The simplest annotation-based approach is to use `@JsonProperty` annotation like so: ```java public class MyBean { private String _name; // without annotation, we'd get "theName", but we want "name": @JsonProperty("name") public String getTheName() { return _name; } // note: it is enough to add annotation on just getter OR setter; // so we can omit it here public void setTheName(String n) { _name = n; } } ``` There are other mechanisms to use for systematic naming changes, including use of "Naming Strategy" (via `@JsonNaming` annotation). You can use [Mix-in Annotations](https://github.com/FasterXML/jackson-docs/wiki/JacksonMixinAnnotations) to associate any and all Jackson-provided annotations. ### Annotations: Ignoring properties There are two main annotations that can be used to ignore properties: `@JsonIgnore` for individual properties; and `@JsonIgnoreProperties` for per-class definition ```java // means that if we see "foo" or "bar" in JSON, they will be quietly skipped // regardless of whether POJO has such properties @JsonIgnoreProperties({ "foo", "bar" }) public class MyBean { // will not be written as JSON; nor assigned from JSON: @JsonIgnore public String internal; // no annotation, public field is read/written normally public String external; @JsonIgnore public void setCode(int c) { _code = c; } // note: will also be ignored because setter has annotation! public int getCode() { return _code; } } ``` As with renaming, note that annotations are "shared" between matching fields, getters and setters: if only one has `@JsonIgnore`, it affects others. But it is also possible to use "split" annotations, to for example: ```java public class ReadButDontWriteProps { private String _name; @JsonProperty public void setName(String n) { _name = n; } @JsonIgnore public String getName() { return _name; } } ``` in this case, no "name" property would be written out (since 'getter' is ignored); but if "name" property was found from JSON, it would be assigned to POJO property! For a more complete explanation of all possible ways of ignoring properties when writing out JSON, check ["Filtering properties"](http://www.cowtowncoder.com/blog/archives/2011/02/entry_443.html) article. ### Annotations: using custom constructor Unlike many other data-binding packages, Jackson does not require you to define "default constructor" (constructor that does not take arguments). While it will use one if nothing else is available, you can easily define that an argument-taking constructor is used: ```java public class CtorBean { public final String name; public final int age; @JsonCreator // constructor can be public, private, whatever private CtorBean(@JsonProperty("name") String name, @JsonProperty("age") int age) { this.name = name; this.age = age; } } ``` Constructors are especially useful in supporting use of [Immutable objects](http://www.cowtowncoder.com/blog/archives/2010/08/entry_409.html). Alternatively, you can also define "factory methods": ```java public class FactoryBean { // fields etc omitted for brevity @JsonCreator public static FactoryBean create(@JsonProperty("name") String name) { // construct and return an instance } } ``` Note that use of a "creator method" (`@JsonCreator` with `@JsonProperty` annotated arguments) does not preclude use of setters: you can mix and match properties from constructor/factory method with ones that are set via setters or directly using fields. ## Tutorial: fancier stuff, conversions One useful (but not very widely known) feature of Jackson is its ability to do arbitrary POJO-to-POJO conversions. Conceptually you can think of conversions as sequence of 2 steps: first, writing a POJO as JSON, and second, binding that JSON into another kind of POJO. Implementation just skips actual generation of JSON, and uses more efficient intermediate representation. Conversions work between any compatible types, and invocation is as simple as: ```java ResultType result = mapper.convertValue(sourceObject, ResultType.class); ``` and as long as source and result types are compatible -- that is, if to-JSON, from-JSON sequence would succeed -- things will "just work". But here are a couple of potentially useful use cases: ```java // Convert from List<Integer> to int[] List<Integer> sourceList = ...; int[] ints = mapper.convertValue(sourceList, int[].class); // Convert a POJO into Map! Map<String,Object> propertyMap = mapper.convertValue(pojoValue, Map.class); // ... and back PojoType pojo = mapper.convertValue(propertyMap, PojoType.class); // decode Base64! (default byte[] representation is base64-encoded String) String base64 = "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz"; byte[] binary = mapper.convertValue(base64, byte[].class); ``` Basically, Jackson can work as a replacement for many Apache Commons components, for tasks like base64 encoding/decoding, and handling of "dyna beans" (Maps to/from POJOs). ## Tutorial: Builder design pattern + Jackson The Builder design pattern is a creational design pattern and can be used to create complex objects step by step. If we have an object that needs multiple checks on other dependencies, In such cases, it is preferred to use builder design pattern. Let's consider the person structure, which has some optional fields ```java public class Person { private final String name; private final Integer age; // getters } ``` Let’s see how we can employ its power in deserialization. First of all, let’s declare a private all-arguments constructor, and a Builder class. ```java private Person(String name, Integer age) { this.name = name; this.age = age; } static class Builder { String name; Integer age; Builder withName(String name) { this.name = name; return this; } Builder withAge(Integer age) { this.age = age; return this; } public Person build() { return new Person(name, age); } } ``` First of all, we need to mark our class with `@JsonDeserialize` annotation, passing a builder parameter with a fully qualified domain name of a builder class. After that, we need to annotate the builder class itself as `@JsonPOJOBuilder`. ```java @JsonDeserialize(builder = Person.Builder.class) public class Person { //... @JsonPOJOBuilder static class Builder { //... } } ``` A simple unit test will be: ```java String json = "{\"name\":\"Hassan\",\"age\":23}"; Person person = new ObjectMapper().readValue(json, Person.class); assertEquals("Hassan", person.getName()); assertEquals(23, person.getAge().intValue()); ``` If your builder pattern implementation uses other prefixes for methods or uses other names than build() for the builder method Jackson also provide a handy way for you. For example, if you have a builder class that uses the "set" prefix for its methods and use the create() method instead of build() for building the whole class, you have to annotate your class like: ```java @JsonPOJOBuilder(buildMethodName = "create", withPrefix = "set") static class Builder { String name; Integer age; Builder setName(String name) { this.name = name; return this; } Builder setAge(Integer age) { this.age = age; return this; } public Person create() { return new Person(name, age); } } ``` To deserialize JSON fields under a different name than their object counterparts, the @JsonProperty annotation can be used within the builder on the appropriate fields. ```java @JsonPOJOBuilder(buildMethodName = "create", withPrefix = "set") static class Builder { @JsonProperty("known_as") String name; Integer age; //... } ``` This will deserialize the JSON property `known_as` into the builder field `name`. If a mapping like this is not provided (and further annotations aren't supplied to handle this), an `Unrecognized field "known_as"` exception will be thrown during deserialization if the field is provided anyways. If you wish to refer to properties with more than one alias for deserialization, the `@JsonAlias` annotation can be used. ```java @JsonPOJOBuilder(buildMethodName = "create", withPrefix = "set") static class Builder { @JsonProperty("known_as") @JsonAlias({"identifier", "first_name"}) String name; Integer age; //... } ``` This will deserialize JSON fields with `known_as`, as well as `identifer` and `first_name` into `name`. Rather than an array of entries, a single alias can be used by specifying a string as such `JsonAlias("identifier")`. Note: to use the `@JsonAlias` annotation, a `@JsonProperty` annotation must also be used. Overall, Jackson library is very powerful in deserializing objects using builder pattern. # Contribute! We would love to get your contribution, whether it's in form of bug reports, Requests for Enhancement (RFE), documentation, or code patches. See [CONTRIBUTING](https://github.com/FasterXML/jackson/blob/master/CONTRIBUTING.md) for details on things like: * Community, ways to interact (mailing lists, gitter) * Issue tracking ([GitHub Issues](https://github.com/FasterXML/jackson-databind/issues)) * Paperwork: CLA (just once before the first merged contribution) ## Limitation on Dependencies by Core Components One additional limitation exists for so-called core components (streaming api, jackson-annotations and jackson-databind): no additional dependencies are allowed beyond: * Core components may rely on any methods included in the supported JDK * Minimum Java version is Java 7 for Jackson 2.7 - 2.12 of `jackson-databind` and most non-core components * Minimum Java version is Java 8 for Jackson 2.13 and later * Jackson-databind (this package) depends on the other two (annotations, streaming). This means that anything that has to rely on additional APIs or libraries needs to be built as an extension, usually a Jackson module. ## Branches `master` branch is for developing the next major Jackson version -- 3.0 -- but there are active maintenance branches in which much of development happens: * `2.16` is the branch for "next" minor version to release (as of July 2023) * `2.15` is the current stable minor 2.x version * `2.14` is for selected backported fixes Older branches are usually not maintained after being declared as closed on [Jackson Releases](https://github.com/FasterXML/jackson/wiki/Jackson-Releases) page, but exist just in case a rare emergency patch is needed. All released versions have matching git tags (e.g. `jackson-dataformats-binary-2.12.3`). ----- ## Differences from Jackson 1.x Project contains versions 2.0 and above: source code for last (1.x) release, 1.9, is available at [Jackson-1](../../../jackson-1) repo. Main differences compared to 1.x "mapper" jar are: * Maven build instead of Ant * Java package is now `com.fasterxml.jackson.databind` (instead of `org.codehaus.jackson.map`) ----- ## Support ### Community support Jackson components are supported by the Jackson community through mailing lists, Gitter forum, Github issues. See [Participation, Contributing](../../../jackson#participation-contributing) for full details. ### Enterprise support Available as part of the [Tidelift](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind) Subscription. The maintainers of `jackson-databind` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind?utm_source=maven-com-fasterxml-jackson-core-jackson-databind&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) ----- ## Further reading * [Overall Jackson Docs](../../../jackson-docs) * [Project wiki page](https://github.com/FasterXML/jackson-databind/wiki) Related: * [Core annotations](https://github.com/FasterXML/jackson-annotations) package defines annotations commonly used for configuring databinding details * [Core parser/generator](https://github.com/FasterXML/jackson-core) package defines low-level incremental/streaming parsers, generators * [Jackson Project Home](../../../jackson) has links to all modules * [Jackson Docs](../../../jackson-docs) is project's documentation hub
0
jetlinks/jetlinks-community
JetLinks 基于Java8,Spring Boot 2.x ,WebFlux,Netty,Vert.x,Reactor等开发, 是一个全响应式的企业级物联网平台。支持统一物模型管理,多种设备,多种厂家,统一管理。统一设备连接管理,多协议适配(TCP,MQTT,UDP,CoAP,HTTP等),屏蔽网络编程复杂性,灵活接入不同厂家不同协议等设备。实时数据处理,设备告警,消息通知,数据转发。地理位置,数据可视化等。能帮助你快速建立物联网相关业务系统。
iot iot-platform java jetlinks mqtt netty r2dbc reactive-streams reactor rule-engine spring-boot tcp webflux websocket
# JetLinks 物联网基础平台 ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jetlinks/jetlinks-community/maven.yml?branch=master) ![Version](https://img.shields.io/badge/version-2.1--RELEASE-brightgreen) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/e8d527d692c24633aba4f869c1c5d6ad)](https://app.codacy.com/gh/jetlinks/jetlinks-community?utm_source=github.com&utm_medium=referral&utm_content=jetlinks/jetlinks-community&utm_campaign=Badge_Grade_Settings) [![OSCS Status](https://www.oscs1024.com/platform/badge/jetlinks/jetlinks-community.svg?size=small)](https://www.oscs1024.com/project/jetlinks/jetlinks-community?ref=badge_small) [![star](https://img.shields.io/github/stars/jetlinks/jetlinks-community?style=social)](https://github.com/jetlinks/jetlinks-community) [![star](https://gitee.com/jetlinks/jetlinks-community/badge/star.svg?theme=gvp)](https://gitee.com/jetlinks/jetlinks-community/stargazers) [![QQ⑤群554591908](https://img.shields.io/badge/QQ⑤群-554591908-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=jiirLiyFUecy_gsankzVQ-cl6SrZCnv9&&jump_from=webapi) [![QQ④群780133058](https://img.shields.io/badge/QQ④群-780133058-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=Gj47w9kg7TlV5ceD5Bqew_M_O0PIjh_l&jump_from=webapi) [![QQ③群647954464](https://img.shields.io/badge/QQ③群-647954464-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=K5m27CkhDn3B_Owr-g6rfiTBC5DKEY59&jump_from=webapi) [![QQ②群324606263](https://img.shields.io/badge/QQ②群-324606263-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=IMas2cH-TNsYxUcY8lRbsXqPnA2sGHYQ&jump_from=webapi) [![QQ①群2021514](https://img.shields.io/badge/QQ①群-2021514-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=LGf0OPQqvLGdJIZST3VTcypdVWhdfAOG&jump_from=webapi) JetLinks 基于Java8,Spring Boot 2.x,WebFlux,Netty,Vert.x,Reactor等开发, 是一个开箱即用,可二次开发的企业级物联网基础平台。平台实现了物联网相关的众多基础功能, 能帮助你快速建立物联网相关业务系统。 ## 核心特性 #### 开放源代码 全部源代码开放,可自由拓展功能,不再受制于人.前后端分离,接口全开放。 #### 统一设备接入,海量设备管理 TCP/UDP/MQTT/HTTP、TLS/DTLS、不同厂商、不同设备、不同报文、统一接入,统一管理。 #### 规则引擎 灵活的规则模型配置,支持多种规则模型以及自定义规则模型. 设备告警,场景联动,均由统一的规则引擎管理。 #### 数据权限控制 灵活的非侵入数据权限控制。可实现菜单、按钮、数据三维维度的数据权限控制。可控制单条数据的操作权限。 ## 技术栈 1. [Spring Boot 2.7.x](https://spring.io/projects/spring-boot) 2. [Spring WebFlux](https://spring.io/) 响应式Web支持 3. [R2DBC](https://r2dbc.io/) 响应式关系型数据库驱动 4. [Project Reactor](https://projectreactor.io/) 响应式编程框架 4. [Netty](https://netty.io/),[Vert.x](https://vertx.io/) 高性能网络编程框架 5. [ElasticSearch](https://www.elastic.co/cn/products/enterprise-search) 全文检索,日志,时序数据存储 6. [PostgreSQL](https://www.postgresql.org) 业务功能数据管理 7. [hsweb framework 4](https://github.com/hs-web) 业务功能基础框架 ## 架构 ![platform](./platform.png) ## 设备接入流程 ![device-flow](./device-flow.png) ## 模块 ```bash --jetlinks-community ------|----docker ------|------|----dev-env # 启动开发环境 ------|------|----run-all # 启动全部,通过http://localhost:9000 访问系统. ------|----jetlinks-components # 公共组件模块 ------|-------|----common-component # 通用组件. ------|-------|----configuration-component # 通用配置. ------|-------|----dashboard-component # 仪表盘. ------|-------|----datasource-component # 数据源. ------|-------|----elasticsearch-component # elasticsearch集成. ------|-------|----gateway-component # 网关组件,消息网关,设备接入. ------|-------|----io-component # IO 组件,Excel导入导出等. ------|-------|----logging-component # 日志组件 ------|-------|----network-component # 网络组件,MQTT,TCP,CoAP,UDP等 ------|-------|----notify-component # 通知组件,短信,右键等通知 ------|-------|----protocol-component # 协议组件 ------|-------|----relation-component # 关系组件 ------|-------|----rule-engine-component # 规则引擎 ------|-------|----script-component # 脚本组件 ------|-------|----timeseries-component # 时序数据组件 ------|-------|----tdengine-component # TDengine集成 ------|-------|----things-component # 物组件 ------|----jetlinks-manager # 业务管理模块 ------|-------|----authentication-manager # 用户,权限管理 ------|-------|----device-manager # 设备管理 ------|-------|----logging-manager # 日志管理 ------|-------|----network-manager # 网络组件管理 ------|-------|----notify-manager # 通知管理 ------|-------|----visualization-manager # 数据可视化管理 ------|-------|----rule-engine-manager # 规则引擎管理 ------|----jetlinks-standalone # 服务启动模块 ------|----simulator # 设备模拟器 ``` ## 服务支持 我们提供了各种服务方式帮助您深入了解物联网平台和代码,通过产品文档、技术交流群、付费教学等方式,你将获得如下服务: | 服务项 | 服务内容 | 服务收费 | 服务方式 | |-----------|-----------------|--------|-------------| | 基础问题答疑 | 问题答疑 | 免费 | 技术交流群支持 [![QQ⑤群554591908](https://img.shields.io/badge/QQ⑤群-554591908-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=jiirLiyFUecy_gsankzVQ-cl6SrZCnv9&&jump_from=webapi) [![QQ④群780133058](https://img.shields.io/badge/QQ④群-780133058-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=Gj47w9kg7TlV5ceD5Bqew_M_O0PIjh_l&jump_from=webapi) [![QQ③群647954464](https://img.shields.io/badge/QQ③群-647954464-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=K5m27CkhDn3B_Owr-g6rfiTBC5DKEY59&jump_from=webapi) [![QQ②群324606263](https://img.shields.io/badge/QQ②群-324606263-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=IMas2cH-TNsYxUcY8lRbsXqPnA2sGHYQ&jump_from=webapi) [![QQ①群2021514](https://img.shields.io/badge/QQ①群-2021514-brightgreen)](https://qm.qq.com/cgi-bin/qm/qr?k=LGf0OPQqvLGdJIZST3VTcypdVWhdfAOG&jump_from=webapi) | | 系统部署 | 系统部署 | 免费 | 文档自助。[源码部署](https://hanta.yuque.com/px7kg1/yfac2l/vvoa3u2ztymtp4oh) [Docker部署](https://hanta.yuque.com/px7kg1/yfac2l/mzq23z4iey5ev1a5) | | 产品使用 | 教学产品各功能使用 | 免费 | 文档自助。[产品文档](https://hanta.yuque.com/px7kg1/yfac2l) | | 二次开发 | 教学平台源码开发过程、工具使用等;| 免费 | 文档自助。[开发文档](https://hanta.yuque.com/px7kg1/nn1gdr) | | 系统部署 | 在客户指定的网络和硬件环境中完成社区版服务部署;提供**模拟**设备接入到平台中,并能完成正常设备上线、数据上下行 | 199元 | 线上部署支持 | | 技术支持 | 提供各类部署、功能使用中遇到的问题答疑 | 100元 | 半小时内 线上远程支持| | 设备接入协议开发 | 根据提供的设备型号,编写并提供接入平台协议包的源码。| 3000+元 | 定制化开发 | | 硬件支持 | 提供JetLinks自有硬件邮寄到手(JetLinks DTU、报警器、温度传感器);并提供完整的接入视频文档 | 699元 | 硬件包邮<br /> [视频文档](https://hanta.yuque.com/px7kg1/yfac2l/pgi0eydsmlyb7q1w)| | 其他服务 | 企业版源码购买;定制化开发;定制化时长、功能服务等 | 面议 | 面议 | ### **付费**服务支持或商务合作请联系 ![qrCode.jpg](./qrCode.png) ## 文档 [产品文档](https://hanta.yuque.com/px7kg1/yfac2l) [快速开始](https://hanta.yuque.com/px7kg1/yfac2l/raspyc4p1asfuxks) [开发文档](https://hanta.yuque.com/px7kg1/nn1gdr) [![Stargazers over time](https://starchart.cc/jetlinks/jetlinks-community.svg?variant=adaptive)](https://starchart.cc/jetlinks/jetlinks-community)
0
libgdx/gdx-ai
Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines
artificial-intelligence behavior-trees decision-making formation-motion framework gamedev java libgdx movement npc pathfinding state-machines steering-behaviors
![](https://cloud.githubusercontent.com/assets/2366334/4677025/64ae592a-55e2-11e4-8a31-31c2941ff995.png) [![Jenkins build status](https://libgdx.badlogicgames.com/jenkins/buildStatus/icon?job=gdx-ai&.png)](https://libgdx.badlogicgames.com/jenkins/job/gdx-ai/) (Jenkins) An artificial intelligence framework, entirely written in Java, for game development with [libGDX](https://github.com/libgdx/libgdx). The gdxAI project is a libGDX extension living under the [libGDX umbrella](https://github.com/libgdx). However it does not force you to use that specific framework if you do not wish to do so. The libGDX jar remains an essential requirement, mostly due to the use of libGDX collections which are optimized for mobile platforms by limiting garbage creation and supporting primitive types directly, so avoiding boxing and unboxing. GdxAI tries to be a high-performance framework providing some of the most common AI techniques used by game industry. However, in the present state of the art, the gdxAI framework covers only part of the entire game AI area, which is really huge. We've tried to focus on what matters most in game AI development, though. And more stuff will come soon. Currently supported features are: - Movement AI * Steering Behaviors * Formation Motion - Pathfinding * A* * Hierarchical Pathfinding * Path Smoothing * Interruptible Pathfinding - Decision Making * State Machine * Behavior Trees - Infrastructure * Message Handling * Scheduling ### Getting Started * [Use gdxAI in your project](https://github.com/libgdx/gdx-ai/wiki/Getting-started-with-gdxAI) * [Read the wiki](https://github.com/libgdx/gdx-ai/wiki) * [Refer to the javadocs](http://libgdx.badlogicgames.com/gdx-ai/docs/) * [Read the examples](https://github.com/libgdx/gdx-ai/tree/master/tests) * [Useful Links and Resources](https://github.com/libgdx/gdx-ai/wiki/Useful-Links-and-Resources) ### News & Community Check the [libGDX blog](https://libgdx.com/news/) for news and updates. You can get help on our [Discord server](https://libgdx.com/community/discord/). ### Reporting Issues Something not working quite as expected? Do you need a feature that has not been implemented yet? Check the [issue tracker](https://github.com/libgdx/gdx-ai/issues) and add a new one if your problem is not already listed. Please try to provide a detailed description of your problem, including the steps to reproduce it. ### Contributing Awesome! If you would like to contribute with a new feature or a bugfix, [fork this repo](https://help.github.com/articles/fork-a-repo) and [submit a pull request](https://help.github.com/articles/using-pull-requests). Also, before we can accept substantial code contributions, we need you to sign the [libGDX Contributor License Agreement](https://libgdx.com/dev/contributing/#contributor-license-agreement). ### License The gdxAI project is licensed under the [Apache 2 License](https://github.com/libgdx/gdx-ai/blob/master/LICENSE), meaning you can use it free of charge, without strings attached in commercial and non-commercial projects. We love to get (non-mandatory) credit in case you release a game or app using gdxAI!
0
fuzhengwei/itstack-demo-design
:art: 《重学Java设计模式》是一本互联网真实案例实践书籍。以落地解决方案为核心,从实际业务中抽离出,交易、营销、秒杀、中间件、源码等22个真实场景,来学习设计模式的运用。欢迎关注小傅哥,微信(fustack),公众号:bugstack虫洞栈,博客:https://bugstack.cn
java springboot
# 重学 Java 设计模式 > **作者:** 小傅哥,Java Developer,[:pencil2: 虫洞 · 科技栈,作者](https://bugstack.cn),[:trophy: CSDN 博客专家](https://bugstack.blog.csdn.net) > 本代码库是作者小傅哥多年从事一线互联网```Java```开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。如果本仓库能为您提供帮助,请给予支持(关注、点赞、分享)! <br/> <div align="center"> <a href="https://bugstack.cn" style="text-decoration:none"><img src="https://bugstack.cn/images/system/CodeGuide-LOGO.png?raw=true" width="256px"></a> </div> <br/> <div align="center"> <a href="https://bugstack.cn/md/other/guide-to-reading.html"><img src="https://bugstack.cn/images/system/CodeGuide-Read.svg"></a> <a href="https://bugstack.cn/images/personal/qrcode.png"><img src="https://bugstack.cn/images/system/CodeGuide-WeiXinCode.svg"></a> <a href="https://bugstack.cn/md/knowledge/pdf/2021-01-26-Java%E9%9D%A2%E7%BB%8F%E6%89%8B%E5%86%8CPDF%E4%B8%8B%E8%BD%BD.html"><img src="https://bugstack.cn/images/system/CodeGuide-JavaPDF.svg"></a> <a href="https://mp.weixin.qq.com/s/VthCUlT8oAJqKOoq5_NzSQ"><img src="https://bugstack.cn/images/system/CodeGuide-Lottery.svg"></a> <a href="https://github.com/fuzhengwei/CodeGuide"><img src="https://badgen.net/github/stars/fuzhengwei/CodeGuide?icon=github&color=4ab8a1"></a> </div> <br/> <div align="center"> <a href="https://bugstack.cn" style="text-decoration:none"><img src="https://github.com/fuzhengwei/itstack-demo-design/blob/master/pdf.png?raw=true" width="500"></a> </div> <br/> ## ⛳ 目录 - [书籍下载&购买](https://github.com/fuzhengwei/itstack-demo-design#%E4%B9%A6%E7%B1%8D%E4%B8%8B%E8%BD%BD%E8%B4%AD%E4%B9%B0) - [源码下载](https://github.com/fuzhengwei/itstack-demo-design#%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD) - [GitHub](https://github.com/fuzhengwei/itstack-demo-design)、[Gitee](https://gitee.com/fustack/itstack-demo-design) - [内容简介](https://github.com/fuzhengwei/itstack-demo-design#%E5%86%85%E5%AE%B9%E7%AE%80%E4%BB%8B) - [电子版书籍](https://github.com/fuzhengwei/itstack-demo-design#%E7%94%B5%E5%AD%90%E7%89%88%E6%97%A7%E7%89%88---%E5%9C%A8%E7%BA%BF%E9%98%85%E8%AF%BB) - [参与贡献](https://github.com/fuzhengwei/itstack-demo-design#%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE) - [与我联系](https://github.com/fuzhengwei/itstack-demo-design#%E4%B8%8E%E6%88%91%E8%81%94%E7%B3%BB) - [致谢](https://github.com/fuzhengwei/itstack-demo-design#%E8%87%B4%E8%B0%A2) - [Go -> 小傅哥的更多原创内容 面经手册、字节码编程、DDD实战项目、SpringBoot中间件等](https://bugstack.cn/md/zsxq/introduce.html) - [通过实战项目锻炼设计模式,锻炼编码能力,提高编程思维](https://bugstack.cn/md/zsxq/introduce.html) - 业务项目 - [ChatGPT 微服务应用体系构建 - API-SDK、鉴权、公众号、企业微信、支付服务](https://bugstack.cn/md/zsxq/project/chatgpt.html)- 👣 进行中 - [Lottery 分布式抽奖系统 - 基于领域驱动设计的四层架构实践](https://bugstack.cn/md/zsxq/project/lottery.html) - [Netty+JavaFx实战:仿桌面版微信聊天](https://bugstack.cn/md/zsxq/project/im.html) - [ChatGPT AI 问答助手 - 小型,对接知识星球](https://bugstack.cn/md/zsxq/project/chatbot-api.html) - 组件项目 - [API网关:中间件设计和实践](https://bugstack.cn/md/zsxq/project/api-gateway.html) - [SpringBoot Starter 中间件设计和开发](https://bugstack.cn/md/zsxq/project/springboot-starter.html) - [IDEA Plugin 开发手册](https://bugstack.cn/md/zsxq/booklet/idea-plugin.html) ## 书籍下载&购买 #### - 小傅哥的《重学 Java 设计模式》 ⭐⭐⭐⭐ >本书是作者`小傅哥`,投入50天时间,从互联网实际业务开发中抽离出,交易、营销、秒杀、中间件、源码等22个真实业务场景,编写了18万字271页的实战型Java编程资料。如果书中含有不易理解的内容,一定是作者在编写的过程中缺少必要的描述和严格的校准,感谢把你的意见或者疑问提交给我,也欢迎与我多一些交互,互相进步共同成长。 - 旧版电子书:关注公众号:[bugstack虫洞栈 `点击扫码`](https://bugstack.cn/assets/images/qrcode.png),回复:`设计模式` - 新版纸质书:[https://item.jd.com/13218336.html](https://item.jd.com/13218336.html) `内容补充、添加类图、重画图稿、全书彩印`,一本可以在手边随时翻阅的设计模式,感谢支持。 ## 源码下载 - **GitHub** [https://github.com/fuzhengwei/itstack-demo-design | `小傅哥 Java 原创版本`](https://github.com/fuzhengwei/itstack-demo-design) - **Gitee** [https://gitee.com/fustack/itstack-demo-design | `小傅哥 Java 原创版本`](https://gitee.com/fustack/itstack-demo-design) *欢迎更多小伙伴,贡献关于此设计模式其他版语言,我会帮你添加链接* ## 内容简介 **Hello, world of design!** 你好,设计模式的世界! 欢迎来到这里,很高兴你能拿到这本书,如果你能坚持看完并按照书中的例子进行实践,那么在编程开发的世界里,就又多了一个可以写出良好代码的人,同时也为架构师培养储备了一个人才。 可能在此之前你也多少了解过设计模式,但在实际的业务开发中使用却不多,多数时候都是大面积堆积`ifelse`组装业务流程,对于一次次的需求迭代和逻辑补充,只能东拼西凑`Ctrl+C`、`Ctrl+V`。 所以为了能让更多的程序员👨‍💻‍更好的接受设计思想和架构思维,并能运用到实际的业务场景。本书的作者`小傅哥`,投入50天时间,从互联网实际业务开发中抽离出,交易、营销、秒杀、中间件、源码等22个真实场景,来学习设计模式实践使用的应用可上手技能。 **谁发明了设计模式?** 设计模式的概念最早是由 `克里斯托佛·亚历山大` 在其著作 `《建筑模式语言》` 中首次提出的。 本书介绍了城市设计的 “语言”,提供了253个描述城镇、邻里、住宅、花园、房间及西部构造的模式, 而此类 “语言” 的基本单元就是模式。后来,`埃里希·伽玛`、 `约翰·弗利赛德斯`、 `拉尔夫·约翰逊` 和 `理查德·赫尔姆` 这四位作者接受了模式的概念。 1994 年, 他们出版了 `《设计模式: 可复用面向对象软件的基础》` 一书, 将设计模式的概念应用到程序开发领域中。 其实有一部分人并没有仔细阅读过设计模式的相关书籍和资料,但依旧可以编写出优秀的代码。这主要是由于在经过众多项目的锤炼和对程序设计的不断追求,从而在多年编程历程上提炼出来的心得体会。而这份经验最终会与设计模式提到的内容几乎一致,同样会要求高内聚、低耦合、可扩展、可复用。你可能也遇到类似的经历,在学习一些框架的源码时,发现它里的某些设计和你在做开发时一样。 **我怎么学不会设计模式?** 钱也花了,书也买了。代码还是一坨一坨的!设计模式是由多年的经验提炼出来开发指导思想。就像我告诉你自行车怎么骑、汽车怎么开,但只要你没跑过几千公里,你能记住的只是理论,想上道依旧很慌! **所以**,本设计模式专题系列开始,会带着你使用设计模式的思想去优化代码。从而学习设计模式的心得并融入给自己。当然这里还需要多加练习,一定是*人车合一*,才能站在设计模式的基础上构建出更加合理的代码。 **阅读建议** 本书属于实战型而不是理论介绍类书籍,每一章节都有对应的完整代码,学习的过程需要参考书中的章节与代码一起学习,同时在学习的过程中需要了解并运行代码。学习完成后进行知识点的总结,以及思考🤔这样的设计模式在自己的业务场景中需要如何使用。 ## 电子版(旧版) - 👉[**在线阅读**](https://bugstack.cn/md/develop/design-pattern/2020-05-20-%E9%87%8D%E5%AD%A6Java%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%B7%A5%E5%8E%82%E6%96%B9%E6%B3%95%E6%A8%A1%E5%BC%8F%E3%80%8B.html) - 创建型模式 - [重学 Java 设计模式《实战工厂方法模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-05-20-%E9%87%8D%E5%AD%A6Java%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%B7%A5%E5%8E%82%E6%96%B9%E6%B3%95%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《抽象工厂模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-05-24-%E9%87%8D%E5%AD%A6Java%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E6%8A%BD%E8%B1%A1%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战建造者模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-05-26-%E9%87%8D%E5%AD%A6Java%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%BB%BA%E9%80%A0%E8%80%85%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战原型模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-05-28-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%8E%9F%E5%9E%8B%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战单例模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-05-31-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - 结构型模式 - [重学 Java 设计模式《适配器模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-02-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E9%80%82%E9%85%8D%E5%99%A8%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战桥接模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-04-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E6%A1%A5%E6%8E%A5%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战组合模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-08-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E7%BB%84%E5%90%88%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战装饰器模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-09-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E8%A3%85%E9%A5%B0%E5%99%A8%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战外观模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-11-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%A4%96%E8%A7%82%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战享元模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-14-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E4%BA%AB%E5%85%83%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战代理模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-16-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E4%BB%A3%E7%90%86%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - 行为型模式 - [重学 Java 设计模式《实战责任链模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-18-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E8%B4%A3%E4%BB%BB%E9%93%BE%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战命令模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-21-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%91%BD%E4%BB%A4%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战迭代器模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-23-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E8%BF%AD%E4%BB%A3%E5%99%A8%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战中介者模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-27-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E4%B8%AD%E4%BB%8B%E8%80%85%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战备忘录模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-28-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E5%A4%87%E5%BF%98%E5%BD%95%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战观察者模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-06-30-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E8%A7%82%E5%AF%9F%E8%80%85%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战状态模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-07-02-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E7%8A%B6%E6%80%81%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战策略模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-07-05-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E7%AD%96%E7%95%A5%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战模板模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-07-07-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E6%A8%A1%E6%9D%BF%E6%A8%A1%E5%BC%8F%E3%80%8B.md) - [重学 Java 设计模式《实战访问者模式》](https://github.com/fuzhengwei/CodeGuide/blob/master/docs/md/develop/design-pattern/2020-07-09-%E9%87%8D%E5%AD%A6%20Java%20%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E3%80%8A%E5%AE%9E%E6%88%98%E8%AE%BF%E9%97%AE%E8%80%85%E6%A8%A1%E5%BC%8F%E3%80%8B.md) --- ## 参与贡献 1. 如果您对本项目有任何建议或发现文中内容有误的,欢迎提交 issues 进行指正。 2. 对于文中我没有涉及到知识点,欢迎提交 PR。 ## 与我联系 - **加群交流** 本群的宗旨是给大家提供一个良好的技术学习交流平台,所以杜绝一切广告!由于微信群人满 100 之后无法加入,请扫描下方二维码先添加作者 “小傅哥” 微信(fustack),备注:加群。 <img src="https://bugstack.cn/images/personal/fustack.png" width="180px"> - **公众号(bugstack虫洞栈)** - 沉淀、分享、成长,专注于原创专题案例,以最易学习编程的方式分享知识,让自己和他人都能有所收获。 <img src="https://bugstack.cn/images/personal/qrcode.png" width="180px"> ## 致谢 感谢以下人员对本仓库做出的贡献或者对小傅哥的赞赏,当然不仅仅只有这些贡献者,这里就不一一列举了。如果你希望被添加到这个名单中,并且提交过 Issue 或者 PR,请与我联系。 **:seedling: 感谢大家对仓库建设的贡献** <a href="https://github.com/6freeair2016"> <img src="https://avatars.githubusercontent.com/u/20253565?v=4" style="border-radius:5px" width="50px"> </a> <a href="https://github.com/LittleBrotherFu"> <img src="https://avatars.githubusercontent.com/u/25544835?v=4" style="border-radius:5px" width="50px"> </a> <a href="https://github.com/MichaelHan0228"> <img src="https://avatars.githubusercontent.com/u/33157567?v=4" style="border-radius:5px" width="50px"> </a> *截止到此设计模式内容就全部讲完了,可能书中会因作者水平有限,有一些描述不准确或者错字内容。欢迎提交给我,也欢迎和我讨论相关的技术内容,作者小傅哥,非常愿意与同好进行交流,互相提升技术。*
0
roncoo/roncoo-education
领课教育系统(roncoo-education)是基于领课网络多年的在线教育平台开发和运营经验打造出来的产品,致力于打造一个各行业都适用的分布式在线教育系统。系统采用前后端分离模式,前台采用vue.js为核心框架,后台采用Spring Cloud为核心框架。系统目前主要功能有课程点播功能,支持多家视频云的接入,课程附件管理功能,支持多家存储云的接入,讲师管理功能,支持讲师入驻功能,可以帮助个人或者企业快速搭建一个轻量级的在线教育平台。
roncoo roncoo-education spring-boot-2 spring-cloud
<div align=center> <img src="images/logo.jpg" alt="领课教育系统-开源版"/> <div align=center> <a href="http://spring.io/projects/spring-boot"> <img src="https://img.shields.io/badge/spring--boot-2.6.3-blue.svg" alt="spring-boot"> </a> <a href="https://spring.io/projects/spring-cloud-alibaba"> <img src="https://img.shields.io/badge/spring--cloud--alibaba-2021.0.1.0-blue.svg" alt="mybatis-plus"> </a> </div> </div> ### 项目介绍 领课教育系统(roncoo-education)是基于领课网络多年的在线教育平台开发和运营经验打造出来的产品,致力于打造一个各行业都适用的分布式在线教育系统。系统采用前后端分离模式,前台采用vue.js为核心框架,后台采用Spring Cloud为核心框架。系统目前主要功能有课程点播功能,支持多家视频云的接入,课程附件管理功能,支持多家存储云的接入,可以帮助个人或者企业快速搭建一个轻量级的在线教育平台。 * 所有使用到的框架或者组件都是基于开源项目,代码保证100%开源。 * 系统功能通用,无论是个人还是企业都可以利用该系统快速搭建一个属于自己的在线教育平台。 * 如需商业技术服务支持,可使用 [领课教育系统商业版](https://www.roncoo.net/),功能更丰富,架构更健壮,VIP服务,上线快速。 * 友情链接:领课教育系统的视频云服务基于 [保利威视频云](https://my.polyv.net/v3/register/?f=qd=lingke) 实现,通过链接注册即可免费试用。 ### 前台主要功能介绍 * 首页功能:导航模块,轮播模块,专区模块,友情链接,底部信息 * 课程中心:搜索功能,分类导航(自定义分类设置),课程列出 * 课程详情:课程信息,课程目录,讲师信息、购买、播放等功能 * 个人中心:我的课程,我的订单,个人信息 <img src="images/index.jpg" alt="领课教育系统-首页"/> <img src="images/course.jpg" alt="领课教育系统-课程"/> ### 后台主要功能介绍 * 权限管理功能:菜单多角色多用户自定义管理 * 系统配置功能:自定义进行站点配置及第三方参数配置 * 讲师管理功能:讲师列出、添加、修改、删除等功能 * 课程分类管理:分类列出、添加、修改、删除等功能 * 课程管理功能:课程列出、添加、修改、删除等功能 * 订单管理功能:订单的列出,对订单进行分析统计功能 * 用户管理功能:同一时间只允许同一个账号在同一个浏览器登录,防止账号共享 * 轮播管理功能:后台自定义轮播设置,增加营销效果 * 支付功能模块:对接官方支付宝、官方微信 * 其他功能模块:菜单导航功能、友情链接功能等 <img src="images/admin1.jpg" alt="领课教育系统-首页"/> <img src="images/admin2.jpg" alt="领课教育系统-课程"/> ### 演示地址 * [前端门户演示地址:https://eduos.roncoo.net/](https://eduos.roncoo.net/) * [后台管理演示地址:https://eduos.roncoo.net/admin](https://eduos.roncoo.net/admin/) * [项目帮助文档地址:https://eduos.roncoo.net/doc](https://eduos.roncoo.net/doc/) --- ##### 领课教育系统(roncoo-education):[码云地址](https://gitee.com/roncoocom/roncoo-education) | [Github地址](https://github.com/roncoo/roncoo-education) > roncoo-education是后台工程,核心框架:Spring Cloud Alibaba ##### 前端门户工程(roncoo-education-web): [码云地址](https://gitee.com/roncoocom/roncoo-education-web) | [Github地址](https://github.com/roncoo/roncoo-education-web) > roncoo-education-web是前端门户工程,核心框架:Vuejs + Nuxt.js ##### 后台管理工程(roncoo-education-admin):[码云地址](https://gitee.com/roncoocom/roncoo-education-admin) | [Github地址](https://github.com/roncoo/roncoo-education-admin) > roncoo-education-admin是后台管理工程,核心框架:vue-element-admin ### 官方交流群(加群即可获取sql脚本) <img src="images/qun.jpg" alt="领课教育系统-官方开源群" width="200"/>
0
RaiMan/SikuliX1
SikuliX version 2.0.0+ (2019+)
java java-aware-languages jython-support linux macos macosm1 opencv tesseract-ocr visual-automation visual-testing windows-10 windows11
******** Paused (not available) till July 2024 ******** --- --- [![SikuliX](https://raw.githubusercontent.com/RaiMan/SikuliX1/master/Support/sikulix-red.png)](https://sikulix.github.io) --- **What is SikuliX**<br>SikuliX automates anything you see on the screen of your desktop computer running Windows, Mac or some Linux/Unix. It uses image recognition powered by OpenCV to identify GUI components and can act on them with mouse and keyboard actions. This is handy in cases when there is no easy access to a GUI's internals or the source code of the application or web page you want to act on. [More details](http://sikulix.com) Great thanks for the new logo and all the help with the new webpage to [@Waleed Sadek](https://github.com/waleedsadek-panx) --- **2.0.6 (branch release_2.0.x) preparing for release - snapshots available** **Latest Upload: April 17th, 2023** **Direct IDE downloads** &nbsp;&nbsp;&nbsp;&nbsp; [> for Windows <](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.sikulix&a=sikulixidewin&v=2.0.6-SNAPSHOT&e=jar)&nbsp;&nbsp;&nbsp;&nbsp;[> for macOS Intel <](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.sikulix&a=sikulixidemac&v=2.0.6-SNAPSHOT&e=jar)&nbsp;&nbsp;&nbsp;&nbsp;[> for macOS Silicon Mx <](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.sikulix&a=sikulixidemacm&v=2.0.6-SNAPSHOT&e=jar)&nbsp;&nbsp;&nbsp;&nbsp;[> for Linux <](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.sikulix&a=sikulixidelux&v=2.0.6-SNAPSHOT&e=jar) You get files like `sikulixidemac-2.0.6-20210708.194940-1.jar`, which you can place wherever you want and rename them to whatever you want. **JAVA: must be Java 11 or later** (best places to get it: [Eclipse Temurin](https://adoptium.net) or [Azul](https://www.azul.com/downloads/?package=jdk#download-openjdk)) **OCR (macOS/Linux):** now using Tess4J/Tesseract 5 - have a Tesseract 5.x ready (tesseract runs on commandline) **OpenCV Support:** Windows/macOS have it bundled - for Linux you have to make it ready yourself [more information coming sooner or later ;-)]() --- **2.1.0 (branch master) currently not useable - development suspended** <hr> **Latest stable version is 2.0.5** (still works with Java 8, does not run on Mac mX machines) [Important: Read about changes/issues/enhancements](https://github.com/RaiMan/SikuliX1/wiki/About-actual-release-version) [List of fixes](https://github.com/RaiMan/SikuliX1/wiki/ZZZ-Bug-Fixes) [Get SikuliX ready to use](https://raimans-sikulix.gitbook.io/untitled/) For use in **Java Maven projects** the dependency coordinates are: ``` <dependency> <groupId>com.sikulix</groupId> <artifactId>sikulixapi</artifactId> <version>2.0.5</version> </dependency> ``` <hr> **My Development environment** - Java 17 (current JDK LTS release) - Source and target level for Java is version 11 - Maven project - Windows 11 latest (Pro 64-Bit) - latest macOS 12 (Monterey) on Intel and M1 machines - Ubuntu latest LTS version running in Oracle VM VirtualBox on Windows 10 - Using IntelliJ IDEA CE in all environments <hr> #### Contributions are welcome and appreciated - for `bugreports and requests for features or enhancements` use the issue tracker here - for `bugfixes` related to the latest release version you should create a pull request against the release branch (currently `release_2.0.x`), so your fix will be in the next bug-fix release (see milestones). - for `smaller bugfixes and/or feature enhancements` related to the running development (currently branch master as version 2.1.0-SNAPSHOT and dev_... branches) you should create a pull request against the target branch - a pull request should target only one branch. It is the resposibility and job of the maintainer to apply the changes to other branches in case - for `more complex revisions and/or enhancements` you should ask for a development branch together with a short description of your ideas **Please respect the following rules and guidelines when contributing** - Start with smaller fixes. E.g. choose an issue from the issue tracker and try to fix it. Or fix issues you encounter while using SikuliX. - Only fix cosmetic stuff if it's related to an issue you want to fix. - Before you change stuff like dependencies / overall code style and so on, talk with the maintainer beforehand.<br>Sometimes there is a a reason that things are as they are (... and sometimes not :-)). - Try to accept the individual coding styles of the acting contributors, even if some of the stuff might be sub-optimal in your eyes.<br>But feel free to talk about your ideas and the reasons behind.
0
projectdiscovery/nuclei-burp-plugin
Nuclei plugin for BurpSuite
null
<h1 align="center"> <br> <a href="https://nuclei.projectdiscovery.io"><img src="static/nuclei-logo.png" width="200px" alt="Nuclei Burp Plugin"></a> </h1> <h4 align="center">Nuclei Template Generator Burp Plugin</h4> <p align="center"> <a href="https://discord.gg/projectdiscovery"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a> <a href="https://twitter.com/pdnuclei"><img src="https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter"></a> </p> <p align="center"> A `Burp Suite` plugin intended to help with [`nuclei`](https://github.com/projectdiscovery/nuclei) template generation. </p> <div align="center"> <br/> <a href="https://www.youtube.com/watch?v=PMHCnaU7dfo" target="_blank"><img src="static/video_thumbnail.png" alt="Nuclei Burp Plugin Demo Video"></a> <br/><br/> <a href="https://nuclei.projectdiscovery.io" target="_blank"><img src="static/demo.gif" alt="Nuclei Burp Plugin Demo"></a> <br/><br/> <a href="https://nuclei.projectdiscovery.io" target="_blank"><img src="static/v1_1_0-demo.gif" alt="Nuclei Burp Plugin v1.1.0 Demo"></a> </div> ## Features ### Template matcher generation * `Word` and `Binary` matcher creation using selected response snippets from `Proxy` history or `Repeater` contexts * Multi-line selections are split to separate words for readability * Binary matchers are created for selections containing non-`ASCII` characters * The `part` field is auto-set based on whether the selection was in the request header or body * Every generated template auto-includes a `Status` matcher, using the `HTTP` status code of the response ### Modifying generated templates * New matchers and requests can be added to previously generated templates, by highlighting a part of a response * In case of a CVE, template information fields can be filled in automatically (Right-click on a template, Add → Classification → CVE) ### Request template generation * In the `Intruder` tab, selected payload positions can be used to generate request templates, using one of the following attack types: `Battering ram`, `Pitchfork` or `Cluster bomb` * The selected text snippet from an `HTTP` request under the `Proxy` or `Repeater` tab can be used to generate a request template with the attack type defaulting to `Battering ram` * Templates containing multiple requests can be generated by selecting multiple proxy items and clicking generate ### Template execution * Generated templates can be executed instantly, and the output is shown in the same window for convenience * The plugin auto-generates the CLI command, using the absolute nuclei path, absolute template path and target information extracted from the desired request * History of unique, executed commands are stored, can be quick searched and re-executed within the current session * CLI flag filtering and completion support can be accessed using the `CTRL + R` keyboard shorcut ### Experimental features * (Non-contextual) `YAML` property and value **auto-complete**, using reserved words from the nuclei [`JSON` schema](https://github.com/projectdiscovery/nuclei/blob/master/nuclei-jsonschema.json) * **Syntax highlighting** of `YAML` properties, based on reserved words ### Productivity * Almost every action can be triggered using keyboard shortcuts: * **F1**: open nuclei template documentation * **Ctrl + Enter**: execute current template * **Ctrl + Shift + E**: jump to the template editor * **Ctrl + L**: jump to the CLI input field * **Ctrl + R**: show CLI argument helper * **Ctrl + S**: save the current template * **Ctrl + Plus/Minus**: increase/decrease font size * **Ctrl + Q**: quit * Tab support: * **Ctrl + Tab** or **Ctrl + PageDown**: open next tab * **Ctrl + Shift + Tab** or **Ctrl + PageUp**: open previous tab * **Ctrl + [1-9]**: move to n-th tab * **Mouse Scroll Up/Down** over the tabs: navigate to next or previous tab * **Ctrl + W** or **Middle Mouse Button Click**: close current tab * The template path is auto-updated if the template is saved to a new location * The `template-id` is recommended as file name when saving ### Settings * The plugin attempts to auto-detect and complete the configuration values * The code searches for the nuclei binary path, using the values from the process's environmental `PATH` variable. **Note**: the Burp Suite binary, opposed to the stand-alone BurpSuite jar, might not have access to the current user's `PATH` variable. * The target template path is calculated based on the default nuclei template directory, configured under `<USER_HOME>/.config/nuclei/.templates-config.json` * The name of the currently logged-in operating system user is used as a default value for the template author configuration * The user can decide whether to display the generated template in a dedicated window or embedded under "Generator", within the Nuclei tab ### Look and feel * The template generator window supports Dark and Light themes. The presented theme is chosen based on the selected Burp Suite theme, under `User Options` * Support for **colored** nuclei output * Modifiable font size in the template editor and command output ## Building the code Use `mvn clean package -DskipTests` to build the project yourself. It requires Maven `3.x` and Java `11+`. On macOS the dependencies for the plugin can be met using Homebrew: `brew install mvn openjdk@11` Alternatively, different builds can be downloaded from the [Actions](https://github.com/projectdiscovery/nuclei-burp-plugin/actions) section. The built artifact can be found under the latest build's `Artifacts` section. These artifacts are generated after every commit, but are only stored for a limited amount of time. ## Installation By building the code: 1. Build the code yourself or download a pre-built/[release](https://github.com/projectdiscovery/nuclei-burp-plugin/releases) version 2. Go to `Extender` in `Burp Suite` 3. Click the `Add` button in the `Extensions` tab 4. Leave the `Extension Type` on `Java` 5. Select the path to the plugin (`.jar`) Through [BApp Store](https://portswigger.net/bappstore/526f5564b7414bfe978e650d8ea6567b): 1. Go to `Extender` in `Burp Suite` 2. Select the `BApp Store` tab 3. Search for **Nuclei Template Generator Plugin** 4. Clink on **Install** Note: this plugin does **NOT** require **Burp Suite Professional**. ## Screenshots ![Generated Word matcher on response header](static/generated_header_word_matcher_template.png "Generated Word matcher on response header") ![Generated multi-word matcher on response body](static/generated_body_multi_word_matcher_template.png "Generated multi-word matcher on response body") ![Generated request template using Battering ram](static/generated_batteringram_request_template.png "Generated request template using Battering ram") ### Credits Created with ❤️ by [@forgedhallpass](https://github.com/forgedhallpass) ### License Nuclei and this plugin are distributed under [MIT License](LICENSE). <h1 align="left"> <a href="https://discord.gg/projectdiscovery"><img src="static/join-discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Check Nuclei Documentation"></a> </h1>
0
h2pl/JavaTutorial
【Java工程师面试复习指南】本仓库涵盖大部分Java程序员所需要掌握的核心知识,整合了互联网上的很多优质Java技术文章,力求打造为最完整最实用的Java开发者学习指南,如果对你有帮助,给个star告诉我吧,谢谢!
null
null
0
alibaba/compileflow
🎨 core business process engine of Alibaba Halo platform, best process engine for trade scenes. | 一个高性能流程编排引擎
alibaba bpmn2 compile flow halo-platform java process process-engine spring
<img src="doc/compileflow-logo.png" alt="compileflow logo" width="20%" align="right" /> # compileflow 📖 See the [📖 中文文档](README_CN.md) for the documents in Chinese. [![Github Workflow Build Status](https://img.shields.io/github/actions/workflow/status/alibaba/compileflow/ci.yaml?branch=master&logo=github&logoColor=white)](https://github.com/alibaba/compileflow/actions/workflows/ci.yaml) [![Build Status](https://img.shields.io/appveyor/ci/oldratlee/compileflow/master?logo=appveyor&logoColor=white)](https://ci.appveyor.com/project/oldratlee/compileflow) [![Maven Central](https://img.shields.io/maven-central/v/com.alibaba.compileflow/compileflow?color=2d545e&logo=apache-maven&logoColor=white)](https://search.maven.org/artifact/com.alibaba.compileflow/compileflow) [![GitHub release](https://img.shields.io/github/release/alibaba/compileflow.svg)](https://github.com/alibaba/compileflow/releases) [![Java support](https://img.shields.io/badge/Java-8+-green?logo=OpenJDK&logoColor=white)](https://openjdk.java.net/) [![License](https://img.shields.io/badge/license-Apache%202-4D7A97.svg?logo=Apache&logoColor=white)](https://www.apache.org/licenses/LICENSE-2.0.html) [![GitHub Stars](https://img.shields.io/github/stars/alibaba/compileflow)](https://github.com/alibaba/compileflow/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/alibaba/compileflow)](https://github.com/alibaba/compileflow/fork) [![GitHub issues](https://img.shields.io/github/issues/alibaba/compileflow.svg)](https://github.com/alibaba/compileflow/issues) [![GitHub Contributors](https://img.shields.io/github/contributors/alibaba/compileflow)](https://github.com/alibaba/compileflow/graphs/contributors) ## 1. Introduction Compileflow is a very lightweight, high-performance, integrable and extensible process engine. The Compileflow process engine is an important part of Taobao Business Process Management(TBBPM), which is dedicated to optimizating operations at Alibaba’s Taobao Marketplace. Specifically, Compileflow is designed to focus on pure memory execution and stateless process engines by converting process files to generate, compile and execute java code. Currently, compileflow powers multiple core systems such as Alibaba's e-commerce stores and transactions. Compileflow allows developers to design their own business processes through the process editor, which will visualize complex business logic, and build a bridge between designers and development engineers. ## 2. Design Intention 1.Provide an end-to-end business process solution from design to execution of business development ideas. 2.Offer a variety of process engines to realize the visual global architecture, so that strategy easily translates to visualizations, which lead to enhanced business capabilities, processes and system. 3.Design an efficient execution engine that can support the company's rapid deployment of new services, and capable of streamlining processes that accelerate the development response and interaction speed. ## 3. Features 1.High performance: It is simple and efficient for compiling and executing java code, which is generated by converting process files. 2.Diverse application scenarios: Widely used across Alibaba's mid-platform solutions; supports multiple business scenarios such as shopping guides, transactions. 3.Integrable: Lightweight and concise design makes it extremely easy to integrate into various solutions and business scenarios. 4.Complete plugin support: Compileflow is currently supported by IntelliJ IDEA and Eclipse plugins. Java code can be dynamically generated and previewed in real-time during the process design. What you see is what you get. 5.Process design drawing:Supports exporting to SVG file and unit test code. ## 4. Quick start ### Step1: Download and install IntelliJ IDEA plugin (optional) Plugin download address: https://github.com/alibaba/compileflow-idea-designer *Installation instructions: Please use IntelliJ IDEA local installation method to install. Then restart IntelliJ IDEA to activate.* ### Step2: Import POM file ```xml <dependency> <groupId>com.alibaba.compileflow</groupId> <artifactId>compileflow</artifactId> <version>1.2.0</version> </dependency> ``` Check available version at [search.maven.org](https://search.maven.org/artifact/com.alibaba.compileflow/compileflow). **Note**: Compileflow only supports JDK 1.8 and above. ### Step3: Process design Refer to the KTV demo below to understand the configuration of nodes and attributes and the use of APIs through the demonstration and practice of the demo. Demo description: N number of people go to ktv to sing. Each person sing a song. The usual fee for the ktv session is 30 yuan/person, but if the total price exceeds 300 yuan, they would receive 10% off. But if the group's total fee falls under 300 yuan, they need to pay the full price. #### S3.1 Create a bpm file, as shown below: ![ktv_demo_s1](./doc/image/ktv_demo_s1.png) Note: The path of the bpm file must be consistent with the code. When the process engine executes in the file loading mode, the file will be found according to the code. #### S3.2 Design process through plug-ins or write process xml files directly. #### S3.3 invoke process Write the following unit test: ```java public void testProcessEngine() { final String code = "bpm.ktv.ktvExample"; final Map<String, Object> context = new HashMap<>(); final List<String> pList = new ArrayList<>(); pList.add("wuxiang"); pList.add("xuan"); pList.add("yusu"); context.put("pList", pList); final ProcessEngine<TbbpmModel> processEngine = ProcessEngineFactory.getProcessEngine(); final TbbpmModel tbbpmModel = processEngine.load(code); final OutputStream outputStream = TbbpmModelConverter.getInstance().convertToStream(tbbpmModel); System.out.println(processEngine.getTestCode(code)); processEngine.preCompile(code); System.out.println(processEngine.start(code, context)); } ``` Compileflow was designed to support the Taobao BPM specification. It has made adaptations to be compatible with the BPMN 2.0 specification, but only supports some of BPMN 2.0 elements. If other elements are needed, it can be extended on the original basis. ## 5. More information [DEMO quick start](https://github.com/alibaba/compileflow/wiki/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8BDEMO) [Detailed description of the original Taobao BPM specification](https://github.com/alibaba/compileflow/wiki/%E5%8D%8F%E8%AE%AE%E8%AF%A6%E8%A7%A3) ## 6. Welcome to join the compileflow development group Please contact @余苏 @徐工 @梵度 @哲良 @无相 ## Known Users Welcome to register the company name in this issue: https://github.com/alibaba/compileflow/issues/9 ![](doc/image/known_users/alibaba.png) ![](doc/image/known_users/alipay.png) ![](doc/image/known_users/aliyun.png) ![](doc/image/known_users/taobao.png) ![](doc/image/known_users/tmall.png)
0
decaywood/XueQiuSuperSpider
雪球股票信息超级爬虫
null
# 雪球超级爬虫 <a href="http://junit.org/"><img src="https://img.shields.io/badge/Test-JUnit-orange.svg?style=flat"></a> <a href="http://jsoup.org/"><img src="https://img.shields.io/badge/Dependency-Jsoup-yellow.svg?style=flat"></a> <a href="http://jackson-users.ning.com/"><img src="https://img.shields.io/badge/Dependency-Jackson-blue.svg?style=flat"></a> <a href="http://dev.mysql.com/"><img src="https://img.shields.io/badge/Database-MySQL-red.svg?style=flat"></a> ## 更新日志 2016.4.12 -- 更新url: http -\> https 2016.4.10 -- 增加自动登录接口,用户在config.sys 下配置用户名以及密码等信息可自动登录并提高爬虫权限。 具体配置格式如下: ``` areaCode = 86 可选 默认国内 userID = 186xxxxxxxx password = xxxx rememberMe = true 可选 默认开启 ``` 2016.2.20 -- 修复雪球后台cookie设置变更所导致的程序更新cookie失效问题 Issues #2 2015.12.4 -- 增加根据股票获取公司信息功能(公司名称、组织形式、成立日期、经营范围、主营业务、地区代码、所属板块) 2015.12.7 -- 游资追踪增加模糊匹配特性 2015.12.10 -- 添加了必要的代码注释,添加了统计一阳穿三线个股的example,另外:雪球网貌似因为我大量抓取数据已经采取反爬虫措施 各位用的时候最好修改一下抓取频率,或者不要一次性抓取太多信息,对于雪球网的输入验证码,应对措施如下: 当日志超时重试次数达到阈值时,很可能雪球封住了你的IP,这时候人工登录雪球网输入验证码后,代码经过重试等待时间后会自动恢复 抓取数据流程。 2015.12.14 -- 更新高级特性,增加RMI分布式数据抓取特性,可将需要访问网络的组件部署至Slave集群,分散流量, 防止被反爬虫机制锁定。 [RMI高级特性](https://github.com/decaywood/XueQiuSuperSpider/blob/master/info/RMI.md) 2020.10.07 -- 移除了RMI特性,精简框架内容。增加股票讨论区爬取、评论爬取以及相关用户信息爬取 2020.10.08 -- 移除了自动获取cookie功能,雪球目前这块做的比较好了,不好获取了,需要从浏览器自己copy下来加到config.sys文件中 ## 前言 雪球网或者东方财富或者同花顺目前已经提供了很多种股票筛选方式,但是筛选方式是根据个人操作 风格来定义的,三个网站有限的筛选方式显然不能满足广大股民、程序员特别是数据分析控的要求, 基于此,本人设计了一个可以任意拓展,实现任意数据搜集与分析的爬虫程序,满足股友们的需要, 只要你能想到的数据搜集与分析策略它都能实现。 (项目严重依赖JDK8新特性,偏重函数式编程思想,不熟悉的已备好教程以及例子: [Java8 简明教程](http://decaywood.github.io/2015/12/23/Java8-guide/)) ## 结构 雪球超级爬虫的所有组件互相没有任何依赖,包括参数。整体架构由Collector、Mapper 以及Consumer三个接口支撑。功能分别为数据搜集、数据相关信息(分支信息)的组装、以及最终 的数据分析,三个接口定义了整个数据抓取生命周期的三个阶段。Mapper组件可以进行多次 嵌套,就像流水线一样,不同的Mapper负责自己对应的组装任务,经过N个Mapper, 完成一个对象的N种属性组装,当然,如果你不需要某些属性,你完全可以跳过某些mapper, 这样可以节省许多抓取时间。在参数传递方面,模块在处理参数之前会对参数进行深度复制, 确保不会出现多线程同步问题,模块内部参数严格定义为只读。变量只局限在方法范围内, 完全避免了线程间数据共享。 ![](https://github.com/decaywood/XueQiuSuperSpider/blob/master/info/structure.png) ## 优势 * 稳定 对模块内部数据的严格限制保证了无论是如何频繁的多线程操作都不会出现脏读,写覆盖等令人头 疼的并发问题,模块之间无依赖,非常容易进行单元测试,只要模块都通过严格的单元测试, 无论多么复杂的数据搜集以及分析逻辑,雪球超级爬虫都能稳定的工作,运行后不用死死的 盯着日志,安心睡觉。 * 高性能 所有模块顶层实现了Java8的函数式接口,能够依靠Java8的并行流进行高并发操作,用户 可以轻易配置线程池缓存工作线程数量,充分发挥网络IO资源以及CPU资源。 * 极易改造与拓展 散文式的结构决定了雪球超级爬虫是一个可以进行任意拓展的程序,任何人都可以稍作了解 后贡献自己的代码,你甚至可以爬取同花顺网站的数据然后结合东方财富的一些资料,再混合 雪球网站自己数据综合进行分析,你所做的只是添加几个Collector和Mapper而已,很多基础 的模块我已经提供好了。(是不是和Python有点像) ## 贡献模块的一些注意事项 * 参数对象请实现DeepCopy接口 对于你定义了在模块间传递的对象,请实现DeepCopy接口,就像我上面提到的,模块间是 不允许共享对象的,模块约定复制传入的参数。 ```java public interface DeepCopy <R> { R copy(); } ``` * 对于只读的域变量请定义为final 为了防止你对域的误写,请将域定义为final,这样更加保险 * 定义可变变量默认值 对于可变变量,初始化时请使用EmptyObject类定义默认值,如果是Entity,请按规范定义好EmptyXX子类, 遵守此规范能够很好的防止空指针异常。 * 组件无状态 模块必须保证为无状态的,避免出现行为不一致的情况,尤其是分布式协同工作时,无状态的 组件能够有效保证整个程序的正确性以及稳定性。 * 定义默认行为 每个模块提供合理的默认值,减少用户在配置上消耗的精力。 * 完善的单元测试 完成一个模块后,请进行完善的单元测试,包括初始化参数合法性。 输入输出的正确性。 * 具备交换律 特别注意的是,mapper与mapper之间输入与输出参数类型如果相同,请保证遵守交换律, 即 M1.andThen(M2) equals M2.andThen(M1) * 推荐继承模块模版 每个生命周期对应的接口皆有对应的抽象模板类,他们通过了单元测试,封装了实用的功能, 包括网络请求、Exception捕获,网络IO异常重新请求以及Cookie更新保存等有用的功能, 除非有必要,否则推荐继承模版模块,它们以Abstract开头,支持泛型。 ## 一些例子 * 统计一阳穿三线个股 ```java @Test public void yiyinsanyang() { List<Stock> stocks = TestCaseGenerator.generateStocks(); StockToStockWithAttributeMapper attributeMapper = new StockToStockWithAttributeMapper(); StockToStockWithStockTrendMapper trendMapper = new StockToStockWithStockTrendMapper(); Predicate<Entry<String, Stock>> predicate = x -> { if(x.getValue().getStockTrend().getHistory().isEmpty()) return false; List<StockTrend.TrendBlock> history = x.getValue().getStockTrend().getHistory(); StockTrend.TrendBlock block = history.get(history.size() - 1); double close = Double.parseDouble(block.getClose()); double open = Double.parseDouble(block.getOpen()); double ma5 = Double.parseDouble(block.getMa5()); double ma10 = Double.parseDouble(block.getMa10()); double ma30 = Double.parseDouble(block.getMa30()); double max = Math.max(close, open); double min = Math.min(close, open); return close > open && max >= MathUtils.max(ma5, ma10, ma30) && min <= MathUtils.min(ma5, ma10, ma30); }; stocks.parallelStream() .map(x -> new Entry<>(x.getStockName(), attributeMapper.andThen(trendMapper).apply(x))) .filter(predicate) .map(Entry::getKey) .forEach(System.out::println); } ``` * 简单的根据关键字获取近期新闻 ```java @Test public void findNewsUcareAbout() { List<URL> news = new HuShenNewsRefCollector(HuShenNewsRefCollector.Topic.TOTAL, 2).get(); List<URL> res = news.parallelStream().filter(new PageKeyFilter("万孚生物", false)).collect(Collectors.toList()); List<URL> regexRes = news.parallelStream().filter(new PageKeyFilter("万孚生物", true)).collect(Collectors.toList()); for (URL re : regexRes) { System.out.println("Regex : " + re); } for (URL re : res) { System.out.println("nonRegex : " + re); } } ``` * 游资追踪 ```java @Test public void LongHuBangTracking() { Calendar calendar = Calendar.getInstance(); calendar.set(2015, Calendar.NOVEMBER, 20); Date from = calendar.getTime(); calendar.set(2015, Calendar.DECEMBER, 1); Date to = calendar.getTime(); DateRangeCollector collector = new DateRangeCollector(from, to); DateToLongHuBangStockMapper mapper = new DateToLongHuBangStockMapper(); StockToLongHuBangMapper mapper1 = new StockToLongHuBangMapper(); List<LongHuBangInfo> s = collector.get() .parallelStream() .map(mapper) .flatMap(List::stream).map(mapper1) .filter(x -> x.bizsunitInBuyList("中信证券股份有限公司上海溧阳路证券营业部")) .sorted(Comparator.comparing(LongHuBangInfo::getDate)) .collect(Collectors.toList()); for (LongHuBangInfo info : s) { System.out.println(info.getDate() + " -> " + info.getStock().getStockName()); } } ``` * 统计股票5000粉以上大V个数,并以行业分类股票 ```java @Test public void getStocksWithVipFollowersCount() { CommissionIndustryCollector collector = new CommissionIndustryCollector();//搜集所有行业 IndustryToStocksMapper mapper = new IndustryToStocksMapper();//搜集每个行业所有股票 StockToVIPFollowerCountMapper mapper1 = new StockToVIPFollowerCountMapper(5000, 20);//搜集每个股票的粉丝 UserInfoToDBConsumer consumer = new UserInfoToDBConsumer();//写入数据库 System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "20");//设置线程数量 List<Entry<Stock, Integer>> res = collector.get() .parallelStream() //并行流 .map(mapper) .flatMap(Collection::stream) .map(x -> new Entry<>(x, mapper1.apply(x))) .peek(consumer) .collect(Collectors.toList()); for (Entry<Stock, Integer> re : res) { System.out.println(re.getKey().getStockName() + " -> 5000粉丝以上大V个数 " + re.getValue()); } } ``` * 最赚钱组合最新持仓以及收益走势、大盘走势 ```java @Test public void MostProfitableCubeDetail() { Calendar calendar = Calendar.getInstance(); calendar.set(2015, Calendar.OCTOBER, 20); Date from = calendar.getTime(); calendar.set(2015, Calendar.NOVEMBER, 25); Date to = calendar.getTime(); MostProfitableCubeCollector cubeCollector = new MostProfitableCubeCollector( MostProfitableCubeCollector.Market.CN, MostProfitableCubeCollector.ORDER_BY.DAILY); CubeToCubeWithLastBalancingMapper mapper = new CubeToCubeWithLastBalancingMapper(); CubeToCubeWithTrendMapper mapper1 = new CubeToCubeWithTrendMapper(from, to); List<Cube> cubes = cubeCollector .get() .parallelStream() .map(mapper.andThen(mapper1)) .collect(Collectors.toList()); for (Cube cube : cubes) { System.out.print(cube.getName() + " 总收益: " + cube.getTotal_gain()); System.out.println(" 最新持仓 " + cube.getRebalancing().getHistory().get(1).toString()); } } ``` * 获取热股榜股票信息 ```java @Test public void HotRankStockDetail() { StockScopeHotRankCollector collector = new StockScopeHotRankCollector(StockScopeHotRankCollector.Scope.US_WITHIN_24_HOUR); StockToStockWithAttributeMapper mapper1 = new StockToStockWithAttributeMapper(); StockToStockWithStockTrendMapper mapper2 = new StockToStockWithStockTrendMapper(StockTrend.Period.ONE_DAY); List<Stock> stocks = collector.get().parallelStream().map(mapper1.andThen(mapper2)).collect(Collectors.toList()); for (Stock stock : stocks) { System.out.print(stock.getStockName() + " -> "); System.out.print(stock.getAmplitude() + " " + stock.getOpen() + " " + stock.getHigh() + " and so on..."); System.out.println(" trend size: " + stock.getStockTrend().getHistory().size()); } } ``` * 获得某个行业所有股票的详细信息和历史走势 比如畜牧业 ```java public void IndustryStockDetail() { CommissionIndustryCollector collector = new CommissionIndustryCollector(); IndustryToStocksMapper mapper = new IndustryToStocksMapper(); StockToStockWithAttributeMapper mapper1 = new StockToStockWithAttributeMapper(); StockToStockWithStockTrendMapper mapper2 = new StockToStockWithStockTrendMapper(); Map<Industry, List<Stock>> res = collector.get() .parallelStream() .filter(x -> x.getIndustryName().equals("畜牧业")) .map(mapper) .flatMap(Collection::stream) .map(mapper1.andThen(mapper2)) .collect(Collectors.groupingBy(Stock::getIndustry)); for (Map.Entry<Industry, List<Stock>> entry : res.entrySet()) { for (Stock stock : entry.getValue()) { System.out.print(entry.getKey().getIndustryName() + " -> " + stock.getStockName() + " -> "); System.out.print(stock.getAmount() + " " + stock.getChange() + " " + stock.getDividend() + " and so on..."); System.out.println(" trend size: " + stock.getStockTrend().getHistory().size()); } } } ``` * 按行业分类获取所有股票 ```java @Test public void IndustryStockInfo() { CommissionIndustryCollector collector = new CommissionIndustryCollector(); IndustryToStocksMapper mapper = new IndustryToStocksMapper(); Map<Industry, List<Stock>> res = collector.get() .parallelStream() .map(mapper) .flatMap(Collection::stream) .collect(Collectors.groupingBy(Stock::getIndustry)); for (Map.Entry<Industry, List<Stock>> entry : res.entrySet()) { for (Stock stock : entry.getValue()) { System.out.println(entry.getKey().getIndustryName() + " -> " + stock.getStockName()); } } } ``` * 某只股票下的热帖过滤出大V评论 ```java @Test public void CommentReduce() { List<Comment.CommentSetter> sh688180 = new StockCommentCollector("SH688180", StockCommentCollector.SortType.alpha, 1, 10) .get() .stream() .map(new CommentSetMapper()) .collect(Collectors.toList()); for (Comment.CommentSetter postInfo : sh688180) { PostInfo p = (PostInfo) postInfo; for (Comment comment : p.getComments()) { if (Integer.parseInt(comment.getUser().getFollowers_count()) > 10000) { System.out.println(comment.getText()); } } } } ``` * 某只票帖子里大V参与的讨论 ```java @Test public void NewComment() { for (int i = 0; i < 10; i++) { List<Comment.CommentSetter> sh688180 = new StockCommentCollector("SH688180", StockCommentCollector.SortType.time, i+1, 10) .get() .stream() .map(new CommentSetMapper()) .collect(Collectors.toList()); for (Comment.CommentSetter postInfo : sh688180) { PostInfo p = (PostInfo) postInfo; for (Comment comment : p.getComments()) { int followerCnt = Integer.parseInt(comment.getUser().getFollowers_count()); if (followerCnt > 10000) { System.out.println(comment.getUser().getScreen_name() + " " + followerCnt + " " + comment.getText()); } } } } } ``` ### LICENSE <a href="https://github.com/decaywood/XueQiuSuperSpider/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat"></a>
0
java-aodeng/hope-boot
🌱 一款现代化的脚手架项目
druid flyway hope mapper maven mybatis redis shiro shiro-redis spring-boot sso swagger thymeleaf
<h1 align="center"><a href="https://github.com/java-aodeng" target="_blank">Hope-Boot</a></h1> > 🌱 Hope-Boot 一款现代化的脚手架项目,给爱学习的同学多一个选择。 <p align="center"> <a href="https://github.com/java-aodeng"><img alt="Author" src="https://img.shields.io/badge/author-%E4%BD%8E%E8%B0%83%E5%B0%8F%E7%86%8A%E7%8C%AB-blue.svg"/></a> <a href="https://jq.qq.com/?_wv=1027&k=574chhz"><img alt="QQ群" src="https://img.shields.io/badge/chat-%E4%BD%8E%E8%B0%83%E5%B0%8F%E7%86%8A%E7%8C%ABQQ%E7%BE%A4-yellow.svg"/></a> <a href="https://t.me/joinchat/LSsyBxVKLGEkF5MtIhg6TQ"><img alt="Telegram" src="https://img.shields.io/badge/telegram-%E4%BD%8E%E8%B0%83%E5%B0%8F%E7%86%8A%E7%8C%AB--%E5%AE%98%E6%96%B9%E9%83%A8%E8%90%BD-orange.svg"/></a> </p> ------------------------------ ## 简介 **Hope** [ˈامید ہے],意为希望。 用于企业开发,技术学习等。🍻🍻 > [关于作者](http://ilovey.live/s/about) | [QQ 交流群](https://jq.qq.com/?_wv=1027&k=574chhz) | [Telegram 交流群](https://t.me/joinchat/LSsyBxVKLGEkF5MtIhg6TQ) | [微博](https://weibo.com/aodeng520?is_all=1) | [公众号](http://image.ilovey.live/image/9c2edb9f57037c89f52d757e3cf79683.jpg) 微信:如果需要和我交流的话可以加我私人微信,有问题的话也可以问,我会尽量回答大家 ![微信图片_20200329114547](http://image.ilovey.live/image/0d6ff0bf2d7d51cc9839bd17c7c9b746.png) ## 文档 | 版本 | 文档 | Code Branches | | ---------- |-------------|--------| | SpringBoot基础版 | [开始使用](https://github.com/hope-for/hope-boot/wiki/1.SpringBoot%E5%9F%BA%E7%A1%80%E7%89%88.%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E) |[1.0.0-release](https://github.com/hope-for/hope-boot/tree/1.0.0-release)| | Dubbo分布式精简版 | 开发中 |开发中| ## 许可证 [![license](https://img.shields.io/github/license/java-aodeng/hope.svg?style=flat-square)](https://github.com/hope-for/hope-boot/blob/master/LICENSE) > Hope-Boot 使用 GPL-v3.0 协议开源,请尽量遵守开源协议,即便是在中国。 ## 捐赠 >如果 Hope-Boot 对你有帮助,可以请作者吃个肉夹馍 :) ![](https://i.loli.net/2018/12/31/5c29d3b18826d.png) ## 预览图 ![banner](https://i.loli.net/2019/11/13/BkoDw3SMh14p7JO.png) ![](https://i.loli.net/2019/05/01/5cc930100d298.png) ![](https://i.loli.net/2019/05/01/5cc9300612ca5.png) ![](https://i.loli.net/2019/05/01/5cc9300d45a92.png) ![](https://i.loli.net/2019/05/01/5cc9300d62006.png) ![](https://i.loli.net/2019/05/01/5cc9300d8fb70.png) ![](https://i.loli.net/2019/05/01/5cc9300bc316d.png) ![](https://i.loli.net/2019/05/01/5cc93003ef3d6.png) ![](https://i.loli.net/2019/05/01/5cc932128cc07.png)
0
will-che/flink-recommandSystem-demo
:helicopter::rocket:基于Flink实现的商品实时推荐系统。flink统计商品热度,放入redis缓存,分析日志信息,将画像标签和实时记录放入Hbase。在用户发起推荐请求后,根据用户画像重排序热度榜,并结合协同过滤和标签两个推荐模块为新生成的榜单的每一个产品添加关联产品,最后返回新的用户列表。
flink flink-examples flink-hbase flink-kafka flink-redis recommand recommander-system
# 商品实时推荐系统 ### 1. 系统架构 v2.0 - **1.1 系统架构图** <div align=center><img src="resources/pic/v2.0架构.png" width="100%" height="100%"></div> - **1.2模块说明** - a.在日志数据模块(flink-2-hbase)中,又主要分为6个Flink任务: - 用户-产品浏览历史 -> 实现基于协同过滤的推荐逻辑 通过Flink去记录用户浏览过这个类目下的哪些产品,为后面的基于Item的协同过滤做准备 实时的记录用户的评分到Hbase中,为后续离线处理做准备. 数据存储在Hbase的p_history表 - 用户-兴趣 -> 实现基于上下文的推荐逻辑 根据用户对同一个产品的操作计算兴趣度,计算规则通过操作间隔时间(如购物 - 浏览 < 100s)则判定为一次兴趣事件 通过Flink的ValueState实现,如果用户的操作Action=3(收藏),则清除这个产品的state,如果超过100s没有出现Action=3的事件,也会清除这个state 数据存储在Hbase的u_interest表 - 用户画像计算 -> 实现基于标签的推荐逻辑 v1.0按照三个维度去计算用户画像,分别是用户的颜色兴趣,用户的产地兴趣,和用户的风格兴趣.根据日志不断的修改用户画像的数据,记录在Hbase中. 数据存储在Hbase的user表 - 产品画像记录 -> 实现基于标签的推荐逻辑 用两个维度记录产品画像,一个是喜爱该产品的年龄段,另一个是性别 数据存储在Hbase的prod表 - 事实热度榜 -> 实现基于热度的推荐逻辑 通过Flink时间窗口机制,统计当前时间的实时热度,并将数据缓存在Redis中. 通过Flink的窗口机制计算实时热度,使用ListState保存一次热度榜 数据存储在redis中,按照时间戳存储list - 日志导入 从Kafka接收的数据直接导入进Hbase事实表,保存完整的日志log,日志中包含了用户Id,用户操作的产品id,操作时间,行为(如购买,点击,推荐等). 数据按时间窗口统计数据大屏需要的数据,返回前段展示 数据存储在Hbase的con表 - b. web模块 - 前台用户界面 该页面返回给用户推荐的产品list - 后台监控页面 该页面返回给管理员指标监控 ### 2.推荐引擎逻辑说明 - **2.1 基于热度的推荐逻辑** 现阶段推荐逻辑图 <div align=center><img src="resources/pic/v2.0用户推荐流程.png" width="80%" height="100%"></div> ​ 根据用户特征,重新排序热度榜,之后根据两种推荐算法计算得到的产品相关度评分,为每个热度榜中的产品推荐几个关联的产品 - **2.2 基于产品画像的产品相似度计算方法** 基于产品画像的推荐逻辑依赖于产品画像和热度榜两个维度,产品画像有三个特征,包含color/country/style三个角度,通过计算用户对该类目产品的评分来过滤热度榜上的产品 <div align=center><img src="resources/pic/基于产品画像的推荐逻辑.png" width="80%" height="100%"></div> 在已经有产品画像的基础上,计算item与item之间的关联系,通过**余弦相似度**来计算两两之间的评分,最后在已有物品选中的情况下推荐关联性更高的产品. | 相似度 | A | B | C | | ------ | ---- | ---- | ---- | | A | 1 | 0.7 | 0.2 | | B | 0.7 | 1 | 0.6 | | C | 0.2 | 0.6 | 1 | - **2.3 基于协同过滤的产品相似度计算方法** 根据产品用户表(Hbase) 去计算公式得到相似度评分: <img src="resources/pic/%E5%9F%BA%E4%BA%8E%E7%89%A9%E5%93%81%E7%9A%84%E5%8D%8F%E5%90%8C%E8%BF%87%E6%BB%A4%E5%85%AC%E5%BC%8F.svg" width="30%" height="30%"> ### 3. 前台推荐页面 ​ 当前推荐结果分为3列,分别是热度榜推荐,协同过滤推荐和产品画像推荐 <div align=center><img src="resources/pic/推荐页面.png" width="80%" height="100%"></div> ### 4. 后台数据大屏 ​ **在后台上显示推荐系统的实时数据**,数据来自其他Flink计算模块的结果.目前包含热度榜和1小时日志接入量两个指标. 真实数据位置在resource/database.sql <div align=center><img src="resources/pic/后台数据.png" width="80%" height="100%"></div> ### 5. 部署说明 >以下的部署均使用Docker,对于搭建一套复杂的系统,使用docker来部署各种服务中间件再合适不过了。这里有一套简单的[Docker入门系列](https://blog.csdn.net/qqHJQS/column/info/33078) 详细的部署说明已经写了一篇文章来说明了,按照流程即可运行项目,无需自己搭建任何组件。 [文章地址](https://xinze.fun/2019/11/19/%E4%BD%BF%E7%94%A8Docker%E9%83%A8%E7%BD%B2Flink%E5%A4%A7%E6%95%B0%E6%8D%AE%E9%A1%B9%E7%9B%AE/) <br> Hbase部署说明->[使用Docker搭建伪分布式Hbase(外置Zookeeper)](https://www.jianshu.com/p/3aabe3a152a8) <br> Kafka部署说明->[使用Docker部署Kafka时的网络应该如何配置](https://www.jianshu.com/p/52a505354bbc) <br> ### 6. Q & A 1. 是否一定要使用Docker来部署环境? <br> 不是的,项目刚开始写的时候都是通过独立的组件来实现功能的。后来为了让大家能够迅速的体验项目,省略搭建过程 才配置了多个Docker环境。所以如果有自己有Kafka 或者 Hbase 的搭建经验,更推荐自搭建的形式,这样更容易解决问题。 2. 部署Docker带来的一系列问题 <br> 包括端口号/连接异常等等问题,多数原因是不同的服务器环境带来的,建议首先检查自己的防火墙等基础设施配置是否能够支持各个组件的连接。
0
processing/processing
Source code for the Processing Core and Development Environment (PDE)
art design education java learning pde processing
# Since the release of Processing 3.5.4 in January 2020, development has moved to [a new repository](https://github.com/processing/processing4/). Using a [4.0 release](https://github.com/processing/processing4/releases) (even an alpha or beta version) is recommended if you find an issue. To avoid confusion, this repo will remain open at least until a 4.0 release is the default download at https://processing.org/download. We chose to move to a new repository so that we could clean out old files accumulated over the last 20 years. <!-- Is there not a better way to do a callout box? --> Processing ========== This is the official source code for the [Processing](http://processing.org) Development Environment (PDE), the “core” and the libraries that are included with the [download](http://processing.org/download). __I've found a bug!__ Let us know [here](https://github.com/processing/processing/issues) (after first checking if someone has already posted a similar problem). If it's a reference, web site, or examples issue, take that up with folks [here](https://github.com/processing/processing-docs/issues). There are also separate locations for [Android Mode](https://github.com/processing/processing-android/issues), or the [Video](https://github.com/processing/processing-video/issues) and [Sound](https://github.com/processing/processing-sound/issues) libraries. The [processing.js](http://processingjs.org) project is not affiliated with us, but you can find their issue tracker [here](https://github.com/processing-js/processing-js/issues). __Locked Issues__ Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. Once an issue has been resolved for 30 days, it will automatically lock. __That [processing-bugs](https://github.com/processing-bugs) fella is suspicious.__ The issues list has been imported from Google Code, so there are many spurious references amongst them since the numbering changed. Basically, any time you see references to changes made by [processing-bugs](https://github.com/processing-bugs), it may be somewhat suspect. Over time this will clean itself up as bugs are fixed and new issues are added from within GitHub. Help speed this process along by helping us! __Please help.__ The instructions for building the source [are here](https://github.com/processing/processing/wiki/Build-Instructions). Please help us fix problems, and if you're submitting code, following the [style guidelines](https://github.com/processing/processing/wiki/Style-Guidelines) helps save me a lot of time. __And finally...__ Someday we'll also fix all these bugs, throw together hundreds of unit tests, and get rich off all this stuff that we're giving away for free. But not today. So in the meantime, I ask for your patience, [participation](https://github.com/processing/processing/wiki/Project-List), and [patches](https://github.com/processing/processing/pulls). Ben Fry, 20 January 2019
0
haraldk/TwelveMonkeys
TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO
bmp icc-profiles icns iff imageio java java-imageio jpeg pbm pcx pgm pict plug-ins ppm psd svg tga tiff twelvemonkeys-imageio webp
[![CI](https://github.com/haraldk/TwelveMonkeys/actions/workflows/ci.yml/badge.svg)](https://github.com/haraldk/TwelveMonkeys/actions/workflows/ci.yml) [![CodeQL](https://github.com/haraldk/TwelveMonkeys/actions/workflows/codeql.yml/badge.svg)](https://github.com/haraldk/TwelveMonkeys/actions/workflows/codeql.yml) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/haraldk/TwelveMonkeys/badge)](https://securityscorecards.dev/viewer/?uri=github.com/haraldk/TwelveMonkeys) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7900/badge)](https://www.bestpractices.dev/projects/7900) [![Maven Central](https://img.shields.io/maven-central/v/com.twelvemonkeys.imageio/imageio?color=slateblue)](https://search.maven.org/search?q=g:com.twelvemonkeys.imageio) [![Maven Snapshot](https://img.shields.io/nexus/s/com.twelvemonkeys.imageio/imageio?label=development&server=https%3A%2F%2Foss.sonatype.org&color=slateblue)](https://oss.sonatype.org/content/repositories/snapshots/com/twelvemonkeys/) [![StackOverflow](https://img.shields.io/badge/stack_overflow-twelvemonkeys-orange.svg)](https://stackoverflow.com/questions/tagged/twelvemonkeys) [![Donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://paypal.me/haraldk76/100) ![Logo](logo.png) ## About TwelveMonkeys ImageIO provides extended image file format support for the Java platform, through plugins for the `javax.imageio.*` package. The main goal of this project is to provide support for formats not covered by the JRE itself. Support for these formats is important, to be able to read data found "in the wild", as well as to maintain access to data in legacy formats. As there is lots of legacy data out there, we see the need for open implementations of readers for popular formats. ---- ## File formats supported | Plugin | Format | Description | R | W | Metadata | Notes | | ------ | -------- |---------------------------------------------------------|:---:|:---:| -------- | ----- | | Batik | **SVG** | Scalable Vector Graphics | ✔ | - | - | Requires [Batik](https://xmlgraphics.apache.org/batik/) | | | WMF | MS Windows Metafile | ✔ | - | - | Requires [Batik](https://xmlgraphics.apache.org/batik/) | | [BMP](https://github.com/haraldk/TwelveMonkeys/wiki/BMP-Plugin) | **BMP** | MS Windows and IBM OS/2 Device Independent Bitmap | ✔ | ✔ | [Native](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/bmp_metadata.html), [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | CUR | MS Windows Cursor Format | ✔ | - | - | | | ICO | MS Windows Icon Format | ✔ | ✔ | - | | [HDR](https://github.com/haraldk/TwelveMonkeys/wiki/HDR-Plugin) | HDR | Radiance High Dynamic Range RGBE Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [ICNS](https://github.com/haraldk/TwelveMonkeys/wiki/ICNS-Plugin) | ICNS | Apple Icon Image | ✔ | ✔ | - | | [IFF](https://github.com/haraldk/TwelveMonkeys/wiki/IFF-Plugin) | IFF | Commodore Amiga/Electronic Arts Interchange File Format | ✔ | ✔ | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [JPEG](https://github.com/haraldk/TwelveMonkeys/wiki/JPEG-Plugin) | **JPEG** | Joint Photographers Expert Group | ✔ | ✔ | [Native](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/jpeg_metadata.html#image), [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | JPEG Lossless | | ✔ | - | [Native](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/jpeg_metadata.html#image), [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [PCX](https://github.com/haraldk/TwelveMonkeys/wiki/PCX-Plugin) | PCX | ZSoft Paintbrush Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | DCX | Multi-page PCX fax document | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [PICT](https://github.com/haraldk/TwelveMonkeys/wiki/PICT-Plugin) | PICT | Apple QuickTime Picture Format | ✔ | ✔ | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PNTG | Apple MacPaint Picture Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [PNM](https://github.com/haraldk/TwelveMonkeys/wiki/PNM-Plugin) | PAM | NetPBM Portable Any Map | ✔ | ✔ | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PBM | NetPBM Portable Bit Map | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PGM | NetPBM Portable Grey Map | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PPM | NetPBM Portable Pix Map | ✔ | ✔ | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PFM | Portable Float Map | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [PSD](https://github.com/haraldk/TwelveMonkeys/wiki/PSD-Plugin) | **PSD** | Adobe Photoshop Document | ✔ | (✔) | Native, [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | PSB | Adobe Photoshop Large Document | ✔ | - | Native, [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [SGI](https://github.com/haraldk/TwelveMonkeys/wiki/SGI-Plugin) | SGI | Silicon Graphics Image Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [TGA](https://github.com/haraldk/TwelveMonkeys/wiki/TGA-Plugin) | TGA | Truevision TGA Image Format | ✔ | ✔ | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | |ThumbsDB| Thumbs.db| MS Windows Thumbs DB | ✔ | - | - | OLE2 Compound Document based format only | | [TIFF](https://github.com/haraldk/TwelveMonkeys/wiki/TIFF-Plugin) | **TIFF** | Aldus/Adobe Tagged Image File Format | ✔ | ✔ | [Native](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html#ImageMetadata), [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | | BigTIFF | | ✔ | ✔ | [Native](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html#ImageMetadata), [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | [WebP](https://github.com/haraldk/TwelveMonkeys/wiki/WebP-Plugin) | **WebP** | Google WebP Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | | XWD | XWD | X11 Window Dump Format | ✔ | - | [Standard](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/metadata/doc-files/standard_metadata.html) | **Important note on using Batik:** *Please read [The Apache™ XML Graphics Project - Security](https://xmlgraphics.apache.org/security.html), and make sure you use an updated and secure version.* Note that GIF, PNG and WBMP formats are already supported through the ImageIO API, using the [JDK standard plugins](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/imageio/package-summary.html). For BMP, JPEG, and TIFF formats the TwelveMonkeys plugins provides extended format support and additional features. ## Basic usage Most of the time, all you need to do is simply include the plugins in your project and write: ```java BufferedImage image = ImageIO.read(file); ``` This will load the first image of the file, entirely into memory. The basic and simplest form of writing is: ```java if (!ImageIO.write(image, format, file)) { // Handle image not written case } ``` This will write the entire image into a single file, using the default settings for the given format. The plugins are discovered automatically at run time. See the [FAQ](#faq) for more info on how this mechanism works. ## Advanced usage If you need more control of read parameters and the reading process, the common idiom for reading is something like: ```java // Create input stream (in try-with-resource block to avoid leaks) try (ImageInputStream input = ImageIO.createImageInputStream(file)) { // Get the reader Iterator<ImageReader> readers = ImageIO.getImageReaders(input); if (!readers.hasNext()) { throw new IllegalArgumentException("No reader for: " + file); } ImageReader reader = readers.next(); try { reader.setInput(input); // Optionally, listen for read warnings, progress, etc. reader.addIIOReadWarningListener(...); reader.addIIOReadProgressListener(...); ImageReadParam param = reader.getDefaultReadParam(); // Optionally, control read settings like sub sampling, source region or destination etc. param.setSourceSubsampling(...); param.setSourceRegion(...); param.setDestination(...); // ... // Finally read the image, using settings from param BufferedImage image = reader.read(0, param); // Optionally, read thumbnails, meta data, etc... int numThumbs = reader.getNumThumbnails(0); // ... } finally { // Dispose reader in finally block to avoid memory leaks reader.dispose(); } } ``` Query the reader for source image dimensions using `reader.getWidth(n)` and `reader.getHeight(n)` without reading the entire image into memory first. It's also possible to read multiple images from the same file in a loop, using `reader.getNumImages()`. If you need more control of write parameters and the writing process, the common idiom for writing is something like: ```java // Get the writer Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName(format); if (!writers.hasNext()) { throw new IllegalArgumentException("No writer for: " + format); } ImageWriter writer = writers.next(); try { // Create output stream (in try-with-resource block to avoid leaks) try (ImageOutputStream output = ImageIO.createImageOutputStream(file)) { writer.setOutput(output); // Optionally, listen to progress, warnings, etc. ImageWriteParam param = writer.getDefaultWriteParam(); // Optionally, control format specific settings of param (requires casting), or // control generic write settings like sub sampling, source region, output type etc. // Optionally, provide thumbnails and image/stream metadata writer.write(..., new IIOImage(..., image, ...), param); } } finally { // Dispose writer in finally block to avoid memory leaks writer.dispose(); } ``` For more advanced usage, and information on how to use the ImageIO API, I suggest you read the [Java Image I/O API Guide](https://docs.oracle.com/javase/7/docs/technotes/guides/imageio/spec/imageio_guideTOC.fm.html) from Oracle. #### Adobe Clipping Path support ```java import com.twelvemonkeys.imageio.path.Paths; ... try (ImageInputStream stream = ImageIO.createImageInputStream(new File("image_with_path.jpg")) { BufferedImage image = Paths.readClipped(stream); // Do something with the clipped image... } ``` See [Adobe Clipping Path support on the Wiki](https://github.com/haraldk/TwelveMonkeys/wiki/Photoshop-Clipping-Path-support) for more details and example code. #### Using the ResampleOp The library comes with a resampling (image resizing) operation, that contains many different algorithms to provide excellent results at reasonable speed. ```java import com.twelvemonkeys.image.ResampleOp; ... BufferedImage input = ...; // Image to resample int width, height = ...; // new width/height BufferedImageOp resampler = new ResampleOp(width, height, ResampleOp.FILTER_LANCZOS); // A good default filter, see class documentation for more info BufferedImage output = resampler.filter(input, null); ``` #### Using the DiffusionDither The library comes with a dithering operation, that can be used to convert `BufferedImage`s to `IndexColorModel` using Floyd-Steinberg error-diffusion dither. ```java import com.twelvemonkeys.image.DiffusionDither; ... BufferedImage input = ...; // Image to dither BufferedImageOp ditherer = new DiffusionDither(); BufferedImage output = ditherer.filter(input, null); ``` ## Building Download the project (using [Git](https://git-scm.com/downloads)): $ git clone git@github.com:haraldk/TwelveMonkeys.git This should create a folder named `TwelveMonkeys` in your current directory. Change directory to the `TwelveMonkeys` folder, and issue the command below to build. Build the project (using [Maven](https://maven.apache.org/download.cgi)): $ mvn package Currently, the recommended JDK for making a build is Oracle JDK 8.x. It's possible to build using OpenJDK, but some tests might fail due to some minor differences between the color management systems used. You will need to either disable the tests in question, or build without tests altogether. Because the unit tests needs quite a bit of memory to run, you might have to set the environment variable `MAVEN_OPTS` to give the Java process that runs Maven more memory. I suggest something like `-Xmx512m -XX:MaxPermSize=256m`. Optionally, you can install the project in your local Maven repository using: $ mvn install ## Installing To install the plug-ins, either use Maven and add the necessary dependencies to your project, or manually add the needed JARs along with required dependencies in class-path. The ImageIO registry and service lookup mechanism will make sure the plugins are available for use. To verify that the JPEG plugin is installed and used at run-time, you could use the following code: ```java Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName("JPEG"); while (readers.hasNext()) { System.out.println("reader: " + readers.next()); } ``` The first line should print: reader: com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader@somehash #### Maven dependency example To depend on the JPEG and TIFF plugin using Maven, add the following to your POM: ```xml ... <dependencies> ... <dependency> <groupId>com.twelvemonkeys.imageio</groupId> <artifactId>imageio-jpeg</artifactId> <version>3.10.1</version> </dependency> <dependency> <groupId>com.twelvemonkeys.imageio</groupId> <artifactId>imageio-tiff</artifactId> <version>3.10.1</version> </dependency> <!-- Optional dependency. Needed only if you deploy ImageIO plugins as part of a web app. Make sure you add the IIOProviderContextListener to your web.xml, see above. --> <dependency> <groupId>com.twelvemonkeys.servlet</groupId> <artifactId>servlet</artifactId> <version>3.10.1</version> </dependency> <!-- Or Jakarta version, for Servlet API 5.0 --> <dependency> <groupId>com.twelvemonkeys.servlet</groupId> <artifactId>servlet</artifactId> <version>3.10.1</version> <classifier>jakarta</classifier> </dependency> </dependencies> ``` #### Manual dependency example To depend on the JPEG and TIFF plugin in your IDE or program, add all of the following JARs to your class path: twelvemonkeys-common-lang-3.10.1.jar twelvemonkeys-common-io-3.10.1.jar twelvemonkeys-common-image-3.10.1.jar twelvemonkeys-imageio-core-3.10.1.jar twelvemonkeys-imageio-metadata-3.10.1.jar twelvemonkeys-imageio-jpeg-3.10.1.jar twelvemonkeys-imageio-tiff-3.10.1.jar #### Deploying the plugins in a web app Because the `ImageIO` plugin registry (the `IIORegistry`) is "VM global", it does not work well with servlet contexts as-is. This is especially evident if you load plugins from the `WEB-INF/lib` or `classes` folder. Unless you add `ImageIO.scanForPlugins()` somewhere in your code, the plugins might never be available at all. In addition, servlet contexts dynamically loads and unloads classes (using a new class loader per context). If you restart your application, old classes will by default remain in memory forever (because the next time `scanForPlugins` is called, it's another `ClassLoader` that scans/loads classes, and thus they will be new instances in the registry). If a read is attempted using one of the remaining "old" readers, weird exceptions (like `NullPointerException`s when accessing `static final` initialized fields or `NoClassDefFoundError`s for uninitialized inner classes) may occur. To work around both the discovery problem and the resource leak, it is *strongly recommended* to use the `IIOProviderContextListener` that implements dynamic loading and unloading of ImageIO plugins for web applications. ```xml <web-app ...> ... <listener> <display-name>ImageIO service provider loader/unloader</display-name> <listener-class>com.twelvemonkeys.servlet.image.IIOProviderContextListener</listener-class> </listener> ... </web-app> ``` Loading plugins from `WEB-INF/lib` without the context listener installed is unsupported and will not work correctly. The context listener has no dependencies to the TwelveMonkeys ImageIO plugins, and may be used with JAI ImageIO or other ImageIO plugins as well. Another safe option, is to place the JAR files in the application server's shared or common lib folder. ##### Jakarta Servlet Support For those transitioning from the old `javax.servlet` to the new `jakarta.servlet` package, there is a separate dependency available. It contains exactly the same servlet classes as mentioned above, but built against the new Jakarta EE packages. The dependency has the same group name and identifier as before, but a `jakarta` *classifier* appended, to distinguish it from the non-Jakarta package. See the [Maven dependency example](#maven-dependency-example) for how to enable it with Maven. Gradle or other build tools will have similar options. #### Including the plugins in a "fat" JAR The recommended way to use the plugins, is just to include the JARs as-is in your project, through a Maven dependency or similar. Re-packaging is not necessary to use the library, and not recommended. However, if you like to create a "fat" JAR, or otherwise like to re-package the JARs for some reason, it's important to remember that automatic discovery of the plugins by ImageIO depends on the [Service Provider Interface (SPI)](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) mechanism. In short, each JAR contains a special folder, named `META-INF/services` containing one or more files, typically `javax.imageio.spi.ImageReaderSpi` and `javax.imageio.spi.ImageWriterSpi`. These files exist *with the same name in every JAR*, so if you simply unpack everything to a single folder or create a JAR, files will be overwritten and behavior be unspecified (most likely you will end up with a single plugin being installed). The solution is to make sure all files with the same name, are merged to a single file, containing all the SPI information of each type. If using the Maven Shade plugin, you should use the [ServicesResourceTransformer](https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer) to properly merge these files. You may also want to use the [ManifestResourceTransforme](https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ManifestResourceTransformer) to get the correct vendor name, version info etc. Other "fat" JAR bundlers will probably have similar mechanisms to merge entries with the same name. ### Links to prebuilt binaries ##### Latest version (3.10.1) The latest version that will run on Java 7 is 3.9.4. Later versions will require Java 8 or later. Common dependencies * [common-lang-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-lang/3.10.1/common-lang-3.10.1.jar) * [common-io-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-io/3.10.1/common-io-3.10.1.jar) * [common-image-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/common/common-image/3.10.1/common-image-3.10.1.jar) ImageIO dependencies * [imageio-core-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-core/3.10.1/imageio-core-3.10.1.jar) * [imageio-metadata-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-metadata/3.10.1/imageio-metadata-3.10.1.jar) ImageIO plugins * [imageio-bmp-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-bmp/3.10.1/imageio-bmp-3.10.1.jar) * [imageio-hdr-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-hdr/3.10.1/imageio-hdr-3.10.1.jar) * [imageio-icns-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-icns/3.10.1/imageio-icns-3.10.1.jar) * [imageio-iff-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-iff/3.10.1/imageio-iff-3.10.1.jar) * [imageio-jpeg-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-jpeg/3.10.1/imageio-jpeg-3.10.1.jar) * [imageio-pcx-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pcx/3.10.1/imageio-pcx-3.10.1.jar) * [imageio-pict-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pict/3.10.1/imageio-pict-3.10.1.jar) * [imageio-pnm-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-pnm/3.10.1/imageio-pnm-3.10.1.jar) * [imageio-psd-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-psd/3.10.1/imageio-psd-3.10.1.jar) * [imageio-sgi-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-sgi/3.10.1/imageio-sgi-3.10.1.jar) * [imageio-tga-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tga/3.10.1/imageio-tga-3.10.1.jar) * [imageio-thumbsdb-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-thumbsdb/3.10.1/imageio-thumbsdb-3.10.1.jar) * [imageio-tiff-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-tiff/3.10.1/imageio-tiff-3.10.1.jar) * [imageio-webp-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-webp/3.10.1/imageio-webp-3.10.1.jar) * [imageio-xwd-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-xwd/3.10.1/imageio-xwd-3.10.1.jar) ImageIO plugins requiring 3rd party libs * [imageio-batik-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-batik/3.10.1/imageio-batik-3.10.1.jar) Photoshop Path support for ImageIO * [imageio-clippath-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/imageio/imageio-clippath/3.10.1/imageio-clippath-3.10.1.jar) Servlet support * [servlet-3.10.1.jar](https://search.maven.org/remotecontent?filepath=com/twelvemonkeys/servlet/servlet/3.10.1/servlet-3.10.1.jar) ## License This project is provided under the OSI approved [BSD license](https://opensource.org/licenses/BSD-3-Clause): Copyright (c) 2008-2022, Harald Kuhr All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. o Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## FAQ q: How do I use it? a: The easiest way is to build your own project using Maven, Gradle or other build tool with dependency management, and just add dependencies to the specific plug-ins you need. If you don't use such a build tool, make sure you have all the necessary JARs in classpath. See the Install section above. q: What changes do I have to make to my code in order to use the plug-ins? a: The short answer is: None. For basic usage, like `ImageIO.read(...)` or `ImageIO.getImageReaders(...)`, there is no need to change your code. Most of the functionality is available through standard ImageIO APIs, and great care has been taken not to introduce extra API where none is necessary. Should you want to use very specific/advanced features of some of the formats, you might have to use specific APIs, like setting base URL for an SVG image that consists of multiple files, or controlling the output compression of a TIFF file. q: How does it work? a: The TwelveMonkeys ImageIO project contains plug-ins for ImageIO. ImageIO uses a service lookup mechanism, to discover plug-ins at runtime. All you have to do, is to make sure you have the TwelveMonkeys ImageIO JARs in your classpath. You can read more about the registry and the lookup mechanism in the [IIORegistry API doc](https://docs.oracle.com/javase/7/docs/api/javax/imageio/spi/IIORegistry.html). The fine print: The TwelveMonkeys service providers for JPEG, BMP and TIFF, overrides the onRegistration method, and utilizes the pairwise partial ordering mechanism of the `IIOServiceRegistry` to make sure it is installed before the Sun/Oracle provided `JPEGImageReader`, `BMPImageReader` `TIFFImageReader`, and the Apple provided `TIFFImageReader` on OS X, respectively. Using the pairwise ordering will not remove any functionality form these implementations, but in most cases you'll end up using the TwelveMonkeys plug-ins instead. q: Why is there no support for common formats like GIF or PNG? a: The short answer is simply that the built-in support in ImageIO for these formats are considered good enough as-is. If you are looking for better PNG write performance on Java 7 and 8, see [JDK9 PNG Writer Backport](https://github.com/gredler/jdk9-png-writer-backport). q: When is the next release? What is the current release schedule? a: The goal is to make monthly releases, containing bug fixes and minor new features. And quarterly releases with more "major" features. q: I love this project! How can I help? a: Have a look at the open issues, and see if there are any issues you can help fix, or provide sample file or create test cases for. It is also possible for you or your organization to become a sponsor, through GitHub Sponsors. Providing funding will allow us to spend more time on fixing bugs and implementing new features. q: What about JAI? Several of the formats are already supported by JAI. a: While JAI (and jai-imageio in particular) have support for some of the same formats, JAI has some major issues. The most obvious being: - It's not actively developed. No issue has been fixed for years. - To get full format support, you need native libs. Native libs does not exist for several popular platforms/architectures, and further the native libs are not open source. Some environments may also prevent deployment of native libs, which brings us back to square one. q: What about JMagick or IM4Java? Can't you just use what's already available? a: While great libraries with a wide range of formats support, the ImageMagick-based libraries has some disadvantages compared to ImageIO. - No real stream support, these libraries only work with files. - No easy access to pixel data through standard Java2D/BufferedImage API. - Not a pure Java solution, requires system specific native libs. ----- We did it
0
confluentinc/schema-registry
Confluent Schema Registry for Kafka
avro avro-schema confluent json json-schema kafka protobuf protobuf-schema rest-api schema schema-registry schemas
Schema Registry ================ Confluent Schema Registry provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving your Avro®, JSON Schema, and Protobuf schemas. It stores a versioned history of all schemas based on a specified subject name strategy, provides multiple compatibility settings and allows evolution of schemas according to the configured compatibility settings and expanded support for these schema types. It provides serializers that plug into Apache Kafka® clients that handle schema storage and retrieval for Kafka messages that are sent in any of the supported formats. This README includes the following sections: <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- generated with [DocToc](https://github.com/thlorenz/doctoc), see the link for install and instructions for use --> - [Documentation](#documentation) - [Quickstart API Usage examples](#quickstart-api-usage-examples) - [Installation](#installation) - [Deployment](#deployment) - [Development](#development) - [OpenAPI Spec](#openapi-spec) - [Contribute](#contribute) - [License](#license) <!-- END doctoc generated TOC please keep comment here to allow auto update --> Documentation ------------- Here are a few links to Schema Registry pages in the Confluent Documentation. - [Installing and Configuring Schema Registry](https://docs.confluent.io/current/schema-registry/installation/index.html) - [Schema Management overview](https://docs.confluent.io/current/schema-registry/index.html) - [Schema Registry Tutorial](https://docs.confluent.io/current/schema-registry/schema_registry_tutorial.html) - [Schema Registry API reference](https://docs.confluent.io/current/schema-registry/develop/api.html) - [Serializers, Deserializers for supported schema types](https://docs.confluent.io/current/schema-registry/serializer-formatter.html) - [Kafka Clients](https://docs.confluent.io/current/clients/index.html#kafka-clients) - [Schema Registry on Confluent Cloud](https://docs.confluent.io/current/quickstart/cloud-quickstart/schema-registry.html) Quickstart API Usage examples ----------------------------- The following assumes you have Kafka and an [instance of the Schema Registry](https://docs.confluent.io/current/schema-registry/installation/index.html) running using the default settings. These examples, and more, are also available at [API Usage examples](https://docs.confluent.io/current/schema-registry/using.html) on [docs.confluent.io](https://docs.confluent.io/current/). ```bash # Register a new version of a schema under the subject "Kafka-key" $ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"schema": "{\"type\": \"string\"}"}' \ http://localhost:8081/subjects/Kafka-key/versions {"id":1} # Register a new version of a schema under the subject "Kafka-value" $ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"schema": "{\"type\": \"string\"}"}' \ http://localhost:8081/subjects/Kafka-value/versions {"id":1} # List all subjects $ curl -X GET http://localhost:8081/subjects ["Kafka-value","Kafka-key"] # List all schema versions registered under the subject "Kafka-value" $ curl -X GET http://localhost:8081/subjects/Kafka-value/versions [1] # Fetch a schema by globally unique id 1 $ curl -X GET http://localhost:8081/schemas/ids/1 {"schema":"\"string\""} # Fetch version 1 of the schema registered under subject "Kafka-value" $ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/1 {"subject":"Kafka-value","version":1,"id":1,"schema":"\"string\""} # Fetch the most recently registered schema under subject "Kafka-value" $ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/latest {"subject":"Kafka-value","version":1,"id":1,"schema":"\"string\""} # Delete version 3 of the schema registered under subject "Kafka-value" $ curl -X DELETE http://localhost:8081/subjects/Kafka-value/versions/3 3 # Delete all versions of the schema registered under subject "Kafka-value" $ curl -X DELETE http://localhost:8081/subjects/Kafka-value [1, 2, 3, 4, 5] # Check whether a schema has been registered under subject "Kafka-key" $ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"schema": "{\"type\": \"string\"}"}' \ http://localhost:8081/subjects/Kafka-key {"subject":"Kafka-key","version":1,"id":1,"schema":"\"string\""} # Test compatibility of a schema with the latest schema under subject "Kafka-value" $ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"schema": "{\"type\": \"string\"}"}' \ http://localhost:8081/compatibility/subjects/Kafka-value/versions/latest {"is_compatible":true} # Get top level config $ curl -X GET http://localhost:8081/config {"compatibilityLevel":"BACKWARD"} # Update compatibility requirements globally $ curl -X PUT -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"compatibility": "NONE"}' \ http://localhost:8081/config {"compatibility":"NONE"} # Update compatibility requirements under the subject "Kafka-value" $ curl -X PUT -H "Content-Type: application/vnd.schemaregistry.v1+json" \ --data '{"compatibility": "BACKWARD"}' \ http://localhost:8081/config/Kafka-value {"compatibility":"BACKWARD"} ``` Installation ------------ You can download prebuilt versions of the schema registry as part of the [Confluent Platform](http://confluent.io/downloads/). To install from source, follow the instructions in the Development section. Deployment ---------- The REST interface to schema registry includes a built-in Jetty server. The wrapper scripts ``bin/schema-registry-start`` and ``bin/schema-registry-stop`` are the recommended method of starting and stopping the service. Development ----------- To build a development version, you may need a development versions of [common](https://github.com/confluentinc/common) and [rest-utils](https://github.com/confluentinc/rest-utils). After installing these, you can build the Schema Registry with Maven. This project uses the [Google Java code style](https://google.github.io/styleguide/javaguide.html) to keep code clean and consistent. To build: ```bash mvn compile ``` To run the unit and integration tests: ```bash mvn test ``` To run an instance of Schema Registry against a local Kafka cluster (using the default configuration included with Kafka): ```bash mvn exec:java -pl :kafka-schema-registry -Dexec.args="config/schema-registry.properties" ``` To create a packaged version, optionally skipping the tests: ```bash mvn package [-DskipTests] ``` It produces: - Schema registry in `package-schema-registry/target/kafka-schema-registry-package-$VERSION-package` - Serde tools for avro/json/protobuf in `package-kafka-serde-tools/target/kafka-serde-tools-package-$VERSION-package` Each of the produced contains a directory layout similar to the packaged binary versions. You can also produce a standalone fat JAR of schema registry using the `standalone` profile: ```bash mvn package -P standalone [-DskipTests] ``` This generates `package-schema-registry/target/kafka-schema-registry-package-$VERSION-standalone.jar`, which includes all the dependencies as well. OpenAPI Spec ------------ OpenAPI (formerly known as Swagger) specifications are built automatically using `swagger-maven-plugin` on `compile` phase. Contribute ---------- Thanks for helping us to make Schema Registry even better! - Source Code: https://github.com/confluentinc/schema-registry - Issue Tracker: https://github.com/confluentinc/schema-registry/issues License ------- The project is licensed under the [Confluent Community License](LICENSE-ConfluentCommunity), except for the `client-*` and `avro-*` libs, which are under the [Apache 2.0 license](LICENSE-Apache). See LICENSE file in each subfolder for detailed license agreement.
0
oracle/graal
GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
aot compiler graalvm java
[![GraalVM](.github/assets/logo_320x64.svg)][website] [![GraalVM downloads][badge-dl]][downloads] [![GraalVM docs][badge-docs]][docs] [![GraalVM on Slack][badge-slack]][slack] [![GraalVM on Twitter][badge-twitter]][twitter] [![GraalVM on YouTube][badge-yt]][youtube] [![GraalVM Gate][badge-gate]][gate] [![License][badge-license]](#license) GraalVM is a high-performance JDK distribution that compiles your Java applications ahead of time into standalone binaries. These binaries start instantly, provide peak performance with no warmup, and use fewer resources. You can use GraalVM just like any other Java Development Kit in your IDE. The project website at [https://www.graalvm.org/][website] describes how to [get started][getting-started], how to [stay connected][community], and how to [contribute][contributors]. ## Documentation Please refer to the [GraalVM website for documentation][docs]. You can find most of the documentation sources in the [_docs/_](docs/) directory in the same hierarchy as displayed on the website. Additional documentation including developer instructions for individual components can be found in corresponding _docs/_ sub-directories. The documentation for the Truffle framework, for example, is in [_truffle/docs/_](truffle/docs/). This also applies to languages, tools, and other components maintained in [related repositories](#related-repositories). ## Get Support * Open a [GitHub issue][issues] for bug reports, questions, or requests for enhancements. * Join the [GraalVM Slack][slack] to connect with the community and the GraalVM team. * Report a security vulnerability according to the [Reporting Vulnerabilities guide][reporting-vulnerabilities]. ## Repository Structure This source repository is the main repository for GraalVM and includes the following components: Directory | Description ------------ | ------------- [`.devcontainer/`](.devcontainer/) | Configuration files for GitHub dev containers. [`.github/`](.github/) | Configuration files for GitHub issues, workflows, …. [`compiler/`](compiler/) | [Graal compiler][reference-compiler], a modern, versatile compiler written in Java. [`espresso/`](espresso/) | [Espresso][java-on-truffle], a meta-circular Java bytecode interpreter for the GraalVM. [`java-benchmarks/`](java-benchmarks/) | Java benchmarks. [`regex/`](regex/) | TRegex, a regular expression engine for other GraalVM languages. [`sdk/`](sdk/) | [GraalVM SDK][graalvm-sdk], long-term supported APIs of GraalVM. [`substratevm/`](substratevm/) | Framework for ahead-of-time (AOT) compilation with [Native Image][native-image]. [`sulong/`](sulong/) | [Sulong][reference-sulong], an engine for running LLVM bitcode on GraalVM. [`tools/`](tools/) | Tools for GraalVM languages implemented with the instrumentation framework. [`truffle/`](truffle/) | GraalVM's [language implementation framework][truffle] for creating languages and tools. [`visualizer/`](visualizer/) | [Ideal Graph Visualizer (IGV)][igv], a tool for analyzing Graal compiler graphs. [`vm/`](vm/) | Components for building GraalVM distributions. [`wasm/`](wasm/) | [GraalWasm][reference-graalwasm], an engine for running WebAssembly programs on GraalVM. ## Related Repositories GraalVM provides additional languages, tools, and other components developed in related repositories. These are: Name | Description ------------ | ------------- [FastR] | Implementation of the R language. [GraalJS] | Implementation of JavaScript and Node.js. [GraalPy] | Implementation of the Python language. [GraalVM Demos][graalvm-demos] | Several example applications illustrating GraalVM capabilities. [Native Build Tools][native-build-tools] | Build tool plugins for GraalVM Native Image. [SimpleLanguage] | A simple example language built with the Truffle framework. [SimpleTool] | A simple example tool built with the Truffle framework. [TruffleRuby] | Implementation of the Ruby language. ## License GraalVM Community Edition is open source and distributed under [version 2 of the GNU General Public License with the “Classpath” Exception](LICENSE), which are the same terms as for Java. The licenses of the individual GraalVM components are generally derivative of the license of a particular language (see the table below). Component(s) | License ------------ | ------------- [Espresso](espresso/LICENSE), [Ideal Graph Visualizer](visualizer/LICENSE) | GPL 2 [GraalVM Compiler](compiler/LICENSE.md), [SubstrateVM](substratevm/LICENSE), [Tools](tools/LICENSE), [VM](vm/LICENSE_GRAALVM_CE) | GPL 2 with Classpath Exception [GraalVM SDK](sdk/LICENSE.md), [GraalWasm](wasm/LICENSE), [Truffle Framework](truffle/LICENSE.md), [TRegex](regex/LICENSE.md) | Universal Permissive License [Sulong](sulong/LICENSE) | 3-clause BSD [badge-dl]: https://img.shields.io/badge/download-latest-blue [badge-docs]: https://img.shields.io/badge/docs-read-green [badge-gate]: https://github.com/oracle/graal/actions/workflows/main.yml/badge.svg [badge-license]: https://img.shields.io/badge/license-GPLv2+CE-green [badge-slack]: https://img.shields.io/badge/Slack-join-active?logo=slack [badge-twitter]: https://img.shields.io/badge/Twitter-@graalvm-active?logo=twitter [badge-yt]: https://img.shields.io/badge/YouTube-subscribe-active?logo=youtube [community]: https://www.graalvm.org/community/ [contributors]: https://www.graalvm.org/community/contributors/ [docs]: https://www.graalvm.org/latest/docs/ [downloads]: https://www.graalvm.org/downloads/ [fastr]: https://github.com/oracle/fastr [gate]: https://github.com/oracle/graal/actions/workflows/main.yml [getting-started]: https://www.graalvm.org/latest/docs/getting-started/ [graaljs]: https://github.com/oracle/graaljs [graalpy]: https://github.com/oracle/graalpython [graalvm-demos]: https://github.com/graalvm/graalvm-demos [graalvm-sdk]: https://www.graalvm.org/sdk/javadoc/ [igv]: https://www.graalvm.org/latest/tools/igv/ [issues]: https://github.com/oracle/graal/issues [java-on-truffle]: https://www.graalvm.org/latest/reference-manual/java-on-truffle/ [native-build-tools]: https://github.com/graalvm/native-build-tools [native-image]: https://www.graalvm.org/native-image/ [reference-compiler]: https://www.graalvm.org/latest/reference-manual/java/compiler/ [reference-graalwasm]: https://www.graalvm.org/latest/reference-manual/wasm/ [reference-sulong]: https://www.graalvm.org/latest/reference-manual/llvm/ [reporting-vulnerabilities]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html [simplelanguage]: https://github.com/graalvm/simplelanguage [simpletool]: https://github.com/graalvm/simpletool [slack]: https://www.graalvm.org/slack-invitation/ [truffle]: https://www.graalvm.org/graalvm-as-a-platform/language-implementation-framework/ [truffleruby]: https://github.com/oracle/truffleruby [twitter]: https://twitter.com/graalvm [website]: https://www.graalvm.org/ [youtube]: https://www.youtube.com/graalvm
0
sonatype/nexus-public
Sonatype Nexus Repository Open-source codebase mirror
repository repository-management
<!-- Sonatype Nexus (TM) Open Source Version Copyright (c) 2008-present Sonatype, Inc. All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the Eclipse Foundation. All other trademarks are the property of their respective owners. --> # Sonatype Nexus Repository Open Source Codebase ## Downloadable Bundles See: https://www.sonatype.com/download-oss-sonatype ## Support Using Sonatype Nexus Repository OSS and need to report an issue? [Open an issue here](https://github.com/sonatype/nexus-public/issues) Sonatype Nexus Repository Pro customers can use https://support.sonatype.com/. ## Build Requirements Builds use Apache Maven and require Java 8. Apache Maven wrapper scripts are included in the source tree. All release versioned dependencies should be available from the [Central](https://repo1.maven.org/maven2/) repository. For SNAPSHOT sources, SNAPSHOT versioned dependencies may only be available from https://repository.sonatype.org/content/groups/sonatype-public-grid repository. ### Configuring Maven for SNAPSHOT Dependencies Following best practices, the nexus-public POM does not include any root `<repositories>` elements. Instead you are advised to [configure Apache Maven to point at single repository mirror URL](https://maven.apache.org/guides/mini/guide-mirror-settings.html#using-a-single-repository) that is a group repository containing both Central proxy repository with Release version policy and sonatype-public-grid with a SNAPSHOT version policy. You can use a [repository manager](https://www.sonatype.org/nexus/go/) to set up a group repository that contains both of these remotes. Alternately, [add a custom profile to a settings.xml](https://maven.apache.org/guides/mini/guide-multiple-repositories.html) for repository manager development that includes both repositories. ## Building From Source Released versions are tagged and branched using a name of the form `release-{version}`. For example: `release-3.29.2-02` To build a tagged release, first fetch all tags: ```shell git fetch --tags ``` Then checkout the remote branch you want. For example: ```shell git checkout -b release-3.29.2-02 origin/release-3.29.2-02 -- ``` Then build using the included Maven wrapper script. For example: ```shell ./mvnw clean install ``` For building SNAPSHOT versions, follow the same process, except your build may require access to [Sonatype Public Grid](https://repository.sonatype.org/content/groups/sonatype-public-grid) to successfully resolve dependencies. ## Running To run Nexus Repository, after building, unzip the assembly and start the server: unzip -d target assemblies/nexus-base-template/target/nexus-base-template-*.zip ./target/nexus-base-template-*/bin/nexus console The `nexus-base-template` assembly is used as the basis for the official Sonatype Nexus Repository distributions. ## License This project is licensed under the Eclipse Public License - v 1.0, you can read the full text [here](LICENSE.txt) ## Getting help Looking to contribute to our code but need some help? There's a few ways to get information or our attention: * Check out the [Nexus3](http://stackoverflow.com/questions/tagged/nexus3) tag on Stack Overflow * Check out the [Nexus Repository User List](https://groups.google.com/a/glists.sonatype.com/forum/?hl=en#!forum/nexus-users) * Connect with [@sonatypeDev](https://twitter.com/sonatypeDev) on Twitter
0
spring-projects/spring-ai
An Application Framework for AI Engineering
artificial-intelligence java
# Spring AI [![build status](https://github.com/spring-projects/spring-ai/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/spring-projects/spring-ai/actions/workflows/continuous-integration.yml) Welcome to the Spring AI project! The Spring AI project provides a Spring-friendly API and abstractions for developing AI applications. Let's make your `@Beans` intelligent! For further information go to our [Spring AI reference documentation](https://docs.spring.io/spring-ai/reference/). ## Project Links * [Documentation](https://docs.spring.io/spring-ai/reference/) * [Issues](https://github.com/spring-projects/spring-ai/issues) * [Discussions](https://github.com/spring-projects/spring-ai/discussions) - Go here if you have a question, suggestion, or feedback! * [Upgrade from 0.7.1-SNAPSHOT](https://docs.spring.io/spring-ai/reference/upgrade-notes.html) ## Educational Resources - Follow the [Workshop material for Azure OpenAI](https://github.com/Azure-Samples/spring-ai-azure-workshop) - The workshop contains step-by-step examples from 'hello world' to 'retrieval augmented generation' Some selected videos. Search YouTube! for more. - Spring Tips: Spring AI <br>[![Watch Spring Tips video](https://img.youtube.com/vi/aNKDoiOUo9M/default.jpg)](https://www.youtube.com/watch?v=aNKDoiOUo9M) * Overview of Spring AI @ Devoxx 2023 <br>[![Watch the Devoxx 2023 video](https://img.youtube.com/vi/7OY9fKVxAFQ/default.jpg)](https://www.youtube.com/watch?v=7OY9fKVxAFQ) * Introducing Spring AI - Add Generative AI to your Spring Applications <br>[![Watch the video](https://img.youtube.com/vi/1g_wuincUdU/default.jpg)](https://www.youtube.com/watch?v=1g_wuincUdU) ## Getting Started Please refer to the [Getting Started Guide](https://docs.spring.io/spring-ai/reference/getting-started.html) for instruction on adding your dependencies. Note, the new Spring CLI project lets you get up and running in two simple steps, [described in detail here](https://docs.spring.io/spring-ai/reference/getting-started.html#spring-cli). 1. Install Spring CLI 2. Type `spring boot new --from ai --name myai` in your terminal ### Adding Dependencies manually Note that are two main steps. 1. [Add the Spring Milestone and Snapshot repositories to your build system](https://docs.spring.io/spring-ai/reference/getting-started.html#repositories). 2. Add the [Spring AI BOM](https://docs.spring.io/spring-ai/reference/getting-started.html#dependency-management) 3. [Add dependencies](https://docs.spring.io/spring-ai/reference/getting-started.html#add-dependencies) for the specific AI model, Vector Database or other component dependencies you require. ## Overview Despite the extensive history of AI, Java's role in this domain has been relatively minor. This is mainly due to the historical reliance on efficient algorithms developed in languages such as C/C++, with Python serving as a bridge to access these libraries. The majority of ML/AI tools were built around the Python ecosystem. However, recent progress in Generative AI, spurred by innovations like OpenAI's ChatGPT, has popularized the interaction with pre-trained models via HTTP. This eliminates much of the dependency on C/C++/Python libraries and opens the door to the use of programming languages such as Java. The Python libraries [LangChain](https://docs.langchain.com/docs/) and [LlamaIndex](https://gpt-index.readthedocs.io/en/latest/getting_started/concepts.html) have become popular to implement Generative AI solutions and can be implemented in other programming languages. These Python libraries share foundational themes with Spring projects, such as: * Portable Service Abstractions * Modularity * Extensibility * Reduction of boilerplate code * Integration with diverse data sources * Prebuilt solutions for common use cases Taking inspiration from these libraries, the Spring AI project aims to provide a similar experience for Spring developers in the AI domain. Note, that the Spring AI API is not a direct port of either LangChain or LlamaIndex. You will see significant differences in the API if you are familiar with those two projects, though concepts and ideas are fairly portable. ## Feature Overview This is a high level feature overview. The features that are implemented lay the foundation, with subsequent more complex features building upon them. You can find more details in the [Reference Documentation](https://docs.spring.io/spring-ai/reference/) ### Interacting with AI Models **ChatClient:** A foundational feature of Spring AI is a portable client API for interacting with generative AI models. With this portable API, you can initially target one AI chat model, for example OpenAI and then easily swap out the implementation to another AI chat model, for example Amazon Bedrock's Anthropic Model. When necessary, you can also drop down to use non-portable model options. Spring AI supports many AI models. For an overview see here. Specific models currently supported are * OpenAI * Azure OpenAI * Amazon Bedrock (Anthropic, Llama2, Cohere, Titan, Jurassic2) * HuggingFace * Google VertexAI (PaLM2, Gemini) * Mistral AI * Stability AI * Ollama * PostgresML * Transformers (ONNX) * Anthropic Claude3 **Prompts:** Central to AI model interaction is the Prompt, which provides specific instructions for the AI to act upon. Crafting an effective Prompt is both an art and science, giving rise to the discipline of "Prompt Engineering". These prompts often leverage a templating engine for easy data substitution within predefined text using placeholders. Explore more on [Prompts](https://docs.spring.io/spring-ai/reference/concepts.html#_prompts) in our concept guide. To learn about the Prompt class, refer to the [Prompt API guide](https://docs.spring.io/spring-ai/reference/api/prompt.html). **Prompt Templates:** Prompt Templates support the creation of prompts, particularly when a Template Engine is employed. Delve into PromptTemplates in our [concept guide](https://docs.spring.io/spring-ai/reference/concepts.html#_prompt_templates). For a hands-on guide to PromptTemplate, see the [PromptTemplate API guide](https://docs.spring.io/spring-ai/reference/api/prompt-template.html). **Output Parsers:** AI model outputs often come as raw `java.lang.String` values. Output Parsers restructure these raw strings into more programmer-friendly formats, such as CSV or JSON. Get insights on Output Parsers in our [concept guide](https://docs.spring.io/spring-ai/reference/concepts.html#_output_parsing).. For implementation details, visit the [OutputParser API guide](https://docs.spring.io/spring-ai/reference/api/output-parser.html). ### Incorporating your data Incorporating proprietary data into Generative AI without retraining the model has been a breakthrough. Retraining models, especially those with billions of parameters, is challenging due to the specialized hardware required. The 'In-context' learning technique provides a simpler method to infuse your pre-trained model with data, whether from text files, HTML, or database results. The right techniques are critical for developing successful solutions. #### Retrieval Augmented Generation Retrieval Augmented Generation, or RAG for short, is a pattern that enables you to bring your data to pre-trained models. RAG excels in the 'query over your docs' use-case. Learn more about [Retrieval Augmented Generation](https://docs.spring.io/spring-ai/reference/concepts.html#_retrieval_augmented_generation). Bringing your data to the model follows an Extract, Transform, and Load (ETL) pattern. The subsequent classes and interfaces support RAG's data preparation. **Documents:** The `Document` class encapsulates your data, including text and metadata, for the AI model. While a Document can represent extensive content, such as an entire file, the RAG approach segments content into smaller pieces for inclusion in the prompt. The ETL process uses the interfaces `DocumentReader`, `DocumentTransformer`, and `DocumentWriter`, ending with data storage in a Vector Database. This database later discerns the pieces of data that are pertinent to a user's query. **Document Readers:** Document Readers produce a `List<Document>` from diverse sources like PDFs, Markdown files, and Word documents. Given that many sources are unstructured, Document Readers often segment based on content semantics, avoiding splits within tables or code sections. After the initial creation of the `List<Document>`, the data flows through transformers for further refinement. **Document Transformers:** Transformers further modify the `List<Document>` by eliminating superfluous data, like PDF margins, or appending metadata (e.g., primary keywords or summaries). Another critical transformation is subdividing documents to fit within the AI model's token constraints. Each model has a context-window indicating its input and output data limits. Typically, one token equates to about 0.75 words. For instance, in model names like gpt-4-32k, "32K" signifies the token count. **Document Writers:** The final ETL step within RAG involves committing the data segments to a Vector Database. Though the `DocumentWriter` interface isn't exclusively for Vector Database writing, it the main type of implementation. **Vector Stores:** Vector Databases are instrumental in incorporating your data with AI models. They ascertain which document sections the AI should use for generating responses. Examples of Vector Databases include Chroma, Postgres, Pinecone, Qdrant, Weaviate, Mongo Atlas, and Redis. Spring AI's `VectorStore` abstraction permits effortless transitions between database implementations. ## Cloning the repo This repository contains [large model files](https://github.com/spring-projects/spring-ai/tree/main/models/spring-ai-transformers/src/main/resources/onnx/all-MiniLM-L6-v2). To clone it you have to either: - Ignore the large files (won't affect the spring-ai behaviour) : `GIT_LFS_SKIP_SMUDGE=1 git clone git@github.com:spring-projects/spring-ai.git`. - Or install the [Git Large File Storage](https://git-lfs.com/) before cloning the repo. ## Building To build with running unit tests ```shell ./mvnw clean package ``` To build including integration tests. Set API key environment variables for OpenAI and Azure OpenAI before running. ```shell ./mvnw clean verify -Pintegration-tests ``` To run a specific integration test allowing for up to two attempts to succeed. This is useful when a hosted service is not reliable or times out. ```shell ./mvnw -pl vector-stores/spring-ai-pgvector-store -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 -Dit.test=PgVectorStoreIT verify ``` To build the docs ```shell ./mvnw -pl spring-ai-docs antora ``` The docs are then in the directory `spring-ai-docs/target/antora/site/index.html` To reformat using the [java-format plugin](https://github.com/spring-io/spring-javaformat) ```shell ./mvnw spring-javaformat:apply ``` To update the year on license headers using the [license-maven-plugin](https://oss.carbou.me/license-maven-plugin/#goals) ```shell ./mvnw license:update-file-header -Plicense ``` To check javadocs using the [javadoc:javadoc](https://maven.apache.org/plugins/maven-javadoc-plugin/) ```shell ./mvnw javadoc:javadoc -Pjavadoc ```
0
gitlab4j/gitlab4j-api
GitLab4J API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories via the GitLab REST API
gitlab gitlab-api gitlab4j-api hacktoberfest java java-gitlab-api
# GitLab4J&trade; API (gitlab4j-api)<br />Java Client Library for the GitLab REST API [![Maven Central](https://img.shields.io/maven-central/v/org.gitlab4j/gitlab4j-api.svg)](http://mvnrepository.com/artifact/org.gitlab4j/gitlab4j-api) [![Build Status](https://github.com/gitlab4j/gitlab4j-api/actions/workflows/ci-build.yml/badge.svg?branch=main)](https://github.com/gitlab4j/gitlab4j-api/actions/workflows/ci-build.yml) [![javadoc.io](https://javadoc.io/badge2/org.gitlab4j/gitlab4j-api/javadoc.io.svg)](https://javadoc.io/doc/org.gitlab4j/gitlab4j-api) GitLab4J&trade; API (gitlab4j-api) provides a full featured and easy to consume Java library for working with GitLab repositories via the GitLab REST API. Additionally, full support for working with GitLab webhooks and system hooks is also provided. --- ## Table of Contents * [GitLab Server Version Support](#gitLab-server-version-support)<br/> * [Using GitLab4J-API](#using-gitlab4j-api)<br/> * [Java 8 Requirement](#java-8-requirement)<br/> * [Javadocs](#javadocs)<br/> * [Project Set Up](#project-set-up)<br/> * [Usage Examples](#usage-examples)<br/> * [Setting Request Timeouts](#setting-request-timeouts)<br/> * [Connecting Through a Proxy Server](#connecting-through-a-proxy-server)<br/> * [GitLab API V3 and V4 Support](#gitLab-api-v3-and-v4-support)<br/> * [Logging of API Requests and Responses](#logging-of-api-requests-and-responses)<br/> * [Results Paging](#results-paging)<br/> * [Java 8 Stream Support](#java-8-stream-support)<br/> * [Eager evaluation example usage](#eager-evaluation-example-usage)<br/> * [Lazy evaluation example usage](#lazy%20evaluation-example-usage)<br/> * [Java 8 Optional&lt;T&gt; Support](#java-8-optional-support)<br/> * [Issue Time Estimates](#issue-time-estimates)<br/> * [Making API Calls](#making-api-calls)<br/> * [Available Sub APIs](#available-sub-apis) --- > **Warning** > If you are looking for our next major version `6.x.x` which is requiring **Java 11** as mimimal version and which is using Jakarta EE components using the `jakarta.*` packages instead of `javax.*` check the [`6.x` branch](https://github.com/gitlab4j/gitlab4j-api/tree/6.x). > The `6.x.x` version is the one you need if you are using Spring Boot 3 and Spring Framework 6.0, . ## GitLab Server Version Support GitLab4J-API supports version 11.0+ of GitLab Community Edition [(gitlab-ce)](https://gitlab.com/gitlab-org/gitlab-ce/) and GitLab Enterprise Edition [(gitlab-ee)](https://gitlab.com/gitlab-org/gitlab-ee/). GitLab released GitLab Version 11.0 in June of 2018 which included many major changes to GitLab. If you are using GitLab server earlier than version 11.0, it is highly recommended that you either update your GitLab install or use a version of this library that was released around the same time as the version of GitLab you are using. **NOTICE**: As of GitLab 11.0 support for the GitLab API v3 has been removed from the GitLab server (see https://about.gitlab.com/2018/06/01/api-v3-removal-impending/). Support for GitLab API v3 will be removed from this library sometime in 2019. If you are utilizing the v3 support, please update your code to use GitLab API v4. --- ## Using GitLab4J-API ### **Java 8 Requirement** As of GitLab4J-API 4.8.0, Java 8+ is now required to use GitLab4J-API. ### **Javadocs** Javadocs are available here: [![javadoc.io](https://javadoc.io/badge2/org.gitlab4j/gitlab4j-api/javadoc.io.svg)](https://javadoc.io/doc/org.gitlab4j/gitlab4j-api) ### **Project Set Up** To utilize GitLab4J&trade; API in your Java project, simply add the following dependency to your project's build file:<br /> **Gradle: build.gradle** ```java dependencies { ... compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '5.5.0' } ``` **NOTE:** Pulling dependencies may fail when using Gradle prior to 4.5. See [Gradle issue 3065](https://github.com/gradle/gradle/issues/3065#issuecomment-364092456) **Maven: pom.xml** ```xml <dependency> <groupId>org.gitlab4j</groupId> <artifactId>gitlab4j-api</artifactId> <version>5.5.0</version> </dependency> ``` **Jbang:** [Jbang](https://www.jbang.dev/) is very convinient to run scripts writen in Java having dependencies on third party libraries. Just add this line at the top of your script: ```java //DEPS org.gitlab4j:gitlab4j-api:5.5.0 ``` **Ivy and SBT**<br/> There have been reports of problems resolving some dependencies when using Ivy or SBT, for help resolving those issues see:<br/> <a href="https://github.com/eclipse-ee4j/jaxrs-api/issues/571">JAX-RS API Issue #571</a><br/> <a href="https://github.com/eclipse-ee4j/jaxrs-api/issues/572">JAX-RS API Issue #572</a> ### **Lastest version** While we are frequently creating releases, you might be interested by a feature that has not been published yet. You can use jars created by [jitpack](https://jitpack.io/) to get the newest version. **Usage with gradle:** ```gradle repositories { mavenCentral() maven { url "https://jitpack.io" content { includeGroup "com.github.gitlab4j" } } } dependencies { // ... implementation 'com.github.gitlab4j:gitlab4j-api:main-SNAPSHOT' // ... } ``` **Usage with maven:** ```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.github.gitlab4j</groupId> <artifactId>gitlab4j-api</artifactId> <version>main-SNAPSHOT</version> </dependency> <!-- ... --> </dependencies> ``` **Usage with jbang:** You just need to declare the dependency like this, instead of using the maven coordinates: ```java //DEPS https://github.com/gitlab4j/gitlab4j-api/tree/main#:SNAPSHOT ``` **Using a specific commit** Version `main-SNAPSHOT` indicates that you would like to get the latest of the `main` branch. You can also point to a specific commit: ```gradle dependencies { implementation 'com.github.gitlab4j:gitlab4j-api:6561c93aaf' } ``` ```xml <dependency> <groupId>com.github.gitlab4j</groupId> <artifactId>gitlab4j-api</artifactId> <version>6561c93aaf</version> </dependency> ``` ```java //DEPS https://github.com/gitlab4j/gitlab4j-api/tree/6561c93aafa6bf35cb9bad0617127a0c249a8f9f ``` --- ### **Usage Examples** GitLab4J-API is quite simple to use, all you need is the URL to your GitLab server and the Personal Access Token from your GitLab Account Settings page. Once you have that info it is as simple as: ```java // Create a GitLabApi instance to communicate with your GitLab server GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PERSONAL_ACCESS_TOKEN"); // Get the list of projects your account has access to List<Project> projects = gitLabApi.getProjectApi().getProjects(); ``` You can also login to your GitLab server with username, and password: ```java // Log in to the GitLab server using a username and password GitLabApi gitLabApi = GitLabApi.oauth2Login("http://your.gitlab.server.com", "username", "password"); ``` As of GitLab4J-API 4.6.6, all API requests support performing the API call as if you were another user, provided you are authenticated as an administrator: ```java // Create a GitLabApi instance to communicate with your GitLab server (must be an administrator) GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PERSONAL_ACCESS_TOKEN"); // sudo as as a different user, in this case the user named "johndoe", all future calls will be done as "johndoe" gitLabApi.sudo("johndoe") // To turn off sudo mode gitLabApi.unsudo(); ``` --- ### **Setting Request Timeouts** As of GitLab4J-API 4.14.21 support has been added for setting the conect and read timeouts for the API client: ```java GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PERSONAL_ACCESS_TOKEN", proxyConfig); // Set the connect timeout to 1 second and the read timeout to 5 seconds gitLabApi.setRequestTimeout(1000, 5000); ``` --- ### **Connecting Through a Proxy Server** As of GitLab4J-API 4.8.2 support has been added for connecting to the GitLab server using an HTTP proxy server: ```java // Log in to the GitLab server using a proxy server (with basic auth on proxy) Map<String, Object> proxyConfig = ProxyClientConfig.createProxyClientConfig( "http://your-proxy-server", "proxy-username", "proxy-password"); GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PERSONAL_ACCESS_TOKEN", null, proxyConfig); // Log in to the GitLab server using a proxy server (no auth on proxy) Map<String, Object> proxyConfig = ProxyClientConfig.createProxyClientConfig("http://your-proxy-server"); GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PERSONAL_ACCESS_TOKEN", null, proxyConfig); // Log in to the GitLab server using an NTLM (Windows DC) proxy Map<String, Object> ntlmProxyConfig = ProxyClientConfig.createNtlmProxyClientConfig( "http://your-proxy-server", "windows-username", "windows-password", "windows-workstation", "windows-domain"); GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PERSONAL_ACCESS_TOKEN", null, ntlmProxyConfig); ``` See the Javadoc on the GitLabApi class for a complete list of methods accepting the proxy configuration (clientConfiguration parameter) --- ### **GitLab API V3 and V4 Support** As of GitLab4J-API 4.2.0 support has been added for GitLab API V4. If your application requires GitLab API V3, you can still use GitLab4J-API by creating your GitLabApi instance as follows: ```java // Create a GitLabApi instance to communicate with your GitLab server using GitLab API V3 GitLabApi gitLabApi = new GitLabApi(ApiVersion.V3, "http://your.gitlab.server.com", "YOUR_PRIVATE_TOKEN"); ``` **NOTICE**: As of GitLab 11.0 support for the GitLab API v3 has been removed from the GitLab server (see https://about.gitlab.com/2018/06/01/api-v3-removal-impending/). Support for GitLab API v3 will be removed from this library sometime in 2019. If you are utilizing the v3 support, please update your code to use GitLab API v4. --- ### **Logging of API Requests and Responses** As of GitLab4J-API 4.8.39 support has been added to log the requests to and the responses from the GitLab API. Enable logging using one of the following methods on the GitLabApi instance: ```java GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PERSONAL_ACCESS_TOKEN"); // Log using the shared logger and default level of FINE gitLabApi.enableRequestResponseLogging(); // Log using the shared logger and the INFO level gitLabApi.enableRequestResponseLogging(java.util.logging.Level.INFO); // Log using the specified logger and the INFO level gitLabApi.enableRequestResponseLogging(yourLoggerInstance, java.util.logging.Level.INFO); // Log using the shared logger, at the INFO level, and include up to 1024 bytes of entity logging gitLabApi.enableRequestResponseLogging(java.util.logging.Level.INFO, 1024); // Log using the specified logger, at the INFO level, and up to 1024 bytes of entity logging gitLabApi.enableRequestResponseLogging(yourLoggerInstance, java.util.logging.Level.INFO, 1024); ``` --- ### **Results Paging** GitLab4J-API provides an easy to use paging mechanism to page through lists of results from the GitLab API. Here are a couple of examples on how to use the Pager: ```java // Get a Pager instance that will page through the projects with 10 projects per page Pager<Project> projectPager = gitLabApi.getProjectApi().getProjects(10); // Iterate through the pages and print out the name and description while (projectPager.hasNext()) { for (Project project : projectPager.next()) { System.out.println(project.getName() + " -: " + project.getDescription()); } } ``` As of GitLab4J-API 4.9.2, you can also fetch all the items as a single list using a Pager instance: ```java // Get a Pager instance so we can load all the projects into a single list, 10 items at a time: Pager<Project> projectPager = gitlabApi.getProjectsApi().getProjects(10); List<Project> allProjects = projectPager.all(); ``` --- ### **Java 8 Stream Support** As of GitLab4J-API 4.9.2, all GitLabJ-API methods that return a List result have a similarlly named method that returns a Java 8 Stream. The Stream returning methods use the following naming convention: ```getXxxxxStream()```. **IMPORTANT** The built-in methods that return a Stream do so using ___eager evaluation___, meaning all items are pre-fetched from the GitLab server and a Stream is returned which will stream those items. **Eager evaluation does NOT support parallel reading of data from ther server, it does however allow for parallel processing of the Stream post data fetch.** To stream using ___lazy evaluation___, use the GitLab4J-API methods that return a ```Pager``` instance, and then call the ```lazyStream()``` method on the ```Pager``` instance to create a lazy evaluation Stream. The Stream utilizes the ```Pager``` instance to page through the available items. **A lazy Stream does NOT support parallel operations or skipping.** #### **Eager evaluation example usage:** ```java // Stream the visible projects printing out the project name. Stream<Project> projectStream = gitlabApi.getProjectApi().getProjectsStream(); projectStream.map(Project::getName).forEach(name -> System.out.println(name)); // Operate on the stream in parallel, this example sorts User instances by username // NOTE: Fetching of the users is not done in parallel, // only the sorting of the users is a parallel operation. Stream<User> stream = gitlabApi.getUserApi().getUsersStream(); List<User> users = stream.parallel().sorted(comparing(User::getUsername)).collect(toList()); ``` #### **Lazy evaluation example usage:** ```java // Get a Pager instance to that will be used to lazily stream Project instances. // In this example, 10 Projects per page will be pre-fetched. Pager<Project> projectPager = gitlabApi.getProjectApi().getProjects(10); // Lazily stream the Projects, printing out each project name, limit the output to 5 project names projectPager.lazyStream().limit(5).map(Project::getName).forEach(name -> System.out.println(name)); ``` --- ### **Java 8 Optional Support** GitLab4J-API supports Java 8 Optional&lt;T&gt; for API calls that result in the return of a single item. Here is an example on how to use the Java 8 Optional&lt;T&gt; API calls: ```java Optional<Group> optionalGroup = gitlabApi.getGroupApi().getOptionalGroup("my-group-path"); if (optionalGroup.isPresent()) return optionalGroup.get(); return gitlabApi.getGroupApi().addGroup("my-group-name", "my-group-path"); ``` --- ### **Issue Time Estimates** GitLab issues allow for time tracking. The following time units are currently available: * months (mo) * weeks (w) * days (d) * hours (h) * minutes (m) Conversion rates are 1mo = 4w, 1w = 5d and 1d = 8h. --- ## Making API Calls The API has been broken up into sub API classes to make it easier to consume and to separate concerns. The GitLab4J sub API classes typically have a one-to-one relationship with the API documentation at [GitLab API](https://docs.gitlab.com/ce/api/). Following is a sample of the GitLab4J sub API class mapping to the GitLab API documentation: ```org.gitlab4j.api.GroupApi``` -> https://docs.gitlab.com/ce/api/groups.html<br/> ```org.gitlab4j.api.MergeRequestApi``` -> https://docs.gitlab.com/ce/api/merge_requests.html<br/> ```org.gitlab4j.api.ProjectApi``` -> https://docs.gitlab.com/ce/api/projects.html<br/> ```org.gitlab4j.api.UserApi``` -> https://docs.gitlab.com/ce/api/users.html<br/> ### **Available Sub APIs** The following is a list of the available sub APIs along with a sample use of each API. See the <a href="https://javadoc.io/doc/org.gitlab4j/gitlab4j-api" target="_top">Javadocs</a> for a complete list of available methods for each sub API. --- &nbsp;&nbsp;[ApplicationsApi](#applicationsapi)<br/> &nbsp;&nbsp;[ApplicationSettingsApi](#applicationsettingsapi)<br/> &nbsp;&nbsp;[AuditEventApi](#auditeventapi)<br/> &nbsp;&nbsp;[AwardEmojiApi](#awardemojiapi)<br/> &nbsp;&nbsp;[BoardsApi](#boardsapi)<br/> &nbsp;&nbsp;[CommitsApi](#commitsapi)<br/> &nbsp;&nbsp;[ContainerRegistryApi](#containerregistryapi)<br/> &nbsp;&nbsp;[DeployKeysApi](#deploykeysapi)<br/> &nbsp;&nbsp;[DiscussionsApi](#discussionsapi)<br/> &nbsp;&nbsp;[EnvironmentsApi](#environmentsapi)<br/> &nbsp;&nbsp;[EpicsApi](#epicsapi)<br/> &nbsp;&nbsp;[EventsApi](#eventsapi)<br/> &nbsp;&nbsp;[GroupApi](#groupapi)<br/> &nbsp;&nbsp;[HealthCheckApi](#healthcheckapi)<br/> &nbsp;&nbsp;[ImportExportApi](#importexportapi)<br/> &nbsp;&nbsp;[IssuesApi](#issuesapi)<br/> &nbsp;&nbsp;[JobApi](#jobapi)<br/> &nbsp;&nbsp;[LabelsApi](#labelsapi)<br/> &nbsp;&nbsp;[LicenseApi](#licenseapi)<br/> &nbsp;&nbsp;[LicenseTemplatesApi](#licensetemplatesapi)<br/> &nbsp;&nbsp;[LabelsApi](#labelsapi)<br/> &nbsp;&nbsp;[MergeRequestApi](#mergerequestapi)<br/> &nbsp;&nbsp;[MilestonesApi](#milestonesapi)<br/> &nbsp;&nbsp;[NamespaceApi](#namespaceapi)<br/> &nbsp;&nbsp;[NotesApi](#notesapi)<br/> &nbsp;&nbsp;[NotificationSettingsApi](#notificationsettingsapi)<br/> &nbsp;&nbsp;[PackagesApi](#packagesapi)<br/> &nbsp;&nbsp;[PipelineApi](#pipelineapi)<br/> &nbsp;&nbsp;[ProjectApi](#projectapi)<br/> &nbsp;&nbsp;[ProtectedBranchesApi](#protectedbranchesapi)<br/> &nbsp;&nbsp;[ReleasesApi](#releasesapi)<br/> &nbsp;&nbsp;[RepositoryApi](#repositoryapi)<br/> &nbsp;&nbsp;[RepositoryFileApi](#repositoryfileapi)<br/> &nbsp;&nbsp;[ReourceLabelEventsApi](#resourcelabeleventsapi)<br/> &nbsp;&nbsp;[RunnersApi](#runnersapi)<br/> &nbsp;&nbsp;[SearchApi](#searchapi)<br/> &nbsp;&nbsp;[ServicesApi](#servicesapi)<br/> &nbsp;&nbsp;[SessionApi](#sessionapi)<br/> &nbsp;&nbsp;[SnippetsApi](#snippetsapi)<br/> &nbsp;&nbsp;[SystemHooksApi](#systemhooksapi)<br/> &nbsp;&nbsp;[TagsApi](#tagsapi)<br/> &nbsp;&nbsp;[TodosApi](#todosapi)<br/> &nbsp;&nbsp;[UserApi](#userapi)<br/> &nbsp;&nbsp;[WikisApi](#wikisapi) ### Sub API Examples ---------------- #### ApplicationsApi ```java // Add an OAUTH Application to GitLab ApplicationScope[] scopes = {ApplicationScope.SUDO, ApplicationScope.PROFILE}; gitLabApi.getApplicationsApi().createApplication("My OAUTH Application", "https//example.com/myapp/callback", scopes); ``` #### ApplicationSettingsApi ```java // Get the current GitLab server application settings ApplicationSettings appSettings = gitLabApi.getApplicationSettingsApi().getAppliationSettings(); ``` #### AuditEventApi ```java // Get the current GitLab server audit events for entity // This uses the ISO8601 date utilities the in org.gitlab4j.api.utils.ISO8601 class Date since = ISO8601.toDate("2017-01-01T00:00:00Z"); Date until = new Date(); // now List<AuditEvent> auditEvents = gitLabApi.getAuditEventApi().getAuditEvents(since, until, EntityType.USER, 1); ``` #### AwardEmojiApi ```java // Get a list of AwardEmoji belonging to the specified issue (group ID = 1, issues IID = 1) List<AwardEmoji> awardEmojis = gitLabApi.getAwardEmojiApi().getIssuAwardEmojis(1, 1); ``` #### BoardsApi ```java // Get a list of the Issue Boards belonging to the specified project List<Board> boards = gitLabApi.getBoardsApi().getBoards(projectId); ``` #### CommitsApi ```java // Get a list of commits associated with the specified branch that fall within the specified time window // This uses the ISO8601 date utilities the in org.gitlab4j.api.utils.ISO8601 class Date since = ISO8601.toDate("2017-01-01T00:00:00Z"); Date until = new Date(); // now List<Commit> commits = gitLabApi.getCommitsApi().getCommits(1234, "new-feature", since, until); ``` #### ContainerRegistryApi ```java // Get a list of the registry repositories belonging to the specified project List<RegistryRepository> registryRepos = gitLabApi.ContainerRegistryApi().getRepositories(projectId); ``` #### DeployKeysApi ```java // Get a list of DeployKeys for the authenticated user List<DeployKey> deployKeys = gitLabApi.getDeployKeysApi().getDeployKeys(); ``` #### DiscussionsApi ```java // Get a list of Discussions for the specified merge request List<Discussion> discussions = gitLabApi.getDiscussionsApi().getMergeRequestDiscussions(projectId, mergeRequestIid); ``` #### EnvironmentsApi ```java // Get a list of Environments for the specified project List<Environment> environments = gitLabApi.getEnvironmentsApi().getEnvironments(projectId); ``` #### EpicsApi ```java // Get a list epics of the requested group and its subgroups. List<Epic> epics = gitLabApi.getEpicsApi().getEpics(1); ``` #### EventsApi ```java // Get a list of Events for the authenticated user Date after = new Date(0); // After Epoch Date before = new Date(); // Before now List<Event> events = gitLabApi.getEventsApi().getAuthenticatedUserEvents(null, null, before, after, DESC); ``` #### GroupApi ```java // Get a list of groups that you have access to List<Group> groups = gitLabApi.getGroupApi().getGroups(); ``` #### HealthCheckApi ```java // Get the liveness endpoint health check results. Assumes ip_whitelisted per: // https://docs.gitlab.com/ee/administration/monitoring/ip_whitelist.html HealthCheckInfo healthCheck = gitLabApi.getHealthCheckApi().getLiveness(); ``` #### ImportExportApi ```java // Schedule a project export for the specified project ID gitLabApi.getImportExportApi().scheduleExport(projectId); // Get the project export status for the specified project ID ExportStatus exportStatus = gitLabApi.getImportExportApi().getExportStatus(projectId); ``` #### IssuesApi ```java // Get a list of issues for the specified project ID List<Issue> issues = gitLabApi.getIssuesApi().getIssues(1234); ``` #### JobApi ```java // Get a list of jobs for the specified project ID List<Job> jobs = gitLabApi.getJobApi().getJobs(1234); ``` #### LabelsApi ```java // Get a list of labels for the specified project ID List<Label> labels = gitLabApi.getLabelsApi().getLabels(1234); ``` #### LicenseApi ```java // Retrieve information about the current license License license = gitLabApi.getLicenseApi().getLicense(); ``` #### LicenseTemplatesApi ```java // Get a list of open sourcse license templates List<LicenseTemplate> licenses = gitLabApi.getLicenseTemplatesApi().getLicenseTemplates(); ``` #### MergeRequestApi ```java // Get a list of the merge requests for the specified project List<MergeRequest> mergeRequests = gitLabApi.getMergeRequestApi().getMergeRequests(1234); ``` #### MilestonesApi ```java // Get a list of the milestones for the specified project List<Milestone> milestones = gitLabApi.getMilestonesApi().getMilestones(1234); ``` #### NamespaceApi ```java // Get all namespaces that match "foobar" in their name or path List<Namespace> namespaces = gitLabApi.getNamespaceApi().findNamespaces("foobar"); ``` #### NotesApi ```java // Get a list of the issues's notes for project ID 1234, issue IID 1 List<Note> notes = gitLabApi.getNotesApi().getNotes(1234, 1); ``` #### NotificationSettingsApi ```java // Get the current global notification settings NotificationSettings settings = gitLabApi.getNotificationSettingsApi().getGlobalNotificationSettings(); ``` #### PackagesApi ```java // Get all packages for the specified project ID List<Packages> packages = gitLabApi.getPackagesApi().getPackages(1234); ``` #### PipelineApi ```java // Get all pipelines for the specified project ID List<Pipeline> pipelines = gitLabApi.getPipelineApi().getPipelines(1234); ``` #### ProjectApi ```java // Get a list of accessible projects public List<Project> projects = gitLabApi.getProjectApi().getProjects(); ``` ```java // Create a new project Project projectSpec = new Project() .withName("my-project") .withDescription("My project for demonstration.") .withIssuesEnabled(true) .withMergeRequestsEnabled(true) .withWikiEnabled(true) .withSnippetsEnabled(true) .withPublic(true); Project newProject = gitLabApi.getProjectApi().createProject(projectSpec); ``` #### ProtectedBranchesApi ```java List<ProtectedBranch> branches = gitLabApi.getProtectedBranchesApi().getProtectedBranches(project.getId()); ``` #### ReleasesApi ```java // Get a list of releases for the specified project List<Release> releases = gitLabApi.getReleasesApi().getReleases(projectId); ``` #### RepositoryApi ```java // Get a list of repository branches from a project, sorted by name alphabetically List<Branch> branches = gitLabApi.getRepositoryApi().getBranches(projectId); ``` ```java // Search repository branches from a project, by name List<Branch> branches = gitLabApi.getRepositoryApi().getBranches(projectId, searchTerm); ``` #### RepositoryFileApi ```java // Get info (name, size, ...) and the content from a file in repository RepositoryFile file = gitLabApi.getRepositoryFileApi().getFile("file-path", 1234, "ref"); ``` #### ResourceLabelEventsApi ```java // Get the label events for the specified merge request List<LabelEvent> labelEvents = gitLabApi.getResourceLabelEventsApi() .getMergeRequestLabelEvents(projectId, mergeRequestIid); ``` #### RunnersApi ```java // Get All Runners. List<Runner> runners = gitLabApi.getRunnersApi().getAllRunners(); ``` #### SearchApi ```java // Do a global search for Projects List<?> projects = gitLabApi.getSearchApi().globalSearch(SearchScope.PROJECTS, "text-to-search-for"); ``` #### ServicesApi ```java // Activate/Update the Slack Notifications service SlackService slackService = new SlackService() .withMergeRequestsEvents(true) .withWebhook("https://hooks.slack.com/services/ABCDEFGHI/KJLMNOPQR/wetrewq7897HKLH8998wfjjj") .withUsername("GitLab4J"); gitLabApi.getServicesApi().updateSlackService("project-path", slackService); ``` #### SessionApi ```java // Log in to the GitLab server and get the session info gitLabApi.getSessionApi().login("your-username", "your-email", "your-password"); ``` #### SnippetsApi ```java // Get a list of the authenticated user's snippets List<Snippet> snippets = gitLabApi.getSnippetsApi().getSnippets(); ``` #### SystemHooksApi ```java // Get a list of installed system hooks List<SystemHook> hooks = gitLabApi.getSystemHooksApi().getSystemHooks(); ``` #### TagsApi ```java // Get a list of tags for the specified project ID List<Tag> tags = gitLabApi.getTagsApi().getTags(projectId); ``` #### TodosApi ```java // Get a list of all pending todos for the current user List<Todo> todos = gitLabApi.getTodosApi().gePendingTodos(); ``` #### UserApi ```java // Get the User info for user_id 1 User user = gitLabApi.getUserApi().getUser(1); // Create a new user with no password who will recieve a reset password email User userConfig = new User() .withEmail("jdoe@example.com") .withName("Jane Doe") .withUsername("jdoe"); String password = null; boolean sendResetPasswordEmail = true; gitLabApi.getUserApi().createUser(userConfig, password, sendResetPasswordEmail); ``` #### WikisApi ```java // Get a list of pages in project wiki List<WikiPage> wikiPages = gitLabApi.getWikisApi().getPages(); ```
0
didi/KnowStreaming
一站式云原生实时流数据平台,通过0侵入、插件化构建企业级Kafka服务,极大降低操作、存储和管理实时流数据门槛
cluster-manager clustermanager kafka kafkamanager kafkamonitor knowstreaming logikm multi-cluster multi-cluster-management
<p align="center"> <img src="https://user-images.githubusercontent.com/71620349/185368586-aed82d30-1534-453d-86ff-ecfa9d0f35bd.png" width = "256" div align=center /> </p> <p align="center"> <a href="https://knowstreaming.com">产品官网</a> | <a href="https://github.com/didi/KnowStreaming/releases">下载地址</a> | <a href="https://doc.knowstreaming.com/product">文档资源</a> | <a href="https://demo.knowstreaming.com">体验环境</a> </p> <p align="center"> <!--最近一次提交时间--> <a href="https://img.shields.io/github/last-commit/didi/KnowStreaming"> <img src="https://img.shields.io/github/last-commit/didi/KnowStreaming" alt="LastCommit"> </a> <!--最新版本--> <a href="https://github.com/didi/KnowStreaming/blob/master/LICENSE"> <img src="https://img.shields.io/github/v/release/didi/KnowStreaming" alt="License"> </a> <!--License信息--> <a href="https://github.com/didi/KnowStreaming/blob/master/LICENSE"> <img src="https://img.shields.io/github/license/didi/KnowStreaming" alt="License"> </a> <!--Open-Issue--> <a href="https://github.com/didi/KnowStreaming/issues"> <img src="https://img.shields.io/github/issues-raw/didi/KnowStreaming" alt="Issues"> </a> <!--知识星球--> <a href="https://z.didi.cn/5gSF9"> <img src="https://img.shields.io/badge/join-%E7%9F%A5%E8%AF%86%E6%98%9F%E7%90%83-red" alt="Slack"> </a> </p> --- ## `Know Streaming` 简介 `Know Streaming`是一套云原生的Kafka管控平台,脱胎于众多互联网内部多年的Kafka运营实践经验,专注于Kafka运维管控、监控告警、资源治理、多活容灾等核心场景。在用户体验、监控、运维管控上进行了平台化、可视化、智能化的建设,提供一系列特色的功能,极大地方便了用户和运维人员的日常使用,让普通运维人员都能成为Kafka专家。 我们现在正在收集 Know Streaming 用户信息,以帮助我们进一步改进 Know Streaming。 请在 [issue#663](https://github.com/didi/KnowStreaming/issues/663) 上提供您的使用信息来支持我们:[谁在使用 Know Streaming](https://github.com/didi/KnowStreaming/issues/663) 整体具有以下特点: - 👀 &nbsp;**零侵入、全覆盖** - 无需侵入改造 `Apache Kafka` ,一键便能纳管 `0.10.x` ~ `3.x.x` 众多版本的Kafka,包括 `ZK` 或 `Raft` 运行模式的版本,同时在兼容架构上具备良好的扩展性,帮助您提升集群管理水平; - 🌪️ &nbsp;**零成本、界面化** - 提炼高频 CLI 能力,设计合理的产品路径,提供清新美观的 GUI 界面,支持 Cluster、Broker、Zookeeper、Topic、ConsumerGroup、Message、ACL、Connect 等组件 GUI 管理,普通用户5分钟即可上手; - 👏 &nbsp;**云原生、插件化** - 基于云原生构建,具备水平扩展能力,只需要增加节点即可获取更强的采集及对外服务能力,提供众多可热插拔的企业级特性,覆盖可观测性生态整合、资源治理、多活容灾等核心场景; - 🚀 &nbsp;**专业能力** - 集群管理:支持一键纳管,健康分析、核心组件观测 等功能; - 观测提升:多维度指标观测大盘、观测指标最佳实践 等功能; - 异常巡检:集群多维度健康巡检、集群多维度健康分 等功能; - 能力增强:集群负载均衡、Topic扩缩副本、Topic副本迁移 等功能; &nbsp; **产品图** <p align="center"> <img src="http://img-ys011.didistatic.com/static/dc2img/do1_sPmS4SNLX9m1zlpmHaLJ" width = "768" height = "473" div align=center /> </p> ## 文档资源 **`开发相关手册`** - [打包编译手册](docs/install_guide/源码编译打包手册.md) - [单机部署手册](docs/install_guide/单机部署手册.md) - [版本升级手册](docs/install_guide/版本升级手册.md) - [本地源码启动手册](docs/dev_guide/本地源码启动手册.md) - [页面无数据排查手册](docs/dev_guide/页面无数据排查手册.md) **`产品相关手册`** - [产品使用指南](docs/user_guide/用户使用手册.md) - [2.x与3.x新旧对比手册](docs/user_guide/新旧对比手册.md) - [FAQ](docs/user_guide/faq.md) **点击 [这里](https://doc.knowstreaming.com/product),也可以从官网获取到更多文档** **`产品网址`** - [产品官网:https://knowstreaming.com](https://knowstreaming.com) - [体验环境:https://demo.knowstreaming.com](https://demo.knowstreaming.com),登陆账号:admin/admin ## 成为社区贡献者 1. [贡献源码](https://doc.knowstreaming.com/product/10-contribution) 了解如何成为 Know Streaming 的贡献者 2. [具体贡献流程](https://doc.knowstreaming.com/product/10-contribution#102-贡献流程) 3. [开源激励计划](https://doc.knowstreaming.com/product/10-contribution#105-开源激励计划) 4. [贡献者名单](https://doc.knowstreaming.com/product/10-contribution#106-贡献者名单) 获取KnowStreaming开源社区证书。 ## 加入技术交流群 **`1、知识星球`** <p align="left"> <img src="https://user-images.githubusercontent.com/71620349/185357284-fdff1dad-c5e9-4ddf-9a82-0be1c970980d.JPG" height = "180" div align=left /> </p> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> 👍 我们正在组建国内最大,最权威的 **[Kafka中文社区](https://z.didi.cn/5gSF9)** 在这里你可以结交各大互联网的 Kafka大佬 以及 4000+ Kafka爱好者,一起实现知识共享,实时掌控最新行业资讯,期待 👏 &nbsp; 您的加入中~ https://z.didi.cn/5gSF9 有问必答~! 互动有礼~! PS: 提问请尽量把问题一次性描述清楚,并告知环境信息情况~!如使用版本、操作步骤、报错/警告信息等,方便大V们快速解答~ &nbsp; **`2、微信群`** 微信加群:添加`PenceXie` 、`szzdzhp001`的微信号备注KnowStreaming加群。 <br/> 加群之前有劳点一下 star,一个小小的 star 是对KnowStreaming作者们努力建设社区的动力。 感谢感谢!!! <img width="116" alt="wx" src="https://user-images.githubusercontent.com/71620349/192257217-c4ebc16c-3ad9-485d-a914-5911d3a4f46b.png"> ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=didi/KnowStreaming&type=Date)](https://star-history.com/#didi/KnowStreaming&Date)
0
eclipse-vertx/vert.x
Vert.x is a tool-kit for building reactive applications on the JVM
concurrency event-loop high-performance http2 java jvm netty nio non-blocking reactive vertx
[![Build Status (5.x)](https://github.com/eclipse-vertx/vert.x/actions/workflows/ci-5.x.yml/badge.svg)](https://github.com/eclipse-vertx/vert.x/actions/workflows/ci-5.x.yml) [![Build Status (4.x)](https://github.com/eclipse-vertx/vert.x/actions/workflows/ci-4.x.yml/badge.svg)](https://github.com/eclipse-vertx/vert.x/actions/workflows/ci-4.x.yml) ## Vert.x Core This is the repository for Vert.x core. Vert.x core contains fairly low-level functionality, including support for HTTP, TCP, file system access, and various other features. You can use this directly in your own applications, and it's used by many of the other components of Vert.x. For more information on Vert.x and where Vert.x core fits into the big picture please see the [website](http://vertx.io). ## Building Vert.x artifacts ``` > mvn package ``` ## Running tests Runs the tests ``` > mvn test ``` Tests can be run with specified HTTP port and/or HTTPS port. ``` > mvn test -Dvertx.httpPort=8888 -Dvertx.httpsPort=4044 ``` Vert.x supports native transport on BSD and Linux, to run the tests with native transport ``` > mvn test -PtestNativeTransport ``` Vert.x supports domain sockets on Linux exclusively, to run the tests with domain sockets ``` > mvn test -PtestDomainSockets ``` Vert.x has a few integrations tests that run a differently configured JVM (classpath, system properties, etc....) for ALPN, native and logging ``` > vertx verify -Dtest=FooTest # FooTest does not exists, its only purpose is to execute no tests during the test phase ``` ## Building documentation ``` > mvn package -Pdocs -DskipTests ``` Open _target/docs/vertx-core/java/index.html_ with your browser
0
dyc87112/SpringBoot-Learning
《Spring Boot基础教程》,2.x版本持续连载中!点击下方链接直达教程目录!
dubbo jdbctemplate log4j mybatis redis spring-boot spring-cloud spring-data-jpa
# Spring Boot基础教程 **专题目标**:打造全网内容最全,比收费教程更好的Spring Boot免费教程! **如何支持**: 1. 关注我的公众号”**程序猿DD**“ 2. 点个`Star`并`Follow`我 3. 把该仓库分享给更多的朋友 **加入社群**:如果你正在学习Spring Boot,不妨加入我们的[Spring技术交流群](https://blog.didispace.com/join-group-spring/index.html) ,一起成长 **Spring社区**:如果您在学习过程中碰到问题,可以访问[SpringForAll社区](http://spring4all.com),描述你的问题,我们会尽快给你答复。当然,如果你想分享你的学习经验,也可以在这里发表你的文章 ## 教程目录 该教程自2016年连载至今,因内容较多,经历过多个版本的迭代。 为方便查看学习,这里重新做了整理,根据1.x版本和2.x版本做了区分汇总,后续还会继续跟进3.x版本! 可以通过下面的链接,进入具体版本的教程目录: - [Spring Boot 2.x](./2.x) - [Spring Boot 1.x](./1.x) > **关注公众号:“程序猿DD”**,领取我整理的免费学习资料。<br> ## 推荐内容 - [我的博客](http://blog.didispace.com):分享平时学习和实践过的技术内容 - [Spring Boot教程](https://blog.didispace.com/spring-boot-learning-2x/):全网Star最多的免费Spring Boot基础教程 - [Spring Cloud教程](https://blog.didispace.com/spring-cloud-learning/):全网最早最全的免费Spring Cloud基础教程 - [知识星球](https://t.xiaomiquan.com/zfEiY3v):聊聊技术人的斜杠生活 **关注公众号,获得更多技术资讯** <img src="http://blog.didispace.com/css/images/weixin.jpg" style="width:150px;height:150px;" />
0
redis/lettuce
Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
asynchronous aws-elasticache azure-redis-cache java reactive redis redis-client redis-cluster redis-sentinel
<img src="https://avatars2.githubusercontent.com/u/25752188?v=4" width="50" height="50"> Lettuce - Advanced Java Redis client =============================== [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.lettuce/lettuce-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.lettuce/lettuce-core) Lettuce is a scalable thread-safe Redis client for synchronous, asynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional operations such as `BLPOP` and `MULTI`/`EXEC`. Lettuce is built with [netty](https://github.com/netty/netty). Supports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models. This version of Lettuce has been tested against the latest Redis source-build. * [synchronous](https://github.com/lettuce-io/lettuce-core/wiki/Basic-usage), [asynchronous](https://github.com/lettuce-io/lettuce-core/wiki/Asynchronous-API-%284.0%29) and [reactive](https://github.com/lettuce-io/lettuce-core/wiki/Reactive-API-%285.0%29) usage * [Redis Sentinel](https://github.com/lettuce-io/lettuce-core/wiki/Redis-Sentinel) * [Redis Cluster](https://github.com/lettuce-io/lettuce-core/wiki/Redis-Cluster) * [SSL](https://github.com/lettuce-io/lettuce-core/wiki/SSL-Connections) and [Unix Domain Socket](https://github.com/lettuce-io/lettuce-core/wiki/Unix-Domain-Sockets) connections * [Streaming API](https://github.com/lettuce-io/lettuce-core/wiki/Streaming-API) * [CDI](https://github.com/lettuce-io/lettuce-core/wiki/CDI-Support) and [Spring](https://github.com/lettuce-io/lettuce-core/wiki/Spring-Support) integration * [Codecs](https://github.com/lettuce-io/lettuce-core/wiki/Codecs) (for UTF8/bit/JSON etc. representation of your data) * multiple [Command Interfaces](https://github.com/lettuce-io/lettuce-core/wiki/Command-Interfaces-%284.0%29) * Support for [Native Transports](https://github.com/lettuce-io/lettuce-core/wiki/Native-Transports) * Compatible with Java 8++ (implicit automatic module w/o descriptors) See the [reference documentation](https://lettuce.io/docs/) and [Wiki](https://github.com/lettuce-io/lettuce-core/wiki) for more details. ## How do I Redis? [Learn for free at Redis University](https://university.redis.com/) [Build faster with the Redis Launchpad](https://launchpad.redis.com/) [Try the Redis Cloud](https://redis.com/try-free/) [Dive in developer tutorials](https://developer.redis.com/) [Join the Redis community](https://redis.com/community/) [Work at Redis](https://redis.com/company/careers/jobs/) Communication --------------- * [GitHub Discussions](https://github.com/lettuce-io/lettuce-core/discussions) (Q&A, Ideas, General discussion) * Stack Overflow (Questions): [https://stackoverflow.com/questions/tagged/lettuce](https://stackoverflow.com/questions/tagged/lettuce) * Discord: [![Discord](https://img.shields.io/discord/697882427875393627.svg?style=social&logo=discord)](https://discord.gg/redis) * Twitter: [![Twitter](https://img.shields.io/twitter/follow/redisinc?style=social)](https://twitter.com/redisinc) * [GitHub Issues](https://github.com/lettuce-io/lettuce-core/issues) (Bug reports, feature requests) Documentation --------------- * [Reference documentation](https://lettuce.io/docs/) * [Wiki](https://github.com/lettuce-io/lettuce-core/wiki) * [Javadoc](https://lettuce.io/core/release/api/) Binaries/Download ---------------- Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org. Releases of lettuce are available in the Maven Central repository. Take also a look at the [Releases](https://github.com/lettuce-io/lettuce-core/releases). Example for Maven: ```xml <dependency> <groupId>io.lettuce</groupId> <artifactId>lettuce-core</artifactId> <version>x.y.z</version> </dependency> ``` If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version. ```xml <dependency> <groupId>io.lettuce</groupId> <artifactId>lettuce-core</artifactId> <version>x.y.z.BUILD-SNAPSHOT</version> </dependency> <repositories> <repository> <id>sonatype-snapshots</id> <name>Sonatype Snapshot Repository</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> ``` Basic Usage ----------- ```java RedisClient client = RedisClient.create("redis://localhost"); StatefulRedisConnection<String, String> connection = client.connect(); RedisStringCommands sync = connection.sync(); String value = sync.get("key"); ``` Each Redis command is implemented by one or more methods with names identical to the lowercase Redis command name. Complex commands with multiple modifiers that change the result type include the CamelCased modifier as part of the command name, e.g. zrangebyscore and zrangebyscoreWithScores. See [Basic usage](https://github.com/lettuce-io/lettuce-core/wiki/Basic-usage) for further details. Asynchronous API ------------------------ ```java StatefulRedisConnection<String, String> connection = client.connect(); RedisStringAsyncCommands<String, String> async = connection.async(); RedisFuture<String> set = async.set("key", "value") RedisFuture<String> get = async.get("key") LettuceFutures.awaitAll(set, get) == true set.get() == "OK" get.get() == "value" ``` See [Asynchronous API](https://github.com/lettuce-io/lettuce-core/wiki/Asynchronous-API-%284.0%29) for further details. Reactive API ------------------------ ```java StatefulRedisConnection<String, String> connection = client.connect(); RedisStringReactiveCommands<String, String> reactive = connection.reactive(); Mono<String> set = reactive.set("key", "value"); Mono<String> get = reactive.get("key"); set.subscribe(); get.block() == "value" ``` See [Reactive API](https://github.com/lettuce-io/lettuce-core/wiki/Reactive-API-%285.0%29) for further details. Pub/Sub ------- ```java RedisPubSubCommands<String, String> connection = client.connectPubSub().sync(); connection.getStatefulConnection().addListener(new RedisPubSubListener<String, String>() { ... }) connection.subscribe("channel") ``` Building ----------- Lettuce is built with Apache Maven. The tests require multiple running Redis instances for different test cases which are configured using a ```Makefile```. Tests run by default against Redis `unstable`. To build: ``` $ git clone https://github.com/lettuce-io/lettuce-core.git $ cd lettuce/ $ make prepare ssl-keys $ make test ``` * Initial environment setup (clone and build `redis`): ```make prepare``` * Setup SSL Keys: ```make ssl-keys``` * Run the build: ```make test``` * Start Redis (manually): ```make start``` * Stop Redis (manually): ```make stop``` Bugs and Feedback ----------- For bugs, questions and discussions please use the [GitHub Issues](https://github.com/lettuce-io/lettuce-core/issues). License ------- * This repository is licensed under the "MIT" license. See [LICENSE](LICENSE). * Fork of https://github.com/wg/lettuce Contributing ------- Github is for social coding: if you want to write code, I encourage contributions through pull requests from forks of this repository. Create Github tickets for bugs and new features and comment on the ones that you are interested in and take a look into [CONTRIBUTING.md](https://github.com/lettuce-io/lettuce-core/blob/main/.github/CONTRIBUTING.md)
0
dromara/dynamic-tp
🔥🔥🔥轻量级动态线程池,内置监控告警功能,集成三方中间件线程池管理,基于主流配置中心(已支持Nacos、Apollo,Zookeeper、Consul、Etcd,可通过SPI自定义实现)。Lightweight dynamic threadpool, with monitoring and alarming functions, base on popular config centers (already support Nacos、Apollo、Zookeeper、Consul, can be customized through SPI).
apollo consul dubbo dynamic-threadpool grpc java micrometer monitor nacos rocketmq spring springboot springcloud thread threadpool threadpoolexecutor zookeeper
<p align="center"> <img alt="logo" src="resources/img/logo.png" width="50%"> </p> <p align="center"> <strong>基于配置中心的轻量级动态线程池,内置监控告警功能,集成常用中间件线程池管理,可通过SPI自定义扩展实现</strong> </p> <p align="center"> <a href="https://gitee.com/dromara/dynamic-tp"><img src="https://gitee.com/dromara/dynamic-tp/badge/star.svg"></a> <a href="https://gitee.com/dromara/dynamic-tp/members"><img src="https://gitee.com/dromara/dynamic-tp/badge/fork.svg"></a> <a href="https://github.com/dromara/dynamic-tp"><img src="https://img.shields.io/github/stars/dromara/dynamic-tp?style=flat-square&logo=github"></a> <a href="https://github.com/dromara/dynamic-tp/network/members"><img src="https://img.shields.io/github/forks/dromara/dynamic-tp?style=flat-square&logo=GitHub"></a> <a href="https://github.com/dromara/dynamic-tp/blob/master/LICENSE"><img src="https://img.shields.io/github/license/dromara/dynamic-tp.svg?style=flat-square"></a> <a target="_blank" href="/resources/img/contact.jpg"><img src='resources/img/wechat.jpg' alt='备注加群'></a> </p> <p align="center"> 官网: <a href="https://dynamictp.cn">https://dynamictp.cn</a> 🔥 </p> --- ## 使用痛点 使用线程池 ThreadPoolExecutor 过程中你是否有以下痛点呢? > 1. 代码中创建了一个 ThreadPoolExecutor,但是不知道那几个核心参数设置多少比较合适 > > 2. 凭经验设置参数值,上线后发现需要调整,改代码重新发布服务,非常麻烦 > > 3. 线程池相对开发人员来说是个黑盒,运行情况不能及时感知到,直到出现问题 如果有以上痛点,动态可监控线程池框架(**DynamicTp**)或许能帮助到你。 如果看过 ThreadPoolExecutor 的源码,大概可以知道它对核心参数基本都有提供 set / get 方法以及一些扩展方法,可以在运行时动态修改、获取相应的值,这些方法有: ```java public void setCorePoolSize(int corePoolSize); public void setMaximumPoolSize(int maximumPoolSize); public void setKeepAliveTime(long time, TimeUnit unit); public void setThreadFactory(ThreadFactory threadFactory); public void setRejectedExecutionHandler(RejectedExecutionHandler handler); public void allowCoreThreadTimeOut(boolean value); public int getCorePoolSize(); public int getMaximumPoolSize(); public long getKeepAliveTime(TimeUnit unit); public BlockingQueue<Runnable> getQueue(); public RejectedExecutionHandler getRejectedExecutionHandler(); public boolean allowsCoreThreadTimeOut(); protected void beforeExecute(Thread t, Runnable r); protected void afterExecute(Runnable r, Throwable t); ``` 现在大多数的互联网项目都会采用微服务化部署,有一套自己的服务治理体系,微服务组件中的分布式配置中心 扮演的就是动态修改配置,实时生效的角色。 那么我们是否可以结合配置中心来做运行时线程池参数的动态调整呢? 答案是肯定的,而且配置中心相对都是高可用的,使用它也不用过于担心配置推送失败这类问题,而且也能减少研发动态线程池组件本身的难度和接入的工作量。 **综上,可以总结出以下的背景** - **广泛性**:在 Java 开发中,想要提高系统性能,线程池已经是一个 90% 以上开发人员都会选择使用的基础工具 - **不确定性**:项目中可能存在很多线程池,既有 IO 密集型的,也有 CPU 密集型的,但线程池的核心参数并不好确定,需要有套机制在运行过程中动态去调整参数 - **无感知性**:线程池运行过程中的各项指标一般感知不到,需要有套监控报警机制在事前、事中就能让开发人员感知到线程池的运行状况,及时处理 - **高可用性**:配置变更需要及时推送到客户端,需要有高可用的配置管理推送服务,配置中心是现在大多数互联网系统都会使用的组件,与之结合可以极大提高系统可用性 --- ## 功能特性 基于以上背景分析,我们对线程池 ThreadPoolExecutor 做一些扩展增强,主要实现以下目标 > 1. 实现对运行中线程池参数的动态修改,实时生效 > > 2. 实时监控线程池的运行状态,触发设置的报警策略时报警,报警信息推送办公平台 > > 3. 定时采集线程池指标数据,配合像 Grafana 这种可视化监控平台做大盘监控 > > 4. 集成常用三方中间件内部线程池管理 **经过多个版本的迭代,目前最新版本 v1.1.7 具有以下特性** ✅ - **代码零侵入**:我们改变了线程池以往的使用姿势,所有配置均放在配置中心,服务启动时会从配置中心拉取配置生成线程池对象放到 Spring 容器中,使用时直接从 Spring 容器中获取,对业务代码零侵入 - **通知告警**:提供多种通知告警维度(配置变更通知、活性报警、队列容量阈值报警、拒绝触发报警、任务执行或等待超时报警),触发配置阈值实时推送告警信息,已支持企微、钉钉、飞书、邮件、云之家报警,同时提供 SPI 接口可自定义扩展实现 - **运行监控**:定时采集线程池指标数据(20 多种指标,包含线程池维度、队列维度、任务维度、tps、tp99等),支持通过 MicroMeter、JsonLog 两种方式,也可以通过 SpringBoot Endpoint 端点实时获取最新指标数据,同时提供 SPI 接口可自定义扩展实现 - **任务增强**:提供任务包装功能(比 Spring 线程池任务包装更强大),实现 TaskWrapper 接口即可,如 MdcTaskWrapper、TtlTaskWrapper、SwTraceTaskWrapper、OpenTelemetryWrapper,可以支持线程池上下文信息传递 - **多配置中心支持**:支持多种主流配置中心,包括 Nacos、Apollo、Zookeeper、Consul、Etcd、Polaris、ServiceComb,同时也提供 SPI 接口可自定义扩展实现 - **中间件线程池管理**:集成管理常用第三方组件的线程池,已集成 Tomcat、Jetty、Undertow、Dubbo、RocketMq、Hystrix、Grpc、Motan、Okhttp3、Brpc、Tars、SofaRpc、RabbitMq 等组件的线程池管理(调参、监控报警) - **轻量简单**:使用起来极其简单,引入相应依赖,接入只需简单 4 步就可完成,顺利 3 分钟搞定,相当丝滑 - **多模式**:提供了增强线程池 DtpExecutor,IO 密集型场景使用的线程池 EagerDtpExecutor,调度线程池 ScheduledDtpExecutor,有序线程池 OrderedDtpExecutor,可以根据业务场景选择合适的线程池 - **兼容性**:JUC 普通线程池和 Spring 中的 ThreadPoolTaskExecutor 也可以被框架管理,@Bean 定义时加 @DynamicTp 注解即可 - **可靠性**:依靠 Spring 生命周期管理,可以做到优雅关闭线程池,在 Spring 容器关闭前尽可能多的处理队列中的任务 - **高可扩展**:框架核心功能都提供 SPI 接口供用户自定义个性化实现(配置中心、配置文件解析、通知告警、监控数据采集、任务包装等等) - **线上大规模应用**:参考[美团线程池实践](https://tech.meituan.com/2020/04/02/java-pooling-pratice-in-meituan.html),美团内部已经有该理论成熟的应用经验 --- ## 架构设计 **框架功能大体可以分为以下几个模块** > 1. 配置变更监听模块 > > 2. 线程池管理模块 > > 3. 监控模块 > > 4. 通知告警模块 > > 5. 三方组件线程池管理模块 ![技术架构](resources/img/arch.svg) 详细查看官网文档,[架构设计](https://dynamictp.cn/guide/introduction/architecture.html) --- ## 接入步骤 > 1. 引入相应配置中心的依赖,具体见官网文档 > > 2. 配置中心配置线程池实例,配置文件见官网文档 > > 3. 启动类加 @EnableDynamicTp 注解 > > 4. 使用 @Resource 或 @Autowired 进行依赖注入,或通过 DtpRegistry.getExecutor("name") 获取 > > 5. 通过以上 4 步就可以使用了,是不是感觉超级简单呀 更详细使用示例请参考 `example` 工程及[官网文档](https://dynamictp.cn/guide/use/quick-start.html) --- ## 通知报警 - 触发报警阈值会推送相应报警消息(活性、容量、拒绝、任务等待超时、任务执行超时),且会高亮显示相应字段 <img src="resources/img/alarm.jpg" alt="告警" width="50%" /> - 配置变更会推送通知消息,且会高亮变更的字段 <img src="resources/img/notice.jpg" alt="变更通知" width="50%" /> 更多见官网文档,[通知报警](https://dynamictp.cn/guide/notice/alarm.html) --- ## 监控 ![监控数据1](resources/img/monitor1.jpg) ![监控数据2](resources/img/monitor2.jpg) ![监控数据3](resources/img/monitor3.jpg) 目前框架提供了四种监控数据采集方式,通过 collectorTypes 属性配置监控指标采集类型,默认 Micrometer > 1. Logging:线程池指标数据会以 Json 格式输出到指定的日志文件里 > > 2. Internal_logging:线程池指标数据会以 Json 格式输出到项目日志文件里 > > 3. Micrometer:采用监控门面,通过引入相关 Micrometer 依赖采集到相应的存储平台里(如 Prometheus,InfluxDb...) > > 4. Endpoint:暴露 Endpoint 端点,可以通过 http 方式实时获取指标数据 更多见官网文档,[监控](https://dynamictp.cn/guide/monitor/collect_types.html) --- ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=dromara/dynamic-tp&type=Date)](https://star-history.com/#dromara/dynamic-tp&Date) --- ## 知识星球 ![](/resources/img/zsxq.jpg) --- ## 联系我 看到这儿,**请给项目一个 star**,你的支持是我们前进的动力! 使用过程中有任何问题,或者对项目有什么想法或者建议,可以加入社群,跟 1000+ 群友一起交流讨论。 微信群已满 200 人,可以关注微信公众号,加我个人微信拉群(备注:dynamic-tp)。 ![](resources/img/contact.jpg) 为了项目更好的发展,请在此进行登记,[使用登记](https://dynamictp.cn/guide/other/users.html) --- ## 友情链接 - [HertzBeat](https://github.com/dromara/hertzbeat) : 易用友好的实时监控告警系统,无需Agent,强大自定义监控能力. --- ## 特别赞助 **JNPF低代码开发平台** <a href="https://www.jnpfsoft.com/?from=dynamic-tp"><img src="/resources/img/jnpfsoft.png"></a> --- ## 鸣谢 感谢 JetBrains 对开源项目的支持 <a href="https://jb.gg/OpenSourceSupport"> <img src="https://user-images.githubusercontent.com/8643542/160519107-199319dc-e1cf-4079-94b7-01b6b8d23aa6.png" align="left" height="150" width="150" alt="JetBrains"> </a>
0
rememberber/WePush
专注批量推送的小而美的工具,目前支持:模板消息-公众号、模板消息-小程序、微信客服消息、微信企业号/企业微信消息、阿里云短信、阿里大于模板短信 、腾讯云短信、云片网短信、E-Mail、HTTP请求、钉钉、华为云短信、百度云短信、又拍云短信、七牛云短信
gui java mail message push send sender sms swing wechat weixin
null
0
GeyserMC/Geyser
A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
bedrock bedrock-edition bedrock-to-java bungee fabric geyser geysermc hacktoberfest java java-edition minecraft packet pe protocol proxy spigot translator velocity
<img src="https://geysermc.org/img/geyser-1760-860.png" alt="Geyser" width="600"/> [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](https://discord.gg/geysermc) [![Crowdin](https://badges.crowdin.net/e/51361b7f8a01644a238d0fe8f3bddc62/localized.svg)](https://translate.geysermc.org/) Geyser is a bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition, closing the gap from those wanting to play true cross-platform. Geyser is an open collaboration project by [CubeCraft Games](https://cubecraft.net). ## What is Geyser? Geyser is a proxy, bridging the gap between Minecraft: Bedrock Edition and Minecraft: Java Edition servers. The ultimate goal of this project is to allow Minecraft: Bedrock Edition users to join Minecraft: Java Edition servers as seamlessly as possible. However, due to the nature of Geyser translating packets over the network of two different games, *do not expect everything to work perfectly!* Special thanks to the DragonProxy project for being a trailblazer in protocol translation and for all the team members who have joined us here! ### Currently supporting Minecraft Bedrock 1.20.40 - 1.20.73 and Minecraft Java 1.20.4 ## Setting Up Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser. [![YouTube Video](https://img.youtube.com/vi/U7dZZ8w7Gi4/0.jpg)](https://www.youtube.com/watch?v=U7dZZ8w7Gi4) ## Links: - Website: https://geysermc.org - Docs: https://wiki.geysermc.org/geyser/ - Download: https://geysermc.org/download - Discord: https://discord.gg/geysermc - Donate: https://opencollective.com/geysermc - Test Server: `test.geysermc.org` port `25565` for Java and `19132` for Bedrock ## What's Left to be Added/Fixed - Near-perfect movement (to the point where anticheat on large servers is unlikely to ban you) - Some Entity Flags ## What can't be fixed There are a few things Geyser is unable to support due to various differences between Minecraft Bedrock and Java. For a list of these limitations, see the [Current Limitations](https://wiki.geysermc.org/geyser/current-limitations/) page. ## Compiling 1. Clone the repo to your computer 2. Navigate to the Geyser root directory and run `git submodule update --init --recursive`. This command downloads all the needed submodules for Geyser and is a crucial step in this process. 3. Run `gradlew build` and locate to `bootstrap/build` folder. ## Contributing Any contributions are appreciated. Please feel free to reach out to us on [Discord](http://discord.geysermc.org/) if you're interested in helping out with Geyser. ## Libraries Used: - [Adventure Text Library](https://github.com/KyoriPowered/adventure) - [NukkitX Bedrock Protocol Library](https://github.com/NukkitX/Protocol) - [Steveice10's Java Protocol Library](https://github.com/Steveice10/MCProtocolLib) - [TerminalConsoleAppender](https://github.com/Minecrell/TerminalConsoleAppender) - [Simple Logging Facade for Java (slf4j)](https://github.com/qos-ch/slf4j)
0
crate/crate
CrateDB is a distributed and scalable SQL database for storing and analyzing massive amounts of data in near real-time, even with complex queries. It is PostgreSQL-compatible, and based on Lucene.
analytics big-data cluster cratedb database dbms distributed distributed-database distributed-sql-database elasticsearch industrial-iot iot iot-analytics iot-database lucene olap postgresql sql time-series tsdb
null
0
aurelhubert/ahbottomnavigation
A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
null
# AHBottomNavigation Library to implement the Bottom Navigation component from Material Design guidelines (minSdkVersion=14). **Warning: For >= 2.3.0, you need to use AndroidX in your project** ## Demo <img src="https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo1.gif" width="208" height="368" /> <img src="https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo2.gif" width="208" height="368" /> <img src="https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo3.gif" width="208" height="368" /> <img src="https://raw.githubusercontent.com/aurelhubert/ahbottomnavigation/master/demo4.gif" width="208" height="368" /> ## What's new (2.3.4) - [Changelog](https://github.com/aurelhubert/ahbottomnavigation/blob/master/CHANGELOG.md) * Fix a bug with the disappearing animation for the notification ## Features * Follow the bottom navigation guidelines (https://www.google.com/design/spec/components/bottom-navigation.html) * Add 3 to 5 items (with title, icon & color) * Choose your style: Classic or colored navigation * Add a OnTabSelectedListener to detect tab selection * Support icon font color with "setForceTint(true)" * Manage notififcations for each item * Enable/disable tab state ## How to? ### Gradle ```groovy dependencies { compile 'com.aurelhubert:ahbottomnavigation:2.3.4' } ``` ### XML ```xml <com.aurelhubert.ahbottomnavigation.AHBottomNavigation android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content"/> ``` OR ```xml <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> ... <com.aurelhubert.ahbottomnavigation.AHBottomNavigation android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> ``` ### Activity/Fragment ```java AHBottomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation); // Create items AHBottomNavigationItem item1 = new AHBottomNavigationItem(R.string.tab_1, R.drawable.ic_maps_place, R.color.color_tab_1); AHBottomNavigationItem item2 = new AHBottomNavigationItem(R.string.tab_2, R.drawable.ic_maps_local_bar, R.color.color_tab_2); AHBottomNavigationItem item3 = new AHBottomNavigationItem(R.string.tab_3, R.drawable.ic_maps_local_restaurant, R.color.color_tab_3); // Add items bottomNavigation.addItem(item1); bottomNavigation.addItem(item2); bottomNavigation.addItem(item3); // Set background color bottomNavigation.setDefaultBackgroundColor(Color.parseColor("#FEFEFE")); // Disable the translation inside the CoordinatorLayout bottomNavigation.setBehaviorTranslationEnabled(false); // Enable the translation of the FloatingActionButton bottomNavigation.manageFloatingActionButtonBehavior(floatingActionButton); // Change colors bottomNavigation.setAccentColor(Color.parseColor("#F63D2B")); bottomNavigation.setInactiveColor(Color.parseColor("#747474")); // Force to tint the drawable (useful for font with icon for example) bottomNavigation.setForceTint(true); // Display color under navigation bar (API 21+) // Don't forget these lines in your style-v21 // <item name="android:windowTranslucentNavigation">true</item> // <item name="android:fitsSystemWindows">true</item> bottomNavigation.setTranslucentNavigationEnabled(true); // Manage titles bottomNavigation.setTitleState(AHBottomNavigation.TitleState.SHOW_WHEN_ACTIVE); bottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_SHOW); bottomNavigation.setTitleState(AHBottomNavigation.TitleState.ALWAYS_HIDE); // Use colored navigation with circle reveal effect bottomNavigation.setColored(true); // Set current item programmatically bottomNavigation.setCurrentItem(1); // Customize notification (title, background, typeface) bottomNavigation.setNotificationBackgroundColor(Color.parseColor("#F63D2B")); // Add or remove notification for each item bottomNavigation.setNotification("1", 3); // OR AHNotification notification = new AHNotification.Builder() .setText("1") .setBackgroundColor(ContextCompat.getColor(DemoActivity.this, R.color.color_notification_back)) .setTextColor(ContextCompat.getColor(DemoActivity.this, R.color.color_notification_text)) .build(); bottomNavigation.setNotification(notification, 1); // Enable / disable item & set disable color bottomNavigation.enableItemAtPosition(2); bottomNavigation.disableItemAtPosition(2); bottomNavigation.setItemDisableColor(Color.parseColor("#3A000000")); // Set listeners bottomNavigation.setOnTabSelectedListener(new AHBottomNavigation.OnTabSelectedListener() { @Override public boolean onTabSelected(int position, boolean wasSelected) { // Do something cool here... return true; } }); bottomNavigation.setOnNavigationPositionListener(new AHBottomNavigation.OnNavigationPositionListener() { @Override public void onPositionChange(int y) { // Manage the new y position } }); ``` ### With XML menu ```java int[] tabColors = getApplicationContext().getResources().getIntArray(R.array.tab_colors); AHBottomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation); AHBottomNavigationAdapter navigationAdapter = new AHBottomNavigationAdapter(this, R.menu.bottom_navigation_menu_3); navigationAdapter.setupWithBottomNavigation(bottomNavigation, tabColors); ``` ## TODO * Manage tablet ## Contributions Feel free to create issues / pull requests. ## License ``` AHBottomNavigation library for Android Copyright (c) 2018 Aurelien Hubert (http://github.com/aurelhubert). 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
thymeleaf/thymeleaf
Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
html java javascript server-side-rendering template-engine thymeleaf thymeleaf-template-engine xml
null
0
zfile-dev/zfile
在线云盘、网盘、OneDrive、云存储、私有云、对象存储、h5ai、上传、下载
clouddisk h2 h5ai mysql spring-boot vue
# ZFile [![ZFile License](https://img.shields.io/badge/license-MIT-blue.svg?longCache=true&style=flat-square)](https://github.com/zfile-dev/zfile/blob/main/LICENSE) [![GitHub release](https://shields.io/github/v/release/zhaojun1998/zfile?style=flat-square)](https://github.com/zfile-dev/zfile/releases) <img src="https://api.codacy.com/project/badge/Grade/70b793267f7941d58cbd93f50c9a8e0a"/> <h3 align="center">Special Sponsors</h3> <p align="center"> <a href="https://neo.horain.net/aff/ENRTPIGB" target="_blank"> <img width="350px" src="https://www.horain.net/logo/HoRain-Blue.png"> </a> </p> <!--gold sponsors end--> ## ZFile 是什么? ZFile 是一个适用于个人的在线网盘(列目录)程序,可以将你各个存储类型的存储源,统一到一个网页中查看、预览、维护,再也不用去登录各种各样的网页登录后管理文件,现在你只需要在 ZFile 中使用。你只需要填写存储源相关信息,其他的令牌刷新,授权都是尽量自动化的,且有完善的文档帮助你使用。 - 支持对接 S3、OneDrive、SharePoint、Google Drive、多吉云、又拍云、本地存储、FTP、SFTP 等存储源 - 支持在线浏览图片、播放音视频,文本文件、Office、obj(3d)等文件类型。 ## 快速开始 请参考部署文档: [https://docs.zfile.vip](https://docs.zfile.vip) ## 在线体验 [https://demo.zfile.vip](https://demo.zfile.vip) ## 功能预览 ### 文件列表 ![文件列表](https://cdn.jun6.net/uPic/2022/08/13/0urMn8.png) ### 画廊模式 ![图片预览](https://cdn.jun6.net/uPic/2022/08/13/d2J9aE.png) ### 视频预览 ![视频预览](https://cdn.jun6.net/uPic/2022/08/13/tBX00R.png) ### 文本预览 ![文本预览](https://cdn.jun6.net/uPic/2022/08/13/7dDy4G.png) ### 音频预览 ![音频预览](https://cdn.jun6.net/uPic/2022/08/13/N5bU1R.png) ### PDF 预览 ![PDF 预览](https://cdn.jun6.net/uPic/2022/08/13/H327bV.png) ### Office 预览 ![Office 预览](https://cdn.jun6.net/uPic/2022/08/27/RxeiqI.png) ### 3d 文件预览 ![3d 文件预览](https://cdn.jun6.net/uPic/2022/08/29/8iszyh.png) ### 生成直链 ![生成直链](https://cdn.jun6.net/uPic/2022/08/13/zCX3xT.jpg) ### 页面设置 ![页面设置](https://cdn.jun6.net/uPic/2022/08/13/54nYv2.png) ### 后台设置-登录 ![后台设置-登录](https://cdn.jun6.net/uPic/2022/08/13/J8P2Zf.png) ### 后台设置-存储源列表 ![后台设置-存储源列表](https://cdn.jun6.net/uPic/2022/08/13/jymieO.png) ### 后台设置-存储源权限控制 ![后台设置-存储源权限控制](https://cdn.jun6.net/uPic/2022/08/13/JgiwkH.jpg) ### 后台设置-添加存储源(本地存储) ![后台设置-添加存储源(本地存储)](https://cdn.jun6.net/uPic/2022/08/13/add-storage.png) ### 后台设置-添加存储源(世纪互联) ![后台设置-添加存储源(世纪互联)](https://cdn.jun6.net/uPic/2022/08/13/add-storage2.png) ### 后台设置-显示设置 ![后台设置-显示设置](https://cdn.jun6.net/uPic/2022/08/13/view-setting.png) ## 支持作者 如果本项目对你有帮助,请作者喝杯咖啡吧。 <img src="https://cdn.jun6.net/2021/03/27/152704e91f13d.png" width="400" alt="赞助我"> ## Status ![Alt](https://repobeats.axiom.co/api/embed/580333f83b91087e713f15497e6433c50e1da090.svg "Repobeats analytics image") ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=zfile-dev/zfile&type=Date)](https://star-history.com/#zfile-dev/zfile&Date)
0
hanxinhao000/ZeroTermux
null
null
# ZeroTermux <img src="https://raw.githubusercontent.com/hanxinhao000/ZeroTermux/main/img/Screenshot_20210701-120322.jpg" height="720" width="360"><img src="https://raw.githubusercontent.com/hanxinhao000/ZeroTermux/main/img/Screenshot_20210620-091454.jpg" height="720" width="360"> # DOWNLOAD APK ## 不想自行编译的小伙版可下载已经编译好的版本(不要直接点击,复制地址在浏览器地址栏打开): https://od.ixcmstudio.cn/repository/main/ZeroTermux/ ## ZeroTermux 签名文件(与Utermux共用同一个签名) https://github.com/hanxinhao000/Termux-app-UpgradedVersion/tree/master/%E7%AD%BE%E5%90%8D%E6%96%87%E4%BB%B6 ## 软件意图(Software intent) ## ZeroTermux 是根据 Termux 二次开发的一个非盈利性的软件 (ZeroTermux is a non-profit software developed based on Termux) ## 语言环境(Language) ## 中文 English (Chinese English) # 区别 1.备份恢复 2.容器切换 3.源功能切换 4.linux发行 (ubuntu kali..) 5.等等 # the difference 1. Backup and recovery 2. Container switching 3. Source function switching 4. Linux distribution (ubuntu kali...) 5. Other ## 默认源为 清华源 与 北京源(需手动切换[针对国内用户,国外用户请使用官方版本!])[地址](https://github.com/termux/termux-app) ## The default source is Tsinghua source and Beijing source (need to switch manually [for domestic users, foreign users please use the official version!]) [Address](https://github.com/termux/termux-app) ## 在使用一定程度之后,极力建议你过渡到官方termux[入门之后开始使用](https://github.com/termux/termux-app) ## After a certain level of use, it is strongly recommended that you transition to the official termux [start using after getting started] (recommended) ## 原作者链接(Original author link) # [点击访问(Go To)](https://github.com/termux/termux-app) ## 阿里巴巴 ico 访问链接(Alibaba ico access link) # [点击访问(Go To)](https://www.iconfont.cn/) # 声明 ZeroTermux所有功能只能用于个人学习交流使用,不得用于商业用途!以及非法用途! 1.本软件(ZeroTermux)为开源软件,你可以自由分发、复制、更改,但请遵循GPL协议! 2.软件遵循GPL协议(http://www.opensource.org/licenses/gpl-2.0.php) 3.本软件(ZeroTermux)的所有功能均为学习交流使用,切勿商用,如用户(使用ZeroTermux用户)的意外操作、有意操作、无意操作等由用户承担! 4.本软件(ZeroTermux)由第一条例一样为免费学习交流使用,软件内涉及的图标以及字体均来源于互联网。 4.1.字体为Android默认字体,如使用其他字体请用户(使用ZeroTermux用户)承担所有风险以及法律责任。 4.2.图标使用为阿里巴巴ICO公用图库,使用该图标的原则是学习与交流,并非商用,如有侵权立即删除。 5.在本软件(ZeroTermux)内使用的的恢复包、数据包、zip包等都有使用风险,切全部都来源于互联网,请用户酌情使用,如有造成无法挽回的损失,请用户承担风险。 6.所有恢复包、数据包、zip包、模块包,ZeroTermux不能控制其内容,如有包内侵权本软件作者不承担任何责任,均由恢复包、数据包、zip包制作者承担(tar.gz备份功能法律声明)。 7.感谢所有该项目所应用到功能的作者。 8.使用ZeroTermux会有直接或间接的损害你的设备,如有造成无法挽回的损失由用户承担,本软件以及作者不承担任何法律等责任 # statement All functions of ZeroTermux can only be used for personal learning and communication, not for commercial use! and illegal use! 1. This software (ZeroTermux) is open source software, you can freely distribute, copy, and change, but please follow the GPL agreement! 2. The software follows the GPL agreement (http://www.opensource.org/licenses/gpl-2.0.php) 3. All the functions of this software (ZeroTermux) are for learning and communication use, do not use commercially, such as accidental operations, intentional operations, unintentional operations, etc. of the user (users who use ZeroTermux) are borne by the user! 4. This software (ZeroTermux) is used for free learning and communication as in the first regulation. The icons and fonts involved in the software are all from the Internet. 4.1. The font is the Android default font. If you use other fonts, please users (users using ZeroTermux) bear all risks and legal responsibilities. 4.2. The icon is used as the public library of Alibaba ICO. The principle of using the icon is for learning and communication, not for commercial use. If there is any infringement, it will be deleted immediately. 5. The recovery packages, data packages, zip packages, etc. used in this software (ZeroTermux) are all at risk. All of them are from the Internet. Please use it at your discretion. If any irreparable loss is caused, the user shall bear the risk. . 6. All recovery packages, data packages,module packages, and zip packages ZeroTermux cannot control their content. If there is any infringement in the package, the author of this software does not bear any responsibility, and the creator of the recovery package, data package, and zip package shall bear the responsibility (tar.gz backup function law statement). 7. Thanks to all the authors of the functions applied to this project. 8.Using ZeroTermux will directly or indirectly damage your equipment. If there is any irreparable loss, the user shall bear the responsibility of the software and the author." ## 使用项目: ## use item: https://github.com/termux/termux-app https://github.com/termux/termux-tasker https://github.com/termux/termux-api https://github.com/termux/termux-styling https://github.com/termux/termux-packages https://github.com/termux/termux-styling https://github.com/Lichenwei-Dev/ImagePicker https://github.com/BryleHelll/android-vshell https://github.com/Justson/AgentWeb https://github.com/getActivity/XXPermissions https://github.com/magnusja/libaums https://github.com/rtugeek/ColorSeekBar https://github.com/jeasonlzy/ImagePicker https://github.com/bumptech/glide https://github.com/tsl0922/ttyd https://github.com/filebrowser/filebrowser https://www.iconfont.cn/ https://github.com/ppareit/swiftp https://github.com/gyf-dev/ImmersionBar https://github.com/570622566/FNetServer https://github.com/testica/codeeditor ## ZeroTermux鸣谢所有在此项目当中引用的作者,项目展示可能不完全,请谅解。 ## ZeroTermux thanks all the authors cited in this project, the project presentation may not be complete, please understand. ## 如果项目对你有用,请支持下吧~~~ <img src="https://raw.githubusercontent.com/hanxinhao000/ZeroTermux/main/img/alipay.png" height="360" width="360"><img src="https://raw.githubusercontent.com/hanxinhao000/ZeroTermux/main/img/wechat.png" height="360" width="360">
0
SonarSource/sonar-java
:coffee: SonarSource Static Analyzer for Java Code Quality and Security
analysis analyzer java language-team quality sonarcloud sonarlint sonarqube static-analysis static-analyzer static-code-analysis
Code Quality and Security for Java [![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonar-java.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonar-java) [![Quality Gate](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.java%3Ajava&metric=alert_status)](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.java%3Ajava) [![Coverage](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.java%3Ajava&metric=coverage)](https://next.sonarqube.com/sonarqube/component_measures/domain/Coverage?id=org.sonarsource.java%3Ajava) ========== This SonarSource project is a code analyzer for Java projects to help developers produce [Clean Code](https://www.sonarsource.com/solutions/clean-code/). Information about the analysis of Java features is available [here](https://redirect.sonarsource.com/plugins/java.html). Features -------- * 600+ rules (including 150+ bug detection rules and 350+ code smells) * Metrics (cognitive complexity, number of lines, etc.) * Import of [test coverage reports](https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project) * [Custom rules](https://docs.sonarqube.org/latest/analysis/languages/java/) Useful links ------------ * [Project homepage](https://redirect.sonarsource.com/plugins/java.html) * [Issue tracking](https://jira.sonarsource.com/browse/SONARJAVA/) * [Available rules](https://rules.sonarsource.com/java) * [Sonar Community Forum](https://community.sonarsource.com/) * [Demo project analysis](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.java%3Ajava) * [Plugin Wiki](https://github.com/SonarSource/sonar-java/wiki) Have questions or feedback? --------------------------- To provide feedback (request a feature, report a bug, etc.) use the [Sonar Community Forum](https://community.sonarsource.com/). Please do not forget to specify the language (Java!), plugin version and SonarQube version. If you have a question on how to use plugin (and the [docs](https://docs.sonarqube.org/latest/analysis/languages/java/) don't help you), we also encourage you to use the community forum. Contributing ------------ ### Topic in SonarQube Community Forum To request a new feature, please create a new thread in [SonarQube Community Forum](https://community.sonarsource.com/). Even if you plan to implement it yourself and submit it back to the community, please start a new thread first to be sure that we can use it. ### Pull Request (PR) To submit a contribution, create a pull request for this repository. Please make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all [tests](#testing) are passing (all checks must be green). ### Custom Rules If you have an idea for a rule but you are not sure that everyone needs it you can implement a [custom rule](https://docs.sonarqube.org/latest/analysis/languages/java/) available only for you. Note that in order to help you, we highly recommend to first follow the [Custom Rules 101 tutorial](https://redirect.sonarsource.com/doc/java-custom-rules-guide.html) before diving directly into implementing rules from scratch. ### Work with us Would you like to work on this project full-time? We are hiring! Check out https://www.sonarsource.com/hiring <a name="testing"></a> Testing ------- To run tests locally follow these instructions. ### Java versions You need `Java 21` to build the project and `Java 17` run the Integration Tests (ITs). * `Java 17` can be used to build and test all modules except under `java-checks-test-sources` that requires `Java 21`. * `Java 21` can be used to build and test all modules except under `its` that requires `Java 17` because of SQ imcompatibility. ### Build the Project and Run Unit Tests To build the plugin and run its unit tests, execute this command from the project's root directory: mvn clean install ### Note that Running unit tests within the IDE might incur in some issues because of the way the project is built with Maven. If you see something like this: java.lang.SecurityException: class ... signer information does not match signer information of other classes in the same package try removing the Maven nature of the 'jdt' module. ### Integration Tests To run integration tests, you will need to create a properties file like the one shown below, and set the URL pointing to its location in an environment variable named `ORCHESTRATOR_CONFIG_URL`. # version of SonarQube Server sonar.runtimeVersion=LATEST_RELEASE orchestrator.updateCenterUrl=http://update.sonarsource.org/update-center-dev.properties # The location of the Maven local repository is not automatically guessed. It can also be set with the env variable MAVEN_LOCAL_REPOSITORY. maven.localRepository=/home/myName/.m2/repository With for instance the `ORCHESTRATOR_CONFIG_URL` variable being set as: export ORCHESTRATOR_CONFIG_URL=file:///home/user/workspace/orchestrator.properties Before running the ITs, be sure your MAVEN_HOME environment variable is set. #### Sanity Test The "Sanity Test" is a test that runs all checks against all the test source files without taking into account the result of the analysis. It verifies that rules are not crashing on any file in our test sources. By default, this test is excluded from the build. To launch it: mvn clean install -P sanity #### Plugin Test The "Plugin Test" is an integration test suite that verifies plugin features such as metric calculation, coverage, etc. To launch it: mvn clean install -Pit-plugin -DcommunityEditionTestsOnly=true Note for internal contributors: in order to also execute the tests that depend on the SonarQube Enterprise Edition, use: mvn clean install -Pit-plugin #### Ruling Test The "Ruling Test" is an integration test suite that launches the analysis of a large code base, saves the issues created by the plugin in report files, and then compares those results to the set of expected issues (stored as JSON files). To run the test, first make sure the submodules are checked out: git submodule update --init --recursive Then, ensure that the `JAVA_HOME` environment variable is set for the ruling tests execution and that it points to your local JDK 17 installation. Failing to do so will produce inconsistencies with the expected results. From the `its/ruling` folder, launch the ruling tests: mvn clean install -Pit-ruling -DcommunityEditionTestsOnly=true # Alternatively JAVA_HOME=/my/local/java17/jdk/ mvn clean install -Pit-ruling -DcommunityEditionTestsOnly=true Note for internal contributors: in order to also execute the tests that depend on the SonarQube Enterprise Edition, use: mvn clean install -Pit-ruling This test gives you the opportunity to examine the issues created by each rule and make sure they're what you expect. Any implemented rule is highly likely to raise issues on the multiple projects we use as ruling code base. * For a newly implemented rule, it means that a first build will most probably fail, caused by differences between expected results (without any values for the new rule) and the new results. You can inspect these new issues by searching for files named after your rule (`squid-SXXXX.json`) in the following folder: /path/to/project/sonar-java/its/ruling/target/actual/... * For existing rules which are modified, you may expect some differences between "actual" (from new analysis) and expected results. Review carefully the changes that are shown and update the expected resources accordingly. All the `json` files contain a list of lines, indexed by file, explaining where the issues raised by a specific rule are located. If/When everything looks good to you, you can copy the file with the actual issues located at: its/ruling/target/actual/ Into the directory with the expected issues: its/ruling/src/test/resources/ For example using the command: cp its/ruling/target/actual/* its/ruling/src/test/resources/ #### Autoscan Test The tests in the [autoscan module](its/autoscan) are designed to detect differences between the issues the Java analyzer can find with and without bytecode. The goal here is to spot and fix the potential FPs, and verify the expected FNs between that would show up in [SonarCloud's automatic analysis](https://docs.sonarcloud.io/advanced-setup/automatic-analysis/). Running this test can be broken down in 2 steps: 1. Compiling the test sources 2. Executing the autoscan test ##### Compiling the test sources Make sure that the `java-checks-tests-sources` module has been compiled (ie: the .class files in `java-checks-tests-sources/target/` are up to date). In doubt, go the top-level of the project and run: ```shell # Use java 21! mvn clean compile --projects java-checks-test-sources --also-make-dependents ``` ##### Executing the autoscan test To run the tests, move to the [`its/autoscan`](its/autoscan) folder and run: ```shell # cd its/autoscan # use Java 17! mvn clean package --batch-mode --errors --show-version \ --activate-profiles it-autoscan \ -Dsonar.runtimeVersion=LATEST_RELEASE ``` The artifacts produced during the test execution will be found in [`its/autoscan/target/actual`](its/autoscan/target/actual). You will want to compare the results produced in the autoscan-diff-by-rules For more detailed information, you can compare the differences between the results found with bytecode and without bytecode by comparing two respective folders: * [java-checks-test-sources-mvn](its/autoscan/target/actual/java-checks-test-sources-mvn) * [java-checks-test-sources-no-binaries](its/autoscan/target/actual/java-checks-test-sources-no-binaries) Depending on the results found, you might need to update the ground truth. The expected results are listed in [src/test/resources](its/autoscan/src/test/resources/autoscan/). #### Debugging Integration Tests You can debug ITs by adding `-Dmaven.binary=mvnDebug` as an option when running the tests. This will cause the analyzer JVM to wait for a debugger to be attached before continuing. ### License Copyright 2012-2024 SonarSource. Licensed under the [GNU Lesser General Public License, Version 3.0](https://www.gnu.org/licenses/lgpl.txt)
0
languagetool-org/languagetool
Style and Grammar Checker for 25+ Languages
grammar natural-language natural-language-processing proofreading spellcheck style-checker
## LanguageTool **LanguageTool** is an Open Source proofreading software for English, Spanish, French, German, Portuguese, Polish, Dutch, and [more than 20 other languages](https://languagetool.org/languages/). It finds many errors that a simple spell checker cannot detect. * **[Jobs at LanguageTool](https://languagetool.org/careers)** * [LanguageTool Forum](https://forum.languagetool.org) * [How to run your own LanguageTool server](https://dev.languagetool.org/http-server) * [HTTP API documentation](https://languagetool.org/http-api/swagger-ui/#!/default/post_check) * [How to use our public server via HTTP](https://dev.languagetool.org/public-http-api) * [How to use LanguageTool from Java](https://dev.languagetool.org/java-api) ([Javadoc](https://languagetool.org/development/api/index.html?org/languagetool/JLanguageTool.html)) For more information, please see our homepage at https://languagetool.org, [this README](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/README.md), and [CHANGES](https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/CHANGES.md). The LanguageTool core (this repo) is freely available under the LGPL 2.1 or later. ## Docker Try one of the following projects for a community-contributed Docker file: - https://github.com/meyayl/docker-languagetool ([Docker Hub](https://hub.docker.com/r/meyay/languagetool)) - https://github.com/Erikvl87/docker-languagetool ([Docker Hub](https://hub.docker.com/r/erikvl87/languagetool)) - https://github.com/silvio/docker-languagetool ([Docker Hub](https://hub.docker.com/r/silviof/docker-languagetool)) ## Contributions [The development overview](https://dev.languagetool.org/development-overview) describes how you can contribute error detection rules. For more technical details, see [our dev pages](https://dev.languagetool.org). ## Scripted installation and building To install or build using a script, simply type: ``` curl -L https://raw.githubusercontent.com/languagetool-org/languagetool/master/install.sh | sudo bash <options> ``` If you wish to have more options, download the `install.sh` script. Usage options follow: ``` sudo bash install.sh <options> Usage: install.sh <option> <package> Options: -h --help Show help -b --build Builds packages from the bleeding edge development copy of LanguageTool -c --command <command> Specifies post-installation command to run (default gui when screen is detected) -q --quiet Shut up LanguageTool installer! Only tell me important stuff! -t --text <file> Specifies what text to be spellchecked by LanguageTool command line (default spellcheck.txt) -d --depth <value> Specifies the depth to clone when building LanguageTool yourself (default 1). -p --package <package> Specifies package to install when building (default all) -o --override <OS> Override automatic OS detection with <OS> -a --accept Accept the oracle license at http://java.com/license. Only run this if you have seen the license and agree to its terms! -r --remove <all/partial> Removes LanguageTool install. <all> uninstalls the dependencies that were auto-installed. (default partial) Packages(only if -b is specified): standalone Installs standalone package wikipedia Installs Wikipedia package office-extension Installs the LibreOffice/OpenOffice extension package Commands: GUI Runs GUI version of LanguageTool commandline Runs command line version of LanguageTool server Runs server version of LanguageTool ``` ## Alternate way to build from source Before start: you will need to clone from GitHub and install Java 8 and Apache Maven. Warning: a complete clone requires downloading more than 500 MB and needs more than 1500 MB on disk. This can be reduced if you only need the last few revisions of the master branch by creating a shallow clone: git clone --depth 5 https://github.com/languagetool-org/languagetool.git A shallow clone downloads less than 60 MB and needs less than 200 MB on disk. In the root project folder, run: mvn clean test (sometimes you can skip Maven step for repeated builds) ./build.sh languagetool-standalone package -DskipTests Test the result in `languagetool-standalone/target/`. ./build.sh languagetool-wikipedia package -DskipTests Test the result in `languagetool-wikipedia/target`. ./build.sh languagetool-office-extension package -DskipTests Test the result in `languagetool-office-extension/target`, rename the `*.zip` to `*.oxt` to install it in LibreOffice/OpenOffice. Now you can use the bleeding edge development copy of LanguageTool `*.jar` files, be aware that it might contain regressions. ### How to run under Mac M1 or M2 1. Install Brew for Rosetta: `arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"` 2. Install openjdk for Rosetta: `arch -x86_64 brew install openjdk` 3. Install Maven for Rosetta: `arch -x86_64 brew install maven` 4. Now run build scripts ### License Unless otherwise noted, this software - the LanguageTool core - is distributed under the LGPL, see file [COPYING.txt](https://github.com/languagetool-org/languagetool/blob/master/COPYING.txt).
0
mircokroon/minecraft-world-downloader
Download Minecraft worlds, extend server's render distance. 1.12.2 - 1.20.4
cross-platform gui minecraft
# minecraft-world-downloader A Minecraft world downloader that works as a proxy server between the client and the server to read & save chunk data. Download multiplayer worlds by connecting to them and walking around. Chunks can be sent back to the client to extend the render distance. ### Downloads <a href="https://github.com/mircokroon/minecraft-world-downloader/releases/latest"><img align="right" src="https://img.shields.io/github/downloads/mircokroon/minecraft-world-downloader/total.svg"></a> Windows launcher: [world-downloader-launcher.exe](https://github.com/mircokroon/minecraft-world-downloader-launcher/releases/latest/download/world-downloader-launcher.exe) Latest cross-platform jar (command-line support): [world-downloader.jar](https://github.com/mircokroon/minecraft-world-downloader/releases/latest/download/world-downloader.jar) ### Basic usage [Download](https://github.com/mircokroon/minecraft-world-downloader-launcher/releases/latest/download/world-downloader-launcher.exe) the latest release and run it. Enter the server address in the address field and press start. <img src="https://i.imgur.com/yH8SH5C.png"> Instead of connecting to the server itself, connect to `localhost` in Minecraft to start downloading the world. <img src="https://i.imgur.com/wKMnXfq.png"> If you run into any problems, check the [FAQ](https://github.com/mircokroon/minecraft-world-downloader/wiki/FAQ) page for some common issues. ### [Features](https://github.com/mircokroon/minecraft-world-downloader/wiki/Features) - Requires no client modifications and as such works with every game client, vanilla or not - Automatically merge into previous downloads or existing worlds - Save chests and other inventories by opening them - Extend the client's render distance by sending chunks downloaded previously back to the client - Overview map of chunks that have been saved: <img src="https://i.imgur.com/7FIJ6fZ.png" width="80%" title="Example of the GUI showing all the downloaded chunks as white squares, which ones from a previous download greyed out."> ### Requirements - Java 17 or higher - Minecraft version 1.12.2+ // 1.13.2+ // 1.14.1+ // 1.15.2+ // 1.16.2+ // 1.17+ // 1.18+ // 1.19.3+ // 1.20+ ### Command-line [Download](https://github.com/mircokroon/minecraft-world-downloader/releases/latest/download/world-downloader.jar) the cross-platform `world-downloader.jar` and run it using the command-line: ``` java -jar world-downloader.jar ``` Arguments can be specified to change the behaviour of the downloader. Running with `--help` shows all the available commands. ``` java -jar world-downloader.jar --help ``` The GUI can be disabled by including the `--no-gui` option, and specifying the server address: ``` java -jar world-downloader.jar --no-gui -s address.to.server.com ``` ### Running on Linux To easily download the latest release using the terminal, the following commands can be used: ``` wget https://github.com/mircokroon/minecraft-world-downloader/releases/latest/download/world-downloader.jar java -jar world-downloader.jar -s address.to.server.com ``` When running headless Java, the GUI should be disabled by including the GUI option: ``` java -jar world-downloader.jar -s address.to.server.com --no-gui ``` Some linux distributions may require `-Djdk.gtk.version=2` for the GUI to work: ``` java -Djdk.gtk.version=2 -jar world-downloader.jar ``` ### Building from source <details> <summary>Dependencies on linux</summary> ### debian/ubuntu ``` sudo apt-get install default-jdk maven ``` ### arch/manjaro ``` sudo pacman -S --needed jdk-openjdk maven ``` </details> <details> <summary>Build project to executable jar file</summary> Building the project manually can be done using Maven: ``` git clone https://github.com/mircokroon/minecraft-world-downloader cd minecraft-world-downloader mvn package java -jar ./target/world-downloader.jar -s address.to.server.com ``` </details> ### Contact <details> <summary>Contact information</summary> For problems, bugs, feature requests and questions about how to use the application, please [open an issue](https://github.com/mircokroon/minecraft-world-downloader/issues/new/choose) or discussion on GitHub. For other inquiries, email: mircokroon.github@gmail.com If you want to support this project, you can [donate through GitHub](https://github.com/sponsors/mircokroon?frequency=one-time&amount=5) </details>
0
Graylog2/graylog2-server
Free and open log management
amqp gelf graylog hacktoberfest kafka log-analysis log-collector log-management log-viewer logging logging-server secure-logging security siem syslog
null
0
MeteorDevelopment/meteor-client
Based Minecraft utility mod.
fabricmc minecraft minecraft-fabric minecraft-mod utility-mod
<p align="center"> <img src="https://meteorclient.com/icon.png" alt="meteor-client-logo" width="15%"/> </p> <h1 align="center">Meteor</h1> <p align="center">A Minecraft Fabric Utility Mod for anarchy servers.</p> <div align="center"> <a href="https://discord.gg/bBGQZvd"><img src="https://img.shields.io/discord/689197705683140636?logo=discord" alt="Discord"/></a> <br> <img src="https://img.shields.io/github/last-commit/MeteorDevelopment/meteor-client" alt="GitHub last commit"/> <img src="https://img.shields.io/github/commit-activity/w/MeteorDevelopment/meteor-client" alt="GitHub commit activity"/> <img src="https://img.shields.io/github/contributors/MeteorDevelopment/meteor-client" alt="GitHub contributors"/> <br> <img src="https://img.shields.io/github/languages/code-size/MeteorDevelopment/meteor-client" alt="GitHub code size in bytes"/> <img src="https://tokei.rs/b1/github/MeteorDevelopment/meteor-client" alt="GitHub lines of code"/> </div> ## Usage ### Building - Clone this repository - Run `./gradlew build` ### Installation Follow the [guide](https://meteorclient.com/faq/installation) on the wiki. ## Contributions We will review and help with all reasonable pull requests as long as the guidelines below are met. - The license header must be applied to all java source code files. - IDE or system-related files should be added to the `.gitignore`, never committed in pull requests. - In general, check existing code to make sure your code matches relatively close to the code already in the project. - Favour readability over compactness. - If you need help, check out the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) for a reference. ## Bugs and Suggestions Bug reports and suggestions should be made in this repo's [issue tracker](https://github.com/MeteorDevelopment/meteor-client/issues) using the templates provided. Please provide as much information as you can to best help us understand your issue and give a better chance of it being resolved. ## Donations All of our work is completely free and non-profit (donations pay only for hosting costs), therefore we are very grateful for all donations made to support us in running our community. Donations can be made via our [website](https://meteorclient.com/donate) and the minimum amount to get donor benefits is €5. You will be rewarded with a role on our Discord server and a customisable in-game cape. ⚠️ _Make sure to create a Meteor account and link your Discord and Minecraft accounts to fully experience your rewards._ ⚠️ ## Credits [Cabaletta](https://github.com/cabaletta) and [WagYourTail](https://github.com/wagyourtail) for [Baritone](https://github.com/cabaletta/baritone) The [Fabric Team](https://github.com/FabricMC) for [Fabric](https://github.com/FabricMC/fabric-loader) and [Yarn](https://github.com/FabricMC/yarn) ## Licensing This project is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html). If you use **ANY** code from the source: - You must disclose the source code of your modified work and the source code you took from this project. This means you are not allowed to use code from this project (even partially) in a closed-source and/or obfuscated application. - You must state clearly and obviously to all end users that you are using code from this project. - Your application must also be licensed under the same license. *If you have any other questions, check our [FAQ](https://meteorclient.com/faq) or ask in our [Discord](https://meteorclient.com/discord) server.*
0
jOOQ/jOOL
jOOλ - The Missing Parts in Java 8 jOOλ improves the JDK libraries in areas where the Expert Group's focus was elsewhere. It adds tuple support, function support, and a lot of additional functionality around sequential Streams. The JDK 8's main efforts (default methods, lambdas, and the Stream API) were focused around maintaining backwards compatibility and implementing a functional API for parallelism.
null
jOOλ ==== jOOλ is part of the jOOQ series (along with jOOQ, jOOX, jOOR, jOOU) providing some useful extensions to Java 8 lambdas. It contains these classes: org.jooq.lambda.function ------------------------ Why only `Function` and `BiFunction`? We have also included support for `Function1` through `Function16`. org.jooq.lambda.tuple --------------------- Tuple support is essential in functional programming. A variety of things can be modelled as tuples, e.g. function argument lists. This is why we support type safe `Tuple1` through `Tuple16` types. org.jooq.lambda.Seq ------------------- The new Streams API was implemented to provide filter/map/reduce-like operations leveraging the new lambdas. Many of the useful methods that we know from other functional languages (e.g Scala) are missing. This is why jOOλ knows a `Seq` (short of _Sequential_) interface that extends `Stream` and adds a variety of additional methods to. Please note that all `Seq`'s are **sequential and ordered streams**, so don't bother to call `parallel()` on it, it will return the same `Seq`. `Seq` adds a handful of useful methods, such as: ```java // (1, 2, 3, 4, 5, 6) Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6)); // true Seq.of(1, 2, 3, 4).contains(2); // true Seq.of(1, 2, 3, 4).containsAll(2, 3); // true Seq.of(1, 2, 3, 4).containsAny(2, 5); // (tuple(1, "A"), tuple(1, "B"), tuple(2, "A"), tuple(2, "B")) Seq.of(1, 2).crossJoin(Seq.of("A", "B")); // (tuple(1, 1), tuple(1, 2), tuple(2, 1), tuple(2, 2)) Seq.of(1, 2).crossSelfJoin() // (1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, ...) Seq.of(1, 2, 3).cycle(); // tuple((1, 2, 3), (1, 2, 3)) Seq.of(1, 2, 3).duplicate(); // "!abc" Seq.of("a", "b", "c").foldLeft("!", (u, t) -> u + t); // "abc!" Seq.of("a", "b", "c").foldRight("!", (t, u) -> t + u); // { 1 = (1, 3), 0 = (2, 4) } Seq.of(1, 2, 3, 4).groupBy(i -> i % 2); // (tuple(1, (1, 3)), tuple(0, (2, 4))) Seq.of(1, 2, 3, 4).grouped(i -> i % 2); // (tuple(1, 1), tuple(2, 2)) Seq.of(1, 2, 4).innerJoin(Seq.of(1, 2, 3), (a, b) -> a == b); // (tuple(1, 2), tuple(2, 1)) Seq.of(1, 2).innerSelfJoin((t, u) -> t != u) // (1, 0, 2, 0, 3, 0, 4) Seq.of(1, 2, 3, 4).intersperse(0); // "123" Seq.of(1, 2, 3).join(); // "1, 2, 3" Seq.of(1, 2, 3).join(", "); // "^1|2|3$" Seq.of(1, 2, 3).join("|", "^", "$"); // (tuple(1, 1), tuple(2, 2), tuple(4, null)) Seq.of(1, 2, 4).leftOuterJoin(Seq.of(1, 2, 3), (a, b) -> a == b); // (tuple(tuple(1, 0), NULL), tuple(tuple(2, 1), tuple(1, 0))) Seq.of(tuple(1, 0), tuple(2, 1)).leftOuterSelfJoin((t, u) -> t.v2 == u.v1) // (1, 2) Seq.of(1, 2, 3, 4, 5).limitWhile(i -> i < 3); // (1, 2) Seq.of(1, 2, 3, 4, 5).limitUntil(i -> i == 3); // (1, 2L) Seq.of(new Object(), 1, "B", 2L).ofType(Number.class); // (tuple(1, 1), tuple(2, 2), tuple(null, 3)) Seq.of(1, 2, 4).rightOuterJoin(Seq.of(1, 2, 3), (a, b) -> a == b); // (tuple(NULL, tuple(1, 0)), tuple(tuple(1, 0), tuple(2, 1))) Seq.of(tuple(1, 0), tuple(2, 1)).rightOuterSelfJoin((t, u) -> t.v1 == u.v2) // tuple((1, 3), (2, 4)) Seq.of(1, 2, 3, 4).partition(i -> i % 2 != 0); // (1, 3, 4) Seq.of(1, 2, 3, 4).remove(2); // (1, 4) Seq.of(1, 2, 3, 4).removeAll(2, 3, 5); // (2, 3) Seq.of(1, 2, 3, 4).retainAll(2, 3, 5); // (4, 3, 2, 1) Seq.of(1, 2, 3, 4).reverse(); // (3, 1, 4, 5, 2) for example Seq.of(1, 2, 3, 4, 5).shuffle(); // (3, 4, 5) Seq.of(1, 2, 3, 4, 5).skipWhile(i -> i < 3); // (3, 4, 5) Seq.of(1, 2, 3, 4, 5).skipUntil(i -> i == 3); // (2, 3) Seq.of(1, 2, 3, 4, 5).slice(1, 3) // tuple((1, 2), (3, 4, 5)) Seq.of(1, 2, 3, 4, 5).splitAt(2); // tuple(1, (2, 3, 4, 5)) Seq.of(1, 2, 3, 4, 5).splitAtHead(); // tuple((1, 2, 3), (a, b, c)) Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))); // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c")) Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c")); // ("1:a", "2:b", "3:c") Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (x, y) -> x + ":" + y); // (tuple("a", 0), tuple("b", 1), tuple("c", 2)) Seq.of("a", "b", "c").zipWithIndex(); ``` org.jooq.lambda.Unchecked ------------------------- Lambda expressions and checked exceptions are a major pain. Even before going live with Java 8, there are a lot of Stack Overflow questions related to the subject: - http://stackoverflow.com/q/18198176/521799 - http://stackoverflow.com/q/19757300/521799 - http://stackoverflow.com/q/14039995/521799 The Unchecked class can be used to wrap common `@FunctionalInterfaces` in equivalent ones that are allowed to throw checked exceptions. E.g. this painful beast: ```java Arrays.stream(dir.listFiles()).forEach(file -> { try { System.out.println(file.getCanonicalPath()); } catch (IOException e) { throw new RuntimeException(e); } // Ouch, my fingers hurt! All this typing! }); ``` ... will become this beauty: ```java Arrays.stream(dir.listFiles()).forEach( Unchecked.consumer(file -> { System.out.println(file.getCanonicalPath()); }) ); ``` ... or if you fancy method references: ```java Arrays.stream(dir.listFiles()) .map(Unchecked.function(File::getCanonicalPath)) .forEach(System.out::println); ``` Do note that `Unchecked` also allows you to throw checked exceptions explicitly without the compiler noticing: ```java // Compiler doesn't see that checked Exception is being thrown: Unchecked.throwChecked(new Exception()); ``` Download -------- **For use with Java 9+** ```xml <dependency> <groupId>org.jooq</groupId> <artifactId>jool</artifactId> <version>0.9.15</version> </dependency> ``` **For use with Java 8+** ```xml <dependency> <groupId>org.jooq</groupId> <artifactId>jool-java-8</artifactId> <version>0.9.15</version> </dependency>
0
plantuml/plantuml
Generate diagrams from textual description
diagram diagram-as-code diagrams diagrams-as-code java plantuml uml uml-diagram
# 🌱 PlantUML Generate UML diagrams from textual descriptions. [![Discord server](https://img.shields.io/discord/1083727021328306236?color=5865F2&logo=discord&logoColor=white)](https://discord.gg/sXhzexAQGh) [![GitHub Sponsors](https://img.shields.io/github/sponsors/plantuml?logo=github)](https://github.com/sponsors/plantuml/) [![GitHub Org's stars](https://img.shields.io/github/stars/plantuml)](https://github.com/plantuml/plantuml/stargazers/) [![GitHub watchers](https://img.shields.io/github/watchers/plantuml/plantuml)](https://github.com/plantuml/plantuml/watchers/) [![GitHub contributors](https://img.shields.io/github/contributors-anon/plantuml/plantuml?color=blue)](https://github.com/plantuml/plantuml/graphs/contributors) [![GitHub forks](https://img.shields.io/github/forks/plantuml/plantuml)](https://github.com/plantuml/plantuml/network/) [![GitHub all releases](https://img.shields.io/sourceforge/dt/plantuml?color=blue)](https://github.com/plantuml/plantuml/releases) [![online](https://img.shields.io/endpoint?url=https://www.plantuml.com/plantuml/badge)](https://www.plantuml.com/plantuml) [![rate](https://img.shields.io/endpoint?url=https://www.plantuml.com/plantuml/rate)](https://www.plantuml.com/plantuml) [![peak](https://img.shields.io/endpoint?url=https://www.plantuml.com/plantuml/rate?peak)](https://www.plantuml.com/plantuml) [![Release (latest by date)](https://img.shields.io/github/v/release/plantuml/plantuml)](https://github.com/plantuml/plantuml/releases/latest) [![Release Date](https://img.shields.io/github/release-date/plantuml/plantuml?color=blue)](https://github.com/plantuml/plantuml/releases/latest) [![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/plantuml/plantuml/latest)](https://github.com/plantuml/plantuml/commits/) [![javadoc](https://javadoc.io/badge2/net.sourceforge.plantuml/plantuml-gplv2/javadoc.svg)](https://javadoc.io/doc/net.sourceforge.plantuml/plantuml-gplv2) [![Pre-release (latest by date)](https://img.shields.io/github/v/release/plantuml/plantuml?color=chocolate&include_prereleases)](https://github.com/plantuml/plantuml/releases/tag/snapshot) [![Pre-release Date](https://img.shields.io/github/release-date-pre/plantuml/plantuml?color=chocolate)](https://github.com/plantuml/plantuml/releases/tag/snapshot) [![GitHub last commit](https://img.shields.io/github/last-commit/plantuml/plantuml?color=chocolate)](https://github.com/plantuml/plantuml/commits/) [![CI](https://github.com/plantuml/plantuml/actions/workflows/ci.yml/badge.svg?color=chocolate)](https://github.com/plantuml/plantuml/actions/workflows/ci.yml) [![snapshot javadoc](https://img.shields.io/badge/javadoc-snapshot-chocolate.svg?logo=github)](https://plantuml.github.io/plantuml/) > [!IMPORTANT] > [PlantUML is **not** affected by the log4j vulnerability.](https://github.com/plantuml/plantuml/issues/826) ## ℹ️ About PlantUML is a component that allows you to create various UML diagrams through simple textual descriptions. From sequence diagrams to deployment diagrams and beyond, PlantUML provides an easy way to create visual representations of complex systems. ### 🗃️ Supported Diagram Types - 🧩 UML Diagrams - [Sequence diagram](http://plantuml.com/sequence-diagram) - [Use case diagram](http://plantuml.com/use-case-diagram) - [Class diagram](http://plantuml.com/class-diagram) - [Object diagram](http://plantuml.com/object-diagram) - [Activity diagram](http://plantuml.com/activity-diagram-beta) - [Legacy syntax](http://plantuml.com/activity-diagram-legacy) - [Component diagram](http://plantuml.com/component-diagram) - [Deployment diagram](http://plantuml.com/deployment-diagram) - [State diagram](http://plantuml.com/state-diagram) - [Timing diagram](http://plantuml.com/timing-diagram) - 📈 Non-UML Diagrams - [JSON data](http://plantuml.com/json) - [YAML data](http://plantuml.com/yaml) - [EBNF (Extended Backus-Naur Form)](http://plantuml.com/ebnf) - [Regex (Regular Expression)](http://plantuml.com/regex) - [Network diagram (nwdiag)](http://plantuml.com/nwdiag) - [Salt (Wireframe graphical interface or UI Mockups)](http://plantuml.com/salt) - [Archimate diagram](http://plantuml.com/archimate-diagram) - [SDL (Specification and Description Language)](http://plantuml.com/activity-diagram-beta#sdl) - [Ditaa diagram](http://plantuml.com/ditaa) - [Gantt diagram](http://plantuml.com/gantt-diagram) - [Chronology diagram](http://plantuml.com/chronology-diagram) - [MindMap diagram](http://plantuml.com/mindmap-diagram) - [WBS (Work Breakdown Structure)](http://plantuml.com/wbs-diagram) - [Mathematical Notations (AsciiMath, JLaTeXMath)](http://plantuml.com/ascii-math) - Entity Relationship (ER) diagram - [Information Engineering (IE) diagram](http://plantuml.com/ie-diagram) - [Entity Relationship (ER) diagram (Chen's notation)](http://alphadoc.plantuml.com/doc/markdown/en/er-diagram) ### 📣 Additional Features - [Hyperlinks and tooltips](http://plantuml.com/link) - [Rich text (Creole) with emoticons, unicode, and icons](http://plantuml.com/creole) - [OpenIconic icons](http://plantuml.com/openiconic) - [Sprite icons](http://plantuml.com/sprite) ### 📖 Learn More For a more detailed overview, visit [PlantUML Official Website](https://plantuml.com/). ## 🚀 Getting Started Whether you're looking to use PlantUML as a standalone application or as a component in your own project, getting started is simple. Check out the official [PlantUML setup guide](https://plantuml.com/starting) for instructions on how to set up PlantUML on your system. ## ⚙️ Building from Source To build PlantUML from source, you'll need to have certain prerequisites installed and follow a series of steps outlined in our build guide. Find detailed instructions in our [BUILDING.md](https://github.com/plantuml/plantuml/blob/master/BUILDING.md) file. ## 🧱 Contributing PlantUML is an open-source project, and we welcome contributions of all kinds. Whether you're helping us fix bugs, improve the docs, or spread the word, we appreciate your support. See our [contributing guide](CONTRIBUTING.md) for more information on how to get started. For comprehensive and detailed documentation on using PlantUML, refer to the [official Javadoc, available here](https://plantuml.github.io/plantuml/). Please note that this documentation is a work in progress and may not be complete. ## 🧑‍🤝‍🧑 Support and Community - [GitHub issues](https://github.com/plantuml/plantuml/issues/) - [Community Forum](https://forum.plantuml.net/) ## 📃 License PlantUML is licensed under several licenses; you can choose the one that suits you best: - [GPL license](https://www.gnu.org/licenses/gpl-3.0.html) - [LGPL license](https://www.gnu.org/licenses/lgpl-3.0.html) - [Apache license](https://www.apache.org/licenses/LICENSE-2.0) - [Eclipse Public license](https://www.eclipse.org/legal/epl-2.0/) - [MIT license](https://opensource.org/licenses/MIT) For more information, please refer to the [PlantUML license FAQ](https://plantuml.com/en/faq#ddbc9d04378ee462) to help determine which license is appropriate for your use case.
0
moxi624/mogu_blog_v2
蘑菇博客(MoguBlog),一个基于微服务架构的前后端分离博客系统。Web端使用Vue + Element , 移动端使用uniapp和ColorUI。后端使用Spring cloud + Spring boot + mybatis-plus进行开发,使用 Jwt + Spring Security做登录验证和权限校验,使用ElasticSearch和Solr作为全文检索服务,使用Github Actions完成博客的持续集成,使用ELK收集博客日志,文件支持上传七牛云和Minio,支持Docker Compose脚本一键部署。
blog element-ui java mybatis spring-boot springcloud vue
# 蘑菇博客 <p align=center> <a href="http://www.moguit.cn"> <img src="./doc/images/gitee/favicon2.ico" alt="蘑菇博客" style="width:200px;height:200px"> </a> </p> <p align=center> 蘑菇博客,一个基于微服务架构的前后端分离博客系统 </p> <p align="center"> <a target="_blank" href="https://gitee.com/moxi159753/mogu_blog_v2"> <img src="https://img.shields.io/hexpm/l/plug.svg" ></img> <img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img> <img src="https://img.shields.io/badge/nodejs-14.x-green" ></img> <img src="https://img.shields.io/badge/springboot-2.2.2.RELEASE-green" ></img> <img src="https://img.shields.io/badge/SpringCloud-Hoxton.RELEASE-brightgreen" ></img> <img src="https://img.shields.io/badge/vue-2.5.17-green" ></img> <img src="https://img.shields.io/badge/swagger-3.0.0-brightgreen" ></img> <img src="https://img.shields.io/badge/mybatis--plus-3.1.2-green" ></img> <img src="https://gitee.com/moxi159753/mogu_blog_v2/badge/star.svg?theme=dark" ></img> <img src="https://gitee.com/moxi159753/mogu_blog_v2/badge/fork.svg?theme=dark" ></img> </a></p> [项目介绍](#项目介绍) | [站点演示](#站点演示) | [项目特点](#项目特点) | [技术架构](#技术选型) | [项目目录](#项目目录) | [项目文档](#项目文档) | [快速开始](#快速开始) | [视频教程](#视频教程)| [项目截图](#移动端截图) | [更新记录](https://gitee.com/moxi159753/mogu_blog_v2/releases) | [笔记仓库](https://gitee.com/moxi159753/LearningNotes) ## 前言 [**陌溪**](https://gitee.com/moxi159753/LearningNotes/raw/master/doc/images/qq/添加陌溪.png) 是一个从三本院校一路摸滚翻爬上来的程序员。目前就职于字节跳动的Data商业化广告部门,是字节跳动全线产品的商业变现研发团队。这两天创建了一个 **微信公众号【[陌溪教你学编程](https://gitee.com/moxi159753/LearningNotes/raw/master/doc/images/qq/公众号2.jpg)】**,未来将会在公众号上持续性的输出很多原创小知识以及学习资源,欢迎各位小伙伴关注我,和我一起共同学习,同时我也希望各位小伙伴能够给**蘑菇博客**项目多多 **Star** 支持,您的**点赞**就是我维护的动力! <p align=center> <img src="./doc/images/qq/公众号2.jpg" width="500" /> </p> 项目已有较详细的 [项目搭建文档](http://moxi159753.gitee.io/mogu_blog_doc) ,同时包括了 **Windows**、**Linux** 以及 **Docker** 环境下蘑菇博客的搭建。在使用过程中遇到问题时,首先认真阅读**项目搭建文档** ,同时 [FAQ文档](http://www.moguit.cn/info/288) 还收集了小伙伴咨询的问题,可以提前阅读~ 【提问前】可以先 [百度](https://www.baidu.com/) 或者 [Google](https://www.google.com/) 进行解决,有的问题通过**搜索引擎**很快就能得到解决 【提问前】可以首先看看 [issue](https://gitee.com/moxi159753/mogu_blog_v2/issues) 或者 [FAQ文档](http://www.moguit.cn/info/288),可能你的问题别人也遇到过 【提问前】可以提前阅读 [如何向开源社区提问题](http://www.moguit.cn/info/311) 【提问】推荐使用 [Gitee issue](https://gitee.com/moxi159753/mogu_blog_v2/issues) 进行提问,因为issue解决后能够保留解决记录,帮助其它小伙伴避坑。其次可以使用 [蘑菇社区](http://www.moguit.cn/#/question), <a href="##关注&交流">QQ群 </a> 或者 <a href="##前言">微信群 </a> 进行提问。群里提问注意提问的时间,把遇到**问题的详细过程都描述清楚**,最好**配上图文信息**,这样能有利于更高效的解决问题。 ## 字节内推 目前字节跳动拥有大量岗位需求,欢迎点击下方**内推链接**【内推码: **WYU3X8M**】选择合适的岗位投递。小伙伴们使用**内推链接**投递后,可以通过 **公众号** 联系我跟进面试进度。 提前批投递:[点我传送](https://jobs.toutiao.com/s/eGmrue1) ,社会招聘:[点我传送](https://job.toutiao.com/s/eGmBtNC) ## 项目介绍 蘑菇博客( **MoguBlog** ),一个**基于微服务架构的前后端分离博客系统**。**Web** 端使用 **Vue** + **ElementUi** , 移动端使用 **uniapp** 和 **ColorUI**。后端使用 **SpringCloud** + **SpringBoot** + **Mybatis-plus**进行开发,使用 **Jwt** + **SpringSecurity** 做登录验证和权限校验,使用 **ElasticSearch** 和 **Solr** 作为全文检索服务,使用 **Github Actions**完成博客的持续集成,使用 **ElasticStack** 收集博客日志,文件支持**上传本地**、**七牛云** 和 **Minio**. - 蘑菇博客大部分功能是我个人进行开发的,因能力有限,其中很多技术都是一边学习一边使用的,可以说蘑菇博客也是一个我用来熟悉技术的项目,所以很多地方可能考虑不周,故有能改正的地方,还请各位老哥能够指出~ - 现在挺多是SSM或者SSH的博客管理系统,想用 **SpringBoot** + **SpringCloud** + **Vue** 的微服务架构进行尝试项目的构建,里面很多功能可能只是**为了满足自己的学习需求**而引入的,大家可以**根据自己服务器配置来选择启动的服务**,因此本博客也是一个非常好的 **SpringBoot**、**SpringCloud**以及 **Vue** 技术的入门学习项目。 - 原来做过 **Vue** + **ElementUi** 做过管理系统,所以现在打算做一套自己的、基于当前最新技术栈、前后端分离的微服务博客系统。 - [蘑菇博客](http://www.moguit.cn)中的一些文章,很多都来自我平时的学习笔记,目前托管在另一个仓库:[LearningNotes](https://gitee.com/moxi159753/LearningNotes),里面涵盖了 **JVM**、**JUC**、**Java**,**Spring**,**SpringCloud**,计算机网络,操作系统,数据结构,**Vue**、**Linux** 等 ,感兴趣的小伙伴可以跳转该仓库 [Star支持](https://gitee.com/moxi159753/LearningNotes) 一下 ## 运行配置 蘑菇博客使用了一些监控的 **SpringCloud** 组件,但是并不一定都需要部署,必须启动的服务包含 `nacos`,`nginx`,`rabbitmq`, `redis`,`mysql`,`mogu-gateway`,`mogu-sms`,`mogu-picture`, `mogu-web`, `mogu-admin` 其它的服务都可以不启动,也不影正常使用,可以根据自身服务器配置来启动 最低配置:1核2G 【[需开启虚拟内存](http://moguit.cn/info/96)】【容易宕机】 推荐配置:2核4G 【[狂欢特惠](https://curl.qcloud.com/TYzPgyNC)】【博主目前配置】 最近,腾讯云和阿里云的优惠力度非常大,如果有需求的小伙伴,可以了解一下~ > 【阿里云】云服务器狂欢特惠,**2核2G5M** 轻量级应用服务器 **60 元/年** [点我传送](https://www.aliyun.com/minisite/goods?taskPkg=1111ydsrwb&pkgSid=617&recordId=953032&userCode=w7aungxw) > > 【腾讯云】云产品限时秒杀,爆款 **2核4G8M** 云服务器,首年 **74元/年、222/3年**【**博主强烈推荐**】[点我传送](https://curl.qcloud.com/TYzPgyNC) ## 站点演示 首先特别感谢群里小伙伴 **@泪梦红尘** 对蘑菇博客提供服务器支持。所以就刚好以此用来做蘑菇博客的演示站点,同时我也在搭建的时候,顺便录制了一套视频:[20分钟部署一个微服务架构的博客系统](https://www.bilibili.com/video/BV13y4y1V7Us) ,感兴趣的小伙伴可以参考视频一起完成部署~ > 【演示前端】:http://demoweb.moguit.cn/ > > 【演示后端】:http://demoadmin.moguit.cn/ > > 【演示账号】:[点击获取](https://gitee.com/moxi159753/mogu_blog_v2/raw/Nacos/doc/images/qq/%E8%8E%B7%E5%8F%96%E6%BC%94%E7%A4%BA%E7%8E%AF%E5%A2%83%E8%B4%A6%E5%8F%B7.jpg) > > 【小程序】蘑菇博客的移动端版本,可以扫码体验。参考 [蘑菇博客小程序部署](http://www.moguit.cn/info/605) 文档,以及Bilibili上 [20分钟部署博客小程序视频](https://www.bilibili.com/video/BV1sQ4y117nN) 完成小程序的搭建。 | | | :------------------------------------------------------: | | <img src="./doc/images/uniapp/wxCode.jpg" width="200" /> | ## 后期维护 项目后台目前有 **Eureka** 版本和 **Nacos** 版本,其中 **Eureka** 版本使用的是 **SpringCloud** 一些组件,**Nacos** 版本使用的是 **SpringCloudAlibaba** 的一些组件,例如 **Nacos**、**Sentinel** 等 - **Eureka** 版本请切换至 **Eureka** 分支(**已停止维护**,将不再进行新功能的开发) - **Nacos** 版本请切换至 **Nacos** 分支(作为以后**长期维护**的分支) - **master** 分支为主分支,是基于 **Nacos** 分支的稳定版本 ## 蘑菇博客社区版 蘑菇博客的定位是个人博客系统,而蘑菇博客社区版定位是多人博客系统。蘑菇社区版在原有蘑菇博客的基础上加入了更多的社区玩法,如:支持用户投稿、个人主页、用户签到、关注/取关、收藏/点赞、积分模块、VIP特权功能、用户动态(蘑菇圈)、面经模块、课程模块、消息通知、公众号登录/管理、私信/群聊模块、SEO优化、图片敏感审核、任务模块、成就模块、勋章模块、支付模块、消息触达、资源模块等。。 关于蘑菇社区功能模块的介绍,可查看:[蘑菇社区功能模块介绍](https://vsp58xj3kr.feishu.cn/wiki/wikcnHtRsM9HojaYqrvHWjMu0Ah) 关于蘑菇社区版的**学习**/**商用授权**,以及查看版本对比,可以查看:[点我跳转](https://www.moguit.cn/version) 社区版演示环境如下,目前 [蘑菇官网](https://www.moguit.cn/) 使用的是蘑菇博客社区版代码。 > 【社区演示前端】:http://w.moguit.cn > > 【社区演示后端】:http://a.moguit.cn > > 【演示账号】:[点击获取](https://gitee.com/moxi159753/mogu_blog_v2/raw/Nacos/doc/images/qq/%E8%8E%B7%E5%8F%96%E6%BC%94%E7%A4%BA%E7%8E%AF%E5%A2%83%E8%B4%A6%E5%8F%B7.jpg) 目前,蘑菇社区版源码暂未开源,可通过 [赞助蘑菇](https://www.moguit.cn/version) 的方式获取源码授权,详情可添加陌溪微信了解:[coder_moxi](https://gitee.com/moxi159753/mogu_blog_v2/raw/Nacos/doc/images/qq/coder_moxi.png) (备注:蘑菇社区) ## 蘑菇博客Go版本 [**mogu_blog_go**](https://gitee.com/moxi159753/mogu_blog_go) 是根据**蘑菇博客**改编的一个 **Golang** 简化版分支,实现了蘑菇博客后台原有的大部分**基础功能**,同时前端代码和数据库基本没有变化,因此可以直接使用蘑菇博客原有的前端页面。 [**mogu_blog_go**](https://gitee.com/moxi159753/mogu_blog_go) 目前采用的技术有:**beego**、**gorm**、**mysql**、**redis** 和 **nginx**。相比于蘑菇博客微服务版,**Golang**版蘑菇能够做到 **1C2G** 的服务器轻松运行,再也不怕网站第二天起来就宕机了~。 参考[蘑菇博客Golang版安装指南](http://moguit.cn/info/593),快速在 **Windows** 平台搭建蘑菇博客Go版开发环境 ## 项目中初始用户和密码 - **后台登录**:用户:admin,密码:mogu2018 - 前台登录:用户:mogu2018,密码:mogu2018 - **Mysql**:用户:root,密码:mogu2018 - **Redis**:密码:mogu2018 - **远程SSH初始密码**:用户:root,密码:mogu2018 - **RabbitMQ管理页面:** 用户:admin,密码:mogu2018 - **Nacos管理页面:** 用户:nacos,密码:nacos - **Sentinel管理页面:** 用户:sentinel,密码:sentinel - **蘑菇博客监控页面**:用户:user,密码:password123 - **Druid初始密码:** 用户:admin,密码:123456 ## 项目特点 - 友好的代码结构及注释,便于阅读及二次开发 - 实现前后端分离,通过 **Json** 进行数据交互,前端再也不用关注后端技术 - 页面交互使用 **Vue2.x**,极大的提高了开发效率。 - 引入**Swagger** 文档支持,方便编写 **API** 接口文档。 - 引入**RabbitMQ** 消息队列,用于邮件发送、更新 **Redis** 和 **Solr** - 引入**JustAuth** 第三方登录开源库,支持 **Gitee**、**Github** 账号登录。 - 引入**ElasticSearch** 和 **Solr** 作为全文检索服务,并支持可插拔配置 - 引入**Github Actions** 工作流,完成蘑菇博客的持续集成、持续部署。 - 引入七牛云对象存储,同时支持本地文件存储 - 引入 **RBAC** 权限管理设计,灵活的权限控制,按钮级别的细粒度权限控制,满足绝大部分的权限需求 - 引入 **Zipkin** 链路追踪,聚合各业务系统调用延迟数据,可以一眼看出延迟高的服务 - 采用**自定义参数校验注解**,轻松实现后端参数校验 - 采用 **AOP** + 自定义注解 + **Redis** 实现限制IP接口访问次数 - 采用自研的评论模块,实现评论邮件通知 - 采用 **Nacos** 作为服务发现和配置中心,轻松完成项目的配置的维护 - 采用 **Sentinel** 流量控制框架,通过配置再也不怕网站被爆破 - 采用[uniapp](https://uniapp.dcloud.io/) 和[ColorUi](https://github.com/weilanwl/ColorUI) 完成蘑菇博客的移动端门户页面搭建 - 支持多种文本编辑器,**Markdown** 编辑器([Vditor](https://github.com/Vanessa219/vditor))和富文本编辑器([CKEditor](https://github.com/ckeditor/ckeditor4))随心切换 - 采用 **ElasticStack**【**ElasticSearch** + **Beats** + **Kibana** + **Logstash**】[搭建蘑菇博客日志收集](http://moguit.cn/info/436) - 采用 **Docker Compose** 完成容器编排,**Portainer** 实现容器可视化,支持[一键部署线上环境](http://www.moguit.cn/info/565) ## 项目文档 文档地址:http://moxi159753.gitee.io/mogu_blog_doc 备用文档地址:http://doc.moguit.cn ## 项目地址 目前项目托管在 **Gitee** 和 **Github** 平台上中,欢迎大家 **Star** 和 **Fork** 支持~ - Gitee地址:https://gitee.com/moxi159753/mogu_blog_v2 - Github地址:https://github.com/moxi624/mogu_blog_v2 ## 项目目录 - MoguBlog 是一款基于最新技术开发的多人在线、简洁的博客系统。 - mogu_admin: 提供admin端API接口服务; - mogu_web:提供web端API接口服务; - mogu_eureka: 服务发现和注册【注: Nacos分支没有该目录,用Nacos作为服务发现组件】 - mogu_picture: 图片服务,用于图片上传和下载; - mogu_sms:消息服务,用于更新ElasticSearch、Solr索引、邮件和短信发送 - mogu_monitor:监控服务,集成SpringBootAdmin用于管理和监控SpringBoot应用程序 - mogu_spider:爬虫服务`(目前还未完善)` - mogu_gateway:网关服务`(目前还未完善)` - mogu_zipkin:链路追踪服务,`目前使用java -jar的方式启动` - mogu_search:搜索服务,ElasticSearch和Solr作为全文检索工具,[支持可插拔配置](http://www.moguit.cn/info/119),默认使用SQL搜索 - mogu_commons:公共模块,主要用于存放Entity实体类、Feign远程调用接口、以及公共config配置 - mogu_utils: 是常用工具类; - mogu_xo: 是存放 VO、Service,Dao层的 - mogu_base: 是一些Base基类 - doc: 是蘑菇博客的一些文档和数据库文件 - vue_mogu_admin:VUE的后台管理页面 - vue_mogu_web:VUE的门户网站 - uniapp_mogu_web:基于uniapp 和 colorUi 的蘑菇博客移动端门户页面(Nacos分支) - nuxt_mogu_web:Nuxt的门户网站,主要用于支持SEO搜索引擎优化`(目前还未完善)` ## 技术选型 ### 系统架构图 ![image text](./doc/images/gitee/server.jpg) > 蘑菇博客系统架构图,使用 [Processon](https://www.processon.com/i/5e380df1e4b05b335ffa81e9) 在线绘制 ### 后端技术 | 技术 | 说明 | 官网 | | :------------: | :-----------------------: | :----------------------------------------------------------: | | SpringBoot | MVC框架 | [ https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) | | SpringCloud | 微服务框架 | https://spring.io/projects/spring-cloud/ | | SpringSecurity | 认证和授权框架 | https://spring.io/projects/spring-security | | MyBatis-Plus | ORM框架 | https://mp.baomidou.com/ | | Swagger-UI | 文档生产工具 | [ https://github.com/swagger-api/swagger-ui](https://github.com/swagger-api/swagger-ui) | | Kibana | 分析和可视化平台 | https://www.elastic.co/cn/kibana | | Elasticsearch | 搜索引擎 | [ https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch) | | Beats | 轻量型数据采集器 | https://www.elastic.co/cn/beats/ | | Logstash | 用于接收Beats的数据并处理 | https://www.elastic.co/cn/logstash | | Solr | 搜索引擎 | http://lucene.apache.org/solr/ | | RabbitMQ | 消息队列 | [ https://www.rabbitmq.com/](https://www.rabbitmq.com/) | | Redis | 分布式缓存 | https://redis.io/ | | Docker | 容器化部署 | [ https://www.docker.com](https://www.docker.com/) | | Druid | 数据库连接池 | [ https://github.com/alibaba/druid](https://github.com/alibaba/druid) | | 七牛云 | 七牛云 - 对象储存 | https://developer.qiniu.com/sdk#official-sdk | | JWT | JWT登录支持 | https://github.com/jwtk/jjwt | | SLF4J | 日志框架 | http://www.slf4j.org/ | | Lombok | 简化对象封装工具 | [ https://github.com/rzwitserloot/lombok](https://github.com/rzwitserloot/lombok) | | Nginx | HTTP和反向代理web服务器 | http://nginx.org/ | | JustAuth | 第三方登录的工具 | https://github.com/justauth/JustAuth | | Hutool | Java工具包类库 | https://hutool.cn/docs/#/ | | 阿里大于 | 短信发送平台 | https://doc.alidayu.com/doc2/index.htm | | Github Actions | 自动化部署 | https://help.github.com/en/actions | | Zipkin | 链路追踪 | https://github.com/openzipkin/zipkin | | Flexmark-java | Markdown转换Html | https://github.com/vsch/flexmark-java | | Ip2region | 离线IP地址定位库 | https://github.com/lionsoul2014/ip2region | | Minio | 本地对象存储服务 | https://min.io/ | | Docker Compose | Docker容器编排 | https://docs.docker.com/compose/ | | Portainer | Docker可视化管理 | https://github.com/portainer/portainer | ### 前端技术 | 技术 | 说明 | 官网 | | :-------------------: | :-------------------------------------: | :----------------------------------------------------------: | | Vue.js | 前端框架 | https://vuejs.org/ | | Vue-router | 路由框架 | https://router.vuejs.org/ | | Vuex | 全局状态管理框架 | https://vuex.vuejs.org/ | | Nuxt.js | 创建服务端渲染 (SSR) 应用 | https://zh.nuxtjs.org/ | | Element | 前端ui框架 | [ https://element.eleme.io](https://element.eleme.io/) | | Axios | 前端HTTP框架 | [ https://github.com/axios/axios](https://github.com/axios/axios) | | Echarts | 图表框架 | www.echartsjs.com | | CKEditor | 富文本编辑器 | https://ckeditor.com/ | | Highlight.js | 代码语法高亮插件 | https://github.com/highlightjs/highlight.js | | Vditor | Markdown编辑器 | https://github.com/Vanessa219/vditor | | vue-cropper | 图片裁剪组件 | https://github.com/xyxiao001/vue-cropper | | vue-image-crop-upload | vue图片剪裁上传组件 | https://github.com/dai-siki/vue-image-crop-upload | | vue-emoji-comment | Vue Emoji表情评论组件 | https://github.com/pppercyWang/vue-emoji-comment | | clipboard.js | 现代化的拷贝文字 | http://www.clipboardjs.cn/ | | js-beautify | 美化JavaScript代码 | https://github.com/beautify-web/js-beautify | | FileSaver.js | 保存文件在客户端 | https://github.com/eligrey/FileSaver.js | | SortableJS | 功能强大的JavaScript 拖拽库 | http://www.sortablejs.com/ | | vue-side-catalog | 目录导航栏 | https://github.com/yaowei9363/vue-side-catalog | | uniapp | 移动端跨平台语言 | https://uniapp.dcloud.io/ | | colorUi | 专注视觉的小程序组件库 | https://github.com/weilanwl/ColorUI | | showdown | 用Javascript编写的Markdown 到Html转换器 | https://github.com/showdownjs/showdown | | turndown | 用JavaScript编写的HTML到Markdown转换器 | https://github.com/domchristie/turndown | ## 快速开始 ### 【推荐】一条命令部署蘑菇博客 参考 [如何使用一条命令完成蘑菇博客部署](http://www.moguit.cn/info/597), 在云服务器上执行下面命令,完成一键部署蘑菇博客 ```bash wget http://oss.moguit.cn/script/moguInit.sh && chmod +x moguInit.sh && sh moguInit.sh ``` Bilibili一键部署视频:[20分钟部署一个微服务架构的博客系统](https://www.bilibili.com/video/BV13y4y1V7Us) ### [推荐] Windows+VMware一键搭建蘑菇博客本地开发环境 参考 [Windows+VMware一键搭建蘑菇博客本地开发环境](http://www.moguit.cn/info/583),快速在 **Windows** 平台搭建蘑菇博客开发环境,将中间件安装在 **VMware** 中。 ### Windows环境下搭建蘑菇博客 参考 [window环境下配置蘑菇博客环境](http://www.moguit.cn/info/14),能够在 **Windows**下搭建蘑菇博客的开发环境,同时将**所有组件**安装在**Windows** 环境中 ### [推荐] DockerCompose一键部署蘑菇博客(Nacos版) 参考 [DockerCompose一键部署蘑菇博客(Nacos版)](http://www.moguit.cn/info/1151) ,在 **Linux** 服务器中,一键完成蘑菇博客项目的部署 ### Docker搭建蘑菇博客 参考 [使用Docker快速搭建蘑菇博客(Eureka分支)](http://www.moguit.cn/info/299),快速在Linux服务器中搭建好博客运行环境,通过发布 **Jar** 包的方式完成部署 参考 [使用Docker快速搭建蘑菇博客(Nacos分支)](http://www.moguit.cn/info/224),快速在Linux服务器中搭建好博客运行环境,通过发布 **Jar** 包的方式完成部署 ### 蘑菇博客部署到云服务器 【**推荐**】参考[IDEA发布蘑菇博客Docker镜像到云服务器(适用于DockerCompose部署)](http://moguit.cn/info/588),在你修改Nacos分支博客源码后,将重新制作镜像部署到云服务器,然后通过DockerCompose进行启动。 参考[蘑菇博客如何部署到阿里云服务器(Eureka分支)](http://moguit.cn/info/238),在你修改Eureka分支博客源码后将项目打包部署到云服务器 参考[蘑菇博客如何部署到阿里云服务器(Nacos分支)](http://moguit.cn/info/405),在你修改Nacos分支博客源码后将项目打包部署到云服务器 ### 使用Github Actions完成蘑菇博客持续集成 参考 [使用Github Action完成蘑菇博客持续集成](http://moguit.cn/info/13) ,在你提交一个 **push** 请求后,通过 **Github Actions** 能够完成蘑菇博客自动化 编译、打包、部署等操作。 ### 切换搜索模式 参考[蘑菇博客切换搜索模式](http://moguit.cn/info/119),完成蘑菇博客的搜索引擎切换,目前支持 **Solr**、**ElasticSearch**、**SQL** 的方式 ### 配置七牛云对象存储 参考[蘑菇博客切换七牛云存储](http://moguit.cn/info/202),配置文件的七牛云对象存储,及本地文件存储 ### 使用Zipkin搭建蘑菇博客链路追踪 参考[使用Zipkin搭建蘑菇博客链路追踪](http://www.moguit.cn/info/95),通过聚合各业务系统调用延迟数据,达到链路调用监控跟踪,快速定位其中延迟高的服务 ### 使用Nacos搭建蘑菇博客服务注册和配置中心 参考[蘑菇博客Nacos部署指南](http://www.moguit.cn/info/248),搭建蘑菇博客的服务注册和配置中心 ### 使用Sentinel搭建蘑菇博客流量控制 参考[蘑菇博客Sentinel安装指南](http://www.moguit.cn/info/198),**Sentinel** 被称为分布式系统的流量防卫兵,相当于Hystrix ### 蘑菇博客QQ小程序发布 参考[蘑菇博客QQ小程序发布指南](http://www.moguit.cn/info/223),完成蘑菇博客 **uniapp** 移动端的启动和发布 ### 【推荐】蘑菇博客微信小程序发布 参考[蘑菇博客微信小程序部署指南](http://www.moguit.cn/info/605),完成蘑菇博客 **uniapp** 移动端的启动和发布 ### 蘑菇博客扩展新的功能和页面 参考[蘑菇博客如何扩展新的功能和页面](http://www.moguit.cn/info/141),在蘑菇博客现有架构基础上,开发自己需要的页面。 ### 使用ELK搭建蘑菇博客日志收集 参考[搭建蘑菇博客日志收集](http://www.moguit.cn/info/436),使用 **Docker** 快速搭建 **ELK** 环境用于蘑菇博客日志收集 ## 搭建网站免费CDN加速访问 参考 [网站打开花了20秒,我决定自建蘑菇CDN](http://www.moguit.cn/info/976) ,免费搭建自己的CDN加速 ## 环境搭建 ### 开发工具 | 工具 | 说明 | 官网 | | :----------: | :---------------: | :----------------------------------------------------------: | | IDEA | Java开发IDE | https://www.jetbrains.com/idea/download | | WebStorm | 前端开发IDE | https://www.jetbrains.com/webstorm/ | | RedisDesktop | Redis可视化工具 | [ https://redisdesktop.com/download](https://redisdesktop.com/download) | | SwitchHosts | 本地Host管理 | https://oldj.github.io/SwitchHosts/ | | X-shell | Linux远程连接工具 | https://xshell.en.softonic.com/ | | X-ftp | Linux文件传输工具 | https://www.netsarang.com/zh/all-downloads/ | | SQLyog | 数据库连接工具 | https://sqlyog.en.softonic.com/ | | ScreenToGif | Gif录制工具 | [ https://www.screentogif.com/](https://www.screentogif.com/) | ### 开发环境 | 工具 | 版本号 | 下载 | | :-----------: | :----: | :----------------------------------------------------------: | | JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | | Maven | 3.3.0+ | http://maven.apache.org/ | | Elasticsearch | 6.3.0 | https://www.elastic.co/downloads | | Solr | 7.0 | http://lucene.apache.org/solr/ | | MySQL | 5.6 | https://www.mysql.com/ | | Erlang | 20.3 | https://www.erlang.org/ | | RabbitMQ | 3.7.4 | http://www.rabbitmq.com/download.html | | Nginx | 1.10 | http://nginx.org/en/download.html | | Redis | 3.3.0 | https://redis.io/download | | Zipkin | 2.12.5 | https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec | | Nacos | 1.3.2 | https://github.com/alibaba/nacos/releases | | Sentinel | 1.7.2 | https://github.com/alibaba/Sentinel/releases | ## 致谢 **蘑菇博客**起初参考了很多**开源项目**的**解决方案**,**开源不易,感谢分享** - [<img src="./doc/images/gitee/qiniu.jpg" width="80" />](https://portal.qiniu.com/signup?utm_source=kaiyuan&utm_media=mogu)感谢 [七牛云](https://portal.qiniu.com/signup?utm_source=kaiyuan&utm_media=mogu) 提供的 **免费云存储** 和 **CDN** 服务 - [<img src="./doc/images/gitee/jetbrains.png" width="40" />](https://www.jetbrains.com/?from=mogu_blog_v2)感谢 **[jetbrains](https://www.jetbrains.com/?from=mogu_blog_v2)** 提供的开源 **License** - 感谢 **杨青小姐姐** 的博客模板:[http://www.yangqq.com/](http://www.yangqq.com/) - 感谢**PanJiaChen**的Vue后台管理模板:[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) - **Vue** 项目搭建参考这篇博客:[https://segmentfault.com/a/1190000009506097](https://segmentfault.com/a/1190000009506097) - 感谢 **苞米豆** 提供的 **Mybatis-plus**框架:[http://mp.baomidou.com/](http://mp.baomidou.com/) - 感谢 **yadong.zhang** 提供的第三方登录开源库:[https://gitee.com/yadong.zhang/JustAuth](https://gitee.com/yadong.zhang/JustAuth) - 感谢 **bihell** 的 **Dice** 博客项目:[https://github.com/bihell/Dice](https://github.com/bihell/Dice) - 感谢 **pppercyWang** 提供的Emoji表情评论组件:[vue-emoji-comment](https://github.com/pppercyWang/vue-emoji-comment) - 感谢 **若依** 提供的 **RuoYi** 项目:[https://gitee.com/y_project/RuoYi](https://gitee.com/y_project/RuoYi) - 感谢 **yaowei9363** 提供的 **Vue侧目录组件**: [vue-side-catalog](https://github.com/yaowei9363/vue-side-catalog) - 感谢 **奇文社区** 提供的 **奇文网盘** 项目:https://gitee.com/qiwen-cloud/qiwen-file - 感谢 **weilanwl** 提供的 **ColorUI**:https://github.com/weilanwl/ColorUI ## 关注&交流 为了方便小伙伴们沟通交流,我创建了QQ群 (**加群备注**:`蘑菇博客`) 和 **微信群**(备注:**加群**),目前项目还存在很多不足之处,欢迎各位老哥进群进行技术交流,为了防止广告进入,希望加群的时候能添加备注,谢谢~ | 微信群【备注:加群】 | ~~QQ群(备注:`蘑菇博客`)【群满】~~ | QQ群(备注:`蘑菇博客`)【推荐】 | | :------------------------------------------------------: | :----------------------------------------------------: | ------------------------------------------------------ | | <img src="./doc/images/qq/coder_moxi.png" width="200" /> | <img src="./doc/images/qq/qqGroup2.png" width="200" /> | <img src="./doc/images/qq/qqGroup3.png" width="200" /> | ## 未来计划 - [x] 集成Github Actions,完成蘑菇博客持续集成服务 - [x] 门户网站增加登录页面 - [x] 支持第三方登录 - [x] 集成ElasticSearch和Solr - [x] 将图片存储在七牛云中 - [x] 写一个评论模块,用于替换搜狐畅言 - [x] 按钮级别的细粒度权限控制 - [x] 增加评论表情 - [x] 增加数据字典管理 - [x] 前端增加用户个人中心 - [x] 增加一个FAQ常见问题文档 - [x] 集成表单构建页面,来源于[RuoYi](https://gitee.com/y_project/RuoYi) - [x] 增加博客详情页目录导航,来源于[vue-side-catalog](https://github.com/yaowei9363/vue-side-catalog) - [x] 资源管理页面集成网盘管理 - [x] 新建Nacos分支,用于替换Eureka作为服务发现组件和配置中心 - [x] 使用Sentinel做服务限流和熔断 - [x] 增加蘑菇博客小程序项目 uniapp_mogu_web,基于[ColorUI](https://github.com/weilanwl/ColorUI) 和 [Uniapp](https://uniapp.dcloud.io/) - [x] 富文本编辑器和Markdown编辑器任意切换 - [x] 使用ELK搭建[蘑菇博客日志收集功能](http://www.moguit.cn/#/info?blogUid=fd9ab58588d93ef792ec72a359a09f6c) - [x] 使用Minio [搭建对象存储服务](http://www.moguit.cn/#/info?blogUid=a1058b2d030310e2c5d7b0584e514f1f) - [x] 使用DockerCompose完成 [博客一键部署](http://www.moguit.cn/info/565) - [x] 使用Portainer对Docker镜像可视化管理 - [x] 适配门户页面的移动端布局 - [x] 完善网盘管理 - [x] 增加更新记录 - [x] 完善爬虫模块 - [x] 完善网关模块 - [ ] 增加K8S部署蘑菇博客教程 - [ ] 增加大屏数据展示页面 - [ ] 增加定时任务模块 - [ ] 使用Freemark页面静态化技术对博客详情页静态化 - [ ] 解决Nuxt_mogu_web中存在的问题,使博客能被搜索引擎收录 - [ ] 让原创文章能够同步到多平台,如:CSDN,掘金,博客园等 - [ ] 增加博客迁移功能,让其它平台的博客,如:CSDN、博客园,WordPress能够同步到蘑菇博客中 ## 贡献代码 开源项目离不开大家的支持,如果您有好的想法,遇到一些 **BUG** 并修复了,以及 [蘑菇博客文档](https://gitee.com/moxi159753/mogu_blog_doc) 上有错误的地方订正过来了,欢迎小伙伴们提交 **Pull Request** 参与开源贡献 1. **fork** 本项目到自己的 **repo** 2. 把 **fork** 过去的项目也就是你仓库中的项目 **clone** 到你的本地 3. 修改代码 4. **commit** 后 **push** 到自己的库 5. 发起**PR**( **pull request**) 请求,提交到 **Nacos** 分支 6. 等待作者合并 ## 开源协议 [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) ## 赞赏 **服务器**和**域名**等服务的购买和续费都会**产生一定的费用**,为了**维持项目的正常运作**,如果觉得本项目**对您有帮助**的话,欢迎朋友能够**给予一些支持**,陌溪将用于**提升服务器配置**,感谢小伙伴们的支持( **ps**: 小伙伴赞赏的时候可以备注一下下~) | 微信 | 支付宝 | | :----------------------------------------------: | :-----------------------------------------------: | | <img src="./doc/images/qq/wx.png" width="200" /> | <img src="./doc/images/qq/zfb.png" width="200" /> | ## 移动端截图 > 目前移动端版本的代码已经开源至Nacos分支,如果想体验的小伙伴可以移动至Nacos分支 ![image text](./doc/images/uniapp/uniapp.gif) ## 网站截图 | Admin端 | | | :----------------------------------------------------: | :---------------------------------------------------: | | ![image text](./doc/images/admin/login.png) | ![image text](./doc/images/admin/dashboard.png) | | ![image text](./doc/images/admin/blog.png) | ![image text](./doc/images/admin/blogEdit.png) | | ![image text](./doc/images/admin/addPicture.png) | ![image text](./doc/images/admin/blogSort.png) | | ![image text](./doc/images/admin/blogTag.png) | ![image text](./doc/images/admin/blogRecommend.png) | | ![image text](./doc/images/admin/blogLink.png) | ![image text](./doc/images/admin/systemConf.png) | | ![image text](./doc/images/admin/aboutMe.png) | ![image text](./doc/images/admin/user.png) | | ![image text](./doc/images/admin/comment.png) | ![image text](./doc/images/admin/webConf.png) | | ![image text](./doc/images/admin/admin.png) | ![image text](./doc/images/admin/categoryMenu.png) | | | | | ![image text](./doc/images/admin/sysLog.png) | ![image text](./doc/images/admin/exception.png) | | ![image text](./doc/images/admin/visit.png) | ![image text](./doc/images/admin/picture.png) | | ![image text](./doc/images/admin/swagger.png) | ![image text](./doc/images/admin/pictureSort.png) | | | | | ![image text](./doc/images/admin/monitor_solr.png) | ![image text](./doc/images/admin/monitor_eureka.png) | | ![image text](./doc/images/admin/monitor_druid.png) | ![image text](./doc/images/admin/monitor_admin.png) | | ![image text](./doc/images/admin/monitor_zipkin.png) | ![image text](./doc/images/admin/monitor_elastic.png) | | ![image text](./doc/images/admin/monitor_rabbitmq.png) | | | **Web端** | | | ![image text](./doc/images/web/index.png) | ![image text](./doc/images/web/index2.png) | | ![image text](./doc/images/web/index2.png) | ![image text](./doc/images/web/content.png) | | ![image text](./doc/images/web/login.png) | ![image text](./doc/images/web/about.png) | | ![image text](./doc/images/web/sort.png) | ![image text](./doc/images/web/classify.png) | | ![image text](./doc/images/web/time.png) | ![image text](./doc/images/web/messageBox.png) |
0
redisson/redisson
Redisson - Easy Redis Java client with features of In-Memory Data Grid. Sync/Async/RxJava/Reactive API. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, RPC, local cache ...
cache distributed distributed-locks executor hibernate java list lock map mapreduce queue redis redis-client redis-cluster scheduler session set spring-cache tomcat
# Redisson - Easy Redis Java client<br/>with features of an in-memory data grid [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.redisson/redisson/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.redisson/redisson) [![JavaDoc](http://www.javadoc.io/badge/org.redisson/redisson.svg)](http://www.javadoc.io/doc/org.redisson/redisson) [![License](http://img.shields.io/:license-apache-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [Quick start](https://github.com/redisson/redisson#quick-start) | [Documentation](https://github.com/redisson/redisson/wiki/Table-of-Content) | [Changelog](https://github.com/redisson/redisson/blob/master/CHANGELOG.md) | [Code examples](https://github.com/redisson/redisson-examples) | [FAQs](https://github.com/redisson/redisson/wiki/16.-FAQ) | [Report an issue](https://github.com/redisson/redisson/issues/new) Based on high-performance async and lock-free Java Redis client and [Netty](http://netty.io) framework. Supported JDK: 1.8 ... 21 and Android Supported Redis: 3.0 ... 7.2 ## Features * Thread-safe implementation * Compatible with different Redis deployment types * [Redis Proxy](https://github.com/redisson/redisson/wiki/2.-Configuration/#29-proxy-mode) * [Redis Multi-Cluster](https://github.com/redisson/redisson/wiki/2.-Configuration/#210-multi-cluster-mode) * [Redis Multi-Sentinel](https://github.com/redisson/redisson/wiki/2.-Configuration/#211-multi-sentinel-mode) * [Redis Single](https://github.com/redisson/redisson/wiki/2.-Configuration/#26-single-instance-mode) * [Redis Cluster](https://github.com/redisson/redisson/wiki/2.-Configuration/#24-cluster-mode) * [Redis Sentinel](https://github.com/redisson/redisson/wiki/2.-Configuration/#27-sentinel-mode) * [Redis Replicated](https://github.com/redisson/redisson/wiki/2.-Configuration/#25-replicated-mode) * [Redis Master and Slaves](https://github.com/redisson/redisson/wiki/2.-Configuration/#28-master-slave-mode) * [Valkey](https://valkey.io) compatible * Amazon Web Services compatible * [AWS Redis Global Datastore](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Redis-Global-Datastore.html) * [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) * [Amazon MemoryDB](https://aws.amazon.com/memorydb) * Microsoft Azure compatible * [Azure Redis Cache](https://azure.microsoft.com/en-us/services/cache/) * [Azure Redis Cache active-passive replication](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-geo-replication) * [Azure Redis Cache active-active replication](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-how-to-active-geo-replication) * Google Cloud Memorystore compatible * [Google Cloud Redis](https://cloud.google.com/memorystore/docs/redis/) * [Google Cloud Redis High availability](https://cloud.google.com/memorystore/docs/redis/high-availability) * Redis Enterprise compatible * [Redis Enterprise](https://redis.com/redis-enterprise/) * [Redis Enterprise Active-Active databases](https://docs.redis.com/latest/rs/databases/active-active/get-started/) * [Redis Enterprise Multiple Active Proxy](https://docs.redis.com/latest/rs/databases/configure/proxy-policy/#about-multiple-active-proxy-support) * IBM Cloud compatible * [IBM Cloud Databases for Redis](https://www.ibm.com/cloud/databases-for-redis) * Aiven compatible * [Aiven for Redis](https://aiven.io/redis) * Supports auto-reconnection * Supports failed to send command auto-retry * Supports OSGi * Supports SSL * Asynchronous connection pool * Lua scripting * [RediSearch](https://github.com/redisson/redisson/wiki/9.-distributed-services/#96-redisearch-service) * [JSON datatype](https://github.com/redisson/redisson/wiki/6.-distributed-objects/#615-json-object-holder) * [Reactive Streams](https://github.com/redisson/redisson/wiki/3.-operations-execution#32-reactive-way) API * [RxJava3](https://github.com/redisson/redisson/wiki/3.-operations-execution#32-reactive-way) API * [Asynchronous](https://github.com/redisson/redisson/wiki/3.-operations-execution#31-async-way) API * Local cache support including [Caffeine](https://github.com/ben-manes/caffeine)-based implementation * [Distributed Java objects](https://github.com/redisson/redisson/wiki/6.-Distributed-objects) Object holder, Binary stream holder, Geospatial holder, BitSet, AtomicLong, AtomicDouble, PublishSubscribe, Bloom filter, HyperLogLog * [Distributed Java collections](https://github.com/redisson/redisson/wiki/7.-Distributed-collections) Map, Multimap, Set, List, SortedSet, ScoredSortedSet, LexSortedSet, Queue, Deque, Blocking Queue, Bounded Blocking Queue, Blocking Deque, Delayed Queue, Priority Queue, Priority Deque * [Distributed Java locks and synchronizers](https://github.com/redisson/redisson/wiki/8.-Distributed-locks-and-synchronizers) Lock, FairLock, MultiLock, RedLock, ReadWriteLock, Semaphore, PermitExpirableSemaphore, CountDownLatch * [Distributed services](https://github.com/redisson/redisson/wiki/9.-distributed-services) Remote service, Live Object service, Executor service, Scheduler service, MapReduce service * [Helidon](https://github.com/redisson/redisson/tree/master/redisson-helidon) integration * [Micronaut](https://github.com/redisson/redisson/tree/master/redisson-micronaut) integration * [Quarkus](https://github.com/redisson/redisson/tree/master/redisson-quarkus) integration * [Spring Cache](https://github.com/redisson/redisson/wiki/14.-Integration-with-frameworks/#142-spring-cache) implementation * [Spring Transaction API](https://github.com/redisson/redisson/wiki/14.-Integration-with-frameworks/#148-spring-transaction-manager) implementation * [Spring Data Redis](https://github.com/redisson/redisson/tree/master/redisson-spring-data) integration * [Spring Boot Starter](https://github.com/redisson/redisson/tree/master/redisson-spring-boot-starter) implementation * [Hibernate Cache](https://github.com/redisson/redisson/tree/master/redisson-hibernate) implementation * [MyBatis Cache](https://github.com/redisson/redisson/tree/master/redisson-mybatis) implementation * [Transactions API](https://github.com/redisson/redisson/wiki/10.-Additional-features#104-transactions) * [JCache API (JSR-107)](https://github.com/redisson/redisson/wiki/14.-Integration-with-frameworks/#144-jcache-api-jsr-107-implementation) implementation * [Tomcat Session Manager](https://github.com/redisson/redisson/tree/master/redisson-tomcat) implementation * [Spring Session](https://github.com/redisson/redisson/wiki/14.-Integration-with-frameworks/#147-spring-session) implementation * [Redis pipelining](https://github.com/redisson/redisson/wiki/10.-additional-features#103-execution-batches-of-commands) (command batches) * Supports many popular codecs ([Kryo](https://github.com/EsotericSoftware/kryo), [Jackson JSON](https://github.com/FasterXML/jackson), [Avro](http://avro.apache.org/), [Smile](http://wiki.fasterxml.com/SmileFormatSpec), [CBOR](http://cbor.io/), [MsgPack](http://msgpack.org/), [Amazon Ion](https://amzn.github.io/ion-docs/), [LZ4](https://github.com/jpountz/lz4-java), [Snappy](https://github.com/xerial/snappy-java), [Protobuf](https://github.com/protocolbuffers/protobuf) and JDK Serialization) * 2000+ unit tests <!-- Used by ================================ [![Siemens](https://redisson.org/assets/logos/client29.png "Siemens")](https://www.siemens.com) &nbsp;&nbsp;&nbsp; [![BMW GROUP](https://redisson.org/assets/logos/client27.png "BMW GROUP")](https://www.bmwgroup.com) &nbsp;&nbsp;&nbsp; [![AIG](https://redisson.org/assets/logos/client24.png "AIG")](https://www.aig.com/) &nbsp;&nbsp;&nbsp; [![S&P Global](https://redisson.org/assets/logos/client20.png "S&P Global")](https://www.spglobal.com/) &nbsp;&nbsp;&nbsp; [![SAP](https://redisson.org/assets/logos/client12.png "SAP")](http://www.sap.com/) &nbsp;&nbsp;&nbsp; [![EA](https://redisson.org/assets/logos/client1.png "EA")](http://ea.com/) &nbsp;&nbsp;&nbsp; [![Adobe](https://redisson.org/assets/logos/client23.png "Adobe")](https://www.adobe.com/) [![Jeppesen](https://redisson.org/assets/logos/client25.png "Jeppesen")](https://www.jeppesen.com/) &nbsp;&nbsp;&nbsp; [![BROOKHAVEN](https://redisson.org/assets/logos/client6.png "Brookhaven National Laboratory")](http://bnl.gov/) &nbsp;&nbsp;&nbsp; [![New Relic Synthetics](https://redisson.org/assets/logos/client3.png "New Relic Synthetics")](http://newrelic.com/synthetics) &nbsp;&nbsp;&nbsp; [![Netflix](https://redisson.org/assets/logos/client10.png "Netflix")](https://netflix.com/) &nbsp;&nbsp;&nbsp; [![Personal Capital](https://redisson.org/assets/logos/client26.png "Personal Capital")](https://www.personalcapital.com) [![Singtel](https://redisson.org/assets/logos/client5.png "New Relic Synthetics")](http://singtel.com/) &nbsp;&nbsp;&nbsp; [![Baidu](https://redisson.org/assets/logos/client2.png "Baidu")](http://baidu.com/) &nbsp;&nbsp;&nbsp; [![Infor](https://redisson.org/assets/logos/client4.png "Infor")](http://www.infor.com/) &nbsp;&nbsp;&nbsp; [![Crimson Hexagon](https://redisson.org/assets/logos/client7.png "Crimson Hexagon")](https://www.crimsonhexagon.com/) &nbsp;&nbsp;&nbsp; [![ContaAzul](https://redisson.org/assets/logos/client18.png "ContaAzul")](https://contaazul.com/)&nbsp;&nbsp;&nbsp; [![马蜂窝](https://redisson.org/assets/logos/client33.png "马蜂窝")](http://www.mafengwo.cn/) [![Datorama](https://redisson.org/assets/logos/client8.png "Datorama")](https://datorama.com/)&nbsp;&nbsp;&nbsp; [![Ticketmaster](https://redisson.org/assets/logos/client14.png "Ticketmaster")](http://www.ticketmaster.com/)&nbsp;&nbsp;&nbsp; [![NAB](https://redisson.org/assets/logos/client11.png "NAB")](https://www.nab.com.au/)&nbsp;&nbsp;&nbsp; [![Juniper](https://redisson.org/assets/logos/client31.png "Juniper")](https://www.juniper.net/)&nbsp;&nbsp;&nbsp; [![火币](https://redisson.org/assets/logos/client32.png "火币")](https://www.huobi.com/)&nbsp;&nbsp;&nbsp; [![Alibaba](https://redisson.org/assets/logos/client19.png "Alibaba")](http://www.alibaba-inc.com)&nbsp;&nbsp;&nbsp; [![Flipkart](https://redisson.org/assets/logos/client21.png "Flipkart")](https://www.flipkart.com/)&nbsp;&nbsp;&nbsp; [![Invaluable](https://redisson.org/assets/logos/client13.png "Invaluable")](http://www.invaluable.com/)&nbsp;&nbsp;&nbsp; [![BBK](https://redisson.org/assets/logos/client22.png "BBK")](http://www.gdbbk.com/) [![SULAKE](https://redisson.org/assets/logos/client17.png "SULAKE")](http://www.sulake.com/) <sub>Logos, product names and all other trademarks displayed on this page belong to their respective holders and used for identification purposes only. Use of these trademarks, names and brands does not imply endorsement.</sub> --> ## Comparing solutions ### [Redisson vs Jedis](https://redisson.org/feature-comparison-redisson-vs-jedis.html) ### [Redisson vs Lettuce](https://redisson.org/feature-comparison-redisson-vs-lettuce.html) ### [Redis vs Apache Ignite](https://redisson.org/feature-comparison-redis-vs-ignite.html) ### [Redis vs Hazelcast](https://redisson.org/feature-comparison-redis-vs-hazelcast.html) ### [Redis vs Ehcache](https://redisson.org/feature-comparison-redis-vs-ehcache.html) ## Success stories ### [Moving from Hazelcast to Redis / Datorama](https://engineering.datorama.com/moving-from-hazelcast-to-redis-b90a0769d1cb) ### [Migrating from Hazelcast to Redis / Halodoc](https://blogs.halodoc.io/why-and-how-we-move-from-hazelcast-to-redis-2/) ### [Distributed Locking with Redis (Migration from Hazelcast) / ContaAzul](https://carlosbecker.com/posts/distributed-locks-redis/) ### [Migrating from Coherence to Redis](https://www.youtube.com/watch?v=JF5R2ucKTEg) ## Quick start #### Maven <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.28.0</version> </dependency> #### Gradle compile 'org.redisson:redisson:3.28.0' #### SBT libraryDependencies += "org.redisson" % "redisson" % "3.28.0" #### Java ```java // 1. Create config object Config config = new Config(); config.useClusterServers() // use "rediss://" for SSL connection .addNodeAddress("redis://127.0.0.1:7181"); // or read config from file config = Config.fromYAML(new File("config-file.yaml")); ``` ```java // 2. Create Redisson instance // Sync and Async API RedissonClient redisson = Redisson.create(config); // Reactive API RedissonReactiveClient redissonReactive = redisson.reactive(); // RxJava3 API RedissonRxClient redissonRx = redisson.rxJava(); ``` ```java // 3. Get Redis based implementation of java.util.concurrent.ConcurrentMap RMap<MyKey, MyValue> map = redisson.getMap("myMap"); RMapReactive<MyKey, MyValue> mapReactive = redissonReactive.getMap("myMap"); RMapRx<MyKey, MyValue> mapRx = redissonRx.getMap("myMap"); ``` ```java // 4. Get Redis based implementation of java.util.concurrent.locks.Lock RLock lock = redisson.getLock("myLock"); RLockReactive lockReactive = redissonReactive.getLock("myLock"); RLockRx lockRx = redissonRx.getLock("myLock"); ``` ```java // 4. Get Redis based implementation of java.util.concurrent.ExecutorService RExecutorService executor = redisson.getExecutorService("myExecutorService"); // over 50 Redis based Java objects and services ... ``` Upgrade to __[Redisson PRO](https://redisson.pro)__ with **advanced features**. ## Downloads [Redisson 3.28.0](https://repo1.maven.org/maven2/org/redisson/redisson/3.28.0/redisson-3.28.0.jar), [Redisson node 3.28.0](https://repo1.maven.org/maven2/org/redisson/redisson-all/3.28.0/redisson-all-3.28.0.jar) ## FAQs [Q: What is the cause of RedisTimeoutException?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-what-is-the-cause-of-redistimeoutexception) [Q: When do I need to shut down a Redisson instance, at the end of each request or the end of the life of a thread?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-when-do-i-need-to-shut-down-a-redisson-instance-at-the-end-of-each-request-or-the-end-of-the-life-of-a-thread) [Q: In MapCache/SetCache/SpringCache/JCache, I have set an expiry time to an entry, why is it still in Redis when it should be disappeared?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-in-mapcachesetcachespringcachejcache-i-have-set-an-expiry-time-to-an-entry-why-is-it-still-in-redis-when-it-should-be-disappeared) [Q: How can I perform Pipelining/Transaction through Redisson?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-how-can-i-perform-pipeliningtransaction-through-redisson) [Q: Is Redisson thread safe? Can I share an instance of it between different threads?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-is-redisson-thread-safe-can-i-share-an-instance-of-it-between-different-threads) [Q: Can I use different encoder/decoders for different tasks?](https://github.com/redisson/redisson/wiki/16.-FAQ#q-can-i-use-different-encoderdecoders-for-different-tasks)
0
krahets/LeetCode-Book
《剑指 Offer》 Python, Java, C++ 解题代码,LeetBook《图解算法数据结构》配套代码仓
algorithm algorithms algorithms-and-data-structures data-structure data-structures java leetcode leetcode-cpp leetcode-java leetcode-python python sword-for-offer
<p align="center"> <a href="https://leetcode-cn.com/leetbook/detail/illustration-of-algorithm/"> <img src="https://pic.leetcode-cn.com/1599187248-gDiWnC-image.png" width="490"> </a> </p> <p align="center"> <img src="https://img.shields.io/badge/LeetCode%20tests-75%20accepted-brightgreen"> <img src="https://img.shields.io/badge/Language-Python-teal"> <img src="https://img.shields.io/badge/Language-Java-orange"> <img src="https://img.shields.io/badge/Language-C++-blue"> </p> [《图解算法数据结构》](https://leetcode-cn.com/leetbook/detail/illustration-of-algorithm/)是一本面向算法初学者和互联网求职者编写的 LeetBook 手册。 - 图文详解 75 道题目,覆盖主要算法知识点。 - 题目活跃于各大互联网公司招聘中,可使笔面试准备事半功倍。 - 致力于行文深入浅出、图文搭配,提供简洁的 Python, Java, C++ 解题代码。 > [!NOTE] > > 本仓库包含“图解算法数据结构”、“Krahets 笔面试精选 88 题”和“剑指 Offer”的题解内容: > > ```python > LeetCode-Book > ├── leetbook_ioa # 《图解算法数据结构》题解和专栏文档 > ├── selected_coding_interview # 《Krahets 笔面试精选 88 题》题解文档 > └── sword_for_offer # 《剑指 Offer》题解文档、代码、刷题计划 > ``` > 若本仓库对您有所帮助,请在页面右上角点个 **Star** :star: 支持一下,谢谢! ## 如何学习算法 ### 第一步:看入门书 <p align="center" href="https://github.com/krahets/hello-algo"> <img src="https://www.hello-algo.com/index.assets/hello_algo_header.png" width="550"> </p> <p align="center"> <a href="https://github.com/krahets/hello-algo">《Hello 算法》</a> —— 动画图解、一键运行的数据结构与算法教程 </p> 此书旨在引导初学者探索数据结构与算法的知识地图,掌握刷题需要的前置知识与工具库。 > [!TIP] > 建议先读完这本书(概括且全面地了解数据结构与算法),再开始刷题(深入探索各类算法和数据结构)。 ### 第二步:刷算法题 推荐以下 LeetCode 题单: 1. [Krahets 笔面试精选 88 题](https://leetcode.cn/studyplan/selected-coding-interview/):从“剑指 Offer”和“热题 100”精选出的 88 道高频算法笔试题,适合初学者入门。 2. [图解算法数据结构](https://leetcode-cn.com/leetbook/detail/illustration-of-algorithm/)([Interview-75](https://leetcode.cn/studyplan/coding-interviews/)):题目更贴近实际应用,相较于“剑指 Offer”难度有所增加。 3. [LeetCode 热题 100](https://leetcode.cn/studyplan/top-100-liked/):力扣用户最喜爱的 100 道题。 4. [面试经典 150 题](https://leetcode.cn/studyplan/top-interview-150/):150 道经典面试力扣题。 5. [LeetCode-75](https://leetcode.cn/studyplan/leetcode-75/):精选 75 道面试核心题目。 > [!TIP] > 第 `1.` `2.` 项的题目分类与《Hello 算法》的章节内容对应,且提供 [@krahets](https://leetcode.cn/u/jyd/) 写的题解,适合作为配套习题。 对初学者刷题的一些建议: 1. 建议每日刷 2~3 题。若能轻松完成,可以尝试增加至 5~8 题。 2. 刷题的质量比数量更加重要。请确保你真正理解了每个题目的解法及背后的算法原理。 3. 建议你按照题单目录的顺序做题。如果感觉一道题很难,可以先跳过,后续再攻克。 4. 题目通常有不止一种解法,请你注意比较和探讨各种方法的特点和适用情况。 5. 如果你发现自己遗忘了题目解法,不必灰心;我们通常需要复习三次以上,才能真正掌握一个知识点。 6. 行百里者半九十。坚持至关重要,加油! ## License The texts, code, and images in this repository are licensed under [CC BY-NC-SA-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
0
whitechi73/OpenShamrock
A Bot Framework based on Lsposed with OneBot11
lsposed onebot qqbot qqnt qqprotocol tencent
<div align="center"> ![][banner] [![][actions]][actions-link] [![][releases]][releases-link] [![][downloads]][releases-link] ![][onebot-11] ![][onebot-12] [![][license]](LICENSE) [下载][download-link] | [部署][deploy-link] | [接口][api-link] | [文档][docs-link] </div> ## 简介 ☘ 基于 Lsposed(**Non**-Riru) 实现 Kritor 标准的 QQ 机器人框架! > 本项目仅提供学习与交流用途,请在24小时内删除。 > 本项目目的是研究 Xposed 和 LSPosed 框架的使用。 Epic 框架开发相关知识。 > Riru可能导致封禁,请减少使用。 > 如有违反法律,请联系删除。 > 请勿在任何平台宣传,宣扬,转发本项目,请勿恶意修改企业安装包造成相关企业产生损失,如有违背,必将追责到底。 ## 兼容|迁移|替代 说明 - 一键移植:本项目基于 go-cqhttp 的文档进行开发实现。 - 平行部署:可多平台部署。 ## 相关项目 <table> <tr> <td><a href="https://github.com/LagrangeDev/Lagrange.Core">Lagrange.Core</a></td> <td>NTQQ 的协议实现</td> </tr> <tr> <td><a href="https://github.com/whitechi73/OpenShamrock">OpenShamrock</a></td> <td>基于 Xposed 实现 OneBot 标准的机器人框架(👈你在这里</td> </tr> <tr> <td><a href="https://github.com/chrononeko/chronocat">Chronocat</a></td> <td>基于 Electron 的、模块化的 Satori 框架</td> </tr> </table> ## 权限声明 > 如出现未在此处声明的权限,请警惕 Shamrock 是否被修改/植入恶意代码 - 网络访问权限: Shamrock 进程需要使用 HTTP API 来进行一些操作 - [Hook 系统框架][hook-system]: 为了保证息屏状态下服务不被杀死,Shamrock 需要 Hook 系统框架 - 后台启动 Activity: 自动唤醒 QQ 时需要使用 ## 语音解码 请参考文档中 [语音支持][voice-support] 部分 ## 贡献说明 <img src="https://github.com/whitechi73/OpenShamrock/assets/98259561/f04d60bc-ec40-41fc-bc15-62c146f1a1f1" width="160px" alt="Shamrock"> **我可爱吗?欢迎你的到来,这里是一个很大的地方,有着无限可能,主要是有你啦!** ## 鸣谢 感谢[**JetBrains**](https://www.jetbrains.com/zh-cn/community/opensource/#support)提供的开源开发许可证,JetBrains 通过为核心项目贡献者免费提供一套一流的开发者工具来支持非商业开源项目。 [<img src=".github/jetbrains-variant-3.png" width="200"/>](https://www.jetbrains.com/zh-cn/community/opensource/#support) ## 开源协议 本项目使用 [GPL-3.0](LICENSE) 协议开放源代码 ```text Shamrock - OneBot standard QQ robot framework based on Xposed implementation Copyright (C) 2023 ~ 2024 Shamrock Team This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ``` ## 贡献者 [![][contrib-image]][contrib-link] [banner]: https://socialify.git.ci/whitechi73/OpenShamrock/image?description=1&forks=1&issues=1&logo=https%3A%2F%2Fwhitechi73.github.io%2FOpenShamrock%2Fshamrock.jpg&pattern=Plus&pulls=1&stargazers=1&theme=Auto [actions]: https://img.shields.io/github/actions/workflow/status/whitechi73/OpenShamrock/build-apk.yml?style=for-the-badge [actions-link]: https://github.com/whitechi73/OpenShamrock/actions/workflows/build-apk.yml [releases]: https://img.shields.io/github/v/release/whitechi73/OpenShamrock?style=for-the-badge [releases-link]: https://github.com/whitechi73/OpenShamrock/releases [downloads]: https://img.shields.io/github/downloads/whitechi73/OpenShamrock/total?style=for-the-badge [license]: https://img.shields.io/github/license/whitechi73/OpenShamrock?style=for-the-badge [onebot-11]: https://img.shields.io/badge/OneBot-11-black?style=for-the-badge [onebot-12]: https://img.shields.io/badge/OneBot-12-black?style=for-the-badge [download-link]: https://whitechi73.github.io/OpenShamrock/guide/getting-started.html#%E4%B8%8B%E8%BD%BD [deploy-link]: https://whitechi73.github.io/OpenShamrock/guide/getting-started.html#%E9%83%A8%E7%BD%B2 [api-link]: https://whitechi73.github.io/OpenShamrock/api [docs-link]: https://whitechi73.github.io/OpenShamrock/ [hook-system]: https://github.com/whitechi73/OpenShamrock/blob/master/xposed/src/main/java/moe/fuqiuluo/shamrock/xposed/loader/KeepAlive.kt [voice-support]: https://whitechi73.github.io/OpenShamrock/advanced/voice.html [contrib-image]: https://contrib.rocks/image?repo=whitechi73/OpenShamrock [contrib-link]: https://github.com/whitechi73/OpenShamrock/graphs/contributors
0
jeremylong/DependencyCheck
OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
ant-task build-tool gradle-plugin jenkins-plugin maven-plugin security security-audit software-composition-analysis vulnerability-detection
[![Maven Central](https://img.shields.io/maven-central/v/org.owasp/dependency-check-maven.svg)](https://mvnrepository.com/artifact/org.owasp/dependency-check-maven) [![Build and Deploy Snapshot](https://github.com/jeremylong/DependencyCheck/actions/workflows/build.yml/badge.svg)](https://github.com/jeremylong/DependencyCheck/actions/workflows/build.yml) [![Coverity Scan Build Status](https://img.shields.io/coverity/scan/1654.svg)](https://scan.coverity.com/projects/dependencycheck) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6b6021d481dc41a888c5da0d9ecf9494)](https://www.codacy.com/app/jeremylong/DependencyCheck?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jeremylong/DependencyCheck&amp;utm_campaign=Badge_Grade) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/843/badge)](https://bestpractices.coreinfrastructure.org/projects/843) [![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt) [![Black Hat Arsenal](https://raw.githubusercontent.com/toolswatch/badges/master/arsenal/usa/2018.svg?sanitize=true)](http://www.toolswatch.org/2018/05/black-hat-arsenal-usa-2018-the-w0w-lineup/) [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2015.svg)](https://www.toolswatch.org/2015/06/black-hat-arsenal-usa-2015-speakers-lineup/) [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2014.svg)](https://www.toolswatch.org/2014/06/black-hat-usa-2014-arsenal-tools-speaker-list/) [![Black Hat Arsenal](https://www.toolswatch.org/badges/arsenal/2013.svg)](https://www.toolswatch.org/2013/06/announcement-blackhat-arsenal-usa-2013-selected-tools/) # Dependency-Check Dependency-Check is a Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project's dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries. Documentation and links to production binary releases can be found on the [github pages](http://jeremylong.github.io/DependencyCheck/). Additionally, more information about the architecture and ways to extend dependency-check can be found on the [wiki]. ## 9.0.0 Upgrade Notice **Upgrading to 9.0.0 or later is mandatory**; previous versions of dependency-check utilize the NVD data feeds which will be deprecated on Dec 15th, 2023. Versions earlier then 9.0.0 are no longer supported and could fail to work after Dec 15th, 2023. ### NVD API Key Highly Recommended With 9.0.0 dependency-check has moved from using the NVD data-feed to the NVD API. Users of dependency-check are **highly** encouraged to obtain an NVD API Key; see https://nvd.nist.gov/developers/request-an-api-key Without an NVD API Key dependency-check's updates will be **extremely slow**. Please see the documentation for the cli, maven, gradle, or ant integrations on how to set the NVD API key. #### The NVD API Key, CI, and Rate Limiting The NVD API has enforced rate limits. If you are using a single API KEY and multiple builds occur you could hit the rate limit and receive 403 errors. In a CI environment one must use a caching strategy. ### Breaking Changes 9.0.0 contains breaking changes which requires updates to the database. If using an externally hosted database the schema will need to be updated. When using the embedded H2 database, the schema should be upgraded automatically. However, if issues arise you may need to purge the database: - gradle: `./gradlew dependencyCheckPurge` - maven: `mvn org.owasp:dependency-check-maven:9.0.0:purge` - cli: `dependency-check.sh --purge` #### Gradle build Environment With 9.0.0 users may encounter issues with `NoSuchMethodError` exceptions due to dependency resolution. If you encounter this issue you will need to pin some of the transitive dependencies of dependency-check to specific versions. For example: /buildSrc/build.gradle ```groovy dependencies { constraints { // org.owasp.dependencycheck needs at least this version of jackson. Other plugins pull in older versions.. add("implementation", "com.fasterxml.jackson:jackson-bom:2.16.1") // org.owasp.dependencycheck needs these versions. Other plugins pull in older versions.. add("implementation", "org.apache.commons:commons-lang3:3.14.0") add("implementation", "org.apache.commons:commons-text:1.11.0") } } ``` ## Requirements ### Java Version Minimum Java Version: Java 8 update 251 While dependency-check 9.0.0 and higher will still run on Java 8 - the update version must be higher then 251. ### Internet Access OWASP dependency-check requires access to several externally hosted resources. For more information see [Internet Access Required](https://jeremylong.github.io/DependencyCheck/data/index.html). ### Build Tools In order to analyze some technology stacks dependency-check may require other development tools to be installed. Some of the analysis listed below may be experimental and require the experimental analyzers to be enabled. 1. To analyze .NET Assemblies the dotnet 6 run time or SDK must be installed. - Assemblies targeting other run times can be analyzed - but 6 is required to run the analysis. 2. If analyzing GoLang projects `go` must be installed. 3. The analysis of `Elixir` projects requires `mix_audit`. 4. The analysis of `npm`, `pnpm`, and `yarn` projects requires `npm`, `pnpm`, or `yarn` to be installed. - The analysis performed utilize the respective `audit` feature of each. 5. The analysis of Ruby is a wrapper around `bundle-audit`, which must be installed. ## Current Releases ### Jenkins Plugin For instructions on the use of the Jenkins plugin please see the [OWASP Dependency-Check Plugin page](https://wiki.jenkins-ci.org/display/JENKINS/OWASP+Dependency-Check+Plugin). ### Command Line More detailed instructions can be found on the [dependency-check github pages](http://jeremylong.github.io/DependencyCheck/dependency-check-cli/). The latest CLI can be downloaded from github in the [releases section](https://github.com/jeremylong/DependencyCheck/releases). Downloading the latest release: ``` $ VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt) $ curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip ``` On *nix ``` $ ./bin/dependency-check.sh -h $ ./bin/dependency-check.sh --out . --scan [path to jar files to be scanned] ``` On Windows ``` > .\bin\dependency-check.bat -h > .\bin\dependency-check.bat --out . --scan [path to jar files to be scanned] ``` On Mac with [Homebrew](http://brew.sh) Note - homebrew users upgrading from 5.x to 6.0.0 will need to run `dependency-check.sh --purge`. ``` $ brew update && brew install dependency-check $ dependency-check -h $ dependency-check --out . --scan [path to jar files to be scanned] ``` ### Maven Plugin More detailed instructions can be found on the [dependency-check-maven github pages](http://jeremylong.github.io/DependencyCheck/dependency-check-maven). By default, the plugin is tied to the `verify` phase (i.e. `mvn verify`). Alternatively, one can directly invoke the plugin via `mvn org.owasp:dependency-check-maven:check`. The dependency-check plugin can be configured using the following: ```xml <project> <build> <plugins> ... <plugin> <groupId>org.owasp</groupId> <artifactId>dependency-check-maven</artifactId> <executions> <execution> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin> ... </plugins> ... </build> ... </project> ``` ### Gradle Plugin For instructions on the use of the Gradle Plugin, please see the [dependency-check-gradle github page](http://jeremylong.github.io/DependencyCheck/dependency-check-gradle). ### Ant Task For instructions on the use of the Ant Task, please see the [dependency-check-ant github page](http://jeremylong.github.io/DependencyCheck/dependency-check-ant). ## Development Prerequisites For installation to pass, you must have the following components installed: * Java: `java -version` 1.8 * Maven: `mvn -version` 3.5.0 and higher Tests cases require: * dotnet core version 6.0 * Go: `go version` 1.12 and higher * Ruby [bundler-audit](https://github.com/rubysec/bundler-audit#install) * [Yarn](https://classic.yarnpkg.com/en/docs/install/) * [pnpm](https://pnpm.io/installation) ## Development Usage The following instructions outline how to compile and use the current snapshot. While every intention is to maintain a stable snapshot it is recommended that the release versions listed above be used. The repository has some large files due to test resources. The team has tried to clean up the history as much as possible. However, it is recommended that you perform a shallow clone to save yourself time: ```bash git clone --depth 1 https://github.com/jeremylong/DependencyCheck.git ``` On *nix ``` $ mvn -s settings.xml install $ ./cli/target/release/bin/dependency-check.sh -h $ ./cli/target/release/bin/dependency-check.sh --out . --scan ./src/test/resources ``` On Windows ``` > mvn -s settings.xml install > .\cli\target\release\bin\dependency-check.bat -h > .\cli\target\release\bin\dependency-check.bat --out . --scan ./src/test/resources ``` Then load the resulting 'dependency-check-report.html' into your favorite browser. #### Building without running tests To speed up your turnaround cycle times, you can also compile without running the tests each time: `mvn -s settings.xml install -DskipTests=true` Please remember to at least run the tests once before opening the PR. :) ### IntelliJ Idea To be able to debug your tests in IntelliJ Idea, you can introduce a maven configuration that executes your test and enables debugging with breakpoints etc. Basically, you do what´s described in https://www.jetbrains.com/help/idea/work-with-tests-in-maven.html#run_single_test and set the `forkCount` to 0, otherwise debugging won´t work. Step by step: - `Run -> Edit Configurations` - `+ (Add new configuration) -> Maven` - Give the Configuration a name, e.g. `Run tests` - Choose working directory, e.g. `core` - In `command line`, enter `-DforkCount=0 -f pom.xml -s ../settings.xml test` - Press `OK` - `Run -> Debug`, then choose the newly created run configuration IntelliJ will now execute the test run for the `core` subproject with enabled debugging. Breakpoints set anywhere in code should work. #### Only test one function or one class If you would like to speed up your turnaround cycle times, you can also just test one function or one test class. This works by adding `-Dtest=MyTestClass` or `-Dtest=MyTestClass#myTestFunction` to the run configuration. The complete command line in the run configuration then would be: `-Dtest=MyTestClass#myTestFunction -DforkCount=0 -f pom.xml -s ../settings.xml test` ### Docker In the following example it is assumed that the source to be checked is in the current working directory and the reports will be written to `$(pwd)/odc-reports`. Persistent data and cache directories are used, allowing you to destroy the container after running. For Linux: ```sh #!/bin/sh DC_VERSION="latest" DC_DIRECTORY=$HOME/OWASP-Dependency-Check DC_PROJECT="dependency-check scan: $(pwd)" DATA_DIRECTORY="$DC_DIRECTORY/data" CACHE_DIRECTORY="$DC_DIRECTORY/data/cache" if [ ! -d "$DATA_DIRECTORY" ]; then echo "Initially creating persistent directory: $DATA_DIRECTORY" mkdir -p "$DATA_DIRECTORY" fi if [ ! -d "$CACHE_DIRECTORY" ]; then echo "Initially creating persistent directory: $CACHE_DIRECTORY" mkdir -p "$CACHE_DIRECTORY" fi # Make sure we are using the latest version docker pull owasp/dependency-check:$DC_VERSION docker run --rm \ -e user=$USER \ -u $(id -u ${USER}):$(id -g ${USER}) \ --volume $(pwd):/src:z \ --volume "$DATA_DIRECTORY":/usr/share/dependency-check/data:z \ --volume $(pwd)/odc-reports:/report:z \ owasp/dependency-check:$DC_VERSION \ --scan /src \ --format "ALL" \ --project "$DC_PROJECT" \ --out /report # Use suppression like this: (where /src == $pwd) # --suppression "/src/security/dependency-check-suppression.xml" ``` For Windows: ```bat @echo off set DC_VERSION="latest" set DC_DIRECTORY=%USERPROFILE%\OWASP-Dependency-Check SET DC_PROJECT="dependency-check scan: %CD%" set DATA_DIRECTORY="%DC_DIRECTORY%\data" set CACHE_DIRECTORY="%DC_DIRECTORY%\data\cache" IF NOT EXIST %DATA_DIRECTORY% ( echo Initially creating persistent directory: %DATA_DIRECTORY% mkdir %DATA_DIRECTORY% ) IF NOT EXIST %CACHE_DIRECTORY% ( echo Initially creating persistent directory: %CACHE_DIRECTORY% mkdir %CACHE_DIRECTORY% ) rem Make sure we are using the latest version docker pull owasp/dependency-check:%DC_VERSION% docker run --rm ^ --volume %CD%:/src ^ --volume %DATA_DIRECTORY%:/usr/share/dependency-check/data ^ --volume %CD%/odc-reports:/report ^ owasp/dependency-check:%DC_VERSION% ^ --scan /src ^ --format "ALL" ^ --project "%DC_PROJECT%" ^ --out /report rem Use suppression like this: (where /src == %CD%) rem --suppression "/src/security/dependency-check-suppression.xml" ``` Building From Source -------------------- To build dependency-check (using Java 8) run the command: ``` mvn -s settings.xml install ``` Running dependency-check on dependency-check -------------------------------------------- Dependency-check references several vulnerable dependencies that are never used except as test resources. All of these optional test dependencies are included in the `test-dependencies` profile. To run dependency-check against itself simple exclude the `test-dependencies` profile: ```shell mvn org.owasp:dependency-check-maven:aggregate -P-test-dependencies -DskipProvidedScope=true ``` Building the documentation -------------------------- The documentation on the [github pages](http://jeremylong.github.io/DependencyCheck/) is generated from this repository: mvn -s settings.xml site site:staging Once done, point your browser to `./target/staging/index.html`. Building The Docker Image ------------------------- To build dependency-check docker image run the command: ``` mvn -s settings.xml install ./build-docker.sh ``` License ------- Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the [LICENSE.txt](https://raw.githubusercontent.com/jeremylong/DependencyCheck/main/LICENSE.txt) file for the full license. Dependency-Check makes use of several other open source libraries. Please see the [NOTICE.txt][notices] file for more information. This product uses the NVD API but is not endorsed or certified by the NVD. Copyright (c) 2012-2024 Jeremy Long. All Rights Reserved. [wiki]: https://github.com/jeremylong/DependencyCheck/wiki [notices]: https://github.com/jeremylong/DependencyCheck/blob/main/NOTICE.txt
0
komoot/photon
an open source geocoder for openstreetmap data
elasticsearch geocoder geocoding java openstreetmap photon reverse-geocoding search
# photon [![Continuous Integration](https://github.com/komoot/photon/workflows/CI/badge.svg)](https://github.com/komoot/photon/actions) _photon_ is an open source geocoder built for [OpenStreetMap](https://openstreetmap.org) data. It is based on [elasticsearch](http://elasticsearch.org/) - an efficient, powerful and highly scalable search platform. _photon_ was started by [komoot](http://www.komoot.de) and provides search-as-you-type and multilingual support. Find our public API and demo on [photon.komoot.io](http://photon.komoot.io). Until October 2020 the API was available under photon.komoot.**de**. Please update your apps accordingly. ### Contribution All code contributions and bug reports are welcome! For questions please send an email to our [mailing list](https://lists.openstreetmap.org/listinfo/photon). Feel free to test and participate! ### Licence photon software is open source and licensed under [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0) ### Features - high performance - highly scalability - search-as-you-type - multilingual search - location bias - typo tolerance - filter by osm tag and value - filter by bounding box - reverse geocode a coordinate to an address - OSM data import (built upon [Nominatim](https://nominatim.org)) inclusive continuous updates ### Installation photon requires Java, at least version 11. Download the search index (72G GB compressed, 159GB uncompressed as of 2023-10-26, worldwide coverage, languages: English, German, French and local name). The search index is updated weekly and thankfully provided by [GraphHopper](https://www.graphhopper.com/) with the support of [lonvia](https://github.com/lonvia). Now get the latest version of photon from [the releases](https://github.com/komoot/photon/releases). Make sure you have bzip2 or pbzip2 installed and execute one of these two commands in your shell. This will download, uncompress and extract the huge database in one step: ```bash wget -O - https://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x # you can significantly speed up extracting using pbzip2 (recommended): wget -O - https://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | pbzip2 -cd | tar x ``` ### Building photon uses [gradle](https://gradle.org) for building. To build the package from source make sure you have a JDK installed. Then run: ``` ./gradlew build ``` This will build and test photon. The final jar cn be found in `build/libs`. ### Usage Start photon with the following command: ```bash java -jar photon-*.jar ``` Use the `-data-dir` option to point to the parent directory of `photon_data` if that directory is not in the default location `./photon_data`. Before you can send requests to photon, ElasticSearch needs to load some data into memory so be patient for a few seconds. Check the URL `http://localhost:2322/api?q=berlin` to see if photon is running without problems. You may want to use our [leaflet plugin](https://github.com/komoot/leaflet.photon) to see the results on a map. To enable CORS (cross-site requests), use `-cors-any` to allow any origin or `-cors-origin` with a specific origin as the argument. By default, CORS support is disabled. Discover more of photon's featurse with its usage `java -jar photon-*.jar -h`. The available options are as follows: ``` -h Show help / usage -cluster Name of elasticsearch cluster to put the server into (default is 'photon') -transport-addresses The comma separated addresses of external elasticsearch nodes where the client can connect to (default is an empty string which forces an internal node to start) -nominatim-import Import nominatim database into photon (this will delete previous index) -nominatim-update Fetch updates from nominatim database into photon and exit (this updates the index only without offering an API) -languages Languages nominatim importer should import and use at run-time, comma separated (default is 'en,fr,de,it') -default-language Language to return results in when no explicit language is choosen by the user -country-codes Country codes filter that nominatim importer should import, comma separated. If empty full planet is done -extra-tags Comma-separated list of additional tags to save for each place -synonym-file File with synonym and classification terms -json Import nominatim database and dump it to a json like files in (useful for developing) -host Postgres host (default 127.0.0.1) -port Postgres port (default 5432) -database Postgres host (default nominatim) -user Postgres user (default nominatim) -password Postgres password (default '') -data-dir Data directory (default '.') -listen-port Listen to port (default 2322) -listen-ip Listen to address (default '0.0.0.0') -cors-any Enable cross-site resource sharing for any origin (default CORS not supported) -cors-origin Enable cross-site resource sharing for the specified origin (default CORS not supported) -enable-update-api Enable the additional endpoint /nominatim-update, which allows to trigger updates from a nominatim database ``` ### Customized Search Data If you need search data in other languages or restricted to a country you will need to create your search data by your own. Once you have your [Nominatim](https://nominatim.org) database ready, you can import the data to photon. If you haven't already set a password for your Nominatim database user, do it now (change user name and password as you like, below): ```bash su postgres psql ALTER USER nominatim WITH ENCRYPTED PASSWORD 'mysecretpassword'; ``` Import the data to photon: ```bash java -jar photon-*.jar -nominatim-import -host localhost -port 5432 -database nominatim -user nominatim -password mysecretpassword -languages es,fr ``` The import of worldwide data set will take some hours/days, SSD/NVME disks are recommended to accelerate Nominatim queries. #### Updating from OSM via Nominatim To update an existing Photon database from Nominatim, first prepare the Nominatim database with the appropriate triggers: ```bash java -jar photon-*.jar -database nominatim -user nominatim -password ... -nominatim-update-init-for update_user ``` This script must be run with a user that has the right to create tables, functions and triggers. 'update-user' is the PostgreSQL user that will be used when updating the Photon database. The user needs read rights on the database. The necessary update rights will be granted during initialisation. Now you can run updates on Nominatim using the usual methods as described in the [documentation](https://nominatim.org/release-docs/latest/admin/Update/). To bring the Photon database up-to-date, stop the Nominatim updates and then run the Photon update process: ```bash java -jar photon-*.jar -database nominatim -user nominatim -password ... -nominatim-update ``` You can also run the photon process with the update API enabled: ```bash java -jar photon-*.jar -enable-update-api -database nominatim -user nominatim -password ... ``` Then you can trigger updates like this: ```bash curl http://localhost:2322/nominatim-update ``` This will only start the updates. To check if the updates have finished, use the status API: ```bash curl http://localhost:2322/nominatim-update/status ``` It returns a single JSON string `"BUSY"` when updates are in progress or `"OK"` when another update round can be started. For your convenience, this repository contains a script to continuously update both Nominatim and Photon using Photon's update API. Make sure you have Photon started with `-enable-update-api` and then run: ```bash export NOMINATIM_DIR=/srv/nominatim/... ./continuously_update_from_nominatim.sh ``` where `NOMINATIM_DIR` is the project directory of your Nominatim installation. ### Search API #### Search ``` http://localhost:2322/api?q=berlin ``` #### Search with Location Bias ``` http://localhost:2322/api?q=berlin&lon=10&lat=52 ``` There are two optional parameters to influence the location bias. 'zoom' describes the radius around the center to focus on. This is a number that should correspond roughly to the map zoom parameter of a corresponding map. The default is `zoom=16`. The `location_bias_scale` describes how much the prominence of a result should still be taken into account. Sensible values go from 0.0 (ignore prominence almost completely) to 1.0 (prominence has approximately the same influence). The default is 0.2. ``` http://localhost:2322/api?q=berlin&lon=10&lat=52&zoom=12&location_bias_scale=0.1 ``` #### Reverse geocode a coordinate ``` http://localhost:2322/reverse?lon=10&lat=52 ``` #### Adapt Number of Results ``` http://localhost:2322/api?q=berlin&limit=2 ``` #### Adjust Language ``` http://localhost:2322/api?q=berlin&lang=it ``` #### Filter results by bounding box Expected format is minLon,minLat,maxLon,maxLat. ``` http://localhost:2322/api?q=berlin&bbox=9.5,51.5,11.5,53.5 ``` #### Filter results by [tags and values](https://taginfo.openstreetmap.org/projects/nominatim#tags) _Note: the filter only works on principal OSM tags and not all OSM tag/value combinations can be searched. The actual list depends on the import style used for the Nominatim database (e.g. [settings/import-full.style](https://github.com/osm-search/Nominatim/blob/master/settings/import-full.style)). All tag/value combinations with a property 'main' are included in the photon database._ If one or many query parameters named `osm_tag` are present, photon will attempt to filter results by those tags. In general, here is the expected format (syntax) for the value of osm_tag request parameters. 1. Include places with tag: `osm_tag=key:value` 2. Exclude places with tag: `osm_tag=!key:value` 3. Include places with tag key: `osm_tag=key` 4. Include places with tag value: `osm_tag=:value` 5. Exclude places with tag key: `osm_tag=!key` 6. Exclude places with tag value: `osm_tag=:!value` For example, to search for all places named `berlin` with tag of `tourism=museum`, one should construct url as follows: ``` http://localhost:2322/api?q=berlin&osm_tag=tourism:museum ``` Or, just by they key ``` http://localhost:2322/api?q=berlin&osm_tag=tourism ``` You can also use this feature for reverse geocoding. Want to see the 5 pharmacies closest to a location ? ``` http://localhost:2322/reverse?lon=10&lat=52&osm_tag=amenity:pharmacy&limit=5 ``` #### Filter results by layer List of available layers: - house - street - locality - district - city - county - state - country ``` http://localhost:2322/api?q=berlin&layer=city&layer=locality ``` Example above will return both cities and localities. #### Results as GeoJSON ```json { "features": [ { "properties": { "name": "Berlin", "state": "Berlin", "country": "Germany", "countrycode": "DE", "osm_key": "place", "osm_value": "city", "osm_type": "N", "osm_id": 240109189 }, "type": "Feature", "geometry": { "type": "Point", "coordinates": [13.3888599, 52.5170365] } }, { "properties": { "name": "Berlin Olympic Stadium", "street": "Olympischer Platz", "housenumber": "3", "postcode": "14053", "state": "Berlin", "country": "Germany", "countrycode": "DE", "osm_key": "leisure", "osm_value": "stadium", "osm_type": "W", "osm_id": 38862723, "extent": [13.23727, 52.5157151, 13.241757, 52.5135972] }, "type": "Feature", "geometry": { "type": "Point", "coordinates": [13.239514674078611, 52.51467945] } } ] } ``` ### Related Projects - photon's search configuration was developed with a specific test framework. It is written in Python and [hosted separately](https://github.com/yohanboniface/osm-geocoding-tester). - [R package](https://github.com/rCarto/photon) to access photon's public API with [R](https://www.r-project.org/) - [PHP Geocoder provider](https://github.com/geocoder-php/photon-provider) to access photon's public API with PHP using the [GeoCoder Package](https://github.com/geocoder-php/Geocoder)
0
sparrowwallet/sparrow
Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
bitcoin bitcoin-wallet
# Sparrow Bitcoin Wallet Sparrow is a modern desktop Bitcoin wallet application supporting most hardware wallets and built on common standards such as PSBT, with an emphasis on transparency and usability. More information (and release binaries) can be found at https://sparrowwallet.com. Release binaries are also available directly from [GitHub](https://github.com/sparrowwallet/sparrow/releases). ![Sparrow Wallet](https://sparrowwallet.com/assets/images/control-your-sends.png) ## Building To clone this project, use `git clone --recursive git@github.com:sparrowwallet/sparrow.git` or for those without SSH credentials: `git clone --recursive https://github.com/sparrowwallet/sparrow.git` In order to build, Sparrow requires Java 18 or higher to be installed. The release binaries are built with [Eclipse Temurin 18.0.1+10](https://github.com/adoptium/temurin18-binaries/releases/tag/jdk-18.0.1%2B10). Other packages may also be necessary to build depending on the platform. On Debian/Ubuntu systems: `sudo apt install -y rpm fakeroot binutils` The Sparrow binaries can be built from source using `./gradlew jpackage` Note that to build the Windows installer, you will need to install [WiX](https://github.com/wixtoolset/wix3/releases). When updating to the latest HEAD `git pull --recurse-submodules` The release binaries are reproducible from v1.5.0 onwards (pre codesigning and installer packaging). More detailed [instructions on reproducing the binaries](docs/reproducible.md) are provided. > Video documentation of your build process uploaded to [bitcoinbinary.org](https://bitcoinbinary.org/) is appreciated. Alternatively check the site if you wish to see if someone else already verified the provided binaries. ## Running If you prefer to run Sparrow directly from source, it can be launched from within the project directory with `./sparrow` Java 18 or higher must be installed. ## Configuration Sparrow has a number of command line options, for example to change its home folder or use testnet: ``` ./sparrow -h Usage: sparrow [options] Options: --dir, -d Path to Sparrow home folder --help, -h Show usage --level, -l Set log level Possible Values: [ERROR, WARN, INFO, DEBUG, TRACE] --network, -n Network to use Possible Values: [mainnet, testnet, regtest, signet] ``` As a fallback, the network (mainnet, testnet, regtest or signet) can also be set using an environment variable `SPARROW_NETWORK`. For example: `export SPARROW_NETWORK=testnet` A final fallback which can be useful when running the Sparrow binary is to create a file called ``network-testnet`` in the Sparrow home folder (see below) to configure the testnet network. Note that if you are connecting to an Electrum server when using testnet, that server will need to be running on testnet configuration as well. When not explicitly configured using the command line argument above, Sparrow stores its mainnet config file, log file and wallets in a home folder location appropriate to the operating system: | Platform | Location | |----------| -------- | | OSX | ~/.sparrow | | Linux | ~/.sparrow | | Windows | %APPDATA%/Sparrow | Testnet, regtest and signet configurations (along with their wallets) are stored in subfolders to allow easy switching between networks. ## Reporting Issues Please use the [Issues](https://github.com/sparrowwallet/sparrow/issues) tab above to report an issue. If possible, look in the sparrow.log file in the configuration directory for information helpful in debugging. ## License Sparrow is licensed under the Apache 2 software licence. ## GPG Key The Sparrow release binaries here and on [sparrowwallet.com](https://sparrowwallet.com/download/) are signed using [craigraw's GPG key](https://keybase.io/craigraw): Fingerprint: D4D0D3202FC06849A257B38DE94618334C674B40 64-bit: E946 1833 4C67 4B40 ## Credit ![Yourkit](https://www.yourkit.com/images/yklogo.png) Sparrow Wallet uses the [Yourkit Java Profiler](https://www.yourkit.com/java/profiler/) to profile and improve performance. YourKit supports open source projects with useful tools for monitoring and profiling Java and .NET applications.
0
spring-projects/spring-boot
Spring Boot
framework java spring spring-boot
null
0
eugenp/tutorials
Just Announced - Learn Spring Security OAuth": "
null
# Cloning the repository If you are getting an error while cloning the repository, try running: git config --global http.postBuffer 5000000 This will increase the size of the buffer from the default 1MiB to 5MiB. To revert this value to the default, use: git config --global http.postBuffer 1000000 The Courses ============================== Here's the new "Learn Spring" course: <br/> **[>> LEARN SPRING - THE MASTER CLASS](https://www.baeldung.com/learn-spring-course?utm_source=github&utm_medium=social&utm_content=tutorials&utm_campaign=ls#master-class)** Here's the Master Class of "REST With Spring" (along with the new announced Boot 2 material): <br/> **[>> THE REST WITH SPRING - MASTER CLASS](https://www.baeldung.com/rest-with-spring-course?utm_source=github&utm_medium=social&utm_content=tutorials&utm_campaign=rws#master-class)** And here's the Master Class of "Learn Spring Security": <br/> **[>> LEARN SPRING SECURITY - MASTER CLASS](https://www.baeldung.com/learn-spring-security-course?utm_source=github&utm_medium=social&utm_content=tutorials&utm_campaign=lss#master-class)** Java and Spring Tutorials ================ This project is **a collection of small and focused tutorials** - each covering a single and well defined area of development in the Java ecosystem. A strong focus of these is, of course, the Spring Framework - Spring, Spring Boot and Spring Security. In addition to Spring, the modules here cover a number of aspects of Java. Profile based segregation ==================== We are using maven build profiles to segregate the huge list of individual projects we have in our repository. As for now, vast majority of the modules require JDK8 to build and run correctly. The projects are broadly divided into 3 lists: first, second and heavy. Next, they are segregated further on the basis of the tests that we want to execute. Additionally, there are 2 profiles dedicated for JDK9 and above builds - **which require JDK 17**. We also have a parents profile to build only parent modules. Therefore, we have a total of 9 profiles: | Profile | Includes | Type of test enabled | | -------------------------- | --------------------------- | -------------------- | | default-first | First set of projects | *UnitTest | | integration-lite-first | First set of projects | *IntegrationTest | | default-second | Second set of projects | *UnitTest | | integration-lite-second | Second set of projects | *IntegrationTest | | default-heavy | Heavy/long running projects | *UnitTest | | integration-heavy | Heavy/long running projects | *IntegrationTest | | default-jdk9-and-above | JDK9 and above projects | *UnitTest | | integration-jdk9-and-above | JDK9 and above projects | *IntegrationTest | | parents | Set of parent modules | None | Building the project ==================== Though it should not be needed often to build the entire repository at once because we are usually concerned with a specific module. But if we want to, we can invoke the below command from the root of the repository if we want to build the entire repository with only Unit Tests enabled: `mvn clean install -Pdefault-first,default-second,default-heavy` or if we want to build the entire repository with Integration Tests enabled, we can do: `mvn clean install -Pintegration-lite-first,integration-lite-second,integration-heavy` Analogously, for the JDK9 and above projects the commands are: `mvn clean install -Pdefault-jdk9-and-above` and `mvn clean install -Pintegration-jdk9-and-above` Building a single module ==================== To build a specific module, run the command: `mvn clean install` in the module directory. It can happen that your module is part of a parent module e.g. `parent-boot-1`,`parent-spring-5` etc, then you will need to build the parent module first so that you can build your module. We have created a `parents` profile that you can use to build just the parent modules, just run the profile as: `mvn clean install -Pparents` Building modules from the root of the repository ==================== To build specific modules from the root of the repository, run the command: `mvn clean install --pl asm,atomikos -Pdefault-first` in the root directory. Here `asm` and `atomikos` are the modules that we want to build and `default-first` is the maven profile in which these modules are present. Running a Spring Boot module ==================== To run a Spring Boot module, run the command: `mvn spring-boot:run` in the module directory. Working with the IDE ==================== This repo contains a large number of modules. When you're working with an individual module, there's no need to import all of them (or build all of them) - you can simply import that particular module in either Eclipse or IntelliJ. Running Tests ============= The command `mvn clean install` from within a module will run the unit tests in that module. For Spring modules this will also run the `SpringContextTest` if present. To run the integration tests, use the command: `mvn clean install -Pintegration-lite-first` or `mvn clean install -Pintegration-lite-second` or `mvn clean install -Pintegration-heavy` or `mvn clean install -Pintegration-jdk9-and-above` depending on the list where our module exists
0
OpenLineage/OpenLineage
An Open Standard for lineage metadata collection
null
<div align="center"> <img src="./doc/openlineage-logo.png" width="375px" /> <a href="https://lfaidata.foundation/projects"> <img src="./doc/lfaidata-project-badge-sandbox-black.png" width="115px" /> </a> </div> ## Badges [![CircleCI](https://circleci.com/gh/OpenLineage/OpenLineage/tree/main.svg?style=shield)](https://circleci.com/gh/OpenLineage/OpenLineage/tree/main) [![status](https://img.shields.io/badge/status-active-brightgreen.svg)](#status) [![Slack](https://img.shields.io/badge/slack-chat-blue.svg)](http://bit.ly/OpenLineageSlack) [![license](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](https://github.com/OpenLineage/OpenLineage/blob/main/LICENSE) [![maven](https://img.shields.io/maven-central/v/io.openlineage/openlineage-java.svg)](https://search.maven.org/search?q=g:io.openlineage) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4888/badge)](https://bestpractices.coreinfrastructure.org/projects/4888) ## Overview OpenLineage is an Open standard for metadata and lineage collection designed to instrument jobs as they are running. It defines a generic model of run, job, and dataset entities identified using consistent naming strategies. The core lineage model is extensible by defining specific facets to enrich those entities. ## Status OpenLineage is an [LF AI & Data Foundation](https://lfaidata.foundation/projects/openlineage) incubation project under active development, and we'd love your help! ## Problem ### Before - Duplication of effort: each project has to instrument all jobs - Integrations are external and can break with new versions ![Before OpenLineage](doc/before-ol.svg) ### With OpenLineage - Effort of integration is shared - Integration can be pushed in each project: no need to play catch up ![With OpenLineage](doc/with-ol.svg) ## Scope OpenLineage defines the metadata for running jobs and the corresponding events. A configurable backend allows the user to choose what protocol to send the events to. ![Scope](doc/scope.svg) ## Core model ![Model](doc/datamodel.svg) A facet is an atomic piece of metadata attached to one of the core entities. See the spec for more details. ## Spec The [specification](spec/OpenLineage.md) is defined using OpenAPI and allows extension through custom facets. ## Integration matrix The OpenLineage repository contains integrations with several systems. | Name| Table-level lineage| Column-level lineage | | ----| ------------------ | -------------------- | |[Apache Spark](https://github.com/OpenLineage/OpenLineage/tree/main/integration/spark)| :white_check_mark: | :white_check_mark:<sup>1</sup> | |[Apache Airflow](https://github.com/OpenLineage/OpenLineage/tree/main/integration/airflow)| :white_check_mark: | :white_check_mark:<sup>2</sup> | |[Dagster](https://github.com/OpenLineage/OpenLineage/tree/main/integration/dagster)| :white_check_mark: | :x: | |[dbt](https://github.com/OpenLineage/OpenLineage/tree/main/integration/dbt) |:white_check_mark: | :x: | |[Flink](https://github.com/OpenLineage/OpenLineage/tree/main/integration/flink)|:white_check_mark: | :x: | 1. Does not support `SELECT *` queries with JDBC. 2. Supports SQL-based operators other than BigQuery. ## Related projects - [Marquez](https://marquezproject.ai/): Marquez is an [LF AI & DATA](https://lfaidata.foundation/) project to collect, aggregate, and visualize a data ecosystem's metadata. It is the reference implementation of the OpenLineage API. - [OpenLineage collection implementation](https://github.com/MarquezProject/marquez/blob/main/api/src/main/java/marquez/api/OpenLineageResource.java) - [Egeria](https://egeria.odpi.org/): Egeria offers open metadata and governance for enterprises - automatically capturing, managing and exchanging metadata between tools and platforms, no matter the vendor. ## Community - Website: [openlineage.io](http://openlineage.io) - Slack: [OpenLineage.slack.com](http://bit.ly/OpenLineageSlack) - Not a member? Join [here](https://bit.ly/lineageslack). - Twitter: [@OpenLineage](https://twitter.com/OpenLineage) - Mailing list: [openlineage-tsc](https://lists.lfaidata.foundation/g/openlineage-tsc) - Wiki: [OpenLineage+Home](https://wiki.lfaidata.foundation/display/OpenLineage/OpenLineage+Home) - LinkedIn: [13927795](https://www.linkedin.com/groups/13927795/) - YouTube: [channel](https://www.youtube.com/channel/UCRMLy4AaSw_ka-gNV9nl7VQ) - Mastodon: [@openlineage@fostodon.org](openlineage@fosstodon.org) ## Talks - [Data+AI Summit June 2023. Cross-Platform Data Lineage with OpenLineage](https://www.databricks.com/dataaisummit/session/cross-platform-data-lineage-openlineage/) - [Berlin Buzzwords June 2023. Column-Level Lineage is Coming to the Rescue](https://youtu.be/xFVSZCCbZlY) - [Berlin Buzzwords June 2022. Cross-Platform Data Lineage with OpenLineage](https://www.youtube.com/watch?v=pLBVGIPuwEo) - [Berlin Buzzwords June 2021. Observability for Data Pipelines with OpenLineage](https://2021.berlinbuzzwords.de/member/julien-le-dem) - [Data Driven NYC February 2021. Data Observability and Pipelines: OpenLineage and Marquez](https://mattturck.com/datakin/) - [Big Data Technology Warsaw Summit February 2021. Data lineage and Observability with Marquez and OpenLineage](https://bigdatatechwarsaw.eu/edition-2021/) - [Metadata Day 2020. OpenLineage Lightning Talk](https://www.youtube.com/watch?v=anlV5Er_BpM) - [Open Core Summit 2020. Observability for Data Pipelines: OpenLineage Project Launch](https://www.coss.community/coss/ocs-2020-breakout-julien-le-dem-3eh4) ## Contributing See [CONTRIBUTING.md](https://github.com/OpenLineage/OpenLineage/blob/main/CONTRIBUTING.md) for more details about how to contribute. ## Report a Vulnerability If you discover a vulnerability in the project, please [open an issue](https://github.com/OpenLineage/OpenLineage/issues/new/choose) and attach the "security" label. ---- SPDX-License-Identifier: Apache-2.0\ Copyright 2018-2023 contributors to the OpenLineage project
0
conductor-oss/conductor
Conductor is an event driven orchestration platform
distributed-systems durable-execution grpc java javascript microservice-orchestration orchestration-engine orchestrator reactjs spring-boot workflow-automation workflow-engine workflow-management workflows
![Conductor](docs/img/logo.svg) [![Github release](https://img.shields.io/github/v/release/conductor-oss/conductor.svg)](https://GitHub.com/Netflix/conductor-oss/releases) [![License](https://img.shields.io/github/license/conductor-oss/conductor.svg)](http://www.apache.org/licenses/LICENSE-2.0) Conductor is a platform _originally_ created at Netflix to orchestrate microservices and events. Conductor OSS is maintained by the team of developers at [Orkes](https://orkes.io/) along with the members of the open source community. ## Conductor OSS This is the new home for the Conductor open source going forward (previously hosted at Netflix/Conductor). > [!IMPORTANT] > Going forward, all the bug fixes, feature requests and security patches will be applied and released from this repository. The last published version of Netflix Conductor will be **3.15.0** which we will continue to support. If you would like to participate in the roadmap and development, [please reach out](https://forms.gle/P2i1xHrxPQLrjzTB7). ## ⭐ This repository Show support for the Conductor OSS. Please help spread the awareness by starring this repo. [![GitHub stars](https://img.shields.io/github/stars/conductor-oss/conductor.svg?style=social&label=Star&maxAge=)](https://GitHub.com/conductor-oss/conductor/) ## Update your local forks/clones Please update your forks to point to this repo. This will ensure your commits and PRs can be send against this repository ```shell git remote set-url origin https://github.com/conductor-oss/conductor ``` > [!IMPORTANT] > **Follow the steps below if you have an active PR against the Netflix/Conductor repository** > 1. Fork **this** repository > 2. Update your local repository to change the remote to this repository > 3. Send a PR against the `main` branch ## Releases The latest version is [![Github release](https://img.shields.io/github/v/release/conductor-oss/conductor.svg)](https://GitHub.com/conductor-oss/conductor/releases) ## Resources #### [Slack Community](https://join.slack.com/t/orkes-conductor/shared_invite/zt-xyxqyseb-YZ3hwwAgHJH97bsrYRnSZg) We have an active [community](https://join.slack.com/t/orkes-conductor/shared_invite/zt-xyxqyseb-YZ3hwwAgHJH97bsrYRnSZg) of Conductor users and contributors on the channel. #### [Documentation Site](https://docs.conductor-oss.org/) [Documentation](https://docs.conductor-oss.org/) and tutorial on how to use Conductor [Discussion Forum](https://github.com/conductor-oss/conductor/discussions): Please use the forum for questions and discussing ideas and join the community. ### Conductor SDKs Conductor supports creating workflows using JSON and Code. SDK support for creating workflows using code is available in multiple languages and can be found at https://github.com/conductor-sdk ## Getting Started - Building & Running Conductor ### From Source: If you wish to build your own distribution, you can run ```./gradlew build``` from this project that products the runtime artifacts. The runnable server is in server/ module. ### Using Docker (Recommended) Follow the steps below to launch the docker container: ```shell docker compose -f docker/docker-compose.yaml up ``` * Navigate to http://localhost:5000 once the container starts to launch UI. * APIs are accessible at http://localhost:8080 * Swagger Docs:http://localhost:8080/swagger-ui/index.html?configUrl=/api-docs/swagger-config#/ ## Database Requirements * The default persistence used is Redis * The indexing backend is [Elasticsearch](https://www.elastic.co/) (6.x) ## Other Requirements * JDK 17+ * UI requires Node 14 to build. Earlier Node versions may work but are untested. ## Get Support There are several ways to get in touch with us: * [Slack Community](https://join.slack.com/t/orkes-conductor/shared_invite/zt-xyxqyseb-YZ3hwwAgHJH97bsrYRnSZg) ## Contributors <a href="https://github.com/conductor-oss/conductor/graphs/contributors"> <img src="https://contrib.rocks/image?repo=conductor-oss/conductor" /> </a>
0
HoneyNeutrons/RecyclerViewUndoSwipe
Swipe and drag support for RecyclerView with undo action.
null
# RecyclerViewUndoSwipe Native ItemTouch helper swipe and drag support for RecyclerView with undo action just like in "Do It" app. ![Alt text](http://imgur.com/R91UJql.gif "Optional title") You can download "Do It" app on Google Play: <a href="https://play.google.com/store/apps/details?id=com.honeyneutrons.doit" target="_blank"> <img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60"/> </a> # Credits To: ([iPaulPro](https://github.com/iPaulPro)) - [paulburke.co](http://paulburke.co/)<br /> It's basically Paul Burke implementation with some changes. ## License Copyright 2016 Djordje Tankosic 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
flavienlaurent/NotBoringActionBar
News Stand app makes the ActionBar not boring!
null
No boring ActionBar ================== http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/ An explaination on how to implement the edition screen of the Newsstand app. - ActionBar effect - Ken Burns animation ![Example Image][1] License ----------- Copyright 2013 Flavien Laurent 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/flavienlaurent/NotBoringActionBar/master/graphics/notboringab.gif
0
richardwilly98/elasticsearch-river-mongodb
MongoDB River Plugin for ElasticSearch
null
Issue Tracker ================================== This project is maintained in the spare time of contributors and so time able to be dedicated to it is extremely limited. Please file issues only for reproducable problems. Given our limited time, we are not able to provide any help using the river and issues that simply say "things aren't working" will be closed. However, if you're able to diagnose an issue yourself we may be able to help with a fix and we are happy to review pull requests. To debug issues, try changing the log level to trace as described in [the wiki](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki). You may wish to build a custom version of the river with extra logging. MongoDB River Plugin for ElasticSearch ================================== This plugin uses MongoDB or the TokuMX fork of MongoDB as datasource to store data in ElasticSearch. Filtering and transformation are also possible. See the [wiki](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki) for more details. In order to install the plugin, simply run: ```bin/plugin --install com.github.richardwilly98.elasticsearch/elasticsearch-river-mongodb/2.0.9``` Note that you must be using MongoDB replica sets since this river tails the oplog. | MongoDB River Plugin | ElasticSearch | MongoDB | TokuMX | |--------------------------|------------------|---------------|---------------| | master | 1.7.3 | 3.0.0 | 1.5.1 | | 2.0.9 | 1.4.2 | 3.0.0 | 1.5.1 | | 2.0.5 | 1.4.2 | 2.6.6 | 1.5.1 | | 2.0.2 | 1.3.5 | 2.6.5 | 1.5.1 | | 2.0.1 | 1.2.2 | 2.4.9 -> 2.6.3| 1.5.0 | | 2.0.0 | 1.0.0 -> 1.1.1 | 2.4.9 | | | 1.7.4 | 0.90.10 | 2.4.8 | | | 1.7.3 | 0.90.7 | 2.4.8 | | | 1.7.2 | 0.90.5 | 2.4.8 | | | 1.7.1 | 0.90.5 | 2.4.6 | | | 1.7.0 | 0.90.3 | 2.4.5 | | | 1.6.11 | 0.90.2 | 2.4.5 | | | 1.6.9 | 0.90.1 | 2.4.4 | | | 1.6.8 | 0.90.0 | 2.4.3 | | | 1.6.7 | 0.90.0 | 2.4.3 | | | 1.6.6 | 0.90.0 | 2.4.3 | | Build status ------- [![Build Status](https://drone.io/github.com/richardwilly98/elasticsearch-river-mongodb/status.png)](https://drone.io/github.com/richardwilly98/elasticsearch-river-mongodb/latest) [Initial implementation](http://www.matt-reid.co.uk/blog_post.php?id=68#&slider1=4) by [aparo](https://github.com/aparo). Modified to get the same structure as the other Elasticsearch rivers (like [CouchDB](http://www.elasticsearch.org/blog/2010/09/28/the_river_searchable_couchdb.html)) The latest version monitors the oplog capped collection and supports attachment (GridFS). Configure the river using the definition described in the [wiki](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki): ```bash curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "DATABASE_NAME", "collection": "COLLECTION", "gridfs": true }, "index": { "name": "ES_INDEX_NAME", "type": "ES_TYPE_NAME" } }' ``` Example: ```bash curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "testmongo", "collection": "person" }, "index": { "name": "mongoindex", "type": "person" } }' ``` Import data from mongo console: ```bash use testmongo var p = {firstName: "John", lastName: "Doe"} db.person.save(p) ``` Query index: ```bash curl -XGET 'http://localhost:9200/mongoindex/_search?q=firstName:John' ``` ```bash curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "testmongo", "collection": "fs", "gridfs": true }, "index": { "name": "mongoindex", "type": "files" } }' ``` Import binary content in mongo: ``` %MONGO_HOME%\bin>mongofiles.exe --host localhost:27017 --db testmongo --collection fs put test-document-2.pdf connected to: localhost:27017 added file: { _id: ObjectId('4f230588a7da6e94984d88a1'), filename: "test-document-2.pdf", chunkSize: 262144, uploadDate: new Date(1327695240206), md5: "c2f251205576566826f86cd969158f24", length: 173293 } done! ``` Query index: ```bash curl -XGET 'http://localhost:9200/files/4f230588a7da6e94984d88a1?pretty=true' ``` Admin URL: `http://localhost:9200/_plugin/river-mongodb/` See more details check the [wiki](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki) License ------- This software is licensed under the Apache 2 license, quoted below. Copyright 2009-2012 Shay Banon and ElasticSearch <http://www.elasticsearch.org> 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. Changelog ------- #### 2.0.9 - Update versions ES 1.4.2, MongoDB 3.0.0, MongoDB driver 2.13.0 #### 2.0.5 - Update versions ES 1.4.0 - Bug fix for initial import of sharded collections - Bug fix for competing with other rivers for resources - Bug fix and test for skipping sync of elements when restarting river #### 2.0.2 - Update versions ES 1.3.5, MongoDB 2.6.5, MongoDB driver 2.12.4, Java 7 - Improved scaling for running multiple rivers and numerous bug fixes by @ankon of Collaborne B.V. - Improved TokuMX support by @kdkeck of Connectifier, Inc. - Support for collection names with period by @qraynaud #### 2.0.1 - Update versions ES 1.2.2, MongoDB 2.6.3, MongoDB driver 2.12.3 - Support for TokuMX by @kdkeck of Connectifier, Inc. #### 2.0.0 - Update versions ES 1.0.0, MongoDB 2.4.9, MongoDB driver 2.11.4 - Detection of stale river #### 1.7.4 - Make include_fields work for nested fields - Fix ensuring river status indicates failures #### 1.7.3 - Update versions ES 0.90.7 - Optimization of oplog.rs query. The current query was too complex and not efficient in MongoDB. oplog.rs query now uses only $ts filter. - New ```options/import_all_collections``` parameter can be used to import all collection of a database (see issue [#177](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/177)) - Version, commit data and commit id are displayed in the log when the river starts. - New ```options/store_statistics``` parameter can be used to store statistic each time bulk processor is flushed. Data are store in _river/{river.name} - Default value for ```index/bulk/concurrent_bulk_requests``` has been changed to the number of cores available. - Capture failures from bulk processor and set status to IMPORT_FAILED when found. - Fix issues in document indexed counter in administration. - Refactoring to use 1 bulk processor per index/type. #### 1.7.2 - Update versions MongoDB 2.4.8 - Optimization of oplog.rs filter (see issue [#123](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/123)) - ```options/drop_collection``` will also track ```dropDatabase``` (see issue [#133](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/133)) - Add filter in the initial import by @bernd (see issue [#157](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/157)) - MongoDB default port is 27017 (if not specific in configuration) (see issue [#159](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/159)) - Allow alias in place of index (see issue [#163](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/163)) - Initial import supports existing index (see issue [#167](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/167)) - New parameter ```options/skip_initial_import``` to skip initial import using collection data. Default value is false. - Stop properly the river when deleted (see issue [#169](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/169)) - Administration updates: stopped river can be deleted from the administration, auto-refresh. - Switch to BulkProcessor API to provide more flexible configuration during bulk indexing. (see [commit](https://github.com/richardwilly98/elasticsearch-river-mongodb/commit/973dba973f6c1c353a38ed060754967504485769)) #### 1.7.1 - Update versions ES 0.90.5, MongoDB driver 2.11.3 - Initial import using the collection by @benmccann. (see issue [#47](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/47)) - Add unit test to validate Chinese support (see issue [#95](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/95)) - Ensure MongoDB cursor is closed (see issue [#comment-24427369](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/106#issuecomment-24427369)) - River administration has been improved. (see issue [#109](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/109)) - Allow fields ```ts``` or ```op``` to be used in user collection. (see pr [#136](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/136)) - Use of OPLOG_REPLAY to query oplog.rs #### 1.7.0 - Update versions ES 0.90.3, MongoDB 2.4.6 - Ability to index documents from a given datetime (see issue [#102](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/102)) - Fix for ```options/exclude_fields``` by @ozanozen (see issue [#103](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/103)) - Fix for ```options/drop_collection``` (see issue [#105](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/105)) - New advanced transformation feature. (see issue [#106](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/106)) - Add site to the river. Initial implementation (only start / stop river or display river settings). (see issue [#109](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/109)) - Implement include fields (see issue [#119](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/119)) - Refactoring of the river definition (new class MongoDBRiverDefinition). #### 1.6.11 - Add SSL support by @alistair (see [#94](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/94)) - Add support for $set operation (see issue [#91](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/91)) - Add Groovy unit test (for feature [#87](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/87)) - Update versions ES 0.90.2, MongoDB 2.4.5 and MongoDB driver 2.11.2 - Fix for ```options/drop_collection``` option (issue [#79](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/79)) - New ```options/include_collection``` parameter to include the collection name in the document indexed. (see [#101](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/101)) #### 1.6.9 - Allow the script filters to modify the document id (see [#83](https://github.com/richardwilly98/elasticsearch-river-mongodb/pull/83)) - Support for Elasticsearch 0.90.1 and MongoDB 2.4.4 - Improve exclude fields (support multi-level - see [#76](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/76)) - Fix to support ObjectId (see issue [#85](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/85)) - Add logger object to script filters - Provide example for Groovy script (see issue[#87](https://github.com/richardwilly98/elasticsearch-river-mongodb/issues/87)) #### 1.6.8 - Implement exclude fields (see issue #76) - Improve reconnection to MongoDB when connection is lost (see issue #77) - Implement drop collection feature (see issue #79). The river will drop all documents from the index type. #### 1.6.7 - Issue with sharded collection (see issue #46) #### 1.6.6 - Support for Elasticsearch 0.90.0 and MongoDB 2.4.3 - MongoDB driver 2.11.1 (use of MongoClient) Building from master ------- Install Maven (e.g `brew install maven`). Be sure `mvn` command is available. Clone the repository: git clone https://github.com/richardwilly98/elasticsearch-river-mongodb.git Execute installation script (inside the dir where you cloned the project): ./elasticsearch-river-mongodb/install-local.sh If your elasticsearch is not installed in `/usr/share/elasticsearch` you can set it `ES_HOME`. eg: ES_HOME=/usr/local/Cellar/elasticsearch/1.1.1/ ./elasticsearch-river-mongodb/install-local.sh Developing in Eclipse --------------------- Install the m2eclipse plugin: * Work with: --All Available Sites-- * Under Collaboration choose the m2e plugins [Install the testng eclipse plugin](http://testng.org/doc/download.html) Run `mvn eclipse:eclipse -DdownloadSources=true` Import the project with `File > Import > Maven > Existing Maven Projects` [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/richardwilly98/elasticsearch-river-mongodb/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
0
Solartisan/WaveSideBar
null
null
WaveSideBar project =================== 一个快速跳跃分组的侧边栏控件,示例中配合RecyclerView实现。 <img src="./preview/simple.gif"> 波浪的实现采用了三段二次贝塞尔曲线,附一张手稿草图,仅供参考。 <img src="./preview/design.png"> Usage --- #### **use `WaveSideBarView` in the layout file** ```xml <cc.solart.wave.WaveSideBarView android:id="@+id/side_view" android:layout_width="match_parent" android:layout_height="match_parent"/> ``` #### **set `OnTouchLetterChangeListener`** ```java mSideBarView.setOnTouchLetterChangeListener(new WaveSideBarView.OnTouchLetterChangeListener() { @Override public void onLetterChange(String letter) { int pos = adapter.getLetterPosition(letter); if (pos != -1) { mRecyclerView.scrollToPosition(pos); } } }); ``` Thanks ------ used PinnedHeaderDecoration in [RecyclerItemDecoration](https://github.com/dinuscxj/RecyclerItemDecoration) License --- No fucking license. just enjoy it!
0
pedrovgs/Algorithms
Solutions for some common algorithm problems written in Java.
null
Algorithms [![QA check](https://github.com/pedrovgs/Algorithms/actions/workflows/check.yml/badge.svg)](https://github.com/pedrovgs/Algorithms/actions/workflows/check.yml) ========== This repository contains my solution for common algorithms. I've created this repository to learn about algorithms and improve solutions to common computer science problems. I'll try to add more solutions if I have time. :) Each solution has a Java program and is tested. Some problems contain multiple solutions with different implementations. You can check the solution executing tests inside tests directory. Some problems were resolved using TDD. Problems -------- ### Trees * [Binary tree by level](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem13/BinaryTreeByLevel.java) * [Binary tree pre order](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem14/BinaryTreePreOrder.java) * [Binary tree in order](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem15/BinaryTreeInOrder.java) * [Binary tree post order](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem16/BinaryTreePostOrder.java) * [Are binary trees equals?](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem17/BinaryTreeEquals.java) * [Is binary search tree](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem18/IsBST.java) * [Binary tree depth](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem19/BinaryTreeDepth.java) * [Lowest common ancestor](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem21/LowestCommonAncestor.java) * [Sorted array to BST](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem24/SortedArrayToBST.java) * [AVL tree median](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem36/AvlTreeMedian.java) * [Path calculator](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem37/PathCalculator.java) * [Path to every leaf](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem38/PathToEveryLeaf.java) * [Is tree balanced](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem65/IsTreeBalanced.java) * [Generate list with nodes by level](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem66/TreeToListByLevel.java) ### Linked List * [Reverse linked list](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem22/ReverseLinkedList.java) * [Remove duplicates](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem57/RemoveListDuplicatedElements.java) * [Find kth element](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem58/FindKthElement.java) * [Delete list node](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem59/DeleteListNode.java) * [Partition list](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem60/PartitionList.java) * [Sum lists](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem61/SumLists.java) * [PalindromeList](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem62/PalindromeList.java) * [Get element in the middle of the list](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem64/GetTheElementInTheMiddleOfTheList.java) ### Strings * [Int to String](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem11/IntToString.java) * [Remove comments from file](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem23/RemoveComments.java) * [Reverse sentence](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem27/ReverseSentence.java) * [Contains](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem32/Contains.java) * [Simple regular expression](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem33/SimpleRegularExpression.java) * [Dot regular expression](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem34/DotRegularExpression.java) * [Asterisk regular expression](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem35/AsteriskRegularExpression.java) * [Unique chars](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem50/UniqueChars.java) * [Reverse string](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem51/ReverseString.java) * [Compress string](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem53/CompressString.java) * [Is rotation using substring](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem56/IsRotationUsingIsSubstring.java) ### Binary Numbers and bits operators * [Is binary number even?](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem68/IsEven.java) * [Sum binary numbers](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem3/SumBinaryNumbers.java) * [Count the number of bits equals to 1](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem1/BitsCounter.java) * [Merge binary numbers](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem67/MergeBinaryNumbers.java) * [Count the number of different bits](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem69/BitsToTransform.java) * [Reverse binary number order](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem70/ReverseOrderOfBinaryNumber.java) * [Reverse binary number](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem71/ReverseBinaryNumber.java) ### Math Operations * [Square root](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem4/SquareRoot.java) * [Divide using subtraction](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem5/DivideUsingSubtraction.java) * [Multiplication without multiply](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem20/MultiplicationWithoutMultiply.java) * [Find sums](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem28/FindSums.java) * [ScientificNotation](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem30/ScientificNotation.java) * [Vector scalar product](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem2/VectorScalarProduct.java) * [Subtract adding](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem73/SubtractAdding.java) ### Sequences * [Fibonacci numbers](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem7/FibonacciNumbers.java) * [Factorial](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem9/Factorial.java) ### Arrays * [Merge sorted arrays](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem6/MergeSortedArrays.java) * [Split array in positive and negative numbers](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem8/SplitArray.java) * [Remove duplicated elements](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem10/RemoveDuplicates.java) * [Move zeros in array](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem12/MoveZerosInArray.java) * [Find longest consecutive sequence](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem31/FindLongestConsecutiveSequence.java) * [Multiply array elements](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem39/MultiplyArrayElements.java) * [Move elements to position](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem40/MoveElementsToPositions.java) * [Replace spaces](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem52/ReplaceSpaces.java) * [Rotate matrix](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem54/RotateMatrix.java) * [Rewrite row and columns with zero](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem55/RewriteRowAndColumnsWithZeros.java) * [Find the missing number](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem72/FindTheMissingNumber.java) ### Sorting Algorithms * [Bubble Sort](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem74/BubbleSort.java) * [Selection Sort](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem75/SelectionSort.java) * [Insertion Sort](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem76/InsertionSort.java) * [Merge Sort](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem79/MergeSort.java) * [Quick Sort](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem80/QuickSort.java) ### Misc * [Anagrams](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem25/Anagrams.java) * [Palindromes](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem26/Palindromes.java) * [Are anagrams?](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem29/AreAnagrams.java) * [Constant complexity order stack](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem63/ConstantComplexityOrderStack.java) * [Hello world without semicolon](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem77/HelloWorldWithoutSemicolon.java) * [Autoboxing trick](https://github.com/pedrovgs/Algorithms/blob/master/src/main/java/com/github/pedrovgs/problem78/AutoBoxingTrick.java) Developed By ------------ * Pedro Vicente Gómez Sánchez - <pedrovicente.gomez@gmail.com> <a href="https://twitter.com/pedro_g_s"> <img alt="Follow me on Twitter" src="https://image.freepik.com/iconos-gratis/twitter-logo_318-40209.jpg" height="60" width="60"/> </a> <a href="https://es.linkedin.com/in/pedrovgs"> <img alt="Add me to Linkedin" src="https://image.freepik.com/iconos-gratis/boton-del-logotipo-linkedin_318-84979.png" height="60" width="60"/> </a> License ------- Copyright 2014 Pedro Vicente Gómez Sánchez 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