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
@echo off | |
REM If your path contains spaces remember to quote it | |
setx /m Path "%~1;%PATH%" | |
echo "%~1 has been added to the Path" | |
echo "Restart any application that needs to use the modified Path" |
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
private static BufferedImage watermark(BufferedImage image, String text) { | |
final FontMetrics fm = graphics.getFontMetrics(); | |
// center text string | |
final int x = (image.getWidth() / 2) - fm.stringWidth(text); | |
final int y = (image.getHeight() / 2) - fm.getHeight(); | |
final Graphics2D graphics = image.createGraphics(); | |
graphics.setPaint(Color.white); | |
graphics.setFont(new Font("SansSerif", Font.BOLD, 10)); | |
graphics.drawString(text, x, y); |
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
ProcessBuilder builder = new ProcessBuilder(); | |
builder.command("command1"); | |
builder.inheritIO(); // if you need to see the sysout and syserr | |
Process p = builder.start(); | |
p.waitFor() |
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
require 'rake/testtask' | |
Rake::TestTask.new do |t| | |
t.libs << 'test' | |
t.pattern = "test/**/*_test.rb" | |
t.warning = true | |
t.verbose = true | |
end |
NewerOlder