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 Data.List | |
--2) | |
type Row = [Integer] | |
type Sudoku = [Row] | |
data Variant = Basic | Cross | Color deriving (Eq,Show) | |
isRowValid :: Row -> Bool |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
namespace SimpleCsvLoader | |
{ | |
public class CsvLoader | |
{ | |
private char _delimiter; | |
private string _fileName; |
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
do { | |
ch = fgetc(in1); | |
if ( ch == EOF ) break; | |
LOOP1: if ( ch == 10 || ch == 13 ) { | |
// newline or carriage return | |
ch = fgetc(in1); | |
if ( ch == EOF ) break; | |
goto LOOP1; | |
} | |
// Bad style with 'goto', but then |
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
max=MAX3(diag,down,right); | |
if (max <= 0) { | |
h[i][j]=0; | |
xTraceback[i][j]=-1; | |
yTraceback[i][j]=-1; | |
// these values already -1 | |
} | |
else if (max == diag) { | |
h[i][j]=diag; | |
xTraceback[i][j]=i-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
/*------------------------------------------------------------- | |
Copyright (C) 2000 Peter Clote. | |
All Rights Reserved. | |
Permission to use, copy, modify, and distribute this | |
software and its documentation for NON-COMMERCIAL purposes | |
and without fee is hereby granted provided that this | |
copyright notice appears in all copies. |
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
[root@CentOS src]# make run_mpi | |
mpicc -o sw.o smith_waterman.c | |
mpiexec -np 1 ./sw.o ../input_data/sequence1.dat ../input_data/sequence2.dat ../input_data/data.score -1 | |
argv[0] = ./sw.o | |
argv[1] = ../input_data/sequence1.dat | |
argv[2] = ../input_data/sequence2.dat | |
argv[3] = ../input_data/data.score | |
argv[4] = -1 | |
./sw.o: invalid option -- '1' | |
PAM file empty |
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
/*** EXTENSTION METHODS START ***/ | |
public static T GetFirstDescendant<T>(this OpenXmlElement parent) where T : OpenXmlElement | |
{ | |
var descendants = parent.Descendants<T>(); | |
if (descendants != null) | |
return descendants.FirstOrDefault(); | |
else | |
return 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
#! /bin/sh | |
suspend_vms () { | |
for output in $(virsh list --state-running --uuid) | |
do | |
exec virsh managedsave $output --bypass-cache | |
done | |
} | |
case "$1" in |
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
macAddress=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` | |
sudo ifconfig en0 ether $macAddress | |
echo "new mac address:" | |
echo $macAddress | |
sudo ifconfig en0 ether |
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
2014-06-09T18:30:40,093Z ERROR o.a.d.e.p.i.p.ProjectRecordBatch [zk1] [37daf04b-7d82-4d2f-987c-59851f2aeafe:frag:0:0] AbstractSingleRecordBatch:next(AbstractSingleRecordBatch.java:60) - Failure during query | |
org.apache.drill.exec.exception.SchemaChangeException: Failure while attempting to load generated class | |
at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:243) | |
at org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:57) | |
at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.next(ProjectRecordBatch.java:83) | |
at org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:45) | |
at org.apache.drill.exec.physical.impl.limit.LimitRecordBatch.next(LimitRecordBatch.java:99) | |
at org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:45) | |
at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.next(RemovingRecordBatch.java:94) | |
at org |
OlderNewer