Browsing the blog archives for October, 2009

Java 日期格式化输出

用 SimpleDateFormat 就可以格式化输出日期,见代码:

import java.util.Date;
import java.text.*;
public class CurrentDate {
public static void main(String args[]) {
Date today = new Date();
SimpleDateFormat formatDate = new SimpleDateFormat(“yyyy-MM-dd”);
System.out.println(formatDate.format(today));
}
}

引自 此处

下面是SimpleDateFormat类中的格式代码
符号 意义
G 公元
Y [...]

0 Comments

其实VB也是一样美妙的

今天完成了我第一个 windows GUI 的程序 因为一些原因不想公开
但是我想说的是 之前我都不怎么想用的 VB 却成了我如此重大意义的程序的实现语言。
压力真的可以变成动力,今天算是体会了。
不过虽然过程很难受,不过结果倒是十分美妙的阿~
哈哈…… 算是敲开了 GUI 的门了吧。
要不断努力阿

0 Comments

My First Java Applet

其实是课程设计中的一个拉。。
要求实现的功能是说在 Applet 上有两个按钮 分别增大 减小一个字符串的字号。
代码如下:

import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JLabel;

/**
* website:http://www.noslog.com
* @author neo
*/
public class Work extends JApplet {

JLabel label = new JLabel(“www.noslog.com”);
int textSize = 12;

@Override
public void init() {
[...]

0 Comments

有了 iFuse 有 iPod Touch 的 Linuxer 们就泪奔吧!

iFuse 是一款可以让 Linux 来访问 iPod Touch 的文件管理软件。没错,访问 iPod Touch 的文件。
先说安装:
根据 http://matt.colyer.name/projects/iphone-linux/index.php?title=Main_Page 这里的指示 不同的发行版有不同的安装方式。同时也公布了源代码。
如果页面上说的一样:
iFuse allows you to mount an iPhone or iPod Touch under Linux using the USB cable. You can view and edit the files similar to a normal USB disk drive. iFuse does not require “jailbreaking” or voiding your warranty and works without needing [...]

0 Comments

Firefox Addons: SmoothWheel

SmoothWheel 是一个特别好的 Firefox 扩展。
安装地址在这里:https://addons.mozilla.org/en-US/firefox/addon/357

装上之后不用更改什么设置便可以让鼠标滚轮的滚动变得很平滑。它还可以很方便的定义鼠标滚动大小,值得一提的是,这里滚轮的速度不再是以行数来衡量,而是页面比例。比如一次滚动可以滚动 1/3 或者 1/5 页面。
强烈推荐各位 Firefox 死忠使用。
跑题分割线:=========================
如果你在 Linux 里按鼠标中间无法像 Windows 里面那样通过鼠标位移来滚动页面可以这么办,看图:

0 Comments