This file contains 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
/** | |
* USE WITH CAUTION! | |
* This script attempts to drop every object it can find in the current schema. | |
* - Tables (including constraints) | |
* - Views | |
* - Sequences | |
* - More... | |
* | |
* @author John A. Marsh - ThreeLeaf.com (c) 2014 | |
*/ |
This file contains 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
SET DEFINE OFF; | |
SET SERVEROUTPUT ON; | |
SET FEEDBACK OFF; | |
--/ | |
DECLARE | |
newStartNumber INTEGER; | |
oldStartNumber INTEGER; | |
difference INTEGER; | |
BEGIN |
This file contains 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
/** | |
* I found after running a particular performance test that Oracle started hanging, | |
* and I noticed that the drive space was full. I eventually noticed that the TEMP | |
* tablespace had expanded to fill all the avlailable drive space. I found the following | |
* set of commands online that allowed me to drop the bloated tablespace and recreate | |
* a new one. | |
* @author John A. Marsh (with lots of help from the Internet) | |
* @since 2014-08-01 | |
*/ |
This file contains 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
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>copy</goal> | |
</goals> |
This file contains 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
import net.dongliu.apk.parser.ApkParser; | |
import net.dongliu.apk.parser.bean.Icon; | |
import org.apache.log4j.Logger; | |
import java.io.*; | |
/** Services for managing APK (Adroid Application Package) objects. */ | |
public class ApkService | |
{ | |
/** The {@link Logger}. */ |
This file contains 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
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> | |
<property name="dataSource" ref="dataSource"/> | |
<property name="persistenceUnitName" value="pu"/> | |
<property name="packagesToScan"> | |
<list> | |
<value>com.appia.model.beans</value> | |
</list> | |
</property> | |
<property name="jpaVendorAdapter"> | |
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> |
This file contains 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 com.threeleaf.util; | |
import java.util.Comparator; | |
/** | |
* A {@link Comparator} that allows any two objects to be sorted based on {@link Object#toString()}. | |
* This works best when the object's toString returns something meaningful, but can still be | |
* useful in cases where a object one has not control over needs to be placed in a sorted | |
* collection. | |
* <p> |
This file contains 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
import java.io.*; | |
/** Find all the even divisors of a number. */ | |
class LargestModulus | |
{ | |
/** | |
* Find all the divisors for a number (a.k.a., a dividend). The number must be a positive integer. It may be provided on the command line, or entered interactively when prompted. | |
* | |
* @param args if a command line parameter is detected, the first argument is used. |
This file contains 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
/** | |
* <p>Workaround to allow OpenPojo version 0.8.6 to work with Java 9.</p> | |
* <p>TODO: Remove when OpenPojo is updated</p> | |
*/ | |
@BeforeClass | |
public static void setSystemProperty() | |
{ | |
System.setProperty("sun.boot.class.path", System.getProperty("java.class.path")); | |
} |
This file contains 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
FROM openjdk:8-alpine | |
ENV TZ America/New_York | |
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime | |
RUN echo "${TZ}" > /etc/timezone | |
# Declare the working directory | |
WORKDIR /microservice | |
# Copy and explode the WAR to the working directory |
OlderNewer