归档 2016年10月20日

[LeetCode]Minimum Genetic Mutation

题目描述:

LeetCode 433. Minimum Genetic Mutation

A gene string can be represented by an 8-character long string, with choices from "A","C","G","T". 

Suppose we need to investigate about a mutation (mutation from "start" to "end"), where ONE mutation is defined as ...

继续阅读

Java Swing绘制正弦/余弦波形图

下面的Java代码实现了正弦、余弦波形图的绘制,main方法位于DataWindow.java中。

DataPanel.java

import java.awt.Color;
import java.awt.Graphics;
import java.text.DateFormat;
import java.util.ArrayList;

import javax.swing.JPanel;

public class DataPanel extends JPanel {

    private static final long serialVersionUID = -9039511286331044798L;

    private int index = 0;
    private ArrayList<Long> time = new ArrayList<>();
    private ArrayList<Integer> val = ...

继续阅读

昨天

明天

归档