This file contains hidden or 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
private void createImage(OutputStream out) { | |
int width = 100; | |
int height = 100; | |
BufferedImage buffer = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB); | |
Graphics2D g = buffer.createGraphics(); | |
// set background: | |
g.setBackground(Color.BLUE); | |
g.clearRect(0, 0, width, height); | |
// set fore color: |
This file contains hidden or 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 | |
# Here is how to tell sudo not to ask for password... | |
visudo | |
# Or if you are an expert, then directly edit the file /etc/sudoers | |
vi /etc/sudoers | |
# Add this line to the end of the file (this should be the LAST line!!!)... |
This file contains hidden or 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
//validate string length | |
function ValidLen(s,min,max){ | |
if (s.length < min || s.length > max) { return false; } | |
return true; | |
} | |
// validate email | |
function ValidEmail(s){ | |
var check = /^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/; | |
if (!check.test(s)) { return false; } |
This file contains hidden or 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 | |
# | |
# start/stop subversion daemon. | |
test -f /usr/bin/svnserve || exit 0 | |
OPTIONS=”-d -r /svnroot” | |
case “$1″ in | |
start) |
NewerOlder