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.util.*; | |
public class TestClass | |
{ | |
public static void main( String[] args ) | |
{ | |
List<String> words = new ArrayList<String>(); | |
words.add( "This" ); | |
words.add( " is" ); | |
words.add( " cool :)" ); |
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
#!/sbin/runscript | |
# | |
# name: /etc/init.d/oracle | |
# description: starts and stops Oracle on Gentoo Linux | |
# author: Brian.Duff@oracle.com | |
# | |
# Change this to your Oracle user | |
oracle_user=ora92 | |
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
filenames | |
.parallelStream() | |
.forEach(f -> writeFile(tempDirWithPrefix.resolve(f), data)); |
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
moduleDeps.keySet().stream() | |
.filter(dep -> dep instanceof IjLibrary) | |
.map(library -> (IjLibrary) library) | |
.forEach(referencedLibraries::add); |
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
for (IjProjectElement dep : moduleDeps.keySet()) { | |
if (dep instanceof IjLibrary) { | |
referencedLibraries.add((IjLibrary) dep); | |
} | |
} |
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
type RecordIndex = i32; | |
type ContentIndex = i32; | |
type Bytes = Vec<u8>; | |
/// IJ has the notion of "enumerations" which are basically fast bimaps between a value of | |
/// arbitrary type and an integer, and support automatically adding new values which | |
/// get an auto-incremented integer value. | |
type Enumeration<A> = BiMap<A, i32>; |
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 void doSomethingInteresting(Thingy t) { | |
if (Config.shoudLogInterestingThings()) { | |
LOG.info("doSomethingInteresting(%s)", t); | |
} | |
// Actually do something interesting | |
} |
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 frodo; | |
public class Example { | |
public static void main(String[] args) { | |
new Test().run(); | |
} | |
public void run() { | |
System.out.println(someMethod(new RealFile("/foo"))); | |
System.out.println(someMethod(new RealFile("/bar"))); |
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
# This is the class I care about | |
- frodo/Test | |
# And this is a method I want to log with its super ugly JVM signature | |
- someMethod(Lfrodo/Test$RealFile;)Ljava/lang/String; | |
# Please show me an abbreviated stack trace for each call | |
- showTrace: true | |
# And use the getPath() method to convert the parameter to a String | |
- displayMethod: getPath |
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
someMethod: /foo | |
trace: <- someMethod <- run <- main | |
someMethod: /bar | |
trace: <- someMethod <- run <- main |
OlderNewer