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
#include <stdio.h> | |
char dna_complement(char dna) | |
{ | |
dna ^= 0x15; | |
dna ^= (dna & 0x02) << 3; | |
dna ^= (dna & 0x02) >> 1; | |
dna ^= (dna & 0x08) >> 1; | |
return dna; | |
} |
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
Sample Application using Weld with Java SE |
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"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mythosil</groupId> | |
<artifactId>wildfly-template</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>wildfly-template</name> |
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 soundcloud | |
client = soundcloud.Client(client_id=CLIENT_ID) | |
tracks = client.get('/tracks', q='search query', genres='funk', bpm={ 'from': 110, 'to': 130 }) | |
print vars(tracks) |
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
#!/bin/sh | |
function http_server() { | |
local PORT=8888 | |
if [ $# -ne 0 ]; then | |
expr $1 + 1 > /dev/null 2>&1 | |
if [ $? -lt 2 ]; then | |
PORT=$1 | |
else | |
echo "Usage: http_server <port>" return 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
package com.mythosil.spring.context; | |
import java.beans.Introspector; | |
import org.springframework.beans.factory.config.BeanDefinition; | |
import org.springframework.context.annotation.AnnotationBeanNameGenerator; | |
public class FQDNAnnotationBeanNameGenerator extends AnnotationBeanNameGenerator { | |
/** | |
* Derive a bean name from the given bean definition. |
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
/** | |
* | |
* $ javac AnnotationSample.java -Xlint:unchecked | |
* $ java AnnotationSample | |
* | |
*/ | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; |
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
/* settings */ | |
def filename = './mapk.xml' | |
def duration = 4000.0 | |
def dt = 0.1 | |
/************/ | |
def doc = new XmlParser().parse(filename) | |
def model = doc.model[0] | |
def species = [:] | |
def parameters = [:] |
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 javax.swing.JFrame; | |
import javax.swing.JButton; | |
import java.awt.event.ActionListener; | |
import java.awt.event.ActionEvent; | |
class SwingTest { | |
public static void main(String args[]) { | |
JFrame window = new JFrame("title"); | |
JButton button = new JButton("button"); | |
button.addActionListener(new ActionListener() { |
NewerOlder