This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xsi:schemaLocation="http://www.springframework.org/schema/mvc | |
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd |
public void runBare() throws Throwable { | |
Throwable exception = null; | |
setUp(); | |
try { | |
runTest(); | |
} catch (Throwable running) { | |
exception = running; | |
} finally { | |
try { | |
tearDown(); |
static private boolean doubleIsDifferent(double d1, double d2, double delta) { | |
if (Double.compare(d1, d2) == 0) { | |
return false; | |
} | |
if ((Math.abs(d1 - d2) <= delta)) { | |
return false; | |
} | |
return true; | |
} |
private static boolean equalsRegardingNull(Object expected, Object actual) { | |
if (expected == null) { | |
return actual == null; | |
} | |
return isEquals(expected, actual); | |
} | |
private static boolean isEquals(Object expected, Object actual) { | |
return expected.equals(actual); |
__author__ = 'feng' | |
import string | |
articles = [ | |
'Familiarize Yourself with IntelliJ IDEA editor', | |
'While keeping the Ctrl key pressed, rotate the mouse wheel. As you rotate the mouse wheel forward', | |
'font size grows larger; as you rotate the mouse wheel backwards, font size decreases', | |
'In the popup frame, type Reset font size, and click Enter.', | |
'These operations apply to the active editor only. In the other editor tabs, font size is not affected.', |
http://www.raspberrypi.org/phpBB3/
在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)
安装nettalk
public int compare(String a, String b) { | |
StringTokenizer aTokens = new StringTokenizer(a, "."); | |
StringTokenizer bTokens = new StringTokenizer(b, "."); | |
while (aTokens.hasMoreTokens()) { | |
int aToken = Integer.parseInt(aTokens.nextToken()); | |
System.out.println(aToken); | |
if (bTokens.hasMoreTokens()) { | |
int bToken = Integer.parseInt(bTokens.nextToken()); | |
System.out.println(bToken); |
public static long parseLong(String s, int radix) | |
throws NumberFormatException | |
{ | |
if (s == null) { | |
throw new NumberFormatException("null"); | |
} | |
if (radix < Character.MIN_RADIX) { | |
throw new NumberFormatException("radix " + radix + | |
" less than Character.MIN_RADIX"); |
public class InsertingElementsToArray { | |
public static void insertUnsortedArray(String toInsert) { | |
String[ ] unsortedArray = { "A", "D", "C" }; | |
String[ ] newUnsortedArray = new String[unsortedArray.length + 1]; | |
System.arraycopy(unsortedArray, 0, newUnsortedArray, 0, 3); | |
newUnsortedArray[newUnsortedArray.length - 1] = toInsert; | |
System.out.println(Arrays.toString(newUnsortedArray)); |