Para instalar em seu ecommerce, basta incluir o snippet Maven em seu projeto. Se, por acaso, o download via Maven não for possível, é possível obter a última versão neste link:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package sizebay.intelligence.security; | |
| import javafx.application.Application; | |
| import javafx.scene.Scene; | |
| import javafx.scene.web.WebEngine; | |
| import javafx.scene.web.WebView; | |
| import javafx.stage.Stage; | |
| /** | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lombok.accessors.fluent=true | |
| lombok.accessors.chain=true | |
| lombok.nonNull.exceptionType=IllegalArgumentException |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Sample: | |
| * new Date().add( 20, Date.DAY ) // will point to 20 ahead from today | |
| * new Date().add( -20, Date.DAY ) // will point to 20 ago from today | |
| */ | |
| Date.SECOND = 1000 | |
| Date.MINUTE = (60*Date.SECOND) | |
| Date.HOUR = (60*Date.MINUTE) | |
| Date.DAY = (24*Date.HOUR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RequiredArgsConstructor | |
| final public class NamedThreadFactory implements ThreadFactory { | |
| private final AtomicInteger counter = new AtomicInteger(1); | |
| final private String baseName; | |
| @Override | |
| public Thread newThread(final Runnable r) { | |
| final Thread thread = new Thread(r, getNextMethod()); | |
| thread.setDaemon(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <persistence version="2.0" | |
| xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
| http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
| <persistence-unit name="Eclipselink_JPA" transaction-type="RESOURCE_LOCAL"> | |
| <!-- which one will be the Persistence Provider that will provide the JPA implementation? --> | |
| <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Singleton | |
| public class ConnectionProvider { | |
| public Connection provideConnection() throws Exception { | |
| Class.forName("org.sqlite.JDBC"); | |
| return DriverManager.getConnection("jdbc:sqlite:/tmp/nbwy.db"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * fake polymorphic method. It will switch between number of arguments but will | |
| * make no distinction between types. | |
| */ | |
| function Method( args ){ | |
| if ( this instanceof Method ) { | |
| this.expectations = {} | |
| this.target = args || window | |
| } else | |
| return new Method() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="template"> | |
| <fieldset> | |
| <legend>New task</legend> | |
| <form> | |
| <input type="text" id="title" placeholder="Title" /> | |
| <input type="text" id="description" placeholder="Description" /> | |
| <button class="btn-primary btn-add">Adicionar</button> | |
| </form> | |
| </fieldset> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tests.helper; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| /** | |
| * Class with helper methods to read file content from your classpath. | |
| * It is especially useful when need to compare big string output with | |
| * a file that contains the expected response. |