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 | |
# | |
# Author: Edison <[email protected]> | |
# | |
# This is a modified version for from Andreas Olsson <[email protected]> | |
# For each tunnel; make a uniquely named copy of this template. | |
## SETTINGS | |
# | |
# autossh monitoring port (unique) |
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/bash | |
### BEGIN INIT INFO | |
# Provides: geminabox | |
# Required-Start: $local_fs $remote_fs $network | |
# Required-Stop: $local_fs $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start Geminabox. | |
# Description: Start the Geminabox service. |
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 | |
### BEGIN INIT INFO | |
# Provides: vpn | |
# Required-Start: $syslog $local_fs $remote_fs $network $named | |
# Required-Stop: $syslog $local_fs $remote_fs $network $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the vpn. | |
### END INIT INFO |
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
<var name="counter" value="0"/> | |
<for list="{list}" param="{param}"> | |
<sequential> | |
<switch value="${counter}"> | |
<case value="0"> | |
<!-- do something --> | |
</case> | |
<case value="1"> | |
<!-- do something --> |
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
var num = 0; | |
var num2 = 0.0; | |
var num3 = 0.0; | |
var num4 = 0.0; | |
var num5 = 0.0; | |
console.log("part1"); | |
var part1 = [{ | |
batchCount : 5 | |
},{ |
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 Main { | |
public static void main(String[] args) { | |
test("<html*", "<html></html>"); | |
test("12*?", "12345"); | |
test("12*4?", "12345"); | |
} | |
private static void test(String pattern, String input) { | |
Pattern p = Pattern.compile(pattern); | |
System.out.println(pattern + " : " + input + " matches? " |
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 LongestCommonSequence { | |
public static void main(String[] args) { | |
String str1 = "ABCBDAB"; | |
String str2 = "BDCABA"; | |
String lcs = lcs(str1, str2); | |
System.out.println(lcs); | |
System.out.println(lcs.length()); | |
} |
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 LongestCommonSubstring { | |
public static void main(String[] args) { | |
String str1 = "21232523311324"; | |
String str2 = "312123223445"; | |
String lcs = lcs(str1, str2); | |
System.out.println(lcs); | |
System.out.println(lcs.length()); | |
} |
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 JaroWinklerDistance { | |
public static void main(String[] args) { | |
String s1 = "MARTHA"; | |
String s2 = "MARHTA"; | |
// String s1 = "MARTHA"; | |
// String s2 = "MARHTA"; | |
// int range = Math.floor(Math.max(s1.length(),s2.length())/2) - 1 = 2; | |
// int isMatched = (s1.charAt(row) == s2.charAt(col) && Math.abs(row - col) <= range) ? 0 : 1; | |
// 0 1 2 3 4 5 t | |
// M A R H T A |
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"?> | |
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
height="100" | |
width="100"> | |
<fx:Declarations> | |
<s:ArrayCollection id="damages"> | |
<fx:Array> | |
<fx:Object damage="damage1" |
OlderNewer