full_name
stringlengths
7
104
description
stringlengths
4
725
topics
stringlengths
3
468
readme
stringlengths
13
565k
label
int64
0
1
biemond/soa11g_examples
Oracle SOA Suite 11g Examples
null
null
0
kiegroup/jbpm-playground
Repository containing jBPM examples
null
null
0
howtoprogram/Java-Examples
Some Java examples about using frameworks, libraries
null
# Java Examples ## 1.Java JsonPojo Example This small project contains examples how to convert Java object, Hashmap, List to JSON and vice versa. It also contains examples about how to work with files. ### [Convert Java Objects To JSON And Vice Versa](http://howtoprogram.xyz/2016/07/01/convert-java-objects-json-vice-versa/) ## 2.Book RESTful Service Examples This RESTful ws provides API for all below sub projects ## 3.Simple Java REST Client Example ### [Simple Java REST Client Using java.net.URL package](http://howtoprogram.xyz/2016/07/02/simple-java-rest-client-using-java-net-url-package) ### [Java REST Client Using Spring RestTemplate](http://howtoprogram.xyz/2016/07/03/java-rest-client-using-spring-resttemplate/) ### [Java REST Client Using Apache Httpcomponents](http://howtoprogram.xyz/2016/07/04/java-rest-client-using-apache-httpcomponents/) ### [Java REST Client Using Jersey Client](http://howtoprogram.xyz/2016/07/05/java-rest-client-using-jersey-client/) ### [Java REST Client Using Resteasy Client](http://howtoprogram.xyz/2016/07/12/java-rest-client-using-resteasy-client/) ### [Java REST Client Using Resteasy Client Proxy Framework](http://howtoprogram.xyz/2016/07/13/java-rest-client-using-resteasy-client-proxy-framework/) ### [Java REST Client Using Apache CXF Proxy based API](http://howtoprogram.xyz/2016/07/15/java-rest-client-using-apache-cxf-proxy-based-api/) ### [Java REST Client Using Netflix Feign](http://howtoprogram.xyz/2016/07/18/java-rest-client-using-netflix-feign/) ### [Java REST Client Using Unirest Java API](http://howtoprogram.xyz/2016/07/27/java-rest-client-using-unirest-java-api/) ### [Java REST Client Examples Using OkHttp](howtoprogram.xyz/2016/10/31/java-rest-client-examples-using-okhttp/) ### [How to Post with Retrofit 2](http://howtoprogram.xyz/2017/02/17/how-to-post-with-retrofit-2/) ### [Ignore Unknown Properties or New Fields in Jackson](http://howtoprogram.xyz/2017/02/18/ignore-exclude-new-fields-deserializing-jackson/) ## 4. Java 8 ### [Java 8 – Format Date, LocalDate, LocalDateTime and ZonedDateTime](https://howtoprogram.xyz/2017/08/20/java-8-format-date-localdate-localdatetime/)
0
gradescope/autograder_samples
Examples of autograders for running on Gradescope
autograder autograding computer-science course-management gradescope
docs/README.md
0
jponge/vertx-in-action
Examples for the Manning Vert.x in Action" book"
book distributed-systems examples manning reactive resilience scalability vertx
[![Build Status](https://travis-ci.com/jponge/vertx-in-action.svg?branch=master)](https://travis-ci.com/jponge/vertx-in-action) # Vert.x in Action book examples 👋 Welcome! These are the working examples for [Vert.x in Action](https://www.manning.com/books/vertx-in-action) (ISBN 9781617295621) from [Manning Publications Co](https://www.manning.com/) and written by [Julien Ponge](https://julien.ponge.org/). ## How to open and run the examples? Readers of the book should directly open projects from subfolders: they are all independent. You will find both Gradle and Maven build descriptors for each project, so you can load the projects with text editors or integrated development environments such as IntelliJ IDEA, Eclipse IDE or Microsoft Visual Studio Code. As an example if you want to build the chapter 1 with Gradle, open a terminal and run: $ cd chapter1 $ ./gradlew build or with Maven run: $ cd chapter1 $ mvn package The book examples work best using some Unix environment: Linux, macOS or the Windows Subsystem for Linux from Microsoft. ## What is the structure of the repository? The following folders are available: - `chapter1` - `chapter2` - `chapter3` - `chapter4` - `chapter5` - `chapter6` - `part2-steps-challenge` (covers chapters 7 to 12) - `chapter13` The `master` branch is where you must look for working examples. Chapter 12 provides variants of the same code which you can get from the following branches: - `chapter12/public-api-with-timeouts` - `chapter12/public-api-with-circuit-breaker` - `chapter12/public-api-with-circuit-breaker-and-timeouts` ## Will there be updates? The book went to production with Manning in August 2020. This repository contains samples against Eclipse Vert.x 4.0.3 (see tag `vertx-4.0.3`) that was released in March 2021. At my own discretion I _may_ update to newer versions of Vert.x when they are published. Note that the Vert.x core team has made a goal of ensuring that Vert.x 4.0.3 will work against all examples in this repository. ## Can I contribute? Due to the nature of this project I will not accept any contribution to this repository. ## What if I have a question / issue? If you are a Manning customer then you have access to forums. Please refer to [Vert.x in Action on the Manning website](https://www.manning.com/books/vertx-in-action) where a link to the forum is provided. If you have a question on Vert.x then please get in touch with the [Eclipse Vert.x community](https://vertx.io). There are several channels that you can use including public mailing-lists and chat. If you have a problem with your book order or any special request, then please contact Manning. ## Errata ### November 2020 Due to a peculiarities in how _TestContainers_ supports _Docker Compose_ it may be necessary to explicitly await for containers to be exposed, or test executions can sometimes fail because a container port hasn't been exposed yet. This can be done by calling the `withExposedService` method on a `DockerComposeContainer` instance, as in: ```java @Container private static final DockerComposeContainer CONTAINERS = new DockerComposeContainer(new File("../docker-compose.yml")) .withExposedService("mongo_1", 27017); ``` This fix has been applied to the tests in `part2-steps-challenge`.
0
g00glen00b/spring-samples
A series of examples used to demonstrate certain features of Spring.
spring spring-boot spring-cloud spring-cloud-netflix spring-security
# Example applications using Spring boot This is a collection of small applications demonstrating certain features of Spring boot. Most of these are covered as well in [my blog posts](https://dimitri.codes/tag/spring-boot/). ## Contents | Blog post | GitHub | | ------------------------------------------------------------ | ------------------------------------------------------------ | | [Writing your first Spring webapp with Spring Boot](https://dimitri.codes/spring-webapp/) | [spring-boot-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-webapp) | | [JPA made easy with Spring data's repositories](https://dimitri.codes/spring-data-jpa/) | [spring-boot-jpa-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-webapp) | | [Handling errors with Spring MVC](https://dimitri.codes/handling-errors-with-spring-mvc/) | [spring-boot-jpa-error-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-error-webapp) | | [Using Docker containers for your Spring boot applications](https://dimitri.codes/docker-spring-boot/) | [spring-boot-jpa-docker-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-docker-webapp) | | [Take your Spring apps to the cloud with Bluemix and Docker](https://dimitri.codes/docker-containers-on-bluemix/) | [sping-boot-jpa-docker-bluemix-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-docker-bluemix-webapp) | | [Internationalization (i18n) with Spring](https://dimitri.codes/spring-internationalization-i18n/) | [spring-boot-i18n-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-i18n-webapp) | | [Handling forms with Spring Web and JSR-303](https://dimitri.codes/spring-form-validation/) | [spring-boot-form](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-form) | | [Producing REST API's with Spring](https://dimitri.codes/producing-rest-apis-with-spring/) | [spring-boot-rest](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-rest) | | [Consuming REST API's with Spring](https://dimitri.codes/consuming-rest-apis-with-spring/) | [spring-boot-rest](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-rest) | | [Documenting your REST API with Swagger and Springfox](https://dimitri.codes/documenting-rest-api-swagger-springfox/) | [spring-boot-swagger](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-swagger) | | [Exploring contract first options with Swagger](https://dimitri.codes/exploring-contract-first-options-swagger/) | [spring-boot-swagger](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-swagger) | | [Using Ehcache 3 with Spring boot](https://dimitri.codes/spring-boot-cache-ehcache/) | [spring-boot-ehcache](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-ehcache) | | [Using the Netflix stack with Spring boot: Eureka](https://dimitri.codes/using-the-netflix-stack-with-spring-boot-eureka/) | [spring-boot-eureka](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-eureka) | | [Using the Netflix stack with Spring boot: Ribbon](https://dimitri.codes/using-netflix-stack-spring-boot-ribbon/) | [spring-boot-eureka](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-eureka) | | [Using the Netflix stack with Spring boot: Hystrix](https://dimitri.codes/spring-boot-netflix-hystrix/) | [spring-boot-hystrix](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-hystrix) | | [Mapping with Dozer](https://dimitri.codes/mapping-with-dozer/) | [spring-boot-jpa-dozer-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-dozer-webapp) | | [Mapping beans with MapStruct](https://dimitri.codes/mapstruct/) | [spring-boot-jpa-mapstruct-webapp](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-jpa-mapstruct-webapp) | | [Getting started with Spring boot 2.0](https://dimitri.codes/getting-started-spring-boot-2/) | [spring-boot-2-web-crawler](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-2-web-crawler) | | [Validating the input of your REST API with Spring](https://dimitri.codes/validating-the-input-of-your-rest-api-with-spring) | [spring-boot-validation](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-validation) | | [Working with Spring boot and GraphQL](https://dimitri.codes/graphql-spring-boot) | [spring-boot-graphql](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-graphql) | | [Indexing documents with Spring batch](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-solr-batch) | [spring-boot-solr-batch](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-solr-batch) | | [Generating documentation for your REST API with Spring REST Docs](https://dimitri.codes/spring-rest-docs) | [spring-boot-restdocs](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-restdocs) | | [Generating documentation for your REST API with Spring and Swagger](https://dimitri.codes/generating-static-documentation-swagger) | [spring-boot-swagger-static-docs](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-swagger-static-docs) | | [Reactive relational databases with R2DBC and Spring](https://dimitri.codes/reactive-relational-databases-r2dbc-spring) | [spring-boot-r2dbc](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-r2dbc) | | [Reactive streams over the network with RSocket](https://dimitri.codes/reactive-streams-rsocket) | [spring-boot-rsocket](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-rsocket) | | [Battle of the Spring REST clients: RestTemplate, WebClient or RestClient?](https://dimitri.codes/resttemplate-or-webclient) | [spring-boot-restclient](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-restclient) | [Getting started with htmx and Spring Boot](https://dimitri.codes/spring-boot-htmx-intro) | [spring-boot-htmx](https://github.com/g00glen00b/spring-samples/tree/master/spring-boot-htmx)
0
JavaMoney/javamoney-examples
JavaMoney - Examples
demo examples java money
JSR 354 JavaMoney Examples ========================== The current project structure is as follows: - [Console examples](console) - [Simple Console Examples](console/javamoney-console-simple) - [Java 8 Console Examples](console/javamoney-console-java8) - [Java 11 Console Examples](console/javamoney-console-java11) - [Java Functional Examples](console/functional-examples): examples using Java 8+ with streams, lambda and money-api - [Money Machine](console/moneymachine): Adopt JSR API Testing project for getting feedback on the API - [JavaFX examples](javafx) - [JavaFX Demo application](javafx/money-fxdemo) - [JavaFX binding examples](javafx/money-javafx-binding) - [Swing RCP examples](swing) - [An improved successor to EZ Money.](swing/javamoney-ez) - [Web examples](web) - [Demo for CDI Events with the Money and Currency API](web/javamoney-payment-cdi-event) - [Spring Trading App](web/javamoney-tradingapp) currently **unstable**/disabled - [Java EE with JAX-RS](web/jax-rs-money) currently **unstable/broken**/disabled - [Example using JSF with MoneyAPI](web/jsf-money) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/JavaMoney/javamoney-examples/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/JavaMoney/javamoney-examples/tree/main) [![License](http://img.shields.io/badge/license-Apache2-red.svg)](http://opensource.org/licenses/apache-2.0) [![Built with Maven](http://maven.apache.org/images/logos/maven-feather.png)](http://maven.org/)
0
eventuate-tram/eventuate-tram-examples-java-spring-todo-list
A todo list application implemented using Spring Boot-based microservices and the Eventuate Tram framework
null
# Todo List example application This example demonstrates how to develop microservices with Spring Boot, JPA, Apache Kafka, ElasticSearch and the Eventuate Tram framework. ## The problem: atomically updating data and publishing events/messages It's challenging to atomically update a data (e.g. a Domain-Driven design aggregate) and publish a message, such as a domain event. The traditional approach of using 2PC/JTA isn't a good fit for modern applications. The [Eventuate™ Tram framework](https://github.com/eventuate-tram/eventuate-tram-core) implements an alternative mechanism based on the [Application Events](http://microservices.io/patterns/data/application-events.html) pattern. When an application creates or updates data, as part of that ACID transaction, it inserts an event into an `EVENTS` or `MESSAGES` table. A separate CDC process publishes those events to a message broker, such as Apache Kafka. ## About the Todo list application The Todo List application, which lets users maintain a todo list, is the hello world application for the [Eventuate™ Tram framework](https://github.com/eventuate-tram/eventuate-tram-core). It shows how use Eventuate Tram to * reliably publish domain events as part of a database transaction that updates an aggregate. * consume domain events to update a [CQRS view](http://microservices.io/patterns/data/cqrs.html) view When a user creates or updates a todo, the application publishes a domain event. An event handler, subscribes to those events and updates an ElasticSearch-based CQRS view. ## Todo list architecture The Todo List application is built using * Java * JPA * Eventuate Tram * Spring Boot * MySQL * ElasticSearch * Apache Kafka The following diagram shows the application's architecture. ![TODO architecture](./images/Architecture.png) The application consists of two services: * `Todo Service` - implements the REST endpoints for creating, updating and deleting todos. The service persists the Todo JPA entity in MySQL. Using `Eventuate Tram`, it publishes Todo domain events that are consumed by the `Todo View Service`. * `Todo View Service` - implements a REST endpoint for querying the todos. It maintains a CQRS view of the todos in ElasticSearch. The `Todo Service` publishes events using Eventuate Tram. Eventuate Tram inserts events into the `MESSAGE` table as part of the ACID transaction that updates the TODO table. The Eventuate Tram CDC service tracks inserts into the `MESSAGE` table using the MySQL binlog and publishes messages to Apache Kafka. The `Todo View Service` subscribes to the events and updates ElasticSearch. ## Two flavors of the application: monolithic and microservices There are two versions of the application: * `single-module` - a single module Gradle project for a monolithic version of the application. It is the easiest to get started with. * `multi-module` - a multi-module Gradle project for the microservices-based version of the application. It consists of a `todo-service`, which creates and updates Todos, and `todo-view-service`, which maintains a [CQRS view](http://microservices.io/patterns/data/cqrs.html) view in ElasticSearch # How it works The Todo application uses the [Eventuate Tram framework](https://github.com/eventuate-tram/eventuate-tram-core) to publish and consume domain events. ## Domain event publisher The `TodoCommandService` publishes an event when it creates, updates, or deletes a `Todo`. It uses the `DomainEventPublisher`, which is implemented by the [Eventuate Tram framework](https://github.com/eventuate-tram/eventuate-tram-core). `DomainEventPublisher` publishes the event as part of the transaction that updates the database. If the transactions commits the event will be published. Conversely, if the transaction is rolled back, then the event is not published. ```java @Service @Transactional public class TodoCommandService { @Autowired private TodoRepository todoRepository; @Autowired private DomainEventPublisher domainEventPublisher; public Todo create(CreateTodoRequest createTodoRequest) { Todo todo = new Todo(createTodoRequest.getTitle(), createTodoRequest.isCompleted(), createTodoRequest.getOrder()); todo = todoRepository.save(todo); publishTodoEvent(todo, new TodoCreated(todo.getTitle(), todo.isCompleted(), todo.getExecutionOrder())); return todo; } private void publishTodoEvent(Todo todo, DomainEvent... domainEvents) { domainEventPublisher.publish(Todo.class, todo.getId(), asList(domainEvents)); } ... ``` ## Domain event consumer The CQRS view code subscribes to domain events published by the `TodoCommandService`. It defines `DomainEventDispatcher` @Bean to invoke the event handlers defined by `TodoEventConsumer`. The `DomainEventDispatcher` class is provided by the [Eventuate Tram framework](https://github.com/eventuate-tram/eventuate-tram-core). It handles message de-duplication to ensure that the event handlers are idempotent. ```java @Configuration public class TodoViewConfiguration { @Bean public DomainEventDispatcher domainEventDispatcher(TodoEventConsumer todoEventConsumer, MessageConsumer messageConsumer) { return new DomainEventDispatcher("todoServiceEvents", todoEventConsumer.domainEventHandlers(), messageConsumer); } ``` The `TodoEventConsumer` defines the event handlers, which update Elasticsearch. ```java public class TodoEventConsumer { @Autowired private TodoViewService todoViewService; public DomainEventHandlers domainEventHandlers() { return DomainEventHandlersBuilder .forAggregateType(Todo.class.getName()) .onEvent(TodoCreated.class, dee -> { TodoCreated todoCreated = dee.getEvent(); todoViewService.index(new TodoView(dee.getAggregateId(), todoCreated.getTitle(), todoCreated.isCompleted(), todoCreated.getExecutionOrder())); }) ``` # Got questions? Don't hesitate to create an issue or see * [Mailing list](https://groups.google.com/d/forum/eventuate-users) * [Slack](https://eventuate-users.slack.com). [Get invite](https://eventuateusersslack.herokuapp.com/) * [Contact us](http://eventuate.io/contact.html). Don't forget to take a look at the other [Eventuate Tram examples](http://eventuate.io/exampleapps.html): * [Customers and Orders](https://github.com/eventuate-tram/eventuate-tram-sagas-examples-customers-and-orders) * [FTGO Example application for Microservice Patterns book](https://github.com/microservice-patterns/ftgo-application) # Building and running Note: you do not need to install Gradle since it will be downloaded automatically. You just need to have Java 8 installed. First, build the application ``` ./gradlew assemble ``` Next, launch the services using [Docker Compose](https://docs.docker.com/compose/): ``` export DOCKER_HOST_IP=... docker-compose -f docker-compose-eventuate-mysql.yml build docker-compose -f docker-compose-eventuate-mysql.yml up -d ``` Note: 1. You can also run the Postgres version using `docker-compose-eventuate-postgres.yml` 2. You need to set `DOCKER_HOST_IP` before running Docker Compose. This must be an IP address or resolvable hostname. It cannot be `localhost`. See this [guide to setting `DOCKER_HOST_IP`](http://eventuate.io/docs/usingdocker.html) for more information. # Using the application Once the application has started, you can use the application via the Swagger UI. If you are running the `multi-module` version: * `http://${DOCKER_HOST_IP}:8081/swagger-ui.html` - the command-side service * `http://${DOCKER_HOST_IP}:8082/swagger-ui.html` - the query-side service If you are running the `single-module` version: * `http://${DOCKER_HOST_IP}:8080/swagger-ui.html` - the monolithic application # Got questions? Don't hesitate to create an issue or see * [Mailing list](https://groups.google.com/d/forum/eventuate-users) * [Slack](https://eventuate-users.slack.com). [Get invite](https://eventuateusersslack.herokuapp.com/) * [Contact us](http://eventuate.io/contact.html).
0
jitpack/gradle-simple
Simple gradle example project
null
# gradle-simple [![](https://jitpack.io/v/jitpack/gradle-simple.svg?label=Release)](https://jitpack.io/#jitpack/gradle-simple) [![](https://jitci.com/gh/jitpack/gradle-simple/svg)](https://jitci.com/gh/jitpack/gradle-simple) Example Gradle project producing a single jar. Uses the `maven` plugin to publish the jar to the local repository. [https://jitpack.io/#jitpack/gradle-simple](https://jitpack.io/#jitpack/gradle-simple) To install the library add: ```gradle repositories { jcenter() maven { url "https://jitpack.io" } } dependencies { implementation 'com.github.jitpack:gradle-simple:1.1' } ```
1
Azure-Samples/java-on-azure-examples
Java on Azure examples
aca aks appservice asa azure containerapps functions java jboss spring springapps tomcat
# Java on Azure Examples This GitHub repository contains a set of Azure examples specifically for Java developers to quickly get started with Azure. Please use the issue tracker to leave feedback, file issues or to propose other examples. ## Getting started To work with these examples it is assumed you have the Azure CLI installed, and you have logged in and set your default subscription. If you haven't done so follow the steps below. _Note: Logging in and setting your default subscription needs to be done once per terminal session._ ### Install Azure CLI To setup the Azure CLI, please visit [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). And once you are done come back to this README. ### Login into Azure <!-- workflow.skip() --> ````shell az login ```` ### Set your default subscription Get a list of your subscriptions (notice the `refresh` parameter that retrieves up-to-date subscriptions from the server) : <!-- workflow.skip() --> ````shell az account list --output table --refresh ```` Set your default subscription for this session using the subscription id from the previous output: <!-- workflow.skip() --> ````shell az account set --subscription "subscription-id" ```` <!-- workflow.run() exit 0 --> ## Our alphabetical list of examples 1. [Azure App Configuration examples](appconfig/) 1. [Azure App Service examples](appservice/) 1. [Azure Cache for Redis examples](redis/) <!-- workflows run Sunday / 2 examples --> 1. [Azure Cognitive Services examples](cognitiveservices/) 1. [Azure Container Apps examples](containerapp/) 1. [Azure Container Instances examples](container/) 1. [Azure Container Registry examples](acr/) 1. [Azure Cosmos DB examples](cosmosdb/) 1. [Azure Front Door examples](afd/) 1. [Azure Data Explorer examples](kusto/) <!-- workflows run Sunday / 4 examples --> 1. [Azure Database for MySQL examples](mysql/) <!-- workflows run Tuesday / 4 examples --> 1. [Azure Database for PostgreSQL examples](postgres/) <!-- workflows run Monday / 4 examples --> 1. [Azure Event Hubs examples](eventhubs/) <!-- workflows run Saturday / 4 examples --> 1. [Azure Functions examples](functionapp/) <!-- workflows run Thursday / 3 examples --> 1. [Azure Key Vault examples](keyvault/) <!-- workflows run Tuesday / 6 examples --> 1. [Azure Kubernetes Service examples](aks/) 1. [Azure Monitor examples](monitor/) <!-- workflows run Thursday / 1 example --> 1. [Azure Networking examples](network/) <!-- workflows run Wednesday / 1 example --> 1. [Azure Red Hat OpenShift examples](aro/) 1. [Azure Resource Group examples](group/) <!-- workflows run Saturday / 2 examples --> 1. [Azure Service Bus examples](servicebus/) <!-- workflows run Friday / 9 examples --> 1. [Azure Spring Apps examples](spring/) <!-- workflows run Wednesday / 3 examples --> 1. [Azure SQL Database examples](sql/) <!-- workflows run Wednesday / 4 examples --> 1. [Azure Storage examples](storage/) <!-- workflows run Monday / 3 examples --> ## Contributing How do I contribute? See [Contributing](CONTRIBUTING.md) <!-- See https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#create-a-service-principal to associate use service principal with the GitHub actions mentioned below. Azure Container Registry examples 1. acr/create/README.md - 0 0 * * 1 - westus 2. acr/create-acrpull-service-principal/README.md - 0 1 * * 1 - westus 3. acr/create-settings-xml/README.md - 0 2 * * 1 - westus 4. acr/dropwizard/README.md - 0 3 * * 1 - westus 5. acr/glassfish/README.md - 0 4 * * 1 - westus 6. acr/graalvm/README.md - 0 5 * * 1 - westus 7. acr/helidon/README.md - 0 6 * * 1 - westus 8. acr/helloworldjob/README.md - 0 7 * * 1 - westus 9. acr/jetty/README.md - 0 8 * * 1 - westus 10. acr/micronaut/README.md - 0 9 * * 1 - westus 11. acr/payara/READNE.md - 0 10 * * 1 - westus 12. acr/piranha/README.md - 0 11 * * 1 - westus 13. acr/quarkus/README.md - 0 12 * * 1 - westus 14. acr/springboot/README.md - 0 13 * * 1 - westus 15. acr/tomcat/README.md - 0 14 * * 1 - westus 16. acr/wildfly/README.md - 0 15 * * 1 - westus Azure Front Door examples 1. afd/add-origins-to-origin-group/README.md - 0 16 * * 1 - westus 2. afd/add-route/README.md - 0 17 * * 1 - westus 3. afd/create-endpoint/README.md - 0 18 * * 1 - westus 4. afd/create-origin-group/README.md - 0 19 * * 1 - westus 5. afd/create-profile/README.md - 0 20 * * 1 - westus Azure Kubernetes Service examples 1. aks/create/README.md - 0 21 * * 1 - westus 2. aks/create-kube-config/README.md - 0 22 * * 1 - westus 3. aks/graalvm/README.md - 0 23 * * 1 - westus 4. aks/springboot/README.md - 0 0 * * 2 - westus 5. aks/tomcat/README.md - 0 1 * * 2 - westus 6. aks/use-your-acr/README.md - 0 2 * * 2 - westus 7. aks/wildfly/README.md - 0 3 * * 2 - westus Azure App Configuration examples 1. appconfig/add-key-value/README.md - 0 4 * * 2 - westus 2. appconfig/create/README.md - 0 5 * * 2 - westus Azure App Service examples 1. appservice/container-glassfish/README.md - 0 6 * * 2 - westus 2. appservice/container-graalvm/README.md - 0 7 * * 2 - westus 3. appservice/container-jetty/README.md - 0 8 * * 2 - westus 4. appservice/container-payara/README.md - 0 9 * * 2 - westus 5. appservice/create-deployment-slot/README.md - 0 10 * * 2 - westus 6. appservice/create-plan/README.md - 0 11 * * 2 - westus 7. appservice/delete-plan/README.md - 0 12 * * 2 - westus 8. appservice/delete-webapp/README.md - 0 13 * * 2 - westus 9. appservice/deploy-to-deployment-slot/README.md - 0 14 * * 2 - westus 10. appservice/docker-tomcat/README.md - 0 15 * * 2 - westus 11. appservice/docker-wildfly/README.md - 0 16 * * 2 - westus 12. appservice/javase-quarkus/README.md - 0 17 * * 2 - westus 13. appservice/javase-springboot/README.md - 0 18 * * 2 - westus 14. appservice/jboss-eap-helloworld/README.md - 0 19 * * 2 - westus 15. appservice/list-webapp/README.md - 0 20 * * 2 - westus 16. appservice/scale-manually/README.md - 0 21 * * 2 - westus 17. appservice/swap-deployment-slot/README.md - 0 22 * * 2 - westus 18. appservice/tomcat-helloworld/README.md - 0 23 * * 2 - westus Azure Container Instances examples 1. container/quarkus/README.md - 0 0 * * 3 - westus 2. container/tomcat/README.md - 0 1 * * 3 - westus 3. container/wildfly/README.md - 0 2 * * 3 - westus Azure Container Apps examples 1. containerapp/create-environment/README.md - 0 3 * * 3 - westus 2. containerapp/create-manual-job/README.md - 0 4 * * 3 - westus 3. containerapp/dropwizard/README.md - 0 5 * * 3 - westus 4. containerapp/execute-manual-job/README.md - 0 6 * * 3 - westus 5. containerapp/get-job-execution-log/README.md - 0 7 * * 3 - westus 6. containerapp/glassfish/README.md - 0 8 * * 3 - westus 7. containerapp/helidon/README.md - 0 9 * * 3 - westus 8. containerapp/list-job-executions/README.md - 0 10 * * 3 - westus 9. containerapp/micronaut/README.md - 0 11 * * 3 - westus 10. containerapp/piranha/README.md - 0 12 * * 3 - westus 11. containerapp/quarkus/README.md - 0 13 * * 3 - westus 12. containerapp/springboot/README.md - 0 14 * * 3 - westus 13. containerapp/tomcat/README.md - 0 15 * * 3 - westus 14. containerapp/wildfly/README.md - 0 16 * * 3 - westus Azure Cosmos DB examples 1. cosmosdb/create/README.md - 0 17 * * 3 - westus 2. cosmosdb/create-sql-container/README.md - 0 18 * * 3 - westus 3. cosmosdb/create-sql-database/README.md - 0 19 * * 3 - westus 4. cosmosdb/create-sql-leases-container/README.md - 0 20 * * 3 - westus 5. cosmosdb/insert-item-into-sql-container/README.md - 0 21 * * 3 - westus 6. cosmosdb/sql-change-feed-processor/README.md - 0 22 * * 3 - westus Azure Event Hubs examples 1. eventhubs/create-eventhub/README.md - 0 23 * * 3 - westus 2. eventhubs/create-namespace/README.md - 0 0 * * 4 - westus 3. eventhubs/receive-event/README.md - 0 1 * * 4 - westus 4. eventhubs/send-event/README.md - 0 2 * * 4 - westus Azure Functions examples 1. functionapp/cosmosdb-output/README.md - 0 3 * * 4 - westus3 2. functionapp/helloworld/README.md - 0 4 * * 4 - westus3 3. functionapp/install-tools/README.md - 0 5 * * 4 - westus3 Azure Resource Group examples 1. group/create/README.md - 0 6 * * 4 - westus 2. group/delete/README.md - 0 7 * * 4 - westus Azure Key Vault examples 1. keyvault/add-secret/README.md - 0 8 * * 4 - westus 2. keyvault/create/README.md - 0 9 * * 4 - westus 3. keyvault/create-self-signed-certificate/README.md - 0 10 * * 4 - westus Azure Data Explorer examples 1. kusto/create/README.md - 0 11 * * 4 - westus 2. kusto/create-database/README.md - 0 12 * * 4 - westus Azure Monitor examples 1. monitor/create-log-analytics-workspace/README.md - 0 13 * * 4 - westus Azure Database for MySQL examples 1. mysql/create/README.md - 0 14 * * 4 - westus 2. mysql/get-country/README.md - 0 15 * * 4 - westus 3. mysql/load-your-mysql-database-with-data/README.md - 0 16 * * 4 - westus Azure Cognitive Services examples 1. cognitiveservices/create-openai-account/README.md - 0 17 * * 4 - eastus 2. cognitiveservices/create-gpt35-model/README.md - 0 18 * * 4 - eastus 3. cognitiveservices/chat-with-semantic-kernel-and-gpt35/README.md - 0 19 * * 4 - eastus Azure SQL Database examples 1. sql/create/README.md - 0 20 * * 4 - westus2 2. sql/get-country/README.md - 0 21 * * 4 - westus2 3. sql/load-your-mssql-database-with-data/README.md - 0 22 * * 4 - westus2 4. sql/open-firewall-to-your-ip/README.md - 0 23 * * 4 - westus2 -->
0
mttkay/signpost-examples
example code for how to access various OAuth service providers using Signpost
null
null
1
oracle/nosql-examples
This is a top level repository for code examples related to the use of Oracle NoSQL Database.
api awesome cloud database examples functions java node-js nosql nosql-database oci on-premise oracle oracle-cloud oracle-nosql-database python spring spring-data stream terraform
# Oracle NoSQL Database ![Oracle NoSQL](./demo-livelab/NoSQL-Database.png) **Oracle NoSQL Database** is designed for today’s most demanding applications that require low latency responses, flexible data models, and elastic scaling for dynamic workloads. It supports JSON, Table and Key-Value datatypes running on-premise, or as a cloud service with on-demand throughput and storage based provisioning. **Oracle NoSQL Database Cloud Service** is now a fully managed database service running on Gen 2 Oracle Cloud Infrastructure hardware. Oracle NoSQL Database Cloud Service makes it easy for developers to build applications, delivering predictable single digit millisecond response times with data replication for high availability. The service offers ACID transactions, serverless scaling, comprehensive security, and low pay-per-use pricing for both on-demand and provisioned capacity modes, including 100% compatibility with on-premises Oracle NoSQL Database. # Oracle Nosql Examples This repository stores a variety of examples demonstrating how to use the Oracle NoSQL Database. | Repo/Folder name | Description | | ------------- | ------------- | | [cluster_setup](./cluster_setup) | Deploying Oracle NoSQL Database on the Oracle Cloud Infrastructure `deploy-nosql` | | [examples-nosql-cluster-deployment](./examples-nosql-cluster-deployment) | Examples allowing you to learn how to deploy a NoSQL cluster/NoSQL store - the most popular topologies | | [examples-nosql-kvlocal](./examples-nosql-kvlocal) | example of Java Application embedding KVLocal | | [examples-nosql-java-direct-driver](./examples-nosql-java-direct-driver) | Examples using the `nosql-java-direct-driver` | | [examples-nosql-java-sdk](./examples-nosql-java-sdk) | Examples using the `nosql-java-sdk` | | [examples-nosql-node-sdk](./examples-nosql-node-sdk) | Examples using the `nosql-node-sdk` | | [examples-nosql-spring-sdk](./examples-nosql-spring-sdk) | Examples using the `nosql-spring-sdk` | | [demo-livelab](./demo-livelab) | you can find the code used in our NoSQL LiveLabs workshops in this directory and more information [here](#oracle-nosql-livelabs) | | [demo-events](./demo-events) | The NoSQL team is delivering content in Webinars and Events around the world. You can also find the instructions for workshops showcased in NoSQL events and have more information [here](#oracle-nosql-livelabs)| | [SQL for Oracle NoSQL Database tutorial](https://docs.oracle.com/en/database/other-databases/nosql-database/22.3/nsdev/getting-started-sql-oracle-nosql-database1.html) | Getting started with SQL for Oracle NoSQL Database `sql-for-nosql`| | [terraform Provider for Oracle NoSQL Database tutorial](https://github.com/oracle/terraform-provider-oci/tree/master/examples/nosql)| This is a Terraform configuration that creates the NoSQL service on Oracle Cloud Infrastructure. `nosql-cloud-devops`| We also collected in this repository exciting content about How to use the Oracle NoSQL database with other OCI services - more information [here](#other-examples-and-resources). **Source:** `Architecture Center` **Source:** `GitHub` --- NoSQL Developers 👨‍💻 👩‍💻 **Tags:** `enhancement` `help wanted` `question` `idea` `show-and-tell` In the development world, practice makes the master. That is why you must find as many ways to practice as possible. Never stop learning. We’ve enabled [GitHub Discussions](https://github.com/oracle/nosql-examples/discussions) to provide a way for you to connect with other community members. We hope that you: Ask questions. Share ideas. Engage with other community members. Welcome others and are open-minded. Remember that this is a community we build together # Oracle NoSQL LiveLabs ![NoSQL LiveLabs](./demo-livelab/LiveLabs.png) **Oracle LiveLabs** gives you access to Oracle's tools and technologies to run a wide variety of labs and workshops. In the development world, practice makes master. That is why you must find as many ways to practice as possible. Never stop learning. Follow our LiveLabs * [Get started with tables in Oracle NoSQL Database Cloud Service](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/view-workshop?wid=642) `sql-for-nosql` `nosql-java-sdk` `nosql-node-sdk` `nosql-dotnet-sdk` `nosql-go-sdk` `nosql-python-sdk` * [Discover serverless apps using Oracle NoSQL Database Cloud Service — beginner level](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/view-workshop?wid=879) `sql-for-nosql` `nosql-node-sdk` > Those labs were specialled designed for Application Developers, Architects, Administrators > and DevOps Engineers. --- In the directory **demo-livelab** you can find the **code used in our NoSQL LiveLabs workshops**. * [demo-lab-nosql](./demo-livelab/demo-lab-nosql) contains the code for Discover serverless apps using Oracle NoSQL Database Cloud Service — beginner level `sql-for-nosql` `nosql-node-sdk` ## Oracle LiveLabs Oracle LiveLabs gives you access to Oracle's tools and technologies to run a wide variety of labs and workshops. Experience Oracle's best technology, live! [https://developer.oracle.com/livelabs](https://developer.oracle.com/livelabs) # Oracle NoSQL Workshops and Examples ![NoSQL Ideas](./demo-livelab/Ideas.png) ## Oracle NoSQL Workshops The NoSQL team is delivering content in Webinars and Events around the world. **You can find the code of workshops showcased in NoSQL events** around the World (*LiveLabs coming soon*) * [serverless-with-nosql-database](./demo-livelab/serverless-with-nosql-database) contains the code for Discover serverless apps using Oracle NoSQL Database Cloud Service — intermediate level. Intermediate level LiveLab will feature functions `sql-for-nosql` `nosql-node-sdk` `nosql-python-sdk` `oci-functions` `nosql-cloud-devops` * [demo-lab-baggage](./demo-livelab/demo-lab-baggage) contains the code for Discover serverless apps using Oracle NoSQL Database Cloud Service — expert level. Advanced level Livelab will feature Streaming and API gateway `sql-for-nosql` `nosql-node-sdk` `nosql-python-sdk` `oci-functions` `nosql-cloud-devops` `oci-streaming` `oci-api-gateway` `oci-connector-hub` **You can find also the instructions of workshops showcased in NoSQL events** - [Discover Serverless Apps Using Oracle NoSQL Database Cloud Service - intermediate level](http://oracle.github.io/nosql-examples/demo-events/oug/serverless-with-nosql-database-and-functions/workshops/freetier/index.html) *demo-events > oug > serverless-with-nosql-database-and-functions* `preview version` `sql-for-nosql` `nosql-node-sdk` `nosql-python-sdk` `oci-functions` `nosql-cloud-devops` - [Discover Oracle NoSQL Database](http://oracle.github.io/nosql-examples/demo-events/webinar/demo-nosql-lab-with-kvlite/workshops/livelabs/index.html) *demo-events > webinar > demo-nosql-lab-with-kvlite* `preview version` `sql-for-nosql` `nosql-node-sdk` - [Writing and optimizing NoSQL queries](http://oracle.github.io/nosql-examples/demo-events/webinar/tv-streaming-service-queries/workshops/livelabs/index.html) *demo-events > webinar > demo-nosql-lab-with-kvlite* `preview version` `sql-for-nosql` ## Deploying Oracle NoSQL Database on the Oracle Cloud Infrastructure **Tags:** `deploy-nosql` See this [script](./cluster_setup) that simplifies the installation of Oracle NoSQL Database on the Oracle Cloud Infrastructure (OCI). This script lets a user set up a small cluster (1-10 machines) quickly, for use in proof-of-concepts, small on premise installations, and cluster installations in cloud environments (OCI, AWS, Azure). It's easy to BYOL to the cloud environment of your choosing. Read this [whitepaper](https://www.oracle.com/a/otn/docs/database/oracle-nosql-cluster-setup-oci.pdf) which explains how to easily install Oracle NoSQL Database on the Oracle Cloud Infrastructure (OCI). ## Getting started with SQL for Oracle NoSQL Database **Tags:** `sql-for-nosql` Welcome to [SQL for Oracle NoSQL Database tutorial](https://docs.oracle.com/en/database/other-databases/nosql-database/22.3/nsdev/getting-started-sql-oracle-nosql-database1.html). The SQL for Oracle NoSQL Database data model supports flat relational data, hierarchical typed (schema-full) data, and schema-less JSON data. SQL for Oracle NoSQL Database is designed to handle all such data seamlessly without any impedance mismatch among the different sub-models. Impedance mismatch is the problem that occurs due to differences between the database model and the programming language model. You have two different schemas ( with real-time scenarios) for learning various SQL concepts. These two schemas will include various data types that can be used in the Oracle NoSQL database. **Schema 1: BaggageInfo schema** Using this schema you can handle a use case wherein passengers traveling on a flight can track the progress of their checked-in bags or luggage along the route to the final destination. This functionality can be made available as part of the airline's mobile application. Once the passenger logs into the mobile application, the ticket number or reservation code of the current flight is displayed on the screen. Passengers can use this information to search for their baggage information. The mobile application is using NoSQL Database to store all the data related to the baggage. In the backend, the mobile application logic performs SQL queries to retrieve the required data. **Schema 2: Streaming Media Service - Persistent User Profile Store** Consider a TV streaming application. It streams various shows that are watched by customers across the globe. Every show has a number of seasons and every season has multiple episodes. You need a persistent meta-data store that keeps track of the current activity of the customers using the TV streaming application. Using this schema you can provide useful information to the customer such as episodes they watched, the watch time per episode, the total number of seasons of the show they watched, etc. The data is stored in the NoSQL Database and the application performs SQL queries to retrieve the required data and make it available to the user. The scripts allowing to run this tutorial are hosted in this Repository ( `AcctStreamSchema` and `BaggageSchema` ) but follow the instructions provided in the [SQL for Oracle NoSQL Database tutorial](https://docs.oracle.com/en/database/other-databases/nosql-database/22.3/nsdev/getting-started-sql-oracle-nosql-database1.html) ## Terraform Provider for Oracle Cloud Infrastructure **Tags:** `nosql-cloud-devops` The Oracle Cloud Infrastructure (OCI) provider allows you to use Terraform to interact with Oracle Cloud Infrastructure resources. Wherever you use a Terraform distribution you can use the OCI Terraform provider, including Terraform Cloud and the OCI Resource Manager. [https://github.com/oracle/terraform-provider-oci](https://github.com/oracle/terraform-provider-oci) This is a Terraform configuration that creates the NoSQL service on Oracle Cloud Infrastructure. [https://github.com/oracle/terraform-provider-oci/tree/master/examples/nosql](https://github.com/oracle/terraform-provider-oci/tree/master/examples/nosql) # Cloud Learning NoSQL Developers 👨‍💻 👩‍💻 **Tags:** `nosql-java-sdk` `nosql-node-sdk` `nosql-dotnet-sdk` `nosql-go-sdk` `nosql-python-sdk` `nosql-spring-sdk` `nosql-cloud-devops` `oci-functions` `oci-oke` and `more` Learn how to Develop Applications Fast and Effortlessly using our resources and videos in the **Cloud Learning** page [https://www.oracle.com/database/nosql/#rc30-cloud-learning](https://www.oracle.com/database/nosql/#rc30-cloud-learning) # Other Examples and Resources ![NoSQL Ideas](./demo-livelab/Ideas.png) ## Process media by using serverless job management and ephemeral compute workers **Source:** `Architecture Center` **Tags:** `nosql-python-sdk` `oci-functions` Processing large media files can be a resource intensive operation requiring large compute shapes for timely and efficient processing. In scenarios where media processing requests might be ad-hoc and on-demand, leaving instances idle while waiting for new work is not cost effective. By utilizing Oracle Cloud Infrastructure's (OCI) server-less capabilities, including OCI Functions and OCI NoSQL, we can quickly create a management system for processing media content using ephemeral OCI Compute workers. [https://docs.oracle.com/en/solutions/process-media-using-oci-services/index.html](https://docs.oracle.com/en/solutions/process-media-using-oci-services/index.html) Note: You can deploy this pattern using downloadable code or automated provisioning, as described in the Download or Deploy section in the link above. ## oci wearable health app **Source:** `GitHub` **Tags:** `nosql` `oci` The sample application is an IoT use-case, in which an application capturing health parameters running on a wearable device is sending health statistics to a device gateway (backend) hosted on OCI on regular intervals. The complete use-case can be split into 3 different parts: - On-boarding and Administration - Health data capturing & Real time Analytics - Batch Analytics [https://github.com/oracle-devrel/oci-wearable-health-app](https://github.com/oracle-devrel/oci-wearable-health-app) ## Oracle Cloud Infrastructure Data Flow Samples **Source:** `GitHub` **Tags:** `nosql-python-sdk` `oci-data flow` Oracle Cloud Infrastructure (OCI) Data Flow is a cloud-based serverless platform with a rich user interface. It allows Spark developers and data scientists to create, edit, and run Spark jobs at any scale without the need for clusters, an operations team, or highly specialized Spark knowledge. Being serverless means there is no infrastructure for you to deploy or manage. It is entirely driven by REST APIs, giving you easy integration with applications or workflows Oracle NoSQL Database cloud service : This application shows how to interface with Oracle NoSQL Database cloud service. [https://github.com/oracle-samples/oracle-dataflow-samples/](https://github.com/oracle-samples/oracle-dataflow-samples/) ## Train and deploy models from massive data sets: fraud detection use case **Source:** `Architecture Center` As your business goes through digital transformation and increasingly accepts online payment, effective methods to detect and eventually prevent credit card fraud are necessary to avoid losses. Since fraud is expected to account for a small fraction of all transactions, massive amounts of data are typically needed to build a robust and accurate model capable of alerting of fraud with minimal false positives. [https://docs.oracle.com/en/solutions/models-credit-card-fraud-detection/index.html](https://docs.oracle.com/en/solutions/models-credit-card-fraud-detection/index.html) ## Employ anomaly detection for managing assets and predictive maintenance **Source:** `Architecture Center` Anomaly detection is the identification of rare items, events, or observations in data that greatly differ from expectations. This has uses in many industries for asset monitoring and maintenance. Anomaly Detection Service helps you detect anomalies in time series data without the need for statisticians or machine learning experts. It provides prebuilt algorithms, and it addresses data issues automatically. It is a cloud-native service accessible over REST APIs and can connect to many data sources. The OCI Console, CLI, and SDK make it easy for use in end-to-end solutions. [https://docs.oracle.com/en/solutions/anomaly-detection/index.html](https://docs.oracle.com/en/solutions/anomaly-detection/index.html) ## Oracle Architecture Center **Reference architectures and best practices** Leverage knowledge from Oracle experts. Use our reference architectures, solution playbooks, and customer stories to build and deploy your cloud, hybrid, and on-premises workloads. [Explore Oracle Architecture Center](https://docs.oracle.com/pls/topic/lookup?ctx=en/solutions&id=solutions-home) ## Contributing This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md) ## Security Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process ## License Copyright (c) 2018, 2023 Oracle and/or its affiliates. Released under the Universal Permissive License v1.0 as shown at <https://oss.oracle.com/licenses/upl/>.
0
browserstack/testng-browserstack
Selenium examples for TestNG and BrowserStack Automate
null
# testng-browserstack [TestNG](http://testng.org) Integration with BrowserStack. ![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780) ## Using Maven ### Run sample build - Clone the repository - Replace YOUR_USERNAME and YOUR_ACCESS_KEY with your BrowserStack access credentials in browserstack.yml. - Install dependencies `mvn compile` - To run the test suite having cross-platform with parallelization, run `mvn test -P sample-test` - To run local tests, run `mvn test -P sample-local-test` Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github) ### Integrate your test suite This repository uses the BrowserStack SDK to run tests on BrowserStack. Follow the steps below to install the SDK in your test suite and run tests on BrowserStack: * Create sample browserstack.yml file with the browserstack related capabilities with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) and place it in your root folder. * Add maven dependency of browserstack-java-sdk in your pom.xml file ```sh <dependency> <groupId>com.browserstack</groupId> <artifactId>browserstack-java-sdk</artifactId> <version>LATEST</version> <scope>compile</scope> </dependency> ``` * Modify your build plugin to run tests by adding argLine `-javaagent:${com.browserstack:browserstack-java-sdk:jar}` and `maven-dependency-plugin` for resolving dependencies in the profiles `sample-test` and `sample-local-test`. ``` <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>getClasspathFilenames</id> <goals> <goal>properties</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M5</version> <configuration> <suiteXmlFiles> <suiteXmlFile>config/sample-local-test.testng.xml</suiteXmlFile> </suiteXmlFiles> <argLine> -javaagent:${com.browserstack:browserstack-java-sdk:jar} </argLine> </configuration> </plugin> ``` * Install dependencies `mvn compile` ## Using Gradle ### Prerequisites - If using Gradle, Java v9+ is required. ### Run sample build - Clone the repository - Install dependencies `gradle build` - To run the test suite having cross-platform with parallelization, run `gradle sampleTest` - To run local tests, run `gradle sampleLocalTest` Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github) ### Integrate your test suite This repository uses the BrowserStack SDK to run tests on BrowserStack. Follow the steps below to install the SDK in your test suite and run tests on BrowserStack: * Following are the changes required in `gradle.build` - * Add `compileOnly 'com.browserstack:browserstack-java-sdk:latest.release'` in dependencies * Fetch Artifact Information and add `jvmArgs` property in tasks *SampleTest* and *SampleLocalTest* : ``` def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' } task sampleTest(type: Test) { useTestNG() { dependsOn cleanTest useDefaultListeners = true suites "config/sample-test.testng.xml" jvmArgs "-javaagent:${browserstackSDKArtifact.file}" } } ``` * Install dependencies `gradle build` ## Notes * You can view your test results on the [BrowserStack Automate dashboard](https://www.browserstack.com/automate)
0
habuma/spring-in-action-5-samples
Home for example code from Spring in Action 5.
null
null
1
fescobar/allure-docker-service-examples
Repository to share examples about Allure Docker Service & Allure Docker Service UI
allure allure-docker-service allure-docker-service-ui automation docker kubernetes report reporting-tool testing testing-tools
# ALLURE DOCKER SERVICE EXAMPLES ## OFFICIAL - Kubernetes --> [allure-docker-kubernetes-example](allure-docker-kubernetes-example) - MultiProject --> [allure-docker-multi-project-example](allure-docker-multi-project-example) - TestNG --> [allure-docker-java-testng-example](allure-docker-java-testng-example) - JUnit4 --> [allure-docker-java-junit4-example](allure-docker-java-junit4-example) - Cucumber JVM --> [allure-docker-java-cucumber-jvm-example](allure-docker-java-cucumber-jvm-example) - CucumberJS --> [allure-docker-nodejs-cucumber-example](allure-docker-nodejs-cucumber-example) - CucumberJS TypeScript --> [allure-docker-nodejs-typescript-cucumber-example](allure-docker-nodejs-typescript-cucumber-example) - Mocha --> [allure-docker-nodejs-typescript-mocha-example](allure-docker-nodejs-typescript-mocha-example) - Behave --> [allure-docker-python-behave-example](allure-docker-python-behave-example) - PyTest --> [allure-docker-python-pytest-example](allure-docker-python-pytest-example) - SpecFlow --> [AllureDockerCSharpExample](AllureDockerCSharpExample) - SpecFlow3 --> [AllureDockerCSharpSpecFlow3Example](AllureDockerCSharpSpecFlow3Example) See documentation here: - https://github.com/fescobar/allure-docker-service - https://github.com/fescobar/allure-docker-service-ui ## NO OFFICIAL - Azure Container Instances --> https://github.com/khanzzirfan/jsonserver-mockend/blob/main/azure-aci-template.json - AWS Terraform --> https://github.com/Idea-Pool/aws-allure - GitHub Actions --> https://github.com/unickq/send-to-allure-docker-service-action - Allure Operator --> https://github.com/mting806/allure-operator
0
aspose-pdf/Aspose.PDF-for-Java
Aspose.PDF for Java examples, plugins and showcases
null
![GitHub all releases](https://img.shields.io/github/downloads/aspose-pdf/Aspose.pdf-for-Java/total) ![GitHub](https://img.shields.io/github/license/aspose-pdf/Aspose.pdf-for-java) # Java API to Process & Manipulate PDF Files [Aspose.PDF for Java](https://products.aspose.com/pdf/java) is a PDF document creation component that enables your Java applications to read, write and manipulate PDF documents without using Adobe Acrobat. Directory | Description --------- | ----------- [Examples](Examples) | A collection of Java examples that help you learn the product features. <p align="center"> <a title="Download Examples ZIP" href="https://github.com/aspose-pdf/Aspose.pdf-for-Java/archive/master.zip"> <img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" /> </a> </p> ## `aspose.pdf` Package Features ### PDF Document Featres - Set basic information (e.g. author, creator) of the PDF document. - Configure PDF Page properties (e.g. width, height, cropbox, bleedbox etc.). - Set page numbering, bookmark level, page sizes etc. - Apply document open action, open mode as well as appearance. - Document can have different page transition effects such as dissolve or box. - Create PDF documents via `XML`, `API` or `XML` and `API` combined. - Ability to work with text, paragraphs, headings, hyperlinks, graphs, attachments etc. ### Security Features - PDF documents can be encrypted up to 128 bits. - Master and user passwords can be set for PDF encryption. - Apply rescriptions on content modification, copying, printing and other operations. ### Conversion Features - Convert an existing XML file (`.XML`) or `XmlDocument` to a new PDF document or a PDF file stream. - Convert conventional Image formats into PDF file. - Convert `PCL` files into PDF file. For a more comprehensive list of features, please visit [Features of `aspose.pdf` Package](https://docs.aspose.com/pdf/java/features-of-aspose-pdf-package/). ## `com.aspose.pdf` Package Features - Supports 14 core fonts. - Support for `Type 1`, `TrueType`, `Type 3`, `CJK` fonts. - `Unicode` support is available. - Add, search, extract and replace text in PDF files. - Add/delete, extract and replace images. - Insert, delete, split PDF pages. - Support for Linearization (optimization for the web). - Set and get XMP metadata. - Validate (`PDF/A-1a`, `PDF/A-1b`). - Work with bookmarks, annotations, PDF forms, stamps, watermarks and more. For a more comprehensive list of features, please visit [Features of `com.aspose.pdf` Package](https://docs.aspose.com/pdf/java/features-of-com-aspose-pdf-package/). ## `com.aspose.pdf.facades` Package Features - Supports 14 core fonts. - Support for `Type 1`, `TrueType`, `Type 3`, `CJK` fonts. - `Unicode` support is available. - Add, replace and extract text & images (from the entire PDF, a particular page, or a range of pages). - Work with bookmarks, annotations, PDF forms, links, actions, signature and more. - Print PDF to default, specified, physical, or virtual printer. - Print PDF to `XPS` file or XPS printer. For a more comprehensive list of features, please visit [Features of `com.aspose.pdf.facades` Package](https://docs.aspose.com/pdf/java/features-of-com-aspose-pdf-facades-package/). ## Read & Write PDF & Other Formats **Fixed Layout:** PDF, XPS\ **Books:** EPUB\ **Web:** HTML **Other:** TEX, XML, SVG ## Save PDF Documents As **Microsoft Office:** DOC, DOCX, XLS, XLSX, PPTX\ **Images:** JPEG, PNG, BMP, TIFF, EMF\ **Other:** MobiXML, XML, TEXT ## Read Formats CGM, MHT, PCL, PS, XSLFO, MD ## Supported Environments - **Microsoft Windows:** Windows Desktop & Server (x86, x64) - **macOS:** Mac OS X - **Linux:** Ubuntu, OpenSUSE, CentOS, and others - **Java Versions:** `J2SE 8.0 (1.8)` or above ## Get Started with Aspose.PDF for Java Aspose hosts all Java APIs at the [Aspose Repository](https://repository.aspose.com/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-pdf). You can easily use Aspose.PDF for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit [Installing Aspose.PDF for Java from Aspose Repository](https://docs.aspose.com/pdf/java/installation/) documentation page. ## Extract text from a PDF file using Java ```java // For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.Pdf-for-Java // Open document Document pdfDocument = new Document("input.pdf"); // Create TextAbsorber object to extract text TextAbsorber textAbsorber = new TextAbsorber(); // Accept the absorber for all the pages pdfDocument.getPages().accept(textAbsorber); // Get the extracted text String extractedText = textAbsorber.getText(); // Create a writer and open the file java.io.FileWriter writer = new java.io.FileWriter(new java.io.File("Extracted_text.txt")); writer.write(extractedText); // Write a line of text to the file tw.WriteLine(extractedText); // Close the stream writer.close(); ``` [Product Page](https://products.aspose.com/pdf/java) | [Docs](https://docs.aspose.com/pdf/java/) | [Demos](https://products.aspose.app/pdf/family) | [API Reference](https://apireference.aspose.com/pdf/java) | [Examples](https://github.com/aspose-pdf/Aspose.PDF-for-Java/tree/master/Examples) | [Blog](https://blog.aspose.com/category/pdf/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)
0
sequenceiq/sequenceiq-samples
SequenceIQ Hadoop examples
null
SequenceIQ Hadoop sample projects ============================ This repository is a collection of sample projects and code examples featured in our blog entries - for more details check [SequenceIQ blog](http://blog.sequenceiq.com). This samples repository and the blog contains random thoughts and proof-of-concepts/interesting issues we have face during our product development stack. Where the samples are not covered by a blog entry, we try to make them self explanatory or supply a short readme. Please feel free to collaborate, share, ask for help or report issues. * **flume-sources** module: [Custom Apache Flume source](http://blog.sequenceiq.com/blog/2014/02/22/custom-flume-source/) * **etl-samples** module: [ETL - producing better quality data](http://blog.sequenceiq.com/blog/2014/02/28/etl-and-data-quality/) * **hdp-sandbox-access** module: [Accessing HDP2 sandbox from the host](http://blog.sequenceiq.com/blog/2014/03/05/access-hdp2-sandbox/) * **lastfm-morphlines-etl** module: [How-to: Process Data using Morphlines (in Kite SDK)](http://blog.cloudera.com/blog/2014/04/how-to-process-data-using-morphlines-in-kite-sdk/) * **hdp-sandbox-access** module: [HDFS and java.nio.channels](http://blog.sequenceiq.com/blog/2014/03/07/read-from-hdfs/) * **mapreduce-morphline** module: [Data cleaning with MapReduce and Morphlines](http://blog.sequenceiq.com/blog/2014/03/11/data-cleaning-with-mapreduce-and-morphlines/) * **yarn-queue-tests** module: [YARN Capacity Scheduler](http://blog.sequenceiq.com/blog/2014/03/14/yarn-capacity-scheduler/) * **tez-dag-jobs** module: [Using Mahout with Tez](http://blog.sequenceiq.com/blog/2014/03/31/mahout-on-tez/) * **yarn-monitoring-R** module: [Monitoring YARN with R]() * **scalding-correlation** module: [Correlation example with Scalding](http://blog.sequenceiq.com/blog/2014/06/23/scalding-correlation-example/) * **spark-clustering** module: [K-means clustering on Spark](http://blog.sequenceiq.com/blog/2014/07/31/spark-mllib/) Thanks, [SequenceIQ](http://sequenceiq.com)
0
SonarSource/sonar-training-examples
null
null
# SonarQube Training Examples Several examples of analysis that demonstrate different use cases ## Sub-directories * [complexity](complexity/): Demonstrates difference between cyclomatic and cognitive complexity * [coverage-metrics](coverage-metrics/): Demonstrates the calculations for line, condition and overall coverage * [size-metrics](size-metrics/): Demonstrates the calculation of different size metrics (lines, loc, lines to cover, comment lines and comments %) * [metrics-without-scm](metrics-without-scm/): Demonstrates the SonarQube 7.1+ ability to compute metrics on new code even without SCM * [branches](branches/): Demonstrates the SonarQube 6.7+ new branch management system, and to compare results with 5.6- old branch management. * [portfolios](portfolios/): Example of meaningful Portfolios hierarchy and Application * [file-renaming](file-renaming/): Demonstrate the SonarQube 6.7+ issue tracking preservation (and new code preservation) in case of file renaming or file move. * [security](security/): Example of (7.3+) Vulnerabilities and Security Hotspots. * [external-issues](external-issues/): Example of (7.2+) external linter issues import. * [pull-request](pull-request/): Example of (7.7+) support for GitHub pull request analysis
0
jveverka/java-11-examples
JDK 11 examples and demo projects.
akka avro blockchain clustering dagger dependency-injection google-guice grpc hazelcast hibernate java11 jetty jni kafka mongodb mongodb-database rxjava ssh ssh-server testcontainers
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Java11](https://img.shields.io/badge/java-11-blue)](https://img.shields.io/badge/java-11-blue) [![Gradle](https://img.shields.io/badge/gradle-v6.5-blue)](https://img.shields.io/badge/gradle-v6.5-blue) ![Build and Test](https://github.com/jveverka/java-11-examples/workflows/Build%20and%20Test/badge.svg) # Java 11 examples This repository contains various simple java 11 examples. Examples are demonstrating not only new java 11 language features, but also new JDK 11 possibilities. ### Environment setup Make sure following software is installed on your PC. * [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot) * [Gradle 6.8](https://gradle.org/install/) or later * [docker.io 19.x](https://www.docker.com/) or later Please check [system requirements](docs/system-requirements.md) before. ### Compile & Test Most examples are build by top-level gradle project. ``` gradle clean build test ``` ### Examples * [artefact publishing demo](artefact-publishing-demo) - publish artefact to ORSSH. * [akka clustering demo](akka-cluster-sshsessions) * [futures demo](futures-demo) * [image processing demo](imageprocessing-demo) * [jetty server demo](jetty-servlet4-http2) * [kafka example](kafka-example) * [RxJava demo](rxjava-demo) * [simple JNI demo](simple-jni-demo) * [JPMS demo](simple-module-example) * [ssh server demo](ssh-server-demo) * [com.fasterxml.jackson](jackson-fasterxml-demo) * [weird java stuff](java-is-weird) * __Security and Crypto__ * [Diffie-Hellman demo](diffie-hellman-demo) * [JCE demo](jce-demo) * [Blockchain demo](block-chain) * [JWT demo](jwt-demo) * [Entropy calculation demo](entropy-demo) * [Enigma demo](enigma-demo) * __Databases__ * [mongodb demo](mongodb-demo) * [hibernate demo](hibernate-demo) * [JDBC demo](jdbc-demo) * [R2DBC demo](r2dbc-demo) * [Elastic Search demo](elastic-demo) ### Other Java Examples * [spring demos](https://github.com/jveverka/spring-examples) - java11 & docker & gradle examples * [java-boot-camp](https://github.com/jveverka/java-boot-camp) - java11 tutorials & maven examples ### JDK9 - JDK11 New Features * JDK9 [Feature list](https://openjdk.java.net/projects/jdk9/) * JDK10 [Feature list](https://openjdk.java.net/projects/jdk/10/) * JDK11 [Feature list](https://openjdk.java.net/projects/jdk/11/) ### References * [JDK12 - JDK17 Features](https://github.com/jveverka/java-17-examples) _Enjoy !_
0
atinfo/at.info-knowledge-base
http://automated-testing.info knowledge base on test automation examples
null
at.info knowledge base ====================== http://automated-testing.info knowledge base is basement to provide different examples on test automation topics for different tools. Please have a look to overview page http://atinfo.github.io/at.info-knowledge-base/ Feel free to add and share with test automation communite any examples you wanted. Create pull request and share it. Keep it automated! :) Contribution Guidelines ====================== 1. **Fork** 2. **Implement** Something 3. Submit a **Pull Request** 4. <a href="http://automated-testing.info/t/gotovye-reczepty-ili-aktivizacziya-soobshhestva-avtomatizatorov-na-atinfo/4441">**Create code recipe** on http://automated-testing.info</a> For example, like this http://automated-testing.info/t/code-recipe-kak-ispolzovat-sikuli-c-webdriver-primer-dlya-http-automated-testing-info/4586 4. High Five! Small requirements to pull requests ====================== 1. **Workable code** 2. Folder's name and all other names should be **informative** 3. **README.md** with description in root is obligatory (<a href="https://github.com/atinfo/at.info-knowledge-base/blob/master/functional%20test%20automation/webdriver/methods-interceptor-via-aspectj-on-java/README.md">please have a look to already existed examples</a>) Timeline on added examples ====================== Also you can see it on http://atinfo.github.io/at.info-knowledge-base/ <ul> <li> <label>java</label> <label>selenium</label> <label>webdriver</label> <label>select2</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/select2-wrapper" target="_blank">how to create a Select2 wrapper for further interaction with WebDriver</a> </li> <li> <label>java</label> <label>selenium</label> <label>webdriver</label> <label>content-supplier</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/selenium-supplier-examples" target="_blank">set of examples in regards to selenium content supplier project</a> </li> <li> <label>java</label> <label>selenium</label> <label>webdriver</label> <label>content-supplier</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/selenium-supplier" target="_blank">how to supply selenium content to remote environment</a> </li> <li> <label>java8</label> <label>selenium</label> <label>webdriver</label> <label>interfaces</label> <label>framework-design</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/java8-interfaces-impact-on-framework-design" target="_blank">java 8 interfaces impact on test automation framework design</a> </li> <li> <label>java</label> <label>selenium</label> <label>webdriver</label> <label>env-watcher</label> <label>jenkins</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/selenium-utils-env-watcher" target="_blank">jenkins plugin for managing stucked environment using env-watcher service</a> </li> <li> <label>java</label> <label>selenium</label> <label>webdriver</label> <label>env-watcher</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/env-watcher" target="_blank">how to manage stucked environment via standalone service</a> </li> <li> <label>java</label> <label>mysql</label> <label>hibernate</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/java/testng/mysql-data-provider" target="_blank">how to use Hibernate ORM and Java 8 tricks for retrieving DB entities</a> </li> <li> <label>java</label> <label>Mustache</label> <label>testng</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/java/mustache/html-templates" target="_blank">How to create custom reports based on TestNG results with Mustache template engine.</a> </li> <li> <label>java</label> <label>jenkins</label> <label>webdriver</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/selenium-utils-jenkins-plugin" target="_blank">How to shutdown Selenium Grid hub / nodes on Jenkins plugin</a> </li> <li> <label>java</label> <label>junit</label> <label>maven</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/java/junit/run_methods_by_tag" target="_blank">How to run the only test methods, which has a special tag from java junit</a> </li> <li> <label>mailcatcher</label> <label>java</label> <label>rest</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/mailcatcher%20rest%20client%20on%20java" target="_blank">How to use MailCatcher REST API for emails testing</a> </li> <li> <label>webdriver</label> <label>java</label> <label>proxy</label> <label>browsermob</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/remote%20proxy%20and%20har%20storage%20on%20java" target="_blank">How to use remote proxy (BrowserMob) and save output HAR files into storage</a> </li> <li> <label>webdriver</label> <label>java</label> <label>proxy</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/setting%20proxy%20for%20webdriver%20on%20java" target="_blank">How to initialise Webdriver and RemoteWebdriver with custom Proxy</a></li> <li> <label>javascript</label> <label>firepath</label> <label>xul</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/javascript/how%20to%20extend%20firepath" target="_blank">How to modify FirePath extension to allow saving locators with custom names</a></li> <li> <label>teamcity</label> <label>junit</label> <label>java</label> <label>maven</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/java/junit/run_failed_tests" target="_blank">How to rerun the only failed tests from TeamCity build</a></li> <li> <label>thucydides</label> <label>junit</label> <label>java</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/thucydides/simple%20example%20of%20test%20based%20on%20google.com" target="_blank">How to create simplest webdriver bdd test using Java+JUnit+Thucydides</a> </li> <li> <label>webdriver</label> <label>python</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/typed%20webelements%20on%20python" target="_blank">How to create typed webelements for your webdriver python tests</a> </li> <li> <label>robot framework</label> <label>python</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/robotframework/Simple%20Hybrid%20(Python%20%2B%20Robotframework)%20Page%20Object%20Example" target="_blank">Simple Hybrid (Python + Robotframework) Page Object Example</a> </li> <li> <label>webdriver</label> <label>java</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/methods-interceptor-via-aspectj-on-java">How to intercept methods calls for collecting test steps via aspectj</a> </li> <li> <label>webdriver</label> <label>java</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/custom-locators-on-java">How to create custom locators dynamically</a> </li> <li> <label>webdriver</label> <label>java</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/methods-interceptor-on-java">How to intercept methods calls for collecting test steps</a> </li> <li> <label>java</label> <label>sikuli</label> <label>webdriver</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/sikuli/Java%20Sikuli%20WebDriver%20Examples">How to use sikulix with wrappers, interfaces, observers to automate web with webdriver </a> </li> <li> <label>webdriver</label> <label>java</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/capture%20video%20on%20java">Example on implementation screen recorder for web tests on webdriver by means of java</a> </li> <li> <label>webdriver</label> <label>java</label> <label>python</label> <label>ruby</label> <label>C#</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/file%20upload"> How to make file upload with Selenium WebDriver</a> </li> <li> <label>python</label> <label>webdriver</label> <label>browsermob</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/functional%20test%20automation/webdriver/chromedriver%20with%20browsermob%20proxy%20on%20python"> How to set chrome webdriver to use browsermob proxy</a> </li> <li> <label>python</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/python/code%20recipes/implement%20general%20wait"> How to implement generic waiting mechanism that wait on closure passed</a> </li> <li> <label>python</label> <a href="https://github.com/atinfo/at.info-knowledge-base/tree/master/programming/python/code%20recipes/generate%20nested%20dicts"> Hot to make autogenerated nested dictionary without any headaches on getting not existed key</a> </li> </ul>
0
esig/dss-demonstrations
Examples of DSS integration
null
## Demonstrations for DSS : Digital Signature Service This is the demonstration repository for project DSS : https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/eSignature. # Issue Tracker Please, use the new JIRA for project is on https://ec.europa.eu/digital-building-blocks/tracker/projects/DSS/issues. # Maven repository The release of [DSS](https://github.com/esig/dss) is published on Maven Central repository : https://central.sonatype.com/search?q=eu.europa.ec.joinup.sd-dss # Demonstration The demonstration bundle is deployed at https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo # DSS Standalone Application In order to build the standalone application, the following modules are required: * dss-standalone-app; * dss-standalone-package. If the build is successful, you will be able to find out the following containers in the directory `/dss-standalone-app-package/target/`: * dss-standalone-app-package-minimal.zip - contains the application code. Requires JDK ad JavaFX installed on a target machine in order to run the application; * dss-standalone-app-package-complete.zip - contains the application code, as well as JDK and JavaFX library code. Can be run on a machine whithout pre-installed libraries. In order to launch the application, you will need to extract the archive and run the file `dss-run.bat`. # DSS Web Application To build the DSS Web Application the following modules are required: * dss-demo-webapp; * dss-demo-bundle. After a successful build, in the directory `/dss-demo-bundle/target/` you will be able to find out two containers: `dss-demo-bundle.zip` and `dss-demo-bundle.tar.gz`. Despite the container type, the content of both files is the same. After extracting the content, you will need to run the file `Webapp-Startup.bat` in order to launch the server and the file `Webapp-Shutdown.bat` to stop the server. After running the server, the web-application will be available at the address `http://localhost:8080/`. # JavaDoc The JavaDoc is available on https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/apidocs/index.html # Ready-to-use bundles Bundles which contain the above demonstration can be downloaded from the [Maven repository](https://ec.europa.eu/digital-building-blocks/artifact/service/rest/repository/browse/esignaturedss/eu/europa/ec/joinup/sd-dss/dss-demo-bundle/). The code of the demonstration can be found on https://ec.europa.eu/digital-building-blocks/code/projects/ESIG/repos/dss-demos/browse [![License (LGPL version 2.1)](https://img.shields.io/badge/license-GNU%20LGPL%20version%202.1-blue.svg?style=flat-square)](https://www.gnu.org/licenses/lgpl-2.1.html)
0
restfb/restfb-examples
Exmples how to use RestFB
examples java restfb
# restfb-examples First run: ```bash $ mvn compile ``` You can run the examples afterwards like this: ```bash $ mvn exec:java@run-reader-examples -Daccess_token=MY_ACCESS_TOKEN $ mvn exec:java@run-publisher-examples -Daccess_token=MY_ACCESS_TOKEN $ mvn exec:java@run-login-example -Dapp_id=APP_ID -Dapp_secret=APP_SECRET ``` Instructions for getting an OAuth access token are available on [RestFB](http://restfb.com). Or simply take one from [Facebook Graph API Explorer]([https://developers.facebook.com/tools/explorer/]). You need [maven](https://maven.apache.org/) (>3.3.1) to be installed on your system.
0
dremio-hub/arrow-flight-client-examples
null
null
# Arrow Flight Client Application Examples This repository provides sample Arrow Flight client applications in several languages to help you get started with Dremio Arrow Flight server endpoint.
0
hellokaton/java-library-examples
💪 example of common used libraries and frameworks, programming required, don't fork man.
cache email examples java kafka logback okhttp3 orm qrcode yaml
# Java Library Examples Java 库、框架使用示例大全,持续更新,请勿 `fork`。 [![](https://img.shields.io/travis/biezhi/java-library-examples.svg)](https://travis-ci.org/biezhi/java-library-examples) [![](https://img.shields.io/badge/license-MIT-FF0080.svg)](https://github.com/biezhi/java-library-examples/blob/master/LICENSE) [![@biezhi on zhihu](https://img.shields.io/badge/zhihu-%40biezhi-red.svg)](https://www.zhihu.com/people/biezhi) [![](https://img.shields.io/github/followers/biezhi.svg?style=social&label=Follow%20Me)](https://github.com/biezhi) - [`cache-example`](https://github.com/biezhi/java-library-examples/tree/master/cache-example) - [`ehcache-example`](https://github.com/biezhi/java-library-examples/blob/master/cache-example/ehcache-example) - [`guava-cache-example`](https://github.com/biezhi/java-library-examples/blob/master/cache-example/guava-cache-example) - [`jedis-example`](https://github.com/biezhi/java-library-examples/blob/master/cache-example/jedis-example) - [`compress-example`](https://github.com/biezhi/java-library-examples/tree/master/compress-example) - [`crawler-example`](https://github.com/biezhi/java-library-examples/blob/master/crawler-example) - [`crawler4j-example`](https://github.com/biezhi/java-library-examples/blob/master/crawler-example/crawler4j-example) - [`elves-example`](https://github.com/biezhi/java-library-examples/blob/master/crawler-example/elves-example) - [`webmagic-example`](https://github.com/biezhi/java-library-examples/blob/master/crawler-example/webmagic-example) - [`email-example`](https://github.com/biezhi/java-library-examples/tree/master/email-example) - [`commons-email-example`](https://github.com/biezhi/java-library-examples/tree/master/email-example/commons-email-example/src/main/java/io/github/biezhi/email) - [`ohmyemail-example`](https://github.com/biezhi/java-library-examples/blob/master/email-example/ohmyemail-example) - [`embedded-example`](https://github.com/biezhi/java-library-examples/blob/master/embedded-example) - [`encrypt-example`](https://github.com/biezhi/java-library-examples/blob/master/encrypt-example) - [`excel-example`](https://github.com/biezhi/java-library-examples/blob/master/excel-example) - [`gui-example`](https://github.com/biezhi/java-library-examples/blob/master/gui-example) - [`http-example`](https://github.com/biezhi/java-library-examples/blob/master/http-example) - [`httpclient4-example`](https://github.com/biezhi/java-library-examples/tree/master/http-example/httpclient4-example/src/main/java/io/github/biezhi/httpclient4) - [`ohmyrequest-example`](https://github.com/biezhi/java-library-examples/blob/master/http-example/ohmyrequest-example) - [`okhttp3-example`](https://github.com/biezhi/java-library-examples/tree/master/http-example/okhttp3-example/src/main/java/io/github/biezhi/okhttp3) - [`unirest-example`](https://github.com/biezhi/java-library-examples/tree/master/http-example/unirest-example/src/main/java/io/github/biezhi/unirest) - [`json-example`](https://github.com/biezhi/java-library-examples/blob/master/json-example) - [`fastjson-example`](https://github.com/biezhi/java-library-examples/tree/master/json-example/fastjson-example/src/main/java/io/github/biezhi/json/fastjson) - [`gson-example`](https://github.com/biezhi/java-library-examples/tree/master/json-example/gson-exmaple/src/main/java/io/github/biezhi/json/gson) - [`jackson-example`](https://github.com/biezhi/java-library-examples/tree/master/json-example/jackson-example/src/main/java/io/github/biezhi/json/jackson) - [`log-example`](https://github.com/biezhi/java-library-examples/blob/master/log-example) - [`commons-logging-example`](https://github.com/biezhi/java-library-examples/tree/master/log-example/commons-logging-example/src/main/java/io/github/biezhi/commons/logging) - [`log4j-example`](https://github.com/biezhi/java-library-examples/blob/master/log-example/log4j-example/src/main/java/io/github/biezhi/log4j) - [`logback-example`](https://github.com/biezhi/java-library-examples/blob/master/log-example/logback-example/src/main/java/io/github/biezhi/logback) - [`slf4j-example`](https://github.com/biezhi/java-library-examples/blob/master/log-example/slf4j-example/src/main/java/io/github/biezhi/slf4j) - [`metrics-example`](https://github.com/biezhi/java-library-examples/blob/master/metrics-example) - [`mq-example`](https://github.com/biezhi/java-library-examples/blob/master/mq-example) - [`kafka-example`](https://github.com/biezhi/java-library-examples/blob/master/mq-example/kafka-example) - [`rabbitmq-example`](https://github.com/biezhi/java-library-examples/blob/master/mq-example/rabbitmq-example) - [`rocketmq-example`](https://github.com/biezhi/java-library-examples/blob/master/mq-example/rocketmq-example) - [`network-example`](https://github.com/biezhi/java-library-examples/blob/master/network-example) - [`mina-example`](https://github.com/biezhi/java-library-examples/blob/master/network-example/mina-example) - [`netty-example`](https://github.com/biezhi/java-library-examples/blob/master/network-example/netty-example) - [`orm-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example) - [`blade-jdbc-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/blade-jdbc-example) - [`dbutils-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/dbutils-example) - [`hibernate-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/hibernate-example) - [`jooq-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/jooq-example) - [`mybatis-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/mybatis-example) - [`sql2o-example`](https://github.com/biezhi/java-library-examples/blob/master/orm-example/sql2o-example) - [`qrcode-example`](https://github.com/biezhi/java-library-examples/blob/master/qrcode-example) - [`qrgen-example`](https://github.com/biezhi/java-library-examples/blob/master/qrcode-example/qrgen-example) - [`zxing-example`](https://github.com/biezhi/java-library-examples/blob/master/qrcode-example/zxing-example) - [`rss-example`](https://github.com/biezhi/java-library-examples/blob/master/rss-example) - [`task-example`](https://github.com/biezhi/java-library-examples/blob/master/task-example) - [`template-example`](https://github.com/biezhi/java-library-examples/blob/master/template-example) - [`freemarker-example`](https://github.com/biezhi/java-library-examples/blob/master/template-example/freemarker-example) - [`jetbrick-example`](https://github.com/biezhi/java-library-examples/blob/master/template-example/jetbrick-example) - [`velocity-example`](https://github.com/biezhi/java-library-examples/blob/master/template-example/velocity-example) - [`yaml-example`](https://github.com/biezhi/java-library-examples/tree/master/yaml-example/src/main/java/io/github/biezhi/yaml) ## 项目结构 如若在本地运行,请确保你的计算机已经安装如下环境 - Maven3 - Java8 - [lombok](https://projectlombok.org/) 插件 # 开源协议 [MIT](https://github.com/biezhi/java-library-examples/blob/master/LICENSE)
1
daggerok/spring-5-examples
This repository is contains spring-boot 2 / spring framework 5 project examples. Using reactive programming model / paradigm and Kotlin
flux functional-programming functional-reactive-programming kotlin mongodb mono reactive-programming reactor redis server-side-events spring-5 spring-boot spring-data spring-data-keyvalue spring-fu spring-reactive spring-security spring-webflux sse webclient
null
0
ModeShape/modeshape-examples
A set of examples for ModeShape, which is a lightweight, fast, pluggable, open-source, federating JCR implementation that can unify content from multiple systems, including files systems, databases, data grids, other repositories, etc.
null
[![License](http://img.shields.io/:license-apache%202.0-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.modeshape/modeshape-parent/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.modeshape%22) [![Build Status](https://travis-ci.org/ModeShape/modeshape-examples.svg?branch=master)](https://travis-ci.org/ModeShape/modeshape-examples) # The ModeShape project ModeShape is an open source implementation of the JCR 2.0 ([JSR-283](http://www.jcp.org/en/jsr/detail?id=283])) (aka, 'JCR') specification and standard API. To your applications, ModeShape looks and behaves like a regular JCR repository. Applications can search, query, navigate, change, version, listen for changes, etc. But ModeShape can store that content in a variety of back-end stores or it can access and update existing content from *other* kinds of systems (including file systems, SVN repositories, JDBC database metadata, and other JCR repositories). ModeShape's connector architecture means that you can write custom connectors to access any kind of system. And ModeShape can even federate multiple back-end systems into a single, unified virtual repository. For more information on ModeShape, including getting started guides, reference guides, and downloadable binaries, visit the project's website at [http://www.modeshape.org]() or follow us on our [blog](http://modeshape.wordpress.org) or on [Twitter](http://twitter.com/modeshape). Or hop into our [IRC chat room](http://www.jboss.org/modeshape/chat) and talk our community of contributors and users. The official Git repository for the project is also on GitHub at [http://github.com/ModeShape/modeshape](). # Examples This Git repository contains examples showing how to use ModeShape within your applications. Each example is a self-contained Maven project that is ready to use. To run the examples, simply clone the repository: $ git clone git://github.com/ModeShape/modeshape-examples.git $ cd modeshape-examples Then use Maven to build all of the examples (and run any unit tests): $ mvn clean install -s settings.xml or you can build an individual example. For instance: $ cd modeshape-embedded-example $ mvn clean install -s settings.xml See [this ModeShape community article](http://community.jboss.org/wiki/ModeShapeandMaven) for help on how to install Maven 3. # Looking for ModeShape 4.x or 3.x examples? The code on the 'master' branch works against the latest ModeShape 5.x release, but examples for ModeShape 4.x and 3.x are on different branches. To get to those, use the Git `checkout` command to switch branches: $ git checkout 4.x or $ git checkout 3.x and then use the Maven command to build the examples (same as above). # Need help? ModeShape is open source software with a dedicated community. If you have any questions or problems, post a question in our [user forum](http://community.jboss.org/en/modeshape) or hop into our [IRC chat room](http://www.jboss.org/modeshape/chat) and talk our community of contributors and users. # Contribute an example We're always looking for good, easy to follow examples. If you've written one and would like to help, simply use GitHub's Fork and Pull-Request techniques. 1. Use the "Fork" button at the top of [this page](https://github.com/ModeShape/modeshape-examples) on GitHub to create your own fork. 2. Clone your fork: <pre> $ git clone git@github.com:&lt;you>/modeshape-examples.git $ cd modeshape-examples $ git remote add upstream git://github.com/ModeShape/modeshape-examples.git </pre> 3. Create a topic branch <pre> $ git checkout -b &lt;branch-name> </pre> 4. Make your changes 5. When all of the examples (including yours) build, commit to that branch <pre> $ git commit . </pre> 6. Push your commit(s) to your fork on GitHub <pre> $ git push origin &lt;branch-name> </pre> 7. On GitHub.com, go to your fork and switch branches to your topic branch, press the 'Pull Request' button, and fill out the form with the details. We'll then review your submission and, if it works and builds, merge it into the examples repository.
0
jorgemoralespou/osev3-examples
DEPRECATED!!!!! Use https://github.com/jorgemoralespou/s2i-java instead for building springboot
null
null
0
douglascraigschmidt/POSA-14
This repository contains assignments and examples for the 2014 offering of the POSA MOOC (see www.coursera.org/course/posa for more information)
null
POSA-14 ======= This repository contains assignments and examples for the 2014 offering of the POSA MOOC (see www.coursera.org/course/posa for more information).
0
sjsdfg/OnJava8-Examples-Maven
this is the maven version of OnJava8-Examples https://github.com/BruceEckel/OnJava8-Examples
on-java-8 onjava8
# OnJava8-Examples-Maven this is the maven version of OnJava8-Examples https://github.com/BruceEckel/OnJava8-Examples more easier to import no guarantee that this code is run ok. because some code just show you the wrong way, like this: ```java // generics/HijackedInterface.java // (c)2017 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. // {WillNotCompile} class Cat extends ComparablePet implements Comparable<Cat> { // error: Comparable cannot be inherited with // different arguments: <Cat> and <ComparablePet> // class Cat // ^ // 1 error public int compareTo(Cat arg) { return 0; } } ```
0
leveluplunch/levelup-java-examples
Java examples
null
levelup-java-examples ===================== [![Build Status](https://travis-ci.org/leveluplunch/levelup-java-exercises.png?branch=master)](https://travis-ci.org/leveluplunch/levelup-java-examples) Levelup [Java examples](http://www.leveluplunch.com/java/examples/) is a series of java examples that attempt to cross cut libraries such as straight up java, java 8, [Google Guava](https://code.google.com/p/guava-libraries/), [Apache commons](http://commons.apache.org/), [Spring IO](http://spring.io/), [Joda Time](http://www.joda.org/joda-time/), [Hamcrest](https://code.google.com/p/hamcrest/), [Jackson JSON/XML processor](http://wiki.fasterxml.com/JacksonHome), [jsonpath](http://goessner.net/articles/JsonPath/), [Junit](http://junit.org/) and much more... ## Staying in touch * [leveluplunch.com](http://www.leveluplunch.com) * [Twitter](https://twitter.com/leveluplunch) * [Google plus](https://plus.google.com/+Leveluplunch) * [Facebook](https://www.facebook.com/leveluplunch) * [Youtube channel](https://www.youtube.com/user/LevelUpLunch) ## License Level up lunch is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0).
0
pkainulainen/jooq-with-spring-examples
null
null
jooq-with-spring-examples =========================
0
datastax/graph-examples
null
null
# graph-examples This repo contains a collection of graph examples. The intent is to provide more complete and extensive examples than what is reasonable to include in DataStax documentation or blogposts. This will include DataStax Graph Loader mapping scripts, schemas, example traversals, things to try in DataStax Studio, and application code examples. Feel free to use and modify any of these for your own purposes. There is no warranty or implied official support, but hopefully the examples will be useful as a starting point to show various ways of loading and experimenting with graph data. And if you see anything that could be improved or added, issue reports and pull requests are always welcome! Download DSE (includes DSE Graph), DataStax Studio, and the DSE Graph Loader at https://academy.datastax.com/downloads. ## Graph Resources: ### Documentation - Apache TinkerPop [documentation](http://tinkerpop.apache.org/docs/current/reference/), [getting started tutorial](http://tinkerpop.apache.org/docs/current/tutorials/getting-started/), and [common recipes](http://tinkerpop.apache.org/docs/current/recipes/) - DataStax Enterprise Graph [documentation](http://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/graphTOC.html) - [sql2gremlin.com](http://sql2gremlin.com) - to help migrate from sql to graph, used in the [Northwind](/northwind) graph example ### Video tutorials - DataStax Academy [DSA 330 course](https://academy.datastax.com/resources/ds330-datastax-enterprise-graph) on DSE Graph, a self-paced course covering both DSE Graph and Gremlin as a traversal language. - DataStax Academy Gremlin Recipes - [Gremlin as a stream](https://vimeo.com/user35188327/review/215965720/22e5289c7e) - [SQL to Gremlin](https://vimeo.com/user35188327/review/215966324/84ecf9b4ee) - [Recommendation engine with Gremlin](https://vimeo.com/user35188327/review/216119433/0dcc2e6055) - [Recursive traversal](https://vimeo.com/user35188327/review/216179907/b40808f0a2) - [Path with Gremlin](https://vimeo.com/user35188327/review/216259582/8ae9955826) ### Blog posts - [Getting started with the DataStax Graph Loader](http://www.datastax.com/dev/blog/dgl-basics) - [Gremlin's Time Machine](https://www.datastax.com/dev/blog/gremlins-time-machine) - a post about how to use the TinkerPop SubgraphStrategy to traverse your graph at a specific version or time in its history. - [graphoendodonticology](https://www.datastax.com/2017/03/graphoendodonticology) - a resource to troubleshoot your graph - [Reducing Computational Complexity with Correlate Traversals](https://www.datastax.com/2017/04/reducing-computational-complexity-with-correlate-traversals) - a post about calculating network centrality in various manners and the associated cost. - [Introducing DSE Graph Frames](http://www.datastax.com/dev/blog/dse-graph-frame) - how to use DSE Graph with Spark's GraphFrames with the associated [DseGraphFrames example](/dse-graph-frame) - [Learn How to Build a Domain Specific Language with DSE Graph](https://www.datastax.com/dev/blog/gremlin-dsls-in-java-with-dse-graph) - Large graph loading best practices, [part 1](http://www.datastax.com/dev/blog/large-graph-loading-best-practices-strategies-part-1) and [part 2](http://www.datastax.com/dev/blog/large-graph-loading-tactics-part-2) - Blog series from [DuyHai Doan](https://twitter.com/doanduyhai)'s blog: 1. [Gremlin as a Stream](http://www.doanduyhai.com/blog/?p=13224) 2. [SQL to Gremlin](http://www.doanduyhai.com/blog/?p=13260) 3. [Recommendation Engine Traversal](http://www.doanduyhai.com/blog/?p=13285) 4. [Recursive Traversals](http://www.doanduyhai.com/blog/?p=13301) 5. [Path Object](http://www.doanduyhai.com/blog/?p=13320) 6. [Projection and Selection](http://www.doanduyhai.com/blog/?p=13352) 7. [Variable Handling](http://www.doanduyhai.com/blog/?p=13374) 8. [The `sack()` Operator](http://www.doanduyhai.com/blog/?p=13404) ### Presentations - [The Gremlin Graph Traversal Language](https://www.slideshare.net/slidarko/the-gremlin-traversal-language), a presentation by Marko Rodriguez and Daniel Kuppitz - Fighting Fraud with Graph Databases Webinar [recording](https://www.youtube.com/watch?v=H5MmSL1c9Zs) and [slides](https://www.slideshare.net/DataStax/webinar-fighting-fraud-with-graph-databases). Presented by DataStax and Cambridge Intelligence. ### Help! - [DataStax support portal](https://support.datastax.com) (for current DataStax customers) - [DataStax Academy Slack](https://academy.datastax.com/slack) in the dse-graph channel - [Gremlin-users google group](https://groups.google.com/forum/#!forum/gremlin-users) - Stack overflow with the [datastax-enterprise/datastax-enterprise-graph](http://stackoverflow.com/questions/tagged/datastax-enterprise+datastax-enterprise-graph) tag ### Graph language drivers - Apache TinkerPop [Gremlin Language Variants](http://tinkerpop.apache.org/docs/current/tutorials/gremlin-language-variants/) - describes TinkerPop's idiomatic language support in the form of a fluent API - [Introduction to DataStax Driver Usage of Gremlin Language Variants](http://www.datastax.com/dev/blog/datastax-drivers-fluent-apis-for-dse-graph-are-out) - [Java](http://docs.datastax.com/en/developer/java-driver-dse/1.4/) - includes both a String based and fluent API - [Python](http://docs.datastax.com/en/developer/python-dse-driver/2.2/ - includes both a String based and fluent API - [Node.js](http://docs.datastax.com/en/developer/nodejs-driver-dse/1.3/) - [C#](http://docs.datastax.com/en/developer/csharp-driver-dse/2.0/) - [C/C++](http://docs.datastax.com/en/developer/cpp-driver-dse/1.2/) - [Ruby](http://docs.datastax.com/en/developer/ruby-driver-dse/2.0/) - [PHP](http://docs.datastax.com/en/developer/php-driver-dse/1.1/) - Looking for Scala? Take a look at [this example](https://github.com/mpollmeier/gremlin-scala-examples/tree/master/dse-graph) of using Scala with the DataStax Java driver ### Additional datasets For additional interesting datasets, you might consider the following resources: - [Stanford Large Network Dataset Collection](https://snap.stanford.edu/data/) - a collection of connected data in various categories such as social data, web graphs, product co-purchasing networks, review data, etc. - [Awesome Public Datasets](https://github.com/caesar0301/awesome-public-datasets) - a github repository with links to collections, large and small, of interesting public data. These are further categorized by industry and data type such as energy, government, machine learning, time series, sports data, transportation, etc. - [CRAWDAD](http://crawdad.org/) - the Community Resource for Archiving Wireless Data At Dartmouth. This includes wireless network trace data from a variety of sources.
0
SAP-samples/cf-mta-examples
The repository contains multitarget application (MTA) examples for SAP BTP, Cloud Foundry environment. Examples demonstrate how to achieve different goals using MTAs and show the capabilities of MTA deployment service in the Cloud Foundry environment.
cloud-foundry mta sample sample-code sap-btp sap-cloud-platform
null
0
bybit-exchange/api-usage-examples
null
null
This repository maintains example API wrappers for using the bybit REST API and Websocket.
0
Vedenin/java_in_examples
Moved to https://github.com/Vedenin/useful-java-links
null
### Moved to https://github.com/Vedenin/useful-java-links/tree/master/helloworlds
0
in28minutes/spring-boot-vuejs-fullstack-examples
All full stack examples with Spring Boot and Vue JS for articles on our website http://www.springboottutorial.com
null
# Spring Boot VueJS Full Stack Examples All full stack examples with Spring Boot and VueJS for articles on our website http://www.springboottutorial.com [![Image](https://www.springboottutorial.com/images/Course-Go-Full-Stack-With-SpringBoot-And-Angular.png "Go Full Stack with Spring Boot and Angular")](https://links.in28minutes.com/in28minutes-angular) [![Image](https://www.springboottutorial.com/images/Course-Go-Full-Stack-With-Spring-Boot-and-React.png "Go Full Stack with Spring Boot and React")](https://links.in28minutes.com/in28minutes-React) ## Keep Learning Every Day - **1:** [FOLLOW](https://links.in28minutes.com/lin) Ranga on LinkedIn ## Check Out Our Amazing ROADMAPS - **1:** [AWS Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#aws-roadmap) - **2:** [Azure Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#azure-roadmap) - **3:** [Google Cloud Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#google-cloud-roadmap) - **4:** [Cloud Beginner Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#cloud-beginner-roadmap) - **5:** [DevOps Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#devops-roadmap) - **6:** [Java Full Stack Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#java-full-stack-roadmap) - **7:** [Java Microservices Roadmap](https://github.com/in28minutes/roadmaps/blob/main/README.md#java-microservices-roadmap) ### Installing Eclipse & Embedded Maven - Installation Video : https://www.youtube.com/playlist?list=PLBBog2r6uMCSmMVTW_QmDLyASBvovyAO3 - GIT Repository For Installation : https://github.com/in28minutes/getting-started-in-5-steps - PDF : https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf ### Running Examples - Download the zip or clone the Git repository. - Unzip the zip file (if you downloaded one) - Open Command Prompt and Change directory (cd) to folder containing pom.xml - Open Eclipse - File -> Import -> Existing Maven Project -> Navigate to the folder where you unzipped the zip - Select the right project - Choose the Spring Boot Application file (search for @SpringBootApplication) - Right Click on the file and Run as Java Application - You are all Set ### Troubleshooting - Refer our TroubleShooting Guide - http://www.in28minutes.com/spring-boot-maven-eclipse-troubleshooting-guide-and-faq ### Useful Links - Find out more about in28Minutes and our approach to creating great learning experience - The in28Minutes Way - http://www.in28minutes.com/the-in28minutes-way - Facebook : https://www.facebook.com/in28Minutes​ - Twitter : https://twitter.com/in28Minutes​ - YouTube : https://www.youtube.com/rithustutorials​ - Instagram : https://www.instagram.com/in28minutes/
0
vireshmanagooli/hibernate
Examples related to Hibernate framework
null
hibernate ========= Examples related to Hibernate framework For Hibernate tutorial, tricks and tips visit - http://supportmycode.com/
0
wildfly-security-incubator/elytron-examples
null
hacktoberfest
null
0
pauldeck/springmvc-2ed
Examples for Spring MVC: A Tutorial (Second Edition)" book"
null
# springmvc-2ed Examples for "Spring MVC: A Tutorial (Second Edition)" book (ISBN 9781771970310), Brainy Software (http://brainysoftware.com), April 2016 If you are not familiar with GIT, click the "Download ZIP" button above to download the apps as a zip file. Each sample application comes in both Spring Tool Suite (STS) and Eclipse projects. STS uses Maven as its dependency manager. If you are comfortable with Maven, STS is probably your best bet. If not, you can still use your beloved Eclipse to test the apps. To test a project, open Eclipse or STS and import the project (File > Import > Existing Projects into Workspace > browse to project directory)
1
andreschaffer/microservices-testing-examples
Microservices Testing in practice.
consumer-driven-contract-testing contract-testing contract-tests java microservices microservices-testing pact pact-jvm testing
![Build](https://github.com/andreschaffer/microservices-testing-examples/workflows/Build/badge.svg) [![Test Coverage](https://api.codeclimate.com/v1/badges/77358dd72d38afa63fce/test_coverage)](https://codeclimate.com/github/andreschaffer/microservices-testing-examples/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/77358dd72d38afa63fce/maintainability)](https://codeclimate.com/github/andreschaffer/microservices-testing-examples/maintainability) [![Dependabot](https://img.shields.io/badge/Dependabot-enabled-blue?logo=dependabot)](https://docs.github.com/en/github/administering-a-repository/keeping-your-dependencies-updated-automatically) # Microservices Testing Examples # Strategy When it comes to testing microservices, usually there are two alternatives: a) Deploy all of them and test them in an end-to-end fashion b) Mock external dependencies in unit / integration tests The problem with alternative _a_ is that it doesn't scale. It gets only harder to maintain the tests as the system evolves and new microservices arise. The problem with alternative _b_ is that the mocks might not behave the same way as the real dependencies, and thus we might miss integration problems. So, how to proceed? Glad you asked. This project will focus on [Consumer-Driven Contract Testing](http://martinfowler.com/articles/consumerDrivenContracts.html) to overcome those limitations. It is a technique based on mocks, so that we benefit from fast feedback and no scalability issues, and attacks the problem of potential incompatible behavior by recording the interactions with the mocks and then allowing the real services to test that they behave the same way the mock did instead. Some of the tools that support Consumer-Driven Contract Testing are: [Pact](https://docs.pact.io/), [Pacto](http://thoughtworks.github.io/pacto/) and [Spring Cloud Contract](https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html). This project will use Pact. # Microservices The microservices involved in this project are: - The special-membership-service, that manages members of a special membership; - The credit-score-service, that holds information about individuals credit scores; - The welcome-member-email-service, that contacts new members with a welcome email. The system flow is very simple: a special membership request comes at the special-membership-service that in turn looks up the individual credit score at the credit-score-service and then decides whether it should create the membership or not. As a result of a new membership, the special-membership-service publishes a corresponding event that is picked by the welcome-member-email-service that then contacts the new member with a warm welcome. # Pact Broker While testing, the way we'll make the interactions records (called pacts from now on) available to the real services is through a pact broker. We can run it with [Docker Compose](https://docs.docker.com/compose/) and access it on a browser [(http://localhost:9292)](http://localhost:9292). ```bash docker-compose -f pact-tools/pact-broker/docker-compose.yml up -d ``` We will also use the [pact-cli](https://hub.docker.com/r/pactfoundation/pact-cli) tool to interact with the broker. # Running the tests We can run all the flows with [Maven](https://maven.apache.org/) and the pact cli like this: For the welcome-member-email-service, we build it, create its pacts, publish and tag them: ```bash mvn clean verify -pl welcome-member-email-service mvn verify -pl welcome-member-email-service -Pconsumer-pacts docker run --rm --net host -v `pwd`/welcome-member-email-service/target/pacts:/target/pacts pactfoundation/pact-cli:0.12.3.0 publish /target/pacts --consumer-app-version `git rev-parse --short HEAD` --tag prod --broker-base-url localhost:9292 --broker-username=rw_user --broker-password=rw_pass ``` For the special-membership-service, we build it, verify consumers' pacts, create its own pacts, publish and tag both the verification and the pacts created: ```bash mvn clean verify -pl special-membership-service mvn verify -pl special-membership-service -Pprovider-pacts -Dpact.verifier.publishResults=true -Dpact.provider.version=`git rev-parse --short HEAD` -Dpactbroker.tags=prod -Dpactbroker.user=rw_user -Dpactbroker.pass=rw_pass mvn verify -pl special-membership-service -Pconsumer-pacts docker run --rm --net host -v `pwd`/special-membership-service/target/pacts:/target/pacts pactfoundation/pact-cli:0.12.3.0 publish /target/pacts --consumer-app-version `git rev-parse --short HEAD` --tag prod --broker-base-url localhost:9292 --broker-username=rw_user --broker-password=rw_pass ``` For the credit-score-service, we build it, verify consumers' pacts and tag the verification: ```bash mvn clean verify -pl credit-score-service mvn verify -pl credit-score-service -Pprovider-pacts -Dpact.verifier.publishResults=true -Dpact.provider.version=`git rev-parse --short HEAD` -Dpactbroker.tags=prod -Dpactbroker.user=rw_user -Dpactbroker.pass=rw_pass docker run --rm --net host pactfoundation/pact-cli:0.12.3.0 broker create-version-tag --pacticipant credit-score-service --version `git rev-parse --short HEAD` --tag prod --broker-base-url localhost:9292 --broker-username=rw_user --broker-password=rw_pass ``` ## Test separation We created two auxiliary maven profiles to hold control of creating the pacts (consumer-pacts) and verifying the pacts (provider-pacts). We separate the pact tests from the other tests. Pact tests are focused on the contracts and shouldn't be abused, otherwise we'll give the providers a hard time verifying an explosion of interactions. We have many integration tests with regular mocks for the expected behavior of our services in different scenarios and a few pact tests in their own package (\*.pacts). In each pact test we focus on one provider integration contract at a time, specifying only the properties that we need and using appropriate matchers. (Side note: since it's a point-to-point integration we are talking about, we could use pact with unit tests - important to make sure the client used is the same one the service uses. We opted for slim integration tests instead since the services are very small anyway). The pact verification tests also have their own package (\*.pacts.verifications). Here we need to be able to setup the different states the consumers specify in their interactions and it becomes more evident that we shouldn't abuse pact in order to avoid unnecessary verifications at this point. (Side note: the class names are following a different pattern (\*PactVerifications) that is aligned with the maven profile (provider-pacts) just so we get a better control of when to run them - similar control could be achieved with jUnit categories as well). Now it's time for you to go ahead and take a look at those tests! Try changing a contract and see the tests fail :) ## Dependencies graph Visit the pact broker page again after running the tests and check the pacts are there together with a cool dependencies graph: ![alt text](https://github.com/andreschaffer/microservices-testing-examples/blob/master/docs/images/pact_broker_dependencies_graph.png "Pact broker dependencies graph") # Automating it all with pipelines (Project A pipeline) +-------+ +--------------+ +--------------+ +---------------+ +--------+ +-------------+ | | | | | | | | | | | Tag Pacts | | Build | +> | Verify Pacts | +> | Create Pacts | +> | Can I Deploy? | +> | Deploy | +> | as | | | | | | | | | | | | Prod | +-------+ +--------------+ +--------------+ +---------------+ +--------+ +-------------+ | | | | | | | | | | | | | | 2 +-------------+ 5 | | | +-------+ +-------+ | | 1 | Pact Broker | 6 | +---------------------------+ +----------------------------------------+ +-------------+ | | +----------------------+ +---------------------+ | 3 4 | | | | (Project B Consumers Support Pipeline) | | | | | | +-----------------------+ +--------------+ | | | | | | | +----+ Checkout Prod Version | +> | Verify Pacts +---+ | | | | +-----------------------+ +--------------+ When a change is pushed to Project A repo, its pipeline is triggered: * **Build:** checkout, package and run the regular unit and integration tests. * **Verify Pacts:** download its consumers' pacts (tagged as prod) from the pact broker, verify all of them and publish the results to the pact broker. * **Create Pacts:** create its pacts and publish them to the pact broker. The pact broker will trigger all provider pipelines that has a contract with Project A as consumer: * **Checkout Prod Version:** checkout Project B code corresponding to its prod tag. * **Verify Pacts:** download the pacts that Project A created with B, verify them and publish the results to the pact broker. Meanwhile, the pipeline of Project A was hanging in the **Can I Deploy?** until the pacts it created were marked as verified in the pact broker and resumes: * **Deploy:** with confidence that it can interact with its neighbours, we can deploy Project A to production. * **Tag Pacts as Prod:** tag all its pacts and verifications as prod in the pact broker. **Disclaimer**: You can see these building blocks in our github actions build file, but the flow there looks a little bit different whereas the support pipelines from the providers are simulated. # Contributing If you would like to help making this project better, see the [CONTRIBUTING.md](CONTRIBUTING.md). # Maintainers Send any other comments, flowers and suggestions to [André Schaffer](https://github.com/andreschaffer) and [Dan Eidmark](https://github.com/daneidmark). # License This project is distributed under the [MIT License](LICENSE).
0
deftlabs/mongodb-examples
null
null
null
0
ehcache/ehcache3-samples
Some examples / tutorials on using Ehcache 3.
null
# Ehcache 3 Samples This repository contains examples of and tutorials about usage of Ehcache 3. ## Samples - 'basic' - demonstrates basic configuration and usage of Ehcache 3 - 'clustered' - demonstrates using distributed caching features with Terracotta server - 'jsr107' - demonstrates configuration through JSR-107 (JCache) - 'fullstack' - binding with Spring, Hibernate and Metrics using JSR-107 in a real application - 'scale-continuum' - live benchmark with different caching options - 'caching-still-matters' - code examples used for the "Caching Still Matters" conference
0
atduskgreg/Making-Things-See-Examples
Kinect SimpleOpenNI Processing Examples from Making Things See
null
null
0
antlr/examples-v3
null
null
null
0
JosePaumard/jdk8-lambda-tour
Examples of Java 8, lambdas, Streams and Collectors stuff I show as examples during my talks.
null
This repository contains example files I use in my JDK8 / Lambdas / Streams / Collectors talks. The data files mcdonalds.csv, movies-mpaa.txt, ospd.txt and words.shakespeare.txt can be freely downloaded from Robert Sedgwick page here: http://introcs.cs.princeton.edu/java/data/. By the way, there are other very interesting data sets on this page. You can find 3 examples here : - the Scrabble example, or "how good at Scrabble Shakespeare would have been?" - the MacDonald example, or "Houston, we've got a problem" - the Movie database example. All files are provided under the GPL license. All data sets files are under the copyright of their authors, and provided for convenience only. More on "how good at Scrabble Shakespeare would have been". I realized that the best words are in fact not playable in Scrabble : not enough letters to place buzzards and whizzing on a Scrabble board. But there are two blanks letters in the Scrabble game. So let's take into account that in fact, buzzards and whizzing are doable with blank letters, and let's change the computation of the score to take into account that the blank letters score 0. Nice little problem, and it turns out that it is still solvable with a map / filter / reduce approach, thus fully lambda based. Great ! More on the Movie database example. A nice question I had on this example is : "and how about the most seen duo of actors". This question is pretty straigthforward if your actors are in a DB with a basic SQL engine. With the Stream API, it's a bit trickier, and cant be solved using a brute force method, due to the number of cases to evaluate. There's no Collector for that, to we have to build our own. And if we want to go parallel, we need to be careful about using concurrent structures.
0
bhdrkn/Java-Examples
Contains all kind of Java Examples which explained in blog
null
## Java Examples These are my example project to demonstrate some of the topic which are explained on my personal [blog](http://www.bahadirakin.com). --- ### Projects * **RestClient**: This is an example project which demonstrates how to use Apache HttpClient to consume Restful web services...[read more](http://www.bahadirakin.com/restful-web-servislerine-baglanmak/) * **XStreamAnnotation**: This is an example project which demonstrates how to use XStream annotations to achieve object to xml mapping...[read more](http://www.bahadirakin.com/annotation-kullanarak-xstream/) * **camel-soap**: This is an example project which demonstrates how to use Camel's Soap component... [read more](http://www.bahadirakin.com/camel-soap-ve-nesneler/) * **camel-xslt**: This is an example project which demonstrates how to use xslt transformation by using Camel...[read more](http://www.bahadirakin.com/apache-camel-ve-xslt/) * **download-servlet**: This is an example project which demonstrates how to use servlets to download data from servers...[read more](http://www.bahadirakin.com/servlet-yerel-dosya-yayinlama/) * **jce-encrypt**: This is an example project which demonstrates how to encrypt plain-texts using AES or DES... [read more](http://www.bahadirakin.com/jce-sifrelemeler-ve-hatalar/) * **rest-tutorial**: This is an example project which demonstrates how to develop restful web services using Jersey and Hibernate...[read more](http://www.bahadirakin.com/restful-web-servisleri-hazirlik/) * **simple-smpp-routing**: This is an example project which demonstrates how to use camel to route JPA entities to SMPP endpoint. This project can be also used as a template project to create a Bulk-SMS application...[read more](http://www.bahadirakin.com/java-smpp-ve-camel/) * **spring-cxf**: This is an example project which demonstrates how to develop CXF application which uses Spring...[read more](http://www.bahadirakin.com/spring-ve-cxf-ile-soap-web-servisleri/) * **spring-jpa**: This is an example project which demonstrates how to develop JPA application which uses Spring. In this application Spring also manages trasnactions which are used by JPA...[read more](http://www.bahadirakin.com/spring-ve-jpa/) * **spring-prime**: This is an example project which demonstrates how to develop a JSF application which Spring...[read more](http://www.bahadirakin.com/spring-ve-primefaces/) * **test-with-mockito**: This is an example project which demonstrates how to develop an application by using Mockito...[read more](http://www.bahadirakin.com/mockito-ilk-adimlar/) * **user-application**: This is an example project which demonstrates how to develop an application which uses, SpringData, SpringMvc, Mockito, Fongo etc. and deploys Heroku...[read more](http://www.bahadirakin.com/sprinmvc-ve-mongodb-1-projenin-hazirlanmasi/) * **aws-dynamodb-tutorial**: This is an example project wich demonstrates usage of High Level Java-API usage of DynamoDB --- ### Repository Structure Although i know that this repository structure is not proper, I used this structure to make easier to find other Java Example projects.
0
arhohuttunen/spring-boot-test-examples
This is the repository containing examples for my Spring Boot testing tutorial.
junit5 spring-boot
# Spring Boot Test Examples ![Gradle Build](https://github.com/arhohuttunen/spring-boot-test-examples/workflows/Gradle%20Build/badge.svg) This is the repository containing examples for my [Spring Boot Testing Tutorial](https://www.arhohuttunen.com/spring-boot-testing-tutorial/).
0
Smerity/cc-warc-examples
CommonCrawl WARC/WET/WAT examples and processing code for Java + Hadoop
null
![Common Crawl Logo](http://commoncrawl.org/wp-content/uploads/2012/04/ccLogo.png) # Common Crawl WARC Examples This repository contains both wrappers for processing WARC files in Hadoop MapReduce jobs and also Hadoop examples to get you started. There are three examples for Hadoop processing: + [WARC files] HTML tag frequency counter using raw HTTP responses + [WAT files] Server response analysis using response metadata + [WET files] Classic word count example using extracted text All three assume initially that the files are stored locally but can be trivially modified to pull them down from Common Crawl's Amazon S3 bucket. To acquire the files, you can use [S3Cmd](http://s3tools.org/s3cmd) or similar. s3cmd get s3://aws-publicdatasets/common-crawl/crawl-data/CC-MAIN-2013-48/segments/1386163035819/warc/CC-MAIN-20131204131715-00000-ip-10-33-133-15.ec2.internal.warc.gz # License MIT License, as per `LICENSE`
0
saturnism/istio-by-example-java
A collection of examples of using Istio with Java applications.
istio java microservice service-mesh spring spring-boot
This is the source code material for the Istio Codelab. See [Istio Code Lab](http://bit.ly/istio-lab) for setup instructions.
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
jjenkov/java-examples
A set of Java examples - of Java SE features (core Java) and techniques.
null
# Java Examples A set of Java examples - of Java SE features (core Java) and techniques. The Java examples are related to the Java tutorials at <a href="https://jenkov.com">jenkov.com</a> . Many of these Java examples will be hard to understand without the corresponding tutorial explaining the topic and the examples. # Examples Use Latest Version of Java Since part of the examples in this Git repository are using new Java language features - you should use the latest version of Java when trying to run them. ## Java Concurrency Examples - [Java Virtual Thread Example](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/virtualthreads/VirtualThreadExample.java) - [Java Deadlock](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/deadlock/DeadlockExample.java) - [Java Deadlock Prevention - Timeout Backoff](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/deadlock/prevention/DeadlockTimeoutExample.java) - [Java False Sharing Example](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/falsesharing/FalseSharingExample.java) - [Java Thread Congestion - Shared BlockingQueue Example](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadcongestion/ThreadCongestionExample.java) - [Java Thread Congestion - Separate BlockingQueue Example](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadcongestion/ThreadCongestionExample2.java) - [Java Thread Signaling Example 1](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadsignaling/ThreadSignalingExample.java) - [Java Thread Signaling Example 2](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadsignaling/ThreadSignalingExample2.java) - [Java Thread Signaling Example 3](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadsignaling/ThreadSignalingExample3.java) - [Java Thread Signaling Example 4](https://github.com/jjenkov/java-examples/blob/main/src/main/java/com/jenkov/java/concurrency/threadsignaling/ThreadSignalingExample4.java)
0
ewolff/microservice-kubernetes
Microservices example using Kubernetes
null
Microservice Kubernetes Sample ===================== [Deutsche Anleitung zum Starten des Beispiels](WIE-LAUFEN.md) This sample is like the sample for my Microservices Book ([English](http://microservices-book.com/) / [German](http://microservices-buch.de/)) that you can find at https://github.com/ewolff/microservice . However, this demo uses [Kubernetes](https://kubernetes.io/) as Docker environment. Kubernetes also support service discovery and load balancing. An Apache httpd as a reverse proxy routes the calls to the services. This project creates a complete micro service demo system in Docker containers. The services are implemented in Java using Spring and Spring Cloud. It uses three microservices: - `Order` to process orders. - `Customer` to handle customer data. - `Catalog` to handle the items in the catalog. How to run --------- See [How to run](HOW-TO-RUN.md). Apache HTTP Load Balancer ------------------------ Apache HTTP is used to provide the web page of the demo at port 8080. It also forwards HTTP requests to the microservices. This is not really necessary as each service has its own port on the Minikube host but it provides a single point of entry for the whole system. Apache HTTP is configured as a reverse proxy for this. Load balancing is left to Kubernetes. To configure this Apache HTTP needs to get all registered services from Kubernetes. It just uses DNS for that. Please refer to the subdirectory [microservice-kubernetes-demo/apache](microservice-kubernetes-demo/apache/) to see how this works. Remarks on the Code ------------------- The microservices are: - [microservice-kubernetes-demo-catalog](microservice-kubernetes-demo/microservice-kubernetes-demo-catalog) is the application to take care of items. - [microservice-kubernetes-demo-customer](microservice-kubernetes-demo/microservice-kubernetes-demo-customer) is responsible for customers. - [microservice-kubernetes-demo-order](microservice-kubernetes-demo/microservice-kubernetes-demo-order) does order processing. It uses microservice-kubernetes-demo-catalog and microservice-kubernetes-demo-customer. The microservices use REST to communicate to each other. See e.g. [CatalogClient](microservice-kubernetes-demo/microservice-kubernetes-demo-order/src/main/java/com/ewolff/microservice/order/clients/CatalogClient.java) . The hostname is configurable to allow tests with stubs. The default is `catalog` which works with Kubernetes. Other microservices are found using Kubernetes built-in DNS. Kubernetes does the load balancing on the IP level. The microservices have a Java main application in `src/test/java` to run them stand alone. `microservice-demo-order` uses a stub for the other services then. Also there are tests that use _consumer-driven contracts_. That is why it is ensured that the services provide the correct interface. These CDC tests are used in microservice-demo-order to verify the stubs. In `microservice-kubernetes-demo-customer` and `microserivce-kubernetes-demo-catalog` they are used to verify the implemented REST services. Note that the code has no dependencies on Kubernetes.
1
ftomassetti/analyze-java-code-examples
Some examples of code extracting information from Java source files using JavaParser
null
# analyze-java-code-examples Some examples of code extracting information from Java source files using JavaParser Read an explanation in this article: [http://tomassetti.me/getting-started-with-javaparser-analyzing-java-code-programmatically/](http://tomassetti.me/getting-started-with-javaparser-analyzing-java-code-programmatically/)
0
aspose-cells/Aspose.Cells-for-Java
Aspose.Cells for Java examples, plugins and showcases
null
![GitHub release (latest by date)](https://img.shields.io/github/v/release/aspose-cells-cloud/aspose-cells-cloud-java) ![GitHub all releases](https://img.shields.io/github/downloads/aspose-cells/Aspose.cells-for-Java/total) ![GitHub](https://img.shields.io/github/license/aspose-cells/Aspose.cells-for-java) # Java API for Excel File Formats [Aspose.Cells for Java](https://products.aspose.com/cells/java) is an award-winning Excel Spreadsheet Processing API that allows Java developers to embed the ability to read, write and manipulate Excel® spreadsheets (XLS, XLSX, XLSM, XLSB, XLTX, SpreadsheetML, CSV, ODS), HTML, MHTML, PDF, and image file formats into their own Java applications without needing to rely on Microsoft Excel®. Directory | Description --------- | ----------- [Examples](https://github.com/aspose-cells/Aspose.Cells-for-Java/tree/master/Examples) | A collection of Java examples that help you learn the product features. [Examples.GridWeb](https://github.com/aspose-cells/Aspose.Cells-for-Java/tree/master/Examples.GridWeb) | A collection of Java examples that help you learn and explore Aspose.GridWeb features. [Plugins](https://github.com/aspose-cells/Aspose.Cells-for-Java/tree/master/Plugins) | Plugins that will demonstrate one or more features of Aspose.Cells for Java. <p align="center"> <a title="Download ZIP" href="https://github.com/aspose-cells/Aspose.Cells-for-Java/archive/master.zip"> <img src="https://raw.githubusercontent.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" alt="Download Aspose.Cells for Java Examples, Plugins and Showcases" /> </a> </p> ## Excel File Processing Features ### Document Features - Open Plain or Encrypted Excel files (Excel97, Excel2007/2010/2013) from different sources. - Save Excel files (Excel97- Excel2007/2010/2013) in various supported formats. - Convert Excel files & spreadsheets to various supported formats. - Convert to Tagged Image File Format (`TIFF`). - Read and Write OpenDocument Spreadsheet (`ODS`) format. - Modify the document properties of Excel files. ### Worksheet Features - Make Worksheet visible or hidden. - Ability to show or hide worksheet tabs, scroll bars, gridlines & headers. - Apply worksheet zoom level. - Keep the selected data visible while scrolling in freeze panes. - Ability to preview worksheet page breaks. - Protection support for worksheet content, objects as well as scenarios. - Perform and apply page setup configuration to worksheets. - Perform various actions on individual or group of rows and columns. ### Data Management Features - Insert data in specific cells at runtime. - Fetch data from various data soures and import into worksheets. - Retrieve data from cells based on their datatype. - Get data from worksheet cells and export to array. - Apply conditional formatting. - Perform numerous formatting actions on data, such as, font setting. ### Charting & Graphics Features - Supports creating various kinds of charts. - Add custom charts to the worksheet. - Add pictures to worksheets at the runtime. - Ability to print worksheets. ### Advanced Features - Use robust Formula Calculation Engine to support formula calculation. - Manipulate VBA code or Macros. - Create pivot tables as well as change its source data at runtime. ## Read & Write Spreadsheet Formats **Microsoft Excel:** XLS, XLSX, XLSB, XLT, XLTX, XLTM, XLSM, XML\ **OpenOffice:** ODS\ **Text:** CSV, TSV\ **Web:** HTML, MHTML\ **Numbers:** Apple's iWork office suite Numbers app documents ## Save Excel Files As **Fixed Layout:** PDF, PDF/A, XPS\ **Data Interchange:** DIF\ **Images:** JPEG, PNG, BMP, SVG, TIFF, EMF, GIF ## Supported Environments - **Microsoft Windows:** Windows Desktop & Server (x86, x64) - **macOS:** Mac OS X - **Linux:** Ubuntu, OpenSUSE, CentOS, and others - **Java Versions:** `J2SE 7.0 (1.7)`, or above ## Get Started with Aspose.Cells for Java Aspose hosts all Java APIs at the [Aspose Repository](https://repository.aspose.com/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-cells). You can easily use Aspose.Cells for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit [Installing Aspose.Cells for Java from Maven Repository](https://docs.aspose.com/cells/java/installation/) documentation page. ## Convert Table to Range with Options using Java ```java // For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java // The path to the documents directory. String dataDir = Utils.getSharedDataDir(ConvertTableToRangeWithOptions.class) + "Tables/"; // Open an existing file that contains a table/list object in it Workbook workbook = new Workbook(dataDir + "book1.xlsx"); TableToRangeOptions options = new TableToRangeOptions(); options.setLastRow(5); // Convert the first table/list object (from the first worksheet) to normal range workbook.getWorksheets().get(0).getListObjects().get(0).convertToRange(options); // Save the file workbook.save(dataDir + "ConvertTableToRangeWithOptions_out.xlsx"); ``` [Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/cells/java) | [Docs](https://docs.aspose.com/cells/java/) | [Demos](https://products.aspose.app/cells/family) | [API Reference](https://apireference.aspose.com/cells/java) | [Examples](https://github.com/aspose-cells/Aspose.Cells-for-Java) | [Blog](https://blog.aspose.com/category/cells/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/cells) | [Temporary License](https://purchase.aspose.com/temporary-license)
0
Frameworkium/frameworkium-examples
Sample project which utilises frameworkium-core, a framework for writing maintainable Selenium and REST API tests and facilitates reporting and integration to JIRA.
allure frameworkium selenium selenium-webdriver
# Frameworkium Examples ![build](https://github.com/frameworkium/frameworkium-examples/workflows/frameworkium-examples%20build/badge.svg) This is a *sample project* which utilises [frameworkium-core][frameworkium-core], a framework for writing maintainable Selenium and REST API tests that also makes integrating with other test things (e.g. JIRA) much easier. Please see the [Frameworkium usage guide][guidance] for more details. As a result: * Please [raise issues][core-issues] against the [frameworkium-core][frameworkium-core] project, not this one * See the [frameworkium-core releases page][core-releases] for information about changes and new features * This example project is not updated as regularly as the [core project][frameworkium-core] * To keep up to date with the latest releases of core, modify the following block in the `pom.xml`: ```xml <dependencies> <dependency> <groupId>com.github.frameworkium</groupId> <artifactId>frameworkium-core</artifactId> <!-- Update this with the latest from the frameworkium-core releases page --> <version>3.0.0</version> </dependency> </dependencies> ``` The Frameworkium project is based on Ardesco's [Selenium-Maven-Template][ardesco] and Joe VDW's [Bootstrapium][bootstrapium]. We have extended it with some handy extras for getting started quickly with Selenium, Appium and [Rest Assured][rest-assured]. ## Getting Started After setting up [apache maven][mvn], open the `frameworkium-examples` directory in a terminal/command prompt and run `mvn clean verify` to run the example tests using Firefox. You will need the [geckodriver][geckodriver] on your path if you are using Firefox version 48 or above. ### Browsers You can provide the `-Dbrowser` argument to chose a browser to run the tests in. #### Drivers Each browser requires a "driver". For chrome, [ChromeDriver][chromedriver] needs to be on your path or specified as an argument: ``` mvn clean verify -Dbrowser=chrome -Dwebdriver.chrome.driver=c:\path\to\chromedriver.exe ``` For Firefox 48 and above, [geckodriver][geckodriver] needs to be on your path or specified as an argument: ``` mvn clean verify -Dbrowser=firefox -Dwebdriver.gecko.driver=c:\path\to\geckodriver.exe ``` ### Selenium Grid Want to run tests using a grid and in parallel? ``` mvn clean verify -Dbrowser=chrome -DgridURL=http://localhost:4444/wd/hub -Dthreads=4 ``` All you need to do is ensure the browser is installed in the default location and that the driver is on the path. ### Sauce Labs Running mobile web tests using Appium on Sauce Labs is only slightly more involved: ```bash export SAUCE_USERNAME=username export SAUCE_ACCESS_KEY=access_key mvn clean verify -Dplatform=ios -Dbrowser=safari -Dsauce=true ``` ### BrowserStack Running mobile web tests using Appium on BrowserStack: ```bash export BROWSER_STACK_USERNAME=username export BROWSER_STACK_ACCESS_KEY=access_key mvn clean verify -Dplatform=ios -Dbrowser=safari -DbrowserStack=true ``` A full list of arguments can be found on the [guidance page][guidance]. ### Reporting After running your tests, you can generate an [Allure][allure] test report by simply running: ``` mvn allure:report ``` ## Further Information Frameworkium sets you up for other stuff too - check out the [guidance page][guidance] for further info. [status-svg]: https://travis-ci.org/Frameworkium/frameworkium-examples.svg?branch=master [status]: https://travis-ci.org/Frameworkium/frameworkium-examples [ardesco]: https://github.com/Ardesco/Selenium-Maven-Template [bootstrapium]: https://github.com/jvanderwee/bootstrapium [rest-assured]: http://rest-assured.io/ [frameworkium-core]: https://github.com/Frameworkium/frameworkium-core [core-issues]: https://github.com/Frameworkium/frameworkium-core/issues [core-releases]: https://github.com/Frameworkium/frameworkium-core/releases [mvn]: https://maven.apache.org/download.cgi [geckodriver]: https://github.com/mozilla/geckodriver/releases [chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/home [guidance]: https://frameworkium.github.io [allure]: https://docs.qameta.io/allure/
1
oracle/json-in-db
Oracle Database JSON Examples
json oracle-database
# Oracle Database JSON Examples * [JdbcExamples](JdbcExamples) - a collection of small examples that show how to work with JSON type column values in JDBC 21c+ * [MongoExamples](MongoExamples) - examples of using the Oracle API for MongoDB from a Java program * [SodaExamples](SodaExamples) - a collection of small examples that show how to work with JSON collections in the Autonomous Database (19c+). * [MuShop](https://github.com/oracle-quickstart/oci-cloudnative/tree/master/src/carts) - a cloud-native microservice written in Java. The service stores shopping cart data in the autonomous database using JSON collections (SODA). * [MuSprint](MuSprint) - a web application designed to track sprint user stories on a story board. Stories are organized into 'To Do', 'In Progress' or 'Completed' category. The application is built using the SERN stack (SODA, Express.js, React.js, Node.js). * [WineDemo](WineDemo) - a web application written in JavaScript/Node.js that uses JSON collections (SODA) to store wine collection data. * [SODA Lab](https://dmcghan.github.io/soda-hol/?page=README.md) - a lab on using SODA Node.js in the autonomous database. * [Microservices With Node & SODA](https://blogs.oracle.com/developers/creating-a-microservice-with-node-soda-json-document-storage-in-autonomous-db) - Step-by-step instructions on creating a microservice using Node.js and SODA in the autonomous database. * [Python and AJD](https://cool.devo.build/tutorials/lol-optimizer-using-oci-extraction-processing) - This article shows how to process JSON data from Riot Games API using python and the Autonomous JSON Database. ## Contributing This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md) ## Security Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process ## License Copyright (c) 2014, 2023 Oracle and/or its affiliates. Released under the MIT License
0
mercyblitz/thinking-in-spring-boot-samples
小马哥书籍《Spring Boot 编程思想》示例工程
book code-project examples java mercyblitz samples spring spring-boot thinking-in-spring-boot
# 《Spring Boot 编程思想》 > 谨以此书纪念已故外婆 - 解厚群 本书全名为《Spring Boot 编程思想》,是以 Spring Boot 2.0 为讨论的主线,讨论的范围将涵盖 Spring Boot 1.x 的所有版本,以及所关联的 Spring Framework 版本,致力于: - 场景分析:掌握技术选型 - 系统学习:拒绝浅尝辄止 - 重视规范:了解发展趋势 - 源码解读:理解设计思想 - 实战演练:巩固学习成果 ## 自序 - [《核心篇》](https://mercyblitz.github.io/books/thinking-in-spring-boot/core/preface/)([预售中…](https://item.jd.com/12570242.html)) - 《运维篇》(即将完稿…) - 《Web 篇》(编写中…) ## 扉页 - [内容总览](https://mercyblitz.github.io/books/thinking-in-spring-boot/overview/) - [版本范围](https://mercyblitz.github.io/books/thinking-in-spring-boot/version/) - [相关约定](https://mercyblitz.github.io/books/thinking-in-spring-boot/conventions/) - [配套视频](https://mercyblitz.github.io/books/thinking-in-spring-boot/videos/) - [示例工程](https://mercyblitz.github.io/books/thinking-in-spring-boot/samples/) - [勘误汇总](https://mercyblitz.github.io/books/thinking-in-spring-boot/revision/) - [公益资金流向](https://mercyblitz.github.io/books/thinking-in-spring-boot/donate/) ## [关于我](https://mercyblitz.github.io/books/thinking-in-spring-boot/about/) “我是谁?”,是个不错的哲学问题。 在江湖上,大家亲切地称我 “小马哥“,我做公益,也做生意;在社区中,我又以 `mercyblitz` 的身份出没在众多开源项目,"mercy" 符合我的性格,"blitz" 说明我的风格。 承蒙错爱,不少的朋友对我过去的分享称赞有加,然而“千人之诺诺,不如一士之谔谔”,时常又让自己陷入一种迷思,到底是平台的帮衬,还是个人的确禁得起考验。于是我选择隐匿真名,希望能够听到更为真实的声音。尽管在互联网时代,只要稍作功课,个人信息几乎无处遁形。无可讳言,本人的所属公司以及职业头衔必然会形成“舞台效应”,如此一来,不但违背了写书的初衷,而且模糊了讨论的焦点。所以,本书即不会出现这些信息,又不会搞“个人崇拜”。它的价值应该体现在知识的传播,至于它的优劣则由诸君来评判。 ## 交流社区 - 微信公众号:次灵均阁 ![微信公众号二维码](https://mercyblitz.github.io/books/thinking-in-spring-boot/assets/my_mp_qrcode.jpg) - [知识星球](https://t.zsxq.com/72rj2rr): ![小马哥 Java 星球](https://mercyblitz.github.io/books/thinking-in-spring-boot/assets/my_java_planet.png) - [Github](http://github.com/mercyblitz):[http://github.com/mercyblitz](http://github.com/mercyblitz) > 更多个人信息,请使用 [Google 搜索 `mercyblitz`](https://www.google.com/search?q=mercyblitz)
0
inazaruk/examples
Collection of examples for demo purposes
null
null
0
peterarsentev/games_oop_javafx
This project demonstrates how to use Java Fx in OOP Style. All examples are popular games. (Chess, TicTacToe, SeeBattle and etc)
null
This project demonstrates how to use Java Fx in OOP Style. All examples are popular games. (Snake, Chess, TicTacToe, SeeBattle and etc) If you have any suggestions about this project, please, creating a new GitHub issue https://github.com/peterarsentev/games_oop_javafx/issues ## Snake ![ScreenShot](images/Snake.png) ## TicTacToe ![ScreenShot](images/TicTacToe.png) ## Chess ![ScreenShot](images/Chess.png) ## TODO - SeaBattle - PackMan - Tetris
0
FrontierPsychiatrist/spring-oauth-example
Example Spring Boot examples for a separated OAuth authentication and resource server
null
Spring Boot OAuth Authorization & Resource server ================================================= I present to you an example on how to use Spring Boot together with Spring Security OAuth2 to implement an authorization server and a resource server. Also included are some example client applications for the resource server. It's a pretty modern application, using Spring Boot, gradle, thymeleaf and only JavaConfig. In my opinion it's also a good example of how Java applications aren't big bloated "enterprisy" things anymore. The current sloccount is 519. 178 of that are just the SQLite dialect for hibernate which I had to include because it's not in the official packages. Just tell me how to run it -------------------------- * Clone the repository * If you have gradle installed, run gradle build in the main directory. Otherwise run ./gradlew build It will download a local gradle. On Windows use `gradlew.bat`. * Start the authorization server with java -jar oauth-server/build/libs/oauth-server.jar And the resource server with java -jar resource-server/build/libs/resource-server.jar The authorization server runs under [http://localhost:8081](http://localhost:8081) and the resource server under [http://localhost:8080](http://localhost:8080). * Additionally you can start a http server in example-clients/html, e.g. like this cd example-clients/html/read-only ruby -run -e httpd . -p 9090 It will be reachable under [http://localhost:9090](http://localhost:9090). Starting from within a IDE -------------------------- If you want to play around with the java code it's more practicable to start from within your IDE. Just run either `OAuthServerMain` or `ResourceServerMain`. The working directory to execute in should be the directory in which you cloned into because the database files are expected there. What to do when it is running? ------------------------------ The OAuth server is fairly self explanatory. Just open [http://localhost:8081](http://localhost:8081) in a browser. You can login as * an OAuth admin to administrate clients * an resource admin or normal user to see what clients you have granted access. The login credentials should be displayed on the login page. The URL to get a new access token for a client is http://localhost:8081/oauth/authorize?client_id=$client_id&return_type=token&redirect_uri=some_uri If the call to this URL is valid and you are logged in it will redirect to `some_uri` with an access token attached to the location hash. If you want to call this with cURL you have to set the cookie header to include the session id. curl .../oauth/authorize?... -H "Cookie: JSESSIONID=..." which you can find in your browser development console. The resource server exposes a (very simple) REST API. You can use the example clients to access them or cURL after receiving an access token. curl -v localhost:8080/todos -H "Authorization: Bearer $token" curl -v localhost:8080/todos/1 -H "Authorization: Bearer $token" curl -v -X DELETE localhost:8080/todos/1 -H "Authorization: Bearer $token" curl -v -X POST localhost:8080/tokens localhost:8080/todos/1 -H "Authorization: Bearer $token" -d "{ \"message\": \"Do stuff\", \"done\": false }" Why? ---- I wrote this because I had to get into OAuth with Spring and found it actually quite hard to find good examples and documentation. I hope others can learn from this. Caveats & Disclaimer -------------------- I am not a security expert, far from it. I implemented this with my best knowledge on OAuth and Spring Security but I take no guarantee that it is usable in a productive application. I used sqlite for the database because most people will have sqlite on their system and can easily look into the database like this. It goes without saying that in any production environment all HTTP traffic must be HTTPS, otherwise your tokens and client secrets are sniffable. License ------- See LICENSE.txt
1
mp911de/CleanArchitecture
CleanArchitecture Example
architecture cleanarchitecture hexagonal java onion-architecture
Sampler for Clean Architecture/Onion-Architecture [![Build Status](https://snap-ci.com/mp911de/CleanArchitecture/branch/master/build_image)](https://snap-ci.com/mp911de/CleanArchitecture/branch/master) ======================== Author: Mark Paluch<br/> Technologies: CDI, JSF, JPA, EJB, JPA, JAX-RS<br/> Summary: Example Application built using an Onion-Architecture that incorporates multiple technologies<br/> Source: <https://github.com/mp911de/CleanArchitecture><br/> More Information: <br/> * https://www.paluch.biz/blog/80-clean-your-architecture-databases-the-web-and-service-interfaces-are-just-plugins.html * https://www.paluch.biz/blog/83-clean-architecture-code-examples-for-an-onion-architecture.html What is it? ----------- This simple application consists of a few use cases. The purpose of the application is to show how to apply clean architecture patterns in a Multi-Module Maven/Java environment. It all starts with the data structures/entities/application model. These models are independent of business logic and delivery mechanisms. The models are specific to your domain, but not necessary specific to your application. They live within the `application-model` module. Business rules and use cases, the specific things your application does, reside within the `use-cases` module. They depend on the `application-model` and perhaps on external things that are represented by boundaries, located in `contracts`. Those boundaries are an agreement between the use case and the other side that provides a specific implementation. The `contracts` depend only on the `application-model`. No ORM entities or external-specific API/entities. ORM, caching implementations, clients to external services implement a contract that is located in `external` and its sub-modules. All parts are tied together by the delivery mechanism that integrates the externals and connects the use cases by supplying dependencies to come the system to life. If you need a different implementation for any external, so you can easily change that specific part without affecting other parts of the system. These patterns are verified by real life projects. A word on Clean Architecture ---------------------------- As soon as you dig into the code, you'll notice comments on the one or other class. Subject of these comments is to help to understand the structure and the different styles, which are possible. You'll notice soon, there are many different styles and ways to approach the Clean Architecture style. There are use cases which are built much more simple, e. g. without input/output boundaries and direct usage of dependency injection and there are use-cases which implement input boundaries and use output boundaries. In the end it's up to you, how much you're willing to invest in your architecture. This is, however, only a variety of examples to give you an impression, how to express Clean Architecture with Java. What does it? --------- The use cases are: * CreateOrUpdateItem * CreateOrUpdateUser * ListItems * ListOrders * PlaceOrder * PlaceOrderValidator and a few business entities: * User * OrderItem * Order * Item These use cases can be accessed by REST or Web UI (JSF) and are persisted using JPA within an in-memory H2 Database (everything you need is included). Requirements to run the App ------------------- All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better. The application this project produces is designed to be run on JBoss AS7, WildFly 8 or better. You could easily change the delivery mechanism to a console application with only providing a new delivery mechanism and a different approach how to wire the dependencies. Build and Deploy the Quickstart ------------------------- _NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line._ 1. Open a command line and navigate to the root directory of this project. 2. Type this command to build and deploy the archive: mvn clean package wildfly:run 3. This will start a WildFly 10 instance and deploy `target/clean-architecture.war` to the newly started instance. Access the application ------------------------- The application will be running at the following URL: <http://localhost:8080/clean-architecture/>.
1
halzhang/EverExample
example code
null
EverExample === Android开发一些代码示例,或许挺有用的! ##### GestureExample 手势操作示例 ##### Author === [HalZhang](http://weibo.com/halzhang)
1
jboss-developer/jboss-jdg-quickstarts
Quickstarts (or examples, or samples) for Infinispan.
null
[![Build Status](https://travis-ci.org/jboss-developer/jboss-jdg-quickstarts.svg?branch=jdg-7.3.x)](https://travis-ci.org/jboss-developer/jboss-jdg-quickstarts) Red Hat Data Grid Quickstarts ============================= Red Hat Data Grid (RHDG) is an elastically scalable in-memory data store built on the open source Infinispan project. ## RHDG Modes You can use Red Hat Data Grid in two modes: * _Library Mode_ provides binaries to build and deploy custom runtime environments. RHDG runs alongside your application in the same JVM. Your application has local access to a single node in a distributed cluster. * _Remote Client-Server Mode_ provides a self-contained process in a container based on JBoss EAP. RHDG runs remotely and provides access to data through `Hot Rod`, `REST`, or `Memcached` interfaces. ## About the Quickstarts These quickstarts demonstrate Red Hat Data Grid features and capabilities with specific, working examples that you can reference in your own projects. If you are using _Remote Client-Server Mode_, you should start with the **helloworld-jdg** quickstart to ensure that your server configuration is valid and you can start it successfully. Quickstarts have **Beginner**, **Intermediate**, and **Advanced** levels. You should start with a level that is comfortable for you and move on to the next level as you gain expertise. Some quickstarts are prerequisites for others that expand on certain capabilities or functionality. You should always deploy and run any prerequisite quickstarts first. ## Available Quickstarts This distribution contains the following quickstarts: | **Quickstart Name** | **Demonstrated Technologies** | **Shows you how to...** | |:-----------|:-----------|:-----------| | [carmart](carmart/README.md) | Data Grid, CDI | Use Data Grid instead of a relational database. | | [carmart-tx](carmart-tx/README.md) | Data Grid, CDI, Transactions | Use Data Grid instead of a relational database with transactions enabled.| | [eap-cluster-app](eap-cluster-app/README.md) | Data Grid, CDI, EJB | Access an Data Grid cache from a JBoss EAP application using JDG modules for EAP.| | [helloworld-jdg](helloworld-jdg/README.md) | Data Grid, CDI | Use Data Grid in clustered mode with expiration.| | [hotrod-endpoint](hotrod-endpoint/README.md) | Data Grid, Hot Rod | Access Data Grid remotely through the Hot Rod protocol. | | [hotrod-secured](hotrod-secured/README.md) | Data Grid, Hot Rod | Securely access Data Grid remotely through the Hot Rod protocol. | | [memcached-endpoint](memcached-endpoint/README.md) | Data Grid, Memcached | Access Data Grid remotely through the Memcached protocol. | | [openshift](openshift/README.md) | Data Grid, OpenShift | Complete tutorials for Data Grid on OpenShift that range from simple "Hello World" demonstrations to more advanced use cases. | | [rapid-stock-market](rapid-stock-market/README.md) | Data Grid, Hot Rod, REST | Use compatibility mode to access data with multiple protocols. | | [spring 4](spring4/README.md) | Data Grid, Spring | Use Spring 4 integration modules. | | [spring 5](spring5/README.md) | Data Grid, Spring | Use Spring 5 integration modules. | | [spring 4 session](spring4-session/README.md) | Data Grid, Spring Boot, Spring Session | Use of Spring Boot and Spring Session with RHDG. | | [spring 5 session](spring5-session/README.md) | Data Grid, Spring Boot, Spring Session | Use of Spring Boot and Spring Session with RHDG. | | [remote-query](remote-query/README.md) | Data Grid, Hot Rod, Remote Query | Query Data Grid remotely through the Hot Rod protocol. | | [rest-endpoint](rest-endpoint/README.md) | Data Grid, REST | Access Data Grid remotely through the REST protocol. | | [secure-embedded-cache](secure-embedded-cache/README.md) | Data Grid, CDI, REST | Secure Data Grid in Library (embedded) mode. | | [cdi](cdi-jdg/README.md) | Data Grid, CDI | Use Data Grid CDI and JCache extensions. | | [camel-jbossdatagrid-fuse](camel-jbossdatagrid-fuse/README.md) | Camel, Data Grid, REST | Use the Camel component camel-jbossdatagrid in JBoss Fuse. | | [spark](spark/README.md) | Data Grid, Apache Spark | Read and write data to Data Grid and use streaming to react to data changes in real time. | ## System Requirements You need the following to build and run the quickstarts: * Java 8.0 (Java SDK 1.8) or later. * Maven 3.0 or later. See the [Maven Getting Started Guide](http://maven.apache.org/guides/getting-started/index.html). * JBoss EAP server distribution. Available from the [Red Hat Customer Portal](https://access.redhat.com/downloads). * RHDG server distribution for _Remote Client-Server Mode_. Available from the [Red Hat Customer Portal](https://access.redhat.com/downloads). You can also run the quickstarts with [JBoss Developer Studio or Eclipse](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_JBDS.md#use-jboss-developer-studio-or-eclipse-to-run-the-quickstarts). ### Configuring Maven If you have not yet done so, you must [Configure Maven](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN.md#configure-maven-to-build-and-deploy-the-quickstarts). If you do not configure Maven, you must pass settings with every Maven command as follows: ` -s QUICKSTART_HOME/settings.xml` ### Setting Environment Variables RHDG quickstarts use the following environment variables: * `JBOSS_HOME` denotes the path to your RHDG server installation. * `EAP_HOME` denotes the path to your JBoss EAP installation. `EAP_HOME` is a *replaceable* value. When you encounter it in a RHDG quickstart, change the value as appropriate. | Installation method | Installation directory | |:-----------|:-----------| | ZIP archive | Custom directory | | RPM | `/var/lib/jbossas/` | | Installer | `{USER_HOME}/EAP-6.3.0` | | JBoss Developer Studio installer | `{USER_HOME}/jbdevstudio/runtimes/jboss-eap` | Where `{USER_HOME}` is one of the following: * Linux: `/home/USER_NAME/` * Windows: `"C:\Users\USER_NAME\"` ## Running the Quickstarts Refer to the `README` file in each quickstart directory for instructions on building and running the quickstart. ### Building Quickstart Archives You can build archives without deploying the quickstarts to check for compilation errors and view the contents of the quickstart. From the root directory of the quickstart, run `$ mvn clean install` to build the archive. ## Contributing the Quickstarts Refer to [JBoss Developer Contributing Guide](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONTRIBUTING.md)
0
storm-book/examples-ch02-getting_started
null
null
null
0
apache/accumulo-examples
Apache Accumulo Examples
accumulo big-data hacktoberfest
<!-- 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. --> # Apache Accumulo Examples [![Build Status][ti]][tl] ## Introduction The Accumulo-Examples repository contains a collection of examples for Accumulo versions 2.0 and greater. Examples within the `main` branch are designed to work with the version currently under development. Additional branches exist for previous releases of the Accumulo 2.x line. For example, the `2.0` branch contains examples specifically intended to work with that release version. The [Accumulo Tour] also provides several simple introductory examples that may be of interest. A collection of examples for Accumulo 1.10 can be found [here]. ## Setup instructions Follow the steps below to run the Accumulo examples: 1. Clone this repository git clone https://github.com/apache/accumulo-examples.git 2. Follow [Accumulo's quickstart][quickstart] to install and run an Accumulo instance. Accumulo has an [accumulo-client.properties] in `conf/` that must be configured as the examples will use this file to connect to your instance. 3. Review [env.sh.example] and [accumulo-env.sh] (within your accumulo installation) to see if you need to customize them. If `ACCUMULO_HOME` & `HADOOP_HOME` are set in your shell, you may be able skip this step. Make sure `ACCUMULO_CLIENT_PROPS` is set to the location of your [accumulo-client.properties]. cp conf/env.sh.example conf/env.sh vim conf/env.sh 4. Build the examples repo and copy the examples jar to Accumulo's `lib/` directory to get on its class path: ./bin/build cp target/accumulo-examples.jar /path/to/accumulo/lib/ 5. Each Accumulo example has its own documentation and instructions for running the example which are linked to below. When running the examples, remember the tips below: * Examples are run using the `runex` or `runmr` commands which are located in the `bin/` directory of this repo. The `runex` command is a simple script that use the examples shaded jar to run a a class. The `runmr` starts a MapReduce job in YARN. * Commands intended to be run in bash are prefixed by '$' and should be run from the root of this repository. * Several examples use the `accumulo` and `accumulo-util` commands which are expected to be on your `PATH`. These commands are found in the `bin/` directory of your Accumulo installation. * Commands intended to be run in the Accumulo shell are prefixed by '>'. ## Available Examples Each example below highlights a feature of Apache Accumulo. | Example | Description | |---------|-------------| | [batch] | Using the batch writer and batch scanner | | [bloom] | Creating a bloom filter enabled table to increase query performance | | [bulkIngest] | Ingesting bulk data using map/reduce jobs on Hadoop | | [classpath] | Using per-table classpaths | | [client] | Using table operations, reading and writing data in Java. | | [combiner] | Using example StatsCombiner to find min, max, sum, and count. | | [compactionStrategy] | Configuring a compaction strategy | | [constraints] | Using constraints with tables. Limit the mutation size to avoid running out of memory | | [deleteKeyValuePair] | Deleting a key/value pair and verifying the deletion in RFile. | | [dirlist] | Storing filesystem information. | | [export] | Exporting and importing tables. | | [filedata] | Storing file data. | | [filter] | Using the AgeOffFilter to remove records more than 30 seconds old. | | [helloworld] | Inserting records both inside map/reduce jobs and outside. And reading records between two rows. | | [isolation] | Using the isolated scanner to ensure partial changes are not seen. | | [regex] | Using MapReduce and Accumulo to find data using regular expressions. | | [reservations] | Using conditional mutations to implement simple reservation system. | | [rgbalancer] | Using a balancer to spread groups of tablets within a table evenly | | [rowhash] | Using MapReduce to read a table and write to a new column in the same table. | | [sample] | Building and using sample data in Accumulo. | | [shard] | Using the intersecting iterator with a term index partitioned by document. | | [spark] | Using Accumulo as input and output for Apache Spark jobs | | [tabletofile] | Using MapReduce to read a table and write one of its columns to a file in HDFS. | | [terasort] | Generating random data and sorting it using Accumulo. | | [tracing] | Generating trace data in a client application and Accumulo. | | [uniquecols] | Use MapReduce to count unique columns in Accumulo | | [visibility] | Using visibilities (or combinations of authorizations). Also shows user permissions. | | [wordcount] | Use MapReduce and Accumulo to do a word count on text files | ## Release Testing This repository can be used to test Accumulo release candidates. See [docs/release-testing.md](docs/release-testing.md). [quickstart]: https://accumulo.apache.org/docs/2.x/getting-started/quickstart [accumulo-client.properties]: https://accumulo.apache.org/docs/2.x/configuration/files#accumulo-clientproperties [accumulo-env.sh]: https://accumulo.apache.org/docs/2.x/configuration/files#accumulo-envsh [env.sh.example]: conf/env.sh.example [manual]: https://accumulo.apache.org/latest/accumulo_user_manual/ [batch]: docs/batch.md [bloom]: docs/bloom.md [bulkIngest]: docs/bulkIngest.md [classpath]: docs/classpath.md [client]: docs/client.md [combiner]: docs/combiner.md [compactionStrategy]: docs/compactionStrategy.md [constraints]: docs/constraints.md [deleteKeyValuePair]: docs/deleteKeyValuePair.md [dirlist]: docs/dirlist.md [export]: docs/export.md [filedata]: docs/filedata.md [filter]: docs/filter.md [helloworld]: docs/helloworld.md [isolation]: docs/isolation.md [maxmutation]: docs/maxmutation.md [regex]: docs/regex.md [reservations]: docs/reservations.md [rgbalancer]: docs/rgbalancer.md [rowhash]: docs/rowhash.md [sample]: docs/sample.md [shard]: docs/shard.md [spark]: spark/README.md [tabletofile]: docs/tabletofile.md [terasort]: docs/terasort.md [tracing]: docs/tracing.md [uniquecols]: docs/uniquecols.md [visibility]: docs/visibility.md [wordcount]: docs/wordcount.md [ti]: https://github.com/apache/accumulo-examples/workflows/QA/badge.svg [tl]: https://github.com/apache/accumulo-examples/actions [here]: https://accumulo.apache.org/1.10/examples [Accumulo Tour]: https://accumulo.apache.org/tour/
0
Qkyrie/modern-java-tutorials
Tutorials and code examples posted on diplr.org
crpytography java kotlin micronaut quarkus spring
null
0
meteor1993/spring-boot-examples
本仓库为《Spring Boot 系列文章》代码仓库,欢迎点赞、收藏。
actuator druid hikari jpa mail mybatis mybatis-plus querydsl rabbitmq redis scheduler spring-boot swagger thymeleaf webflux
本仓库为《跟我学 Spring Cloud 系列文章》 姊妹篇 《Spring Boot 系列文章》代码仓库,欢迎点赞、收藏。更多文章可访问博客站 https://www.geekdigging.com/ 获取。 ![](https://img.shields.io/badge/Spring%20Boot-2.1-brightgreen) ![](https://img.shields.io/badge/Mysql-5.7-blue) ![](https://img.shields.io/badge/JDK-1.8-brightgreen) ![](https://img.shields.io/badge/Maven-3.6.0-blue) ![](https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR2-orange) ![](https://img.shields.io/badge/license-MPL--2.0-blue) *** 如果我的文章对你有帮助,请扫码关注我的公众号,所有的文章都会在公众号首推: <center> <img src="https://cdn.geekdigging.com/wechat_qrcode_344.jpg"> </center> # [Spring Boot 系列文章](https://www.geekdigging.com/categories/SpringBoot/) * [Spring Boot (一):快速开始](https://www.geekdigging.com/2019/09/11/2531363117/) * [Spring Boot (二):模版引擎 Thymeleaf 渲染 Web 页面](https://www.geekdigging.com/2019/09/16/2755709569/) * [Spring Boot (三): ORM 框架 JPA 与连接池 Hikari](https://www.geekdigging.com/2019/09/19/2405775053/) * [Spring Boot (四): Druid 连接池密码加密与监控](https://www.geekdigging.com/2019/09/22/1068168916/) * [Spring Boot (五): Redis缓存使用姿势盘点](https://www.geekdigging.com/2019/09/24/2171701522/) * [Spring Boot (六): 为 JPA 插上翅膀的 QueryDSL](https://www.geekdigging.com/2019/09/26/1814805575/) * [Spring Boot (七): Mybatis极简配置](https://www.geekdigging.com/2019/09/28/3684964092/) * [Spring Boot (八): Mybatis 增强工具 MyBatis-Plus](http://www.geekdigging.com/2019/09/29/2160851131/) * [Spring Boot (九): 微服务应用监控 Spring Boot Actuator 详解](http://www.geekdigging.com/2019/09/30/3362349187/) * [Spring Boot (十): Spring Boot Admin 监控 Spring Boot 应用](http://www.geekdigging.com/2019/10/01/3649490045/) * [Spring Boot (十一): Spring Boot 定时任务](http://www.geekdigging.com/2019/10/06/3308794317/) * [Spring Boot (十二): Spring Boot 邮件服务](http://www.geekdigging.com/2019/10/07/3113346683/) * [Spring Boot (十三): Spring Boot 整合 RabbitMQ](http://www.geekdigging.com/2019/10/08/3448388748/) * [Spring Boot (十四): 响应式编程以及 Spring Boot Webflux 快速入门](http://www.geekdigging.com/2019/10/09/2115479772/) * [Spring Boot (十五): 优雅的使用 API 文档工具 Swagger2](http://www.geekdigging.com/2019/10/10/2115479772/) * [Spring Boot (十六): Webflux 和 MVC 性能对比](http://www.geekdigging.com/2019/10/14/363459181/) * 其余文章笔者努力更新中,欢迎大家持续关注:) 顺便打个广告: ## [Spring Cloud 系列文章](https://www.geekdigging.com/categories/SpringCloud) ## [Spring Cloud Alibaba 系列文章](https://www.geekdigging.com/categories/SpringCloudAlibaba/) * [Github代码仓库](https://github.com/meteor1993/SpringCloudLearning) * [Gitee代码仓库](https://gitee.com/inwsy/SpringCloudLearning)
0
lokeshgupta1981/Core-Java
Core Java examples posted on howtodoinjava.com
null
# Related Tutorials on [howtodoinjava.com](https://howtodoinjava.com/) 1. [Java 11 � Files readString() API](https://howtodoinjava.com/java11/files-readstring-read-file-to-string/) 2. [Java 11 � Files writeString() API](https://howtodoinjava.com/java11/write-string-to-file/) 3. [Java � Read File to String](https://howtodoinjava.com/java/io/java-read-file-to-string-examples/) 4. [Java � Write to File](https://howtodoinjava.com/java/io/java-write-to-file/)
0
IanDarwin/javasrc
Ian's Collected code examples from the O'Reilly Java Cookbook & elsewhere
basics environment java
null
0
sujitpal/hia-examples
Hadoop In Action Examples
null
hia-examples ============ The project started as worked examples from the book "Hadoop In Action" (hence the name). Since then it has morphed to a container for multiple projects related to Hadoop (and Hadoop ecosystem). java/hadoop ----------- A selection of solutions to problems from the "Hadoop in Action" book. java/cascading-newsclip ----------------------- An automated newspaper clipping service using Cascading. java/cascading-kevinbacon ------------------------- Cascading implementation of the Degrees of Separation from Kevin Bacon problem. scala/impatient --------------- Scalding version of Parts 1-5 of Paco Nathan's [Cascading for the Impatient](http://www.cascading.org/category/impatient/). scala/cms-preproc ----------------- Data analysis with Scalding on Medicare Claims data from cms.gov to find code outliers, etc. scala/cms-disease-graph ----------------------- Data analysis with Apache Spark to compute a disease graph for diseases identified as comorbidities among members. Uses Medicare Claims data from cms.gov. pig/scripts ------------ Pig script examples from HIA. pig/udfs --------- Associated Pig UDFs from HIA. hive/scripts ------------ Hive script examples from HIA.
0
jmgomezh/tmweka
Examples of Text Mining in WEKA
null
tmweka ====== Examples of Text Mining in WEKA. For more information, check <a href="http://www.esp.uem.es/jmgomez/tmweka">Text Mining in WEKA Cookbook</a>.
0
sleberknight/basic-hbase-examples
Contains sample code for a lightning talk on HBase.
null
null
1
rubykv/code-examples
code-examples is a collection of Java/Spring based software projects implemented as POCs (Proof Of Concept)
docker java kafka microservice mongodb spring-boot spring-cloud
# code-examples code-examples is a collection of software projects implemented as POCs (Proof Of Concept) ## Projects All the projects that are part of this repository are listed below under the concept / framework it belongs to. Few of the projects implement multiple concepts so they would be listed under multiple topics. ### Spring Circuit Breaker * Alibaba Sentinel * Project :: alibaba-sentinel * Guide :: https://levelup.gitconnected.com/how-to-implement-a-circuit-breaker-in-microservice-with-alibaba-sentinel-d645f69b20ef * Resilience4j * Project :: student, subject * Guide :: https://blog.devgenius.io/implementing-spring-cloud-circuit-breaker-with-resilience4j-cea647235cd7 ### Microservice Registry / Eureka / Spring Cloud Netflix * Project :: eureka-server, demo-eureka * Guide :: https://levelup.gitconnected.com/simple-implementation-of-eureka-server-with-springboot-780b64e19735 ### Spring Cloud OpenFeign / Feign * Project :: eureka-server, student, subject * Guide :: https://medium.com/javarevisited/simple-implementation-of-spring-cloud-openfeign-7f022630d01d ### Spring Cloud Gateway / Microservice Gateway + Loadbalancer * Project :: gateway * Guide :: https://medium.com/javarevisited/how-to-use-spring-cloud-gateway-to-dynamically-discover-microservices-194c0c3869c6 ### Spring Cloud Config / Microservice External Configuration * Project :: config-server-app * Guide :: https://medium.com/javarevisited/external-configuration-in-microservices-spring-cloud-config-9c925f64749f ### CQRS / Axon4 * Project :: axon * Guide :: https://medium.com/javarevisited/simple-implementation-of-axon-4-with-springboot-and-mongo-db-6ee25008459d ### Hexagonal Architecture * Project :: hexagonal-architecture * Guide :: https://medium.com/javarevisited/hexagonal-architecture-implementation-in-java-48a89c018247 ### Docker * Project :: demo * Guide :: https://medium.com/javarevisited/how-to-build-run-and-test-a-simple-springboot-app-in-docker-lab-test-style-e632b57265a8 ### Kafka * With Kafka Java Client * Project :: kafka-demo * Guide :: No Guide * With Spring Kafka * Project :: spring-kafka-demo * Guide :: https://medium.com/javarevisited/implementing-another-in-demand-spring-project-spring-kafka-85ee25ec14f8 ### Java Instrumentation * Project :: java-instrumentation * Guide :: https://medium.com/javarevisited/java-instrumentation-a-simple-working-example-in-java-a2c549024d9c ### gRPC * Project :: grpc * Guide :: https://medium.com/javarevisited/what-is-grpc-is-it-better-than-rest-api-58a3b7aff13a ### Reactive Programming RxJava * Project :: reactive * Guide :: https://medium.com/javarevisited/lets-explore-reactive-programming-through-rxjava-805b0137e5d ### GraphQL * Project :: graphql * Guide :: https://medium.com/javarevisited/what-is-graphql-will-it-replace-rest-api-da2618001655 ### AOP + Spring Cloud Sleuth * Project :: aspect * Guide :: https://medium.com/javarevisited/how-to-build-an-effective-logging-system-using-aspect-and-spring-cloud-sleuth-8f7aed647545 ### ArchUnit * Project :: arch-unit-demo * Guide :: https://medium.com/javarevisited/how-to-test-java-architecture-with-archunit-fe8c018b7b57 ### Spring AI * Project :: ai-sample * Guide ::
0
vaadin/flow-spring-examples
Examples for Vaadin and Spring Boot
flow java open-source spring-application spring-boot tutorial vaadin-spring webapp
Flow Spring examples ====================== This project contains the source code for the examples for using Vaadin and Spring together with the help of Spring Boot. The tutorial can be found [here](https://vaadin.com/docs/v14/flow/spring/tutorial-spring-basic.html). The topics that are covered in this example project: * Getting Started with Vaadin Spring for Flow and Spring Boot: the initial `@SpringBootApplication` class. * Injection and Scopes with Vaadin Spring * Navigation with Vaadin Spring * Register VaadinServiceInitListener via the Spring DI mechanism * Flow template within Spring Boot application * Use I18N in Spring application ## Running the project from command line Run `mvn clean install spring-boot:run` in the project root directory. After the server has started point your browser to [http://localhost:8080](http://localhost:8080) to see the resulting application. ## Running the project from your IDE Navigate to the `org.vaadin.spring.tutorial.TutorialApplication` class and run it as a Java application.
0
zznate/hector-examples
Various examples of using the Hector API to access Apache Cassandra
null
null
0
npryce/goos-code-examples
Code examples from later chapters of Growing Object-Oriented Software, Guided by Tests
null
null
0
saucelabs-training/demo-java
A repository containing examples using Java with Sauce Labs
hacktoberfest
# Java Demonstration Scripts Welcome to Java Demo Scripts designed by Solution Architects to provide examples of how to use Sauce Labs technologies. This repository contains everything that you need to get started with web, mobile, visual, functional and all other types of automation using Java. [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/564ddfb012db40048781b7b6c954d099)](https://app.codacy.com/gh/saucelabs-training/demo-java?utm_source=github.com&utm_medium=referral&utm_content=saucelabs-training/demo-java&utm_campaign=Badge_Grade_Dashboard) [![Best Practices Tests](https://github.com/saucelabs-training/demo-java/actions/workflows/best-practice.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/best-practice.yml) [![Selenium JUnit 5 Tests](https://github.com/saucelabs-training/demo-java/actions/workflows/selenium-examples.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/selenium-examples.yml) [![JUnit 4 Tests](https://github.com/saucelabs-training/demo-java/actions/workflows/junit4.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/junit4.yml) [![TestNg Tests](https://github.com/saucelabs-training/demo-java/actions/workflows/testng.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/testng.yml) [![Selenium Cucumber Examples](https://github.com/saucelabs-training/demo-java/actions/workflows/cucumber.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/cucumber.yml) [![Real Devices](https://github.com/saucelabs-training/demo-java/actions/workflows/real-devices.yml/badge.svg)](https://github.com/saucelabs-training/demo-java/actions/workflows/real-devices.yml) ## 🥇Most Popular * [Web automation best practices framework with multiple testing strategies. Crafted by industry experts with decades of experience.](./best-practice/) * [Quick start test, Junit 5](./selenium-examples/src/test/java/com/saucedemo/selenium/demo/SeleniumTest.java) * [Quick start test, Junit 4](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/demo/SeleniumTest.java) * [Quick start test, TestNg](./selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/demo/SeleniumTest.java) * [iOS real device, native app, Junit4](./appium-examples/src/test/java/com/appium_app/simple_example/IOSNativeAppTest.java) * [Front-end performance testing](./selenium-examples/src/test/java/com/saucedemo/selenium/PerformanceTest.java) * [Visual E2E test](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/SimpleVisualE2ETest.java) * [Sauce Connect usage](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/SauceConnectTest.java) ## Best Practices * [Desktop](./best-practice/src/test/java/com/saucedemo/tests/DesktopTests.java) `junit4` `sauce-bindings` * [Emu/Sim Web](./best-practice/src/test/java/com/saucedemo/tests/EmuSimWebAppTests.java) `junit4` `sauce-bindings` * [Performance](./best-practice/src/test/java/com/saucedemo/tests/PerformanceTests.java) `junit4` `sauce-bindings` * [RealDevice](./best-practice/src/test/java/com/saucedemo/tests/RealDeviceWebTests.java) `junit4` `sauce-bindings` * [Visual E2E](./best-practice/src/test/java/com/saucedemo/tests/VisualCrossPlatformTests.java) `junit4` `sauce-bindings` ## 🖥Web automation - Sauce Bindings With TestRunner Examples * [Junit 5](./selenium-examples/src/test/java/com/saucedemo/selenium/demo/SaucebindingsJunitTest.java) `junit5` `sauce-bindings` * [Junit 4](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/demo/SauceBindingsJunit4Test.java) `junit4` `sauce-bindings` * [TestNg](./selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/demo/SauceBindingsTestngTest.java) `testng` `sauce-bindings` - Sauce Bindings Examples * [Junit 5](./selenium-examples/src/test/java/com/saucedemo/selenium/demo/SauceBindingsTest.java) `junit4` `sauce-bindings` * [Junit 4](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/demo/SauceBindingsTest.java) `junit4` `sauce-bindings` * [TestNg](./selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/demo/SauceBindingsTest.java) `junit4` `sauce-bindings` - Selenium Examples * [Accessibility Test with Sauce Bindings](/selenium-examples/src/test/java/com/saucedemo/selenium/accessibility/SauceBindingsTest.java) `junit4` `sauce-bindings` * [Accessibility Test with Deque Axe](/selenium-examples/src/test/java/com/saucedemo/selenium/accessibility/DequeAxeTest.java) `junit4` * [Cucumber web test](./selenium-cucumber-examples/src/test/java/com/saucedemo/selenium/cucumber/RunTestsAT.java) * [Windows authentication](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/WindowsAuthentication.java) `junit4` * [Cross Browser/Platform in Parallel w/ TestNG](./selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/CrossBrowserPlatformTest.java) `testng` * [Performance, front-end with Sauce Bindings](/selenium-examples/src/test/java/com/saucedemo/selenium/PerformanceTest.java) `junit5` `sauce-bindings` * [Single Browser in Parallel w/ TestNG](./selenium-testng-examples/src/test/java/com/saucedemo/selenium/testng/ParallelSingleBrowserTest.java) `testng` * [Visual e2e test](./selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/SimpleVisualE2ETest.java) `visual` `junit4` * [Visual e2e test with branching strategy](./blob/54a4bfde9040d71f88f3b3aff79a047474d01be9/selenium-junit4-examples/src/test/java/com/saucedemo/selenium/junit4/SimpleVisualE2ETest.java#L115-L158) `visual` `junit4` ## 📱Mobile automation [📚 Mobile Testing Training Tutorials](./TRAINING.md) - Real Devices * [iOS native app](./appium-examples/src/test/java/com/appium_app/simple_example/IOSNativeAppTest.java) * [Android native app](./appium-examples/src/test/java/com/appium_app/simple_example/AndroidNativeAppTest.java) * [Upload app to Sauce Storage](./appium-examples/src/test/java/com/helpers/push_apps_to_storage.sh) * [Image Injection](./appium-examples/src/test/java/com/appium_app/image_injection) * [Biometric Login](./appium-examples/src/test/java/com/appium_app/biometric_login) * [Cucumber w/ Appium](./appium-junit4-cucumber-examples/src/test/resources/LoginPage.feature) `junit4` `cucumber` - Emulators and Simulators * [iOS native app](./appium-examples/src/test/java/com/appium_app/simple_example/IOSNativeAppTest.java) * [Android native app](./appium-examples/src/test/java/com/appium_app/simple_example/AndroidNativeAppTest.java) * [Biometric Login](./appium-examples/src/test/java/com/appium_app/biometric_login) ## ⚙️Setup * Install [Git](https://github.com/saucelabs-training/demo-java/blob/main/docs/prerequisites.md#install-git) * Install [IntelliJ (or another IDE)](https://github.com/saucelabs-training/demo-java/blob/main/docs/prerequisites.md#install-intellij) * Install [JDK](https://github.com/saucelabs-training/demo-java/blob/main/docs/prerequisites.md#install-the-jdk) * Install [Maven](https://github.com/saucelabs-training/demo-java/blob/main/docs/prerequisites.md#install-maven) ### Import the Project 1. Create a directory on your machine. 2. Clone this repository into said directory. ``` $ git clone https://github.com/saucelabs-training/demo-java.git ``` 3. Import the project into your IntelliJ (or IDE of your choice) as a **Maven Project**. 4. Click through the prompts, and confirm when it asks to **Import from Sources** 5. Choose the **demo-java** directory as the **root** directory of the project. ### Set Your Sauce Labs Credentials 1. Copy your Sauce Labs **username** and **accessKey** in the [User Settings](https://app.saucelabs.com/user-settings) section of the [Sauce Labs Dashboard](https://app.saucelabs.com/dashboard/builds). 2. Open a Terminal window (command prompt for Windows) and set your Sauce Labs Environment variables: **Mac OSX:** ``` $ export SAUCE_USERNAME="your username" $ export SAUCE_ACCESS_KEY="your accessKey" $ export SCREENER_API_KEY="your screener key" ``` **Windows:** ``` > set SAUCE_USERNAME="username" > set SAUCE_ACCESS_KEY="accessKey" > set SCREENER_API_KEY="your screener key" ``` > To set an environment variables permanently in Windows, you must append it to the `PATH` variable. > Go to **Control Panel > System > Windows version > Advanced System Settings > Environment Variables > System Variables > Edit > New** > Then set the "Name" and "Value" for each variable 3. Test the environment variables **Mac OSX:** ``` $ echo $SAUCE_USERNAME $ echo $SAUCE_ACCESS_KEY ``` ***WARNING FOR UNIX USERS!*** *If you have problems setting your environment variables, run the following commands in your terminal:* ``` $ launchctl setenv SAUCE_USERNAME $SAUCE_USERNAME $ launchctl setenv SAUCE_ACCESS_KEY $SAUCE_ACCESS_KEY ``` **Windows:** ``` > echo %SAUCE_USERNAME% > echo %SAUCE_ACCESS_KEY% ``` ### Run a Maven Test 1. Run the following command to update any package dependencies: ``` $ mvn dependency:resolve ``` 2. Then run the following command to compile your test code: ``` $ mvn test-compile ``` 3. Finally, run the following test to see if you've properly configured the test environment: ``` $ mvn test -pl best-practice -Dtest=DesktopTests ``` You can run different tests from different modules. Check out some examples by looking at the [CI YML files](./.github/workflows) ## Contributing This repository is maintained by the Solutions Architect team at Sauce Labs. **We welcome all ideas and contributions!** Guidance for contributing can be found [here](./CONTRIBUTING.md) ## Disclaimer > The code in these scripts is provided on an "AS-IS" basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. These scripts are provided for educational and demonstration purposes only, and should not be used in production. Issues regarding these scripts should be submitted through GitHub. These scripts are maintained by the Technical Services team at Sauce Labs. > > Some examples in this repository, such as `appium-example`, `parallel-testing`, and `headless`, may require a different account tier beyond free trial. Please contact the [Sauce Labs Sales Team](https://saucelabs.com/contact) for support and information.
0
bogus/Java-Spring-Examples
Java Course Examples with JPA / Spring MVC / JSF / AOP / Hibernate
null
null
0
HotswapProjects/HotswapAgentExamples
Example applications for HotswapAgent plugins
null
HotswapAgent example applications ================================= Example applications for HotswapAgent plugins. The purpose of an example application is: * complex automate integration tests (check various configurations before a release, see `run-tests.sh` script) * to check "real world" plugin usage during plugin development (i.e. inside container) * to provide working solution for typical application setups * sandbox to simulate issues for existing or new setups Feel free to fork/branch and create an application for your setup (functional, but as simple as possible). General setups will be merged into the master. # plain-java This example uses only core agent library and runs without any framework support. Check this example to learn basic agent properties usage (extraClasspath, watchResources, autoHotswap). # plain-servlet Run hotwap agent with a servlet container/J2EE server (Jetty/Tomcat/JBoss). This example does pretty the same as plain-java, but checks the value as HTTP response strings. This examples checks also that various application server versions are supported. # custom-plugin Detail explanation and example of how to create custom plugin even inside your application. # spring-hibernate Complex project with typical setup Spring + Spring MVC + Hibernate. # seam-hibernate-jsf # cdi-hibernate-jsf
1
stephanrauh/BootsFaces-Examples
null
null
# BootsFaces-Examples This is a collection of simple BootsFaces demo applications.
0
neo4j-examples/movies-java-spring-data-neo4j
Neo4j Movies Example with Spring Data Neo4j
null
null
1
apache/camel-kafka-connector-examples
Apache Camel Kafka Connector Examples
camel integration java kafka
null
0
wildfly-extras/wildfly-camel-examples
The WildFly-Camel Examples
null
## WildFly Camel Examples This directory contains a suite of useful modules to demonstrate various features of the WildFly Camel Subsystem. Their aim is to provide small, specific and working examples that can be used for reference in your own projects. ### Prerequisites Please refer to the project [README documentation](https://github.com/wildfly-extras/wildfly-camel/blob/master/README.md) for information on how to build and test the project. Please take into consideration the minimum Java and Maven requirements. The examples also require a running application server with the wildfly-camel subsystem deployed. ### Running Examples Each example aims to be interactive to help you learn how to get started with the WildFly Camel Subsystem. Each example can be accessed by changing into the example source directory, building the project `mvn clean install` and then deploying to a running application server `mvn install -Pdeploy`. Examples can be undeployed from a running application server by running `mvn clean -Pdeploy`.
0
fukata/AES-256-CBC-Example
aes-256-cbc encrypt and decrypt examples
null
# AES-256-CBC Example Original program is [here](https://gist.github.com/799d6021890f34734470). This sample, encryption, decryption input and output to the format of the following. - Encryption - Input: Raw Text - Output: Base64 - Decryption - Input: Base64 - Output: Raw Text *Since you are writing a common key for encryption in the library that you created for each language, when you actually use, please change.* ## Java String src = "Hello,CryptWorld"; String enc = AESUtil.encrypt(src); String dec = AESUtil.decrypt(enc); ## Node.js Encrypt = require './encrypt' src = 'Hello,CryptWorld' enc = Encrypt.encrypt src dec = Encrypt.decrypt enc
0
TeamDev-IP/JxBrowser-Examples
JxBrowser Examples & Tutorials
examples java javafx jxbrowser swing swt
# Welcome to JxBrowser Examples This repository contains a set of examples and tutorials you can use to walk through the main features of [JxBrowser](https://www.teamdev.com/jxbrowser). ## About JxBrowser JxBrowser is a commercial cross-platform Java library that lets you integrate a Chromium-based web browser control into your Java Swing, JavaFX, or SWT desktop application to display modern web pages built with HTML5, CSS3, JavaScript. With JxBrowser you can display modern web pages, PDFs, WebGL, work with DOM, JavaScript, WebRTC, network, printing, call Java from JavaScript, manage file downloads, convert HTML to PNG, debug web pages with DevTools, configure proxy, manage cookies, handle authentication, fill web forms, and much more. ## Running Examples To run the examples please follow the instruction below: 1. Make sure your environment meets the [software and hardware requirements][requirements]. 2. Clone this repository: ```bash git clone https://github.com/TeamDev-IP/JxBrowser-Examples ``` 3. Open the Gradle project in your favourite IDE: - [Intellij IDEA][idea] - [Eclipse][eclipse] - [NetBeans][netbeans] 4. [Get][get-evaluation] a free 30-day trial license key. 5. To run an example please specify the `jxbrowser.license.key` VM parameter: ```bash -Djxbrowser.license.key=<your_trial_license_key> ``` ## What's Next - Learn about JxBrowser [architecture](https://jxbrowser-support.teamdev.com/docs/guides/introduction/architecture.html). - Take a look at JxBrowser [features](https://jxbrowser-support.teamdev.com/docs/guides/engine.html). - Explore the JxBrowser [API](https://jxbrowser-support.teamdev.com/docs/reference/). ## Terms and Privacy The information in this repository is provided on the following terms: https://www.teamdev.com/terms-and-privacy [requirements]: https://jxbrowser-support.teamdev.com/docs/guides/introduction/requirements.html [idea]: https://www.jetbrains.com/help/idea/gradle.html#gradle_import [eclipse]: https://marketplace.eclipse.org/content/buildship-gradle-integration#group-details [netbeans]: https://netbeans.org/features/java/build-tools.html [get-evaluation]: https://www.teamdev.com/jxbrowser#evaluate
0
aws-samples/aws-cloudhsm-jce-examples
Sample applications demonstrating how to use the CloudHSM JCE
null
# aws-cloudhsm-jce-examples These sample applications demonstrate how to use the JCE with CloudHSM. They show basic functionality, as well as best practices regarding performance. ## License Summary This sample code is made available under a modified MIT license. See the LICENSE file. ## Building the examples ### Dependencies The latest SDK5 version of CloudHSM JCE is required. They should be installed using the official procedures documented here: * https://docs.aws.amazon.com/cloudhsm/latest/userguide/java-library-install_5.html The examples are tested on a fresh Amazon Linux 2 AMI. You will need to have the following packages installed: * OpenJDK 8 * Apache Maven 3.0.5 You can install these packages on Amazon Linux 2 by running ``` sudo yum install -y java-1.8.0-amazon-corretto-devel maven ``` If you are running on Amazon Linux 1, you will need to install extra packages to get Maven. You can follow these instructions to build the samples on Amazon Linux 1: ``` # Maven is only available through extra packages sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo # You will need Java 1.8 to build the samples sudo yum install -y java-1.8.0-openjdk-devel sudo yum install -y apache-maven # When updating alternatives, choose the 1.8 path: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java sudo update-alternatives --config java ``` ### Building You can build the project using Maven. Maven will copy the required CloudHSM jars into a local repository and build fat jars which can be executed from the command line. These fat jars will be placed in the `target/assembly/` directory. Before you build your project, be sure to enter the correct CloudHSM version number based on which CloudHSM JCE Provider you have installed on your system. By default, this project is set to use the latest available CloudHSM version, and you may need to make modifications if you are running an older version (note that not all tests are guaranteed to work with older versions of the client). To do this, modify the following line in the `pom.xml` to match your version: ``` <cloudhsmVersion>5.5.0</cloudhsmVersion> ``` To build the project, use the following command: ``` mvn validate mvn clean package ``` ## Running the samples You will need to have a CloudHSM Client connected to an ACTIVE cluster. For more details, please follow the official instructions here: * https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html You will need to provide credentials to the JCE provider in order to run the samples. Please read about JCE provider credentials here: * https://docs.aws.amazon.com/cloudhsm/latest/userguide/java-library-install_5.html#java-library-credentials_5 All Java dependencies should be bundled in the fat jars. Jars can be run using the following command line (as an example): ``` java -ea -jar target/assembly/login-runner.jar --help ``` ## Running and verifying all the samples To run and verify all the samples together, run the command ```mvn verify```
1
7DGroup/JMeter-examples
Blog Demo & Source code (文章示例及源码)
null
# PerformanceTest-Examples ![Spring Boot 2.0](https://img.shields.io/badge/Spring%20Boot-2.0-brightgreen.svg) ![Mysql 5.6](https://img.shields.io/badge/Mysql-5.6-blue.svg) ![JDK 1.8](https://img.shields.io/badge/JDK-1.8-brightgreen.svg) ![Maven](https://img.shields.io/badge/Maven-3.5.0-yellowgreen.svg) **Blog Demo &amp; Source code (文章示例及源码)** #### 性能基础系列: - 接口 - [性能基础之浅谈常见接口性能压测](https://blog.csdn.net/zuozewei/article/details/82836158) - [性能基础之常见RPC框架浅析](https://blog.csdn.net/zuozewei/article/details/85312689) - [秒懂HTTPS接口(原理篇)](https://blog.csdn.net/zuozewei/article/details/84727065) - [秒懂Dubbo接口(原理篇)](https://blog.csdn.net/zuozewei/article/details/85333060) - 全链路 - [性能基础之全链路压测知识整理](https://blog.csdn.net/zuozewei/article/details/84983834) - 架构 - [性能基础之大型网站架构演化(整理篇)](https://blog.csdn.net/zuozewei/article/details/85039849) - [性能基础之大型网站技术架构模式](https://blog.csdn.net/zuozewei/article/details/85226382) - 操作系统 - [性能基础之速读【性能之巅:洞悉系统、企业与云计算】](https://blog.csdn.net/zuozewei/article/details/85107901) - [性能基础之CPU、物理核、逻辑核概念与关系](https://blog.csdn.net/zuozewei/article/details/85251890) - [性能基础之理解Linux系统平均负载和CPU使用率](https://blog.csdn.net/zuozewei/article/details/86483503) ##### 性能闲谈系列: - [浅谈window桌面GUI技术及图像渲染性能测试实践](https://blog.csdn.net/zuozewei/article/details/82656926) #### JMeter系列: - 脚本 - [Jmeter接口测试demo](https://blog.csdn.net/zuozewei/article/details/79627177) - [秒懂HTTPS接口(JMeter压测篇)](https://blog.csdn.net/zuozewei/article/details/84778207) - [性能工具之JMeter压测WebSocket接口(一)](https://blog.csdn.net/zuozewei/article/details/83064219) - 源码分析 - [性能工具之JMeter5.0核心源码浅析](https://blog.csdn.net/zuozewei/article/details/85042829) - [性能工具之JMeter5.0核心类HashTree源码分析](https://blog.csdn.net/zuozewei/article/details/86748517) - [性能工具之JMeter5.0核心类StandardJMeterEngine源码分析](https://blog.csdn.net/zuozewei/article/details/87657696) - [性能工具之JMeter5.0核心类JMeterEngine源码分析](https://blog.csdn.net/zuozewei/article/details/87925297) - 二次开发 - [性能工具之Jmeter扩展函数及压测ActiveMQ实践](https://blog.csdn.net/zuozewei/article/details/82710274) - [性能工具之Jmeter压测Hprose RPC服务](https://blog.csdn.net/zuozewei/article/details/82765585) - [性能工具之Jmeter压测Thrift RPC服务](https://blog.csdn.net/zuozewei/article/details/82589810) - [性能工具之Jmeter扩展配置元件插件](https://blog.csdn.net/zuozewei/article/details/82887039) - [性能工具之JMeter两个Java API Demo](https://blog.csdn.net/zuozewei/article/details/87883055) - 实时监控 - [性能工具之JMeter+InfluxDB+Grafana打造压测可视化实时监控](https://blog.csdn.net/zuozewei/article/details/82911173) - 其他 - [性能工具之Taurus入门(安装篇)](https://zuozewei.blog.csdn.net/article/details/102719878) #### 性能工具系列: - 综合 - [性能工具之Java分析工具BTrace入门](https://blog.csdn.net/zuozewei/article/details/82635139) - [性能工具之DOTNET性能分析工具](https://blog.csdn.net/zuozewei/article/details/80222211) - Linux - [性能工具之15个常用的Linux文件系统命令](https://blog.csdn.net/zuozewei/article/details/85346442) - [性能工具之linux三剑客awk、grep、sed详解](https://blog.csdn.net/zuozewei/article/details/85709621) - [性能工具之linux常见日志统计分析命令](https://blog.csdn.net/zuozewei/article/details/85802582) #### 性能监控系列: - [性能监控之常见JDK命令行工具整理](https://blog.csdn.net/zuozewei/article/details/82695814) - [性能监控之Telegraf+InfluxDB+Grafana linux服务器实时监控](https://blog.csdn.net/zuozewei/article/details/82929429) - [性能监控之JMeter分布式压测轻量日志解决方案](https://blog.csdn.net/zuozewei/article/details/82966719) - [性能监控之Telegraf+InfluxDB+Grafana NVIDIA GPU实时监控](https://blog.csdn.net/zuozewei/article/details/83118343) - [性能监控之Telegraf+InfluxDB+Grafana window服务器安装使用](https://blog.csdn.net/zuozewei/article/details/88400701) - [性能监控之Telegraf+InfluxDB+Grafana+Python实现Oracle实时监控](https://blog.csdn.net/zuozewei/article/details/89042921) - [性能监控之Telegraf+InfluxDB+Grafana实现JMX实时监控](https://zuozewei.blog.csdn.net/article/details/102562702) - [性能监控之Telegraf+InfluxDB+Grafana实现结构化日志实时监控](https://zuozewei.blog.csdn.net/article/details/102584480) #### 性能数据系列: - [Python脚本批量生成SQL语句](https://blog.csdn.net/zuozewei/article/details/83004726) - [Java批量创建测试水印图片和GIF动图](https://zuozewei.blog.csdn.net/article/details/91806822) #### 性能分析系列: - [性能分析之大屏可视化平台瓶颈分析(window版)](https://blog.csdn.net/zuozewei/article/details/81093942) - [性能分析之Linux系统平均负载案例分析](https://blog.csdn.net/zuozewei/article/details/86514406) - [性能分析之单条SQL查询案例分析(mysql)](https://blog.csdn.net/zuozewei/article/details/86681249#_179) #### 性能优化系列: - [性能优化之MQ问题分析及解决方案](https://blog.csdn.net/zuozewei/article/details/79467404) #### 性能报告系列: - [HTML5大屏版性能测试报告](https://blog.csdn.net/zuozewei/article/details/81360803) - [性能报告之路由器性能benchmark评估](https://blog.csdn.net/zuozewei/article/details/79861214)
0
yidongnan/spring-cloud-consul-example
spring-cloud-consul-example is an example for microservices system
docker microservice spring-boot-admin spring-cloud-consul spring-cloud-sleuth swagger zipkin
# spring-cloud-consul-example README: [English](https://github.com/yidongnan/spring-cloud-consul-example/blob/master/README.md) | [中文](https://github.com/yidongnan/spring-cloud-consul-example/blob/master/README-zh.md) spring-cloud-consul-example is an example for microservices system. It's contain **configuration management, service discovery, circuit breakers, intelligent routing, distributed tracing, application monitor**. The registry center uses the consul, if you want to use eureka, you can refer to https://github.com/yidongnan/spring-cloud-netflix-example ## Getting Started ```shell ./gradlew clean build -x test ./buildDockerImage.sh docker-compose up -d ``` if you want to start more serve, you should use ```shell docker-compose scale service-a=2 service-b=3 ``` ## Technology List * Spring Cloud Consul * Spring Cloud Sleuth * Spring Cloud Config * Spring Boot Admin * Spring Boot * ZipKin * Docker * Swagger ## Architecture Overview [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Architecture.png"> ## Screenshots ### Api Route(Zuul) [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_001.png"> ### Consul DashBoard [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_002.png"> ### Consul Key/Value DashBoard [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_003.png"> ### ZipKin DashBoard [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_004.png"> ### ZipKin Trace Detail [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_005.png"> ### ZipKin Dependencies Overview [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_006.png"> ### Spring Boot Admin DashBoard [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_007.png"> ### Spring Boot Admin Detail [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_008.png"> ### Spring Boot Admin Environment [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_009.png"> ### Spring Boot Admin Thread Dump [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_010.png"> ### Spring Boot Admin Trace [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_011.png"> ### Hystrix Dashboard [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_012.png"> ### Hystrix Dashboard Detail [](url "title") <img src="https://raw.githubusercontent.com/yidongnan/spring-cloud-consul-example/master/screenshots/Selection_013.png">
1
Rookout/deployment-examples
Integration examples for Rookout
null
# Examples for deploying Rookout This repository contains full deployment examples, developed by Rookout and the community, and supported by Rookout engineer team. [appengine]: https://cloud.google.com/appengine/docs/flexible/nodejs [tutorial]: https://cloud.google.com/appengine/docs/flexible/nodejs/quickstart [readme]: ../README.md [contributing]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/CONTRIBUTING.md
0
mkyong/spring3-mvc-maven-xml-hello-world
Maven + Spring 3 MVC hello world example (XML)
null
Maven - Spring 3 MVC Hello World =============================== Template for Spring 3 MVC + JSP view + XML configuration, using Maven build tool. ###1. Technologies used * Maven 3 * Spring 3.2.13.RELEASE * JSTL 1.2 * Logback 1.1.3 * Boostrap 3 ###2. To Run this project locally ```shell $ git clone https://github.com/mkyong/spring3-mvc-maven-xml-hello-world $ mvn jetty:run ``` Access ```http://localhost:8080/spring3``` ###3. To import this project into Eclipse IDE 1. ```$ mvn eclipse:eclipse``` 2. Import into Eclipse via **existing projects into workspace** option. 3. Done. ###4. Project Demo Please refer to this article [Maven - Spring 3 MVC Hello World ](http://www.mkyong.com/spring3/spring-3-mvc-hello-world-example/)
1
wcong/learn-java
example of learn java
null
## learn-java example of learn java algorithm has moved to [learn-algorithm](https://github.com/wcong/learn-algorithm)
1
thomasWeise/distributedComputingExamples
Example codes for my Distributed Computing course at Hefei University.
axis2 c communication distributed-computing glassfish hadoop html java java-rmi java-servlet javascript javaserver-pages json-rpc jsp mpi servlet-container socket web-services xml xml-document
# Examples for Distributed Computing [<img alt="Travis CI Build Status" src="https://img.shields.io/travis/thomasWeise/distributedComputingExamples/master.svg" height="20"/>](https://travis-ci.org/thomasWeise/distributedComputingExamples/) [<img alt="Shippable Build Status" src="https://img.shields.io/shippable/56d905429d043da07b368422.svg" height="20"/>](https://app.shippable.com/projects/56d905429d043da07b368422) ## 1. Introduction and Contents ### 1.1. Introduction Distributed systems surround us everywhere today. Their most prominent example is the internet hosting the world wide web. The computing environment in enterprise computing systems is often distributed too, interconnecting different services from human resources, financial departments, to asset management systems. Many applications are even hosted in the cloud. Finally, large-scale engineering and scientific computing today rely heavily on clusters in order to parallelize their workload. These topics are discussed in my distributed computing lecture. In this repository, you can find the practical examples I use in my course. ### 1.2. Contents 1. [Sockets](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/) 1. in [C](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/c) 2. in [Java](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java) 2. [HTML, CSS, and JavaScript](http://github.com/thomasWeise/distributedComputingExamples/tree/master/html/) 3. [Java Servlets](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/) 1. [deployable examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/examples) 2. [HTTP Proxy Servlet](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/proxy) 4. [JavaServer Pages](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServerPages/) 1. [deployable examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServerPages/examples) 2. [stand-alone JSPs](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServerPages/standAloneJSPsWithJetty) 5. [Java RMI](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaRMI/) 6. [XML](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/) 1. [examples for XML documents and related standards](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/xml) 1. [examples for XML processing with Java](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/java) 7. [Web Services](http://github.com/thomasWeise/distributedComputingExamples/tree/master/webServices/) 8. [JSON RPC](http://github.com/thomasWeise/distributedComputingExamples/tree/master/jsonRPC/) 9. [Message Passing Interface](http://github.com/thomasWeise/distributedComputingExamples/tree/master/mpi/) 10. [Hadoop](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/) Each of the above links leads you to a sub-directory containing a set of examples. Each sub-directory has an own `README.md` file with detailed descriptions. Since I also use the same code in my slides, there are some special comments such as `//(*@\serverBox{2)}@*)` for formatting in my codes ... you can safely ignore them ^_^ ## 2. Concept of the Course The concept of this course is that we want to understand how the web and distributed enterprise application environments work. We want to do that by starting to explore how to communicate over a network at the lowest level of abstraction (normally) available to programmers, the [socket API](https://en.wikipedia.org/wiki/Network_socket). From there, we work our way up step-by-step higher levels of abstraction, i.e., simpler and more powerful API stacking on top of each other (and ultimately grounded in sockets). This way, we will gain a solid understanding how distributed applications and the web work. We will be able to look at a website and immediately have a rough understanding of how it may work, down to the nuts and bolts. For each level of abstraction that we explore, we therefore always learn example technologies. ### 2.1. The Basics: Sockets, TCP, UDP, Parallelism, and Mashalling As said, we start at the very bottom: Communication in distributed systems today is usually either based on the [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) or [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol). Both protocols are accessed via the [socket API](https://en.wikipedia.org/wiki/Network_socket), for which we provide [examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/) in both [C](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/c) and [Java](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java). As part of these examples, we also show how text can be encoded in Java and how to construct servers which can process multiple requests in [parallel](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java/src/MinHTTPServerThreadPool.java). Sockets are thus the very basis of distributed applications, the lowest level with which a programmer might have to work. ### 2.2. The Outside View of an Enterprise: Dynamic Websites We now are able to understand the basic communication processes going on in virtually any current computer network and the internet. We will use this understand to investigate how an organization or enterprise can present itself to the outside world via a website. We want to understand the technologies necessary to construct a website that can dynamically interact with a user. #### 2.2.1. HTML, CSS, JavaScript The [world wide web](https://en.wikipedia.org/wiki/World_Wide_Web) is based on three pillars: [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol), [HTML](https://en.wikipedia.org/wiki/HTML)/[CSS](https://en.wikipedia.org/wiki/Cascading_Style_Sheets)/[Javascript](https://en.wikipedia.org/wiki/JavaScript), and [URLs](https://en.wikipedia.org/wiki/Uniform_Resource_Locator). HTTP, the Hyper Text Transfer Protocol, is a text-based protocol to query resources which is usually transmitted over TCP connections. Actually, we already provide example implementations of both the [server](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java/src/MinHTTPServer.java) ([web server](https://en.wikipedia.org/wiki/Web_server)) and [client](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java/src/MinHTTPClient.java) ([web browser](https://en.wikipedia.org/wiki/Web_browser)) client side of the HTTP communication using [sockets](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java) (and even a small [parallel web server](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/java/src/MinHTTPServerThreadPool.java). We then provide some rudimentary [examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/html/) for [HTML](http://github.com/thomasWeise/distributedComputingExamples/tree/master/html/example_pain/index.html), [CSS](http://github.com/thomasWeise/distributedComputingExamples/tree/master/html/example_css/index.html), and [JavaScript](http://github.com/thomasWeise/distributedComputingExamples/tree/master/html/example_javascript_calculator/index.html). #### 2.2.2. Java Servlets: HTTP Protocol Server-Side Implementation Implementing HTTP based on sockets is quite complex. Sockets allow us access TCP. What we would like to have is a similarly elegant API to access HTTP (the next higher level of abstraction). One such technology are [Java Servlets](https://en.wikipedia.org/wiki/Java_Servlet). Servlets are used to implement the server-side of a HTTP conversation. A servlet is a sub-class of a special Java class which implements handler methods for different HTTP interactions ("[HTTP methods](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods)"). These methods are called by a [servlet container](https://en.wikipedia.org/wiki/Web_container), the actual implementation of the server. We can therefore fully concentrate on the application logic and don't need to worry about the protocol interaction itself. We provide a wide range of examples for [Java Servlets](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/), both [deployable examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/examples) as well as a stand-alone [HTTP Proxy Servlet](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/proxy). So with Java Servlets, we can build server components that can dynamically interact with a HTTP client (such as a web browser). This means that we can dynamically generate contents of a web page when a browser requests them. However, building complete dynamic web sites as Java Servlets is again quite cumbersome, as servlets are Java classes while web pages are HTML, which we would then write in form of string constants to be written to the output of a Servlet. #### 2.2.3. JavaServer Pages: Implement Dynamic Web Pages The next higher level of abstraction are [JavaServer Pages](https://en.wikipedia.org/wiki/JavaServer_Pages) (JSPs), which allow us to write HTML pages (or other text formats) and include Java source code in it. The pages are then served again by a servlet container. Whenever a page is sent to a client, the included Java code is first executed on the server side (and may generate additional output). Upon closer inspection, we can find that JSPs are actually "special" servlets: When a JSP is accessed for the first time, the servlet container dynamically creates the source code of a corresponding Java Servlet. This servlet is compiled, loaded, and then executed to create the dynamic content of the page to be sent to the client. Everything which was "text" in JSP becomes a String inside the servlet which is written to the servlet's HTTP response. Everything which was "code" in the JSP is copied directly into the handler methods of the servlet. JSPs are a more natural way to dynamically generate text (HTML) output and serve it to a client. By now, we have a solid understanding how dynamic contents in the web can be generated, how a user can interact with a web application via web forms by using her browser, and how we can realize sessions. ### 2.3. The Inside View of an Enterprise: Distributed Application Environment While these technologies allow us to build a dynamic "outside" view of a company, the way the company presents itself in the web, we now explore the "inside" view of the distributed enterprise computing environment. Here the goal is to build an environment in which applications from different departments (financial department, human resources, asset management, ...) can be connected with each other in a future-safe, extensible way. #### 2.3.1. Remote Procedure Calls with Java RMI The first step on this road to enterprise computing are [Remote Procedure Calls](https://en.wikipedia.org/wiki/Remote_procedure_call) (RPCs), which we explore on the example of [Java Remote Method Invocation](https://en.wikipedia.org/wiki/Java_remote_method_invocation) (RMI). Our [examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaRMI/) show how an object of one application hosted on computer can be accessed from another program running on a another computer. This brings us already close to realizing distributed applications interconnected on a network. However, Java RMI is still a Java-specific technology and its protocol is binary. We would like to implement our distributed applications in a platform-independent way, by using very clear, well-specified, and easy-to-understand protocols. #### 2.3.2. XML as Data Interchange Format Our pursuit of such a technology forces us to first take the de-tour of learning about the Extensible Markup Language ([XML](https://en.wikipedia.org/wiki/Xml). XML is a self-documenting format for storing complex data structures in text. It is similar to HTML, but without any pre-defined semantic or presentation. These can be specified for each application. We both look at [examples for XML documents and related standards](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/xml) themselves as well as [examples for XML processing with Java](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/java). #### 2.3.3. Web Services We then discuss [Web Services](https://en.wikipedia.org/wiki/Web_service). Web services are the basic foundation of many distributed enterprise computing systems and [service-oriented architectures](https://en.wikipedia.org/wiki/Service-oriented_architecture). They are invoked using the [XML](http://github.com/thomasWeise/distributedComputingExamples/tree/master/xml/)-based [SOAP](https://en.wikipedia.org/wiki/SOAP) protocol usually over [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol). Their interface and provided functionality is described via the Web Service Description Language ([WSDL](https://en.wikipedia.org/wiki/Web_Services_Description_Language)), another XML standard. Based on what we already know, we could now send XML data to a Java Servlet via HTTP-POST, parse this data with these Java XML processing technologies, use the same technologies to generate an output XML document, and send this one back as the response of the Java Servlet. Actually, we could even use JavaServer Pages for this purpose. However, there again is a simpler way: We can build services as simple Java objects and publish them to the [Apache Axis2/Java](http://axis.apache.org/axis2/java/core/) server. The server will make them accessible via SOAP and automatically generate WSDL descriptions. These can then be used to generate proxy objects for the client side using, e.g., [Maven](http://maven.apache.org/). We investigate this technology on [several examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/webServices/). #### 2.3.4. JSON RPC [JSON RPC](https://en.wikipedia.org/wiki/JSON-RPC) is another remote procedure call ([RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)) approach (specified [here](http://json-rpc.org/)) where the exchanged data structures are encoded in the JavaScript Object Notation ([JSON](https://en.wikipedia.org/wiki/JSON)). The data is exchanged via either [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) or [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol). JSON RCPs are similar to web services, but designed to be more light-weighted. We again discuss several [examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/jsonRPC/). ### 2.4. Large-Scale Distributed Computations and Data Processing (as used in Data Mining and Engineering) As last important use case for distributed computing, we consider how large-scale distributed computations can be realized. Such computations are needed in many [scenarios](http://www.hadoopilluminated.com/hadoop_illuminated/Hadoop_Use_Cases.html), ranging from simulations in engineering to data mining and processing in enterprises. #### 2.4.1. Message Passing Interface: Processes that Communicate Frequently We now focus on how the computing power of massive clusters can be utilized for large-scale scientific and engineering computations. Such large computations or simulations are often divided into several smaller sub-problems. These smaller problems are then solved *cooperatively* by multiple threads or processes in parallel. This often involves the exchange of messages at regular time intervals between processes working on closely related sub-problems. Obviously, Web Services, Java Servlets, or even just Java and the HTTP protocol, would be the wrong technologies for that: For large-scale computations, we want to get as efficient as possible with as little overhead as possible. This especially concerns communication, which is very expensive and the [limiting factor](https://en.wikipedia.org/wiki/Amdahl's_law) for the speedup we can achieve with distribution. We want to exchange primitive data types efficiently and we want to use communication paradigms not supported by HTTP/TCP, such as broadcasts, multicasts, and asynchronous communication. For this, an implementation of the Message Passing Interface ([MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface)) would be the method of choice. We explore this technology based on [several examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/mpi/) in the C programming language. #### 2.4.2. MapReduce with Hadoop: Large-Scale Data Processing In a final step we discuss a technology which combines the ability to create large-scale distributed computations (from the MPI world) with the rich tool support of the Java ecosystem: [MapReduce](https://en.wikipedia.org/wiki/MapReduce) with [Apache](http://hadoop.apache.org/) [Hadoop](https://en.wikipedia.org/wiki/Apache_Hadoop). MPI is the technology of choice if communication is expensive and the bottleneck of our application, frequent communication is required between processes solving related sub-problems, the available hardware is homogenous, processes need to be organized in groups or topological structures to make efficient use of collective communication to achieve high performance, the size of data that needs to be transmitted is smaller in comparison to runtime of computations, and when we do not need to worry much about exchanging data with a heterogeneous distributed application environment. Hadoop, on the other hand, covers use cases where communication is not the bottleneck, because computation takes much longer than communication (think Machine Learning), when the environment is heterogeneous, processes do not need to be organized in a special way and the division of tasks into sub-problems can be done efficiently by just slicing the input data into equal-sized pieces, where sub-problems have batch job character, where data is unstructured (e.g., text) and potentially huge (eating away the advantages of MPI-style communication), or where data comes from and results must be pushed back to other applications in the environment, say to HTTP/Java Servlet/Web Service stacks. Our [Hadoop examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/) focus on the [MapReduce](https://en.wikipedia.org/wiki/MapReduce) pattern (which is a tiny little bit similar to scatter/gather/reduce in MPI, just for the scenario described above). ### 2.5. Summary All in all, this course will give you a rough understanding of the dominant technologies in different fields of distributed computing, from dynamic websites over company-internal distributed application systems, to distributed engineering and scientific computations. Each field is explored with hands-on examples and you get to test and play with several example technologies. ## 3. Software Requirements For each example, I explicitly list the required software and discuss how it can be obtained and installed. Here I give an overview over these software components. ### 3.1. Java JDK Most of the examples I provide are written in the Java programming language and can run under arbitrary systems, given that Java is installed. In order to compile them, you need a [Java JDK](https://en.wikipedia.org/wiki/Java_Development_Kit) installed. My examples require [Java 7](https://en.wikipedia.org/wiki/Java_version_history#Java_SE_7) or later. Under Windows, you need to download and install Java from the [Oracle website](http://www.oracle.com/technetwork/java/javase/downloads/index.html). Under Linux, you would do `sudo apt-get install openjdk-7-jdk` (where you can replace `7` with any later version, such as `8`, if you like) ### 3.2. Maven Several of my Java examples are built with [Maven](https://en.wikipedia.org/wiki/Apache_Maven). All of these examples have a `pom.xml` file in their root folder. In order to build them, you thus need to install Maven. Under Windows, you need to download and install Maven from the [Apache website](http://maven.apache.org/download.cgi). Under Linux, you would do `sudo apt-get install maven`. If you are using Eclipse (see below), you do not need to install Maven as it is already integrated into Eclipse. ### 3.3. Eclipse I recommend [Eclipse](http://www.eclipse.org) as developer environment for all the Java examples in this repository. Each Java example actually comes already with an Eclipse `.project` file and with Eclipse `.settings`. Eclipse integrates both Maven and git. This means you can clone this repository from within Eclipse and directly import the Jave projects during this process. If you then right-click the Maven projects and choosen `Maven` -> `Update Project...`, Eclipse will also download and use all required libraries and dependencies as specified by the Maven `pom.xml` for you. You can download Eclipse from the [Eclipse website](http://www.eclipse.org). I recommend to use at least Eclipse Mars.1 for its excellent Maven and git support. ### 3.4. GlassFish Server For running some of the [Java Servlets](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/) and [JavaServer Pages](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServerPages/) examples, you need to download the [GlassFish Server](http://javaee.github.io/glassfish) from the corresponding [download website](http://javaee.github.io/glassfish/download). I recommend using at least GlassFish 4.1.2. ### 3.5. Apache Axis2/Java For running the [Web Service](http://github.com/thomasWeise/distributedComputingExamples/tree/master/webServices/) examples, you will need to download [Apache Axis2/Java](http://axis.apache.org/axis2/java/core/) from the corresponding [download page](http://axis.apache.org/axis2/java/core/download.html). I recommend using at least Axis2 1.7.3. ### 3.6. GCC In order to compile the examples written in the C programming language (such as the `C`-based [sockets examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/sockets/c)), you will need a C compiler such as GCC. Under Linux, it should normally be already installed and can otherwise be installed via `sudo apt-get install gcc`. Under Windows, you will need to install [MinGW](http://mingw.org/), usually via the [web installer](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). ### 3.7. Cross-Compiling for Windows under Linux with GCC Several of the C examples come for Windows or Linux. GCC allows you to cross-compile, i.e., if you are using Linux, you can compile C programs for Windows. For this purpose, you would first install `sudo apt-get install gcc-mingw-w64-i686` and then can use the command `gcc-mingw-w64-i686` in the same way you would use `gcc` under MinGW. ### 3.8. MPICH In order to build and compile our [examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/mpi/) for using the Message Passing Interface (MPI), we need an [MPI implementation](https://en.wikipedia.org/wiki/Message_Passing_Interface#Implementations). We choose [MPICH](https://en.wikipedia.org/wiki/MPICH). Under Linux, you can install the required files via `sudo apt-get install mpich libmpich-dev`. ### 3.9. Hadoop (also `ssh` and `rsync`) In order to test our [Hadoop examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/), we now need to set up a single-node Hadoop cluster. We therefore follow the guide given at [http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html](http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html). We need to install pre-requisits such as `ssh` and `rsync`. In the [Hadoop example readme](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/README.md), we provide the installation guide for Hadoop 2.7.2 Linux / Ubuntu. It boils down to downloading and installing Hadoop from one of the mirrors provided at [http://www.apache.org/dyn/closer.cgi/hadoop/common/](http://www.apache.org/dyn/closer.cgi/hadoop/common/), plus following the guidelines of the linked tutorial. ## 4. Licensing This work has purely educational purposes. Besides everything mentioned below, for anything in this repository, I impose one additional licensing condition: The code must never be used for anything which might violate the laws of Germany, China, or the USA. This also holds for any other file or resource provided here. The examples in this repository are licensed under the [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007](http://github.com/thomasWeise/distributedComputingExamples/tree/master/LICENSE), with the following exceptions: ### 4.1. Exception: Stand-Alone JSPs/JavaServlets Everything in the directories [/javaServerPages/standAloneJSPsWithJetty](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServerPages/standAloneJSPsWithJetty) and [/javaServlets/proxy](http://github.com/thomasWeise/distributedComputingExamples/tree/master/javaServlets/proxy) is licensed under the [Apache License v2.0](http://www.opensource.org/licenses/apache2.0.php) and are partially derived from project [embedded-jetty-jsp](https://github.com/jetty-project/embedded-jetty-jsp) with copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. ### 4.2. Exception: Hadoop Examples Some of the [Hadoop examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/) take some inspiration from the [maven-hadoop-java-wordcount-template](https://github.com/H4ml3t/maven-hadoop-java-wordcount-template) by [H3ml3t](https://github.com/H4ml3t), for which no licensing information is provided. The examples, are entirely differently in several ways, for instance in the way we build fat jars. Anyway, this original project is nicely described in [this blog entry](https://nosqlnocry.wordpress.com/2015/03/13/hadoop-mapreduce-wordcount-example-in-java-introduction-to-hadoop-job/). Furthermore, the our [Hadoop word](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/wordCount) is based on the well-known [word counting example](http://wiki.apache.org/hadoop/WordCount) for Hadoop's map reduce functionality. It is based on the version by provided Luca Menichetti [meniluca@gmail.com](mailto:meniluca@gmail.com) under the GNU General Public License version 2.
1
kon3ktor/complete-java-course
Zero to Hero - Master Java with practical examples
null
null
0
kiat/OOP-Design-Patterns
OOP Design Patterns Code Examples
abstract-factory-pattern behavioral-patterns checkstyle command-pattern design-pattern design-patterns design-patterns-implemented-in-java design-patterns-java iterator-pattern junit object-oriented-programming observer-pattern singleton-pattern strategy-pattern structural-patterns template-method template-method-pattern template-pattern visitor-pattern
# Code Examples about Design Patterns In this Repository we collect example design patterns in **Java** and **C++**. * Directory Java/ includes Java examples * Directory C++/ includes C++ examples ## Java Examples * We use [**Apache Maven**](https://maven.apache.org/) to build Java Examples. * We use [**Junit**](junit.org) for unit test. * We use [**findbugs**](http://findbugs.sourceforge.net/) for static code analysis. We use the [maven plugin for findbugs](https://gleclaire.github.io/findbugs-maven-plugin/) * We use [**checkstyle**](http://checkstyle.sourceforge.net/) to check our code style. We use the [maven plugin for checkstyle](https://maven.apache.org/plugins/maven-checkstyle-plugin/) ## C++ Examples We use CMake to build C++ code. * Use Smart pointer in C++ * Use C++14 * Use one of the compiler [**LLvm**](https://llvm.org/) - [**clang**](https://clang.llvm.org/), 'Gnu Compiler Collection' [**gcc**](https://gcc.gnu.org/onlinedocs/gcc/) or 'Gnu C Compiler' g++, and enable warning flags while compiling your code * Check Memory Leaks using [**valgrind**](http://valgrind.org/) ```bash valgrind --tool=memcheck <your_app> <your_apps_params> ``` ----- # Recommended Online Sources to learn Software Design Patterns ## Books ----- 1. [**Design Patterns: Elements of Reusable Object‐Oriented Software**](https://www.amazon.com/dp/0201633612) By Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides Addison‐Wesley,1994 2. [**Head First Design Patterns**](https://www.amazon.com/dp/0596007124/) By Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra O’Reilly, 2004 3. [**Design Patterns Explained: A New Perspective on Object Oriented Design, (Software Patterns)**](https://www.amazon.com/dp/0321247140) by Alan Shalloway, James R. Trott, Addison Wesley, 2004 ISBN-13: 978-0321247148 4. [**Pattern-Oriented Software Architecture Volume 1: A System of Patterns**]( https://www.amazon.com/Pattern-Oriented-Software-Architecture-System-Patterns/dp/0471958697) by Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, Michael Stal. 1996, ISBN-10: 0471958697 5. [**Design Patterns Explained Simply**](https://sourcemaking.com/design-patterns-ebook) ---- ## Websites 1. https://refactoring.guru/design-patterns/catalog List of Design Patterns with description and Example code. 2. http://java-design-patterns.com List of Software Design Patterns with examples in Java http://java-design-patterns.com/patterns/ 3. http://www.oodesign.com/ This website is an older websites. It provides a good list of the main design patterns, description of them, examples and their UML diagrams. 4. https://sourcemaking.com/design_patterns A professional Website with good different examples. If you are looking for different examples for each patterns than the classic examples. This site is a good source. 5. List of Software Design Patterns on Wikipedia https://en.wikipedia.org/wiki/Category:Software_design_patterns --- ## MOOCs 1. [Design Patterns by University of Alberta](https://www.coursera.org/learn/design-patterns/), this is part [Software Design Architecture Specialization](https://www.coursera.org/specializations/software-design-architecture) 2. [Object-Oriented Java](https://www.coursera.org/learn/object-oriented-java) 3. [Software Design Abstraction](https://www.coursera.org/learn/software-design-abstraction) --- ## Youtube 1. [Videos by Christopher Okhravi describing examples ](https://www.youtube.com/playlist?list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc) form [**Head First Design Patterns Book**](https://www.amazon.com/dp/0596007124/) 2. If you program C++, I highly Recommend Videos by Bjarne Stroustrup. For examples on [CppCon](https://www.youtube.com/channel/UCMlGfpWw-RUdWX_JbLCukXg), CppCon 2017, [Keynotes by Bjarne Stroustrup](https://www.youtube.com/watch?v=fX2W3nNjJIo&list=PLHTh1InhhwT6bwIpRk0ZbCA0N2p1taxd6) . (BTW, this line should be on top of top of this list :) )
0
aled/jsi-examples
Simple examples of how to use the JSI library
null
jsi-examples ============ Simple examples of how to use the JSI library. The following commands will run the examples: git clone https://github.com/aled/jsi-examples.git cd jsi-examples mvn package cd target unzip jsi-examples-1.1.0-SNAPSHOT-jar-with-dependencies.jar java -cp .:./classes net.sf.jsi.examples.Contains java -cp .:./classes net.sf.jsi.examples.NearestN
0
b3rnoulli/rsocket-examples
RSocket examples from article series
null
# RSocket Examples ## Introduction This repository contains examples used in the series of articles about RSocket. The articles are available here: https://medium.com/@b3rnoulli/reactive-service-to-service-communication-with-rsocket-introduction-5d64e5b6909 It consist of following modules: - interaction-model - load-balancing - resumability - rpc - spring-boot-requester - spring-boot-responder Each module address different aspect of the protocol, more detailed description is available in the module directories. ## Build The modules use ```gradle``` as a build tool. In order to crate executable jars please invoke `./gradlew clean build` on the root directory. Each module can be built individually using the same command, but executed in the particular module directory. Please notice that examples were designed to run inside your IDE.
0
shekhargulati/day12-face-detection
OpenCV Java example
null
day12-face-detection ==================== OpenCV Java example.
1
peter-lawrey/Performance-Examples
Workshop Examples
null
Performance-Examples ====================
0
bbende/nifi-streaming-examples
Collection of examples integrating NiFi with stream process frameworks.
null
# Apache NiFi Streaming Examples Collection of examples integrating NiFi with stream process frameworks. ## Initial Setup * Download the latest [Apache NiFi release](https://nifi.apache.org/download.html) * Extract the tar and create two instances of NiFi: <pre><code> tar xzvf nifi-1.0.0-bin.tar.gz mv nifi-1.0.0 nifi-edge tar xzvf nifi-1.0.0-bin.tar.gz mv nifi-1.0.0 nifi-core </code></pre> * Configure the edge instance by editing nifi-edge/conf/nifi.properties and setting the following properties: <pre><code> nifi.remote.input.socket.port=7088 nifi.remote.input.secure=false nifi.web.http.port=7080 </code></pre> * Configure the core instance by editing nifi-core/conf/nifi.properties and setting the following properties: <pre><code> nifi.remote.input.socket.port=8088 nifi.remote.input.secure=false nifi.web.http.port=8080 </code></pre> * Start both instances <pre><code> ./nifi-core/bin/nifi.sh start ./nifi-edge/bin/nifi.sh start </code></pre> * Open the UI for both instances in a browser <pre><code> http://localhost:7080/nifi/ http://localhost:8080/nifi/ </code></pre> * Setup initial dictionary files <pre><code> mkdir nifi-edge/data mkdir nifi-edge/data/dictionary mkdir nifi-core/data mkdir nifi-core/data/dictionary </code></pre> * In each of the above dictionary directories, create a file called levels.txt with the content: <pre><code> ERROR WARN </code></pre> * Import nifi-streaming-examples/templates/nifi-log-example-edge.xml into the the edge instance (http://localhost:7080/nifi) * Import nifi-streaming-examples/templates/nifi-log-example-core.xml into the the core instance (http://localhost:8080/nifi) * Start everything on the core instance (http://localhost:8080/nifi) ![Image](https://github.com/bbende/nifi-streaming-examples/blob/master/screens/nifi-core.png?raw=true) * To start sending logs, starting everything on the edge instance (http://localhost:8080/nifi) EXCEPT the TailFile processor, the "Generate Test Logs" process group will send fake log messages ![Image](https://github.com/bbende/nifi-streaming-examples/blob/master/screens/nifi-edge.png?raw=true) * To tail a real file, stop the "Generate Test Logs" process group, configure TailFile to point to your log file of choice, and start the TailFile processor ## Flink - WindowLogLevelCount - Setup * For local testing, run a standalone Flink streaming job <pre><code> cd nifi-flink-examples mvn clean package -PWindowLogLevelCount java -jar target/nifi-flink-examples-0.0.1-SNAPSHOT.jar </code></pre> ## Apex - LogLevelApplicationRunner - Setup * For local testing, run LogLevelApplicationRunner from your favorite IDE: <pre><code> nifi-apex-examples/src/test/java/nifi/apex/examples/logs/LogLevelApplicationRunner.java </code></pre> ## Storm - LogLevelCountTopology - Setup * For local testing, run a standalone local Storm topology <pre><code> cd nifi-storm-examples mvn clean package -PLogLevelCountTopology java -jar target/nifi-storm-examples-0.0.1-SNAPSHOT.jar </code></pre>
0
line/line-fido2-server
FIDO2(WebAuthn) server officially certified by FIDO Alliance and Relying Party examples.
example fido2 java passwordless relying-party security spring-boot webauthn
# LINE FIDO2 SERVER ![Stars](https://img.shields.io/github/stars/line/line-fido2-server.svg?style=social) ![Repo Size](https://img.shields.io/github/repo-size/line/line-fido2-server) ![License Apache-2.0](https://img.shields.io/github/license/line/line-fido2-server) ![Top Language](https://img.shields.io/github/languages/top/line/line-fido2-server) ![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.4.3-green) ![Java version](https://img.shields.io/badge/Java-1.8-green) ![Data base](https://img.shields.io/badge/DataBase-MySQL%2FH2%2FRedis-blue) ![Last Commit](https://img.shields.io/github/last-commit/line/line-fido2-server) > **FIDO2(WebAuthn) Server officially certified by FIDO Alliance** <img src="images/fido2_certificate.jpg" height="500" align="center" alt=""/> ## Overview FIDO (Fast IDentity Online) is an open standard for online authentication. It is designed to solve the password problems stemming from a lot of security problems as we are suffering today. Rather than relying on symmetric credentials (like passwords or PINs, typically which is a knowledge-based factor), FIDO is based on a public-key cryptography algorithm that is based on asymmetric credentials. Simply, the device generates the key pair and stores the private key within the secure area, and sends the corresponding public key (as the name implies it is okay to be public) to the server. Then, if the authentication is needed, the server sends challenges to the device and the device generates the digital signature with the private key and sends it to the server. Finally, the server can validate the signature with the registered public key. ### What is FIDO2 FIDO2 is an improved standard for use on the web and other platforms as well as mobile. Various web browsers and OS platforms currently support the FIDO2 standard API. Basically, FIDO2 has the following operations - Registration, Authentication. #### Registration - The user is prompted to choose an available FIDO authenticator that matches the online service’s acceptance policy. - User unlocks the FIDO authenticator using a fingerprint reader, a button on a second–factor device, securely–entered PIN, or other methods. - The user’s device creates a new public/private key pair unique for the local device, online service, and user’s account. - The public key is sent to the online service and associated with the user’s account. The private key and any information about the local authentication method (such as biometric measurements or templates) never leave the local device. #### Authentication - Online service challenges the user to log in with a previously registered device that matches the service’s acceptance policy. - User unlocks the FIDO authenticator using the same method as at Registration time. - The device uses the user’s account identifier provided by the service to select the correct key and sign the service’s challenge. - The client device sends the signed challenge back to the service, which verifies it with the stored public key and lets the user log in. ## Screenshots ### Chrome on Mac with TouchId <img src="images/chrome_mac_touchid.gif" width="600" align="center" alt="registration_flow"/> ### Chrome on Mac with Secret Key (2FA) <img src="images/chrome_mac_secretkey.gif" width="600" align="center" alt="registration_flow"/> ### Chrome on Android with Fingerprint (Reg) <img src="images/chrome_android_fingerprint_reg.GIF" height="500" align="center" alt="registration_flow"/> ### Chrome on Android with Fingerprint (Auth) <img src="images/chrome_android_fingerprint_auth.GIF" height="500" align="center" alt="registration_flow"/> ## Modules - server: The FIDO2 server implementation conforming to the FIDO2 standard - common: FIDO2 related common models - rp-server: The sample application with a FIDO2 RP implementation - spring-boot-stater: The spring-boot-starter version of the LINE FIDO2 server application that can be easily integrated into a Spring Boot environment ## Features - Supported attestation types - Basic - Self - Attestation CA (a.k.a Privacy CA) - None - Anonymization CA - Supported attestation formats - Packed (FIDO2) - Tpm (Windows10 devices) - Android key attestation - Android SafetyNet (Any Android devices running 7+) - FIDO U2F (Legacy U2F authenticators) - Apple Anonymous - None - Metadata service integration - FIDO MDSv2 ## How to run You need to run the FIDO2 server and RP Server first. If you want to integrate your own RP Server, please implement APIs by referring to the sample codes. Regarding client sides, you may implement the web app for communicating with the RP server. We also provide our server in the form of a spring boot starter. Check out the spring-boot-starter directory. ### Manual ```bash # Start RP Server cd rpserver ./gradlew bootRun # Start FIDO2 Server or Line-fido2-spring-boot Demo cd server ./gradlew bootRun cd spring-boot-starter/line-fido2-spring-boot-demo ./gradlew bootRun ``` ### Docker for demo If the [Docker environment is configured](https://docs.docker.com/get-started/), You can easily run applications with docker-compose. ```bash # Start both RP Server and FIDO2 Server docker-compose up ``` After running the applications, you can open the test page at the link below. **http://localhost:8080/** ### Local DB FIDO2 Server running on local environments uses h2 as an embedded DB. This needs to be replaced with commercial standalone DB for other environments such as staging, beta or real. In the case of the local environment, you can use the h2 console. Add the following path /h2-console to the fido server URL to access the h2 web console. e.g., http://localhost:8081/h2-console If the below error occurs while logging in to h2-console, ``` No suitable driver found for 08001/0 ``` try to remove or comment out *logbook-spring-boot-starter* from build.gradle. ``` implementation('org.zalando:logbook-spring-boot-starter:1.8.1') ``` ### Lombok This project utilizes Lombok to reduce implementing getter/setter/constructors. You need the Lombok plugin to build with IntelliJ and Eclipse. See the following web pages to get information. https://projectlombok.org/ ### Issues - If data.sql doesn't work well in an IntelliJ environment, try commenting on this part in build.gradle. ```groovy jar { processResources { exclude("**/*.sql") } } ``` - If Fido2StarterDemoApplication doesn't work well, try commenting on this part in build.gradle. ```groovy task dockerBuild() { jar.enabled = false dependsOn(bootJar) } ``` ## API Guides After running the applications, you can view API guide documents at the link below. ### Spring REST Docs - server: http://localhost:8081/docs/api-guide.html ### Swagger UI - rpserver: http://localhost:8080/swagger-ui.html - server: http://localhost:8081/swagger-ui.html ## References `LINE Engineering Blogs` - [FIDO at LINE: A First Step to a World Without Passwords](https://engineering.linecorp.com/en/blog/fido-at-line/) - [FIDO at LINE: FIDO2 server as an open-source project](https://engineering.linecorp.com/en/blog/fido-at-line-fido2-server-opensource/) `LINE DevDay Videos` - [Open source contribution Starting with LINE FIDO2 Server](https://youtu.be/xKzXi5ic4Do) - [Strong customer authentication & biometrics using FIDO](https://youtu.be/S1y9wFh7_dc) - [Cross Platform Mobile Security At LINE](https://youtu.be/4288h-EamTU) - [Secure LINE login with biometric key replacing password](https://youtu.be/vCAu-y-iwyw) `Internal` - [Sequence Diagram](https://github.com/line/line-fido2-server/wiki/Sequence-diagrams) `External` - [FIDO2: WebAuthn & CTAP](https://fidoalliance.org/fido2/) - [WebAuthn Level 2](https://www.w3.org/TR/2021/REC-webauthn-2-20210408/) - [CTAP v2.1](https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html)
0