To Show Hidden files run the following 2 commands in the terminal
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
To Hide Hidden files run the following 2 commands in the terminal.
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
Draw Smooth Circles in JAVA instead of jagged edge circles.
Usually when we draw circles/ovals using Graphics2D in JAVA, we get jagged edges.
Following example creates smooth edges to the circle.
The key is g2d.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Following example creates smooth edges to the circle.
The key is g2d.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
public class DrawSmoothCircle {
public static void main(String[] argv) throws Exception {
BufferedImage bufferedImage = new BufferedImage(100,100, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bufferedImage.createGraphics();
g2d.setRenderingHint (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setPaint(Color.green);
g2d.fillOval(10, 10, 50, 50);
g2d.dispose();
ImageIO.write(bufferedImage, "png", new File("newimage.png"));
}
}
Multidimensional Scaling (MDS) Basic Tutorial, Introduction
A very pleasant and quick introduction to Multidimensional(MDS) scaling can be found at
http://homepages.uni-tuebingen.de/florian.wickelmaier/pubs/Wickelmaier2003SQRU.pdf
http://www.tonycoxon.com/KUB/mds_menu.htm
http://homepages.uni-tuebingen.de/florian.wickelmaier/pubs/Wickelmaier2003SQRU.pdf
http://www.tonycoxon.com/KUB/mds_menu.htm
Subscribe to:
Posts (Atom)
Python contextlib for Timing Python code
If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...
-
If you get the following error while installing FFMPEG or other packages on CentOS 7. Requires: libva.so.1(VA_API_0.33.0)(64bit) Follow...
-
Common error: fallocate: fallocate failed: Text file busy in ubuntu OS Check the allocation: free -m or sudo swapon --show Make sure ...
-
How to fix Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' Apparently, Ma...