一、三个静态变量java.lang.System提供了三个静态变量System.in(默认键盘)System.out(默认显示器)System.err二、重写向方法System提供了三个重定向方法方法说明static void setErr(PrintStream errr)重定向标准错误输出流st...
分类:
编程语言 时间:
2015-03-03 06:22:44
阅读次数:
177
由于redhat在初始化的时候,防火墙设置为icmp-host-prohibited,导致数据包无法到达。具体iptables(所在目录/etc/sysconfig)如下:# Firewall configuration written by system-config-firewall# Manu...
分类:
其他好文 时间:
2015-03-02 23:40:56
阅读次数:
177
1.使用泛型方法可以取代将整个类泛型话,要定义泛型方法,只需将泛型参数列表至于返回值之前:
public class GenericMethods {
public void f(T x) {
System.out.println(x.getClass().getName());
}
public static void main(String[] args) {
Generi...
分类:
编程语言 时间:
2015-03-02 22:29:57
阅读次数:
229
在.net环境下,精确的测量出某段代码运行的时长,在网络通信、串口通信以及异步操作中很有意义。现在做了简单的总结。具体代码如下:(1)、首先 using System.Diagnostics;(2)、主要代码 Stopwatch sw = new Stopwatch(); ...
分类:
其他好文 时间:
2015-03-02 22:15:08
阅读次数:
144
C# 后台 (JSONHandler.ashx) 1 2 3 using System; 4 using System.Web; 5 using System.Web.Script.Serialization; 6 7 public class JSONHandler : IHttpHandl...
https://oj.leetcode.com/problems/symmetric-tree/Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For exam...
分类:
其他好文 时间:
2015-03-02 20:45:29
阅读次数:
203
在网上找了很久也没有找到解决方案,最后根据提示自己摸索如下:1.编辑/etc/sshd_config文件,注释掉#ForceCommand /usr/local/bin/ssh_session2.启动sshd服务:sudo launchctl load -w /System/Library/Laun...
分类:
系统相关 时间:
2015-03-02 20:34:30
阅读次数:
232
因为我安装的JRebel插件版本为6.0.3。下面我就以JRebel6.0.3版本的插件为例进行讲述。Eclipse中的JRebel插件配置要注意三点 1. 勾选要使用的应用服务器 因为我使用的是tomcat,所以我要在JRebel Config Center下的...
分类:
系统相关 时间:
2015-03-02 19:26:23
阅读次数:
194
年前调试了一下用mtk的uart1口来外接外部模块,拓展为2个com口。写此文的目前主要是整理一下思路。
拓展ic的型号是WK2114:
WK2114 原理框图
由上图可以看到首先得把主接口测试ok。
mtk6572的uart1默认是用来打log用的,所以要修改权限
chmod 0660 /dev/ttyMT0
chown system sy...
分类:
移动开发 时间:
2015-03-02 19:12:31
阅读次数:
200