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
@SuppressWarnings("unused") | |
public static String wmConcat(String in, Boolean flag, | |
String[] register, Integer[] counter) { | |
if (flag) { | |
if (register[0] == null) { | |
return null; | |
} | |
return register[0]; | |
} | |
if (in == null) { |
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 * from all_sequences where sequence_owner = sys_context('USERENV', 'SESSION_USER') |
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
/* | |
A very special SQL file - actually, a configuration for the exporter | |
the exporter is in the where.clause.awk script, | |
which is called as follows: | |
awk -v table=$TABLE_NAME -f where_clause.awk Schema/public_data.sql | |
NB: We have slightly weird syntax for comments here: a line containing / and * | |
will be completely ignored; so will the line containing */ | |
/* |
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
<ontologyReferences> | |
<term accession="CHEBI:29022"> | |
<a href="http://www.ebi.ac.uk/gxa/experiment/E-MEXP-1573" rel="experiment">E-MEXP-1573</a> | |
<a href="http://www.ebi.ac.uk/gxa/experiment/E-MEXP-2209" rel="experiment">E-MEXP-2209</a> | |
<a href="http://www.ebi.ac.uk/gxa/experiment/E-MEXP-749" rel="experiment">E-MEXP-749</a> | |
</term> | |
<term accession="CHEBI:17790"> | |
<a href="http://www.ebi.ac.uk/gxa/experiment/E-GEOD-5301" rel="experiment">E-GEOD-5301</a> | |
<a href="http://www.ebi.ac.uk/gxa/experiment/E-MEXP-1797" rel="experiment">E-MEXP-1797</a> | |
</term> |
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
// : c13:CriticalSection.java | |
// Synchronizing blocks instead of entire methods. Also | |
// demonstrates protection of a non-thread-safe class | |
// with a thread-safe one. | |
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002 | |
// www.BruceEckel.com. See copyright notice in CopyRight.txt. | |
import java.util.ArrayList; | |
import java.util.List; |
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
$.each( | |
$.grep( | |
$(".l_expandcomments"), | |
function(e) { | |
var m = /(\d+) more comments/.exec(e.innerHTML); | |
return m && parseInt(m[1]) > 10; | |
}), | |
function() { | |
$(".l_hideone", $(this).parents(".l_entry")) | |
.click(); |
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
def env = System.getenv() | |
def gitcmd = "git" | |
if (env["com.apple.java.jvmMode"]) | |
gitcmd = "/usr/local/git/bin/git" | |
if (env["OS"] =~ /^Windows/) | |
gitcmd = "cmd /c ${gitcmd}" | |
def gitDescribe = """${gitcmd} describe""".execute().in.text.trim() | |
def m = gitDescribe =~ /(?:atlas-)?(.*)/ | |
def gitBranch = """${gitcmd} symbolic-ref -q HEAD""".execute().in.text.trim() |
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 VolatileExample implements Runnable { | |
public static boolean flag = true; // do not try this at home | |
public void run() { | |
long i = 0; | |
while (flag) { | |
if (i++ % 10000000000L == 0) | |
System.out.println("Waiting " + System.currentTimeMillis()); | |
} | |
} |
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 org.acm.afilippov; | |
import java.beans.IntrospectionException; | |
import java.beans.Introspector; | |
import java.beans.PropertyDescriptor; | |
public class Chain { | |
private int i; | |
public int getI() { |
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 Deadlock implements Runnable { | |
private final Object a; | |
private final Object b; | |
private final static CountDownLatch latch = new CountDownLatch(2); | |
public Deadlock(Object a, Object b) { | |
this.a = a; | |
this.b = b; | |
} |
OlderNewer