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
# size in GB * 1024 * 2048 -> 3GB * 1024 * 2048 -> 6291456 | |
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://6291456` |
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
public class GetLocationOfClassTest { | |
@Test | |
public void getClasspathOfClass() throws Exception { | |
String locationOfThisClass = getLocationOfClass(this.getClass()); | |
String locationOfJUnit4Class = getLocationOfClass(JUnit4.class); | |
String expectedLocationOfThisClass = "/Users/<User>/Documents/project.java/studies/target/test-classes/"; | |
String expectedLocationOfJUnit4Class = "/Users/<User>/.m2/repository/junit/junit/4.11/junit-4.11.jar"; |
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
@Test | |
public void testJoiner() throws Exception { | |
List<String> texts = Lists.newArrayList("eins", null, "drei", "vier", "fünf", "sechs", "sieben", null); | |
String joined; | |
String expected; | |
joined = Joiner.on(";") | |
.skipNulls() | |
.join(texts); |
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
SELECT username, account_status FROM dba_users; | |
ALTER USER <user> ACCOUNT UNLOCK; | |
ALTER USER <user> IDENTIFIED BY <password>; | |
SELECT profile FROM dba_users WHERE username = <user>; | |
ALTER profile DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED; |
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
public class DateFormatFunction implements Function<Date,String> { | |
private String format; | |
public formatFunction(String format) { | |
this.format = format; | |
} | |
@Override | |
public String apply(Date date) { |
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
public enum EProductivityPlanType { | |
TARGET, ACTUAL | |
} |
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
// 11111111112222222222333333 | |
// 01234567890123456789012345 | |
// |--------------------------| | |
// ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
// DE = 1314, FR = 1527, IT = 1829 | |
def iban(bic, ban, country) { | |
ban = ban.padLeft(10,'0') | |
bic = bic.padLeft(8,'0') | |
def checkSum = "${(98 - new BigInteger(bic+ban+country+'00').remainder(97))}".padLeft(2, '0') |
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
@echo off | |
set classpath=modules\system\layers\base\org\picketbox\main\picketbox-4.0.20.Final.jar | |
set mainclass=org.picketbox.datasource.security.SecureIdentityLoginModule | |
java -classpath %classpath% %mainclass% %1 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans | |
xmlns="http://xmlns.jcp.org/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee | |
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" | |
bean-discovery-mode="all"> | |
</beans> |
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
On a Mac, the path is ~/Library/Caches/IntelliJIdea14/Maven/Indices/UserArchetypes.xml |
OlderNewer