上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
摘要: 原文:http://blog.csdn.net/mq612/article/details/1262071import java.awt.Font;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.UIManager;/** * Java 中GridBagLayout布局管理器 阅读全文
posted @ 2012-10-10 10:42 Leo Forest 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 作者:阮一峰日期:2009年5月30日1.前几天,我才知道有一种简化的数据交换格式,叫做yaml。我翻了一遍它的文档,看懂的地方不多,但是有一句话令我茅塞顿开。它说,从结构上看,所有的数据(data)最终都可以分解成三种类型:第一种类型是标量(scalar),也就是一个单独的字符串(string)或数字(numbers),比如"北京"这个单独的词。第二种类型是序列(sequence),也就是若干个相关的数据按照一定顺序并列在一起,又叫做数组(array)或列表(List),比如"北京,上海"。第三种类型是映射(mapping),也就是一个名/值对(Nam 阅读全文
posted @ 2012-09-25 08:40 Leo Forest 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 原文:http://kidult.iteye.com/blog/148982CallBack.javapublic interface CallBack { //执行回调操作的方法 void execute(); } Tools.javapublic class Tools { /** * 测试函数使用时间,通过定义CallBack接口的execute方法 * @param callBack */ public void testTime(CallBack callBack) {... 阅读全文
posted @ 2012-09-14 20:11 Leo Forest 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 原文:http://stefan321.iteye.com/blog/345221自身类作为监听器import javax.swing.*;import java.awt.*;import java.awt.event.*;/** *Java事件处理机制:自身类作为事件监听器 *@author Winty(wintys@gmail.com) *@version 2008-12-3 */class ThisClassEvent extends JFrame implements ActionListener{ JButton btn; public ThisClassEvent(... 阅读全文
posted @ 2012-09-14 18:14 Leo Forest 阅读(788) 评论(0) 推荐(0) 编辑
摘要: [root@postgresql json]# uname -aLinux postgresql 2.6.18-308.13.1.el5 #1 SMP Tue Aug 21 17:10:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux下载jsoncpp 和scons(类似GnuMake的工具)http://sourceforge.net/projects/jsoncpphttp://www.scons.org/装scons#tar -zxvf scons-2.2.0.tar.gz#cd scons-2.2.0#python setup.py install编 阅读全文
posted @ 2012-09-12 19:43 Leo Forest 阅读(826) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.cnblogs.com/chenlhuaf/archive/2011/05/01/gson_test.htmlimport com.google.gson.Gson;import com.google.gson.reflect.TypeToken;import java.util.ArrayList;import java.util.List;public class Person { private String name; private int age; /** * @return the name */ public ... 阅读全文
posted @ 2012-09-12 13:51 Leo Forest 阅读(574) 评论(0) 推荐(0) 编辑
摘要: Arch Linux + Windows Xp 一个sata主盘sda,一个ide从盘sdb,分区情况:sda1 xpsda2 /sda3 swapsdb1 仓库试用一下winpe启动u盘。pe居然把俩块硬盘的主从顺序搞反了。万恶的自动挂载。。硬盘启动,Grub Error 17。开始修复,先把无关紧要的仓库盘用光驱换掉。找个liveCD。这里用的是ubuntu9.10进光盘系统$sudo -i #获得root权限#mount /dev/sda2 /mnt #挂载arch的根目录#cd /mnt#find . -name grub #找出grub命令的位置。./sbin/grub ... 阅读全文
posted @ 2012-09-02 14:43 Leo Forest 阅读(403) 评论(0) 推荐(0) 编辑
摘要: ubuntu12.04 64位1.把dash改成bash,这个不是必须的#dpkg-reconfigure dash根据提示选N2.安装PPTP, IpTables#apt-get install pptpd iptables3.配置PPTP服务器,设定要分配的网络地址,vi /etc/pptpd.conf 添加localip 192.168.13.1remoteip 192.168.13.100-255,192.168.13.1localip为服务器地址,remoteip为要分配给用户的地址4.添加用户vi /etc/ppp/chap-secrets 添加testuser * testpwd 阅读全文
posted @ 2012-09-01 21:13 Leo Forest 阅读(178) 评论(1) 推荐(0) 编辑
摘要: 原文:http://www.cppblog.com/mzty/archive/2007/03/14/19819.htmlSTL算法学习,小结如下:前提:下载stl源码: http://www.sgi.com/tech/stl/download.html打开网页:http://www.sgi.com/tech/stl/stl_index.html一 函数对象: 因为很多的算法中多使用了函数对象二元函数对象,V1和V2为输入,V3为结果plus<T>: transform(V1.begin(), V1.end(), V2.begin(), V3.begin(),plus<doub 阅读全文
posted @ 2012-08-24 09:13 Leo Forest 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 原文:http://cpp.ezbty.org/content/science_doc/c%E6%A0%87%E5%87%86%E5%BA%93%EF%BC%9A%E4%BD%BF%E7%94%A8_stdfor_each我们先来看看std::for_each最简单和直接的用法,接着关注一下std::for_each更多创造性的用法。这个简单而直接的例子首先定义一个函数对象类型,然后调用std::for_each对一个迭代器组进行遍历操作。#include<algorithm>#include<vector>//新建一个函数对象的类型,它有一个定义好的函数操作符stru 阅读全文
posted @ 2012-08-23 17:54 Leo Forest 阅读(1117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页