??
《Android捕获View焦点事件,LinearLayout结合HorizontalScrollView实现ViewPgaer和选项卡Tabs联动。》
如图:
package zhangphil.tabs;
import java.util.ArrayList;
import android.support.v4.app.Fragment;
import androi...
分类:
移动开发 时间:
2015-06-24 16:37:00
阅读次数:
1054
学习了WebView组件,写了一个有道词典的小案例效果图如下:
代码如下:
布局
activity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:la...
分类:
Web程序 时间:
2015-06-24 16:35:10
阅读次数:
150
成对使用new和delete时要采取相同形式本节条款知识点在于delete和delete[]的区别
大家都知道在new一个对象的时候要delete一个对象,在new 一个对象数组时要delete[]才是正确的。大家也知道new产生两个行为,一个是申请对象所需内存,另一个是调用类构造函数初始化对象。
那么,delete的行为也有两个,一个是调用对象的析构函数,另一个是回收内存。而new[]是对每个...
分类:
编程语言 时间:
2015-06-24 16:36:28
阅读次数:
147
本文说描述的方式是用nginx的443重定向到tomcat的8443,nginx的80端口重定到tomcat的8080;以及配置某个重要模块走https,其他模块正常使用http......
分类:
其他好文 时间:
2015-06-24 16:34:10
阅读次数:
108
Spring依赖注入:
属性注入
要求:
每个Bean都需要提供一个默认的构造函数。对需要注入的属性提供一个 getter和setter方法。(spring只会检查Bean中是否有对应的Setter方法,至于Bean中是否有对应的属性变量不做要求)
构造函数注入
保证一些必要的属性在Bean实例化初就得到设置,以便实例化之后就可以直接使用。
要求:Bean必...
分类:
编程语言 时间:
2015-06-24 16:36:17
阅读次数:
189
题目链接:http://codeforces.com/problemset/problem/535/A#include
#include
using namespace std;int main()
{
string s1[10]={"zero","one","two","three","four","five","six","seven","eigh...
分类:
其他好文 时间:
2015-06-24 16:34:49
阅读次数:
111
wxWidgets之wxGrid控件...
分类:
其他好文 时间:
2015-06-24 16:33:44
阅读次数:
1205
2025. Line Fighting
Time limit: 1.0 second
Memory limit: 64 MB
Boxing, karate, sambo… The audience is sick of classic combat sports. That is why a popular sports channel launches a new compet...
分类:
其他好文 时间:
2015-06-24 16:35:10
阅读次数:
134
一般都是用typeof判断变量是否存在
如if(typeof a!="undefined"){},而不要去使用if(a)因为如果a不存在(未声明)则会出错,
因为typeof遇到null,数组,对象时都会返回object类型,所以当我们要判断一个对象是否是数组时
或者判断某个变量是否是某个对象的实例则要选择使用另一个关键语法instanceof
instanceof用于判断...
分类:
Web程序 时间:
2015-06-24 16:34:34
阅读次数:
113
??
题意:给定一个n个点的连通的无向图,一个点的“鸽子值”定义为将它从图中删去后连通块的个数。求每个点的“鸽子值”。
思路dfs检查每个点是否为割顶,并标记除去该点后有多少个连通分量
#include
#include
#include
#include
#include
#include
#include
#include
#include
#incl...
分类:
其他好文 时间:
2015-06-24 16:34:16
阅读次数:
132
//存数字数组
$code = array();
while(count($code) < 6){
//产生随机数1-9
$code[] = rand(1,9);
//去除数组中的重复元素
$code = array_unique(...
分类:
移动开发 时间:
2015-06-24 16:33:13
阅读次数:
115
1. reverse /**
* @Description: reverse a string.
* @param str the String to reverse, may be null
* @return reversedStr the reversed String, null if null String input
*/
publi...
分类:
其他好文 时间:
2015-06-24 16:32:37
阅读次数:
129
一、SpringMVC基础入门,创建一个HelloWorld程序
1.首先,导入SpringMVC需要的jar包。
2.添加Web.xml配置文件中关于SpringMVC的配置
springmvc
org.springframework.web.servlet.DispatcherServlet
conte...
分类:
编程语言 时间:
2015-06-24 16:32:48
阅读次数:
240
HDU 2102 A计划 (三维的迷宫BFS)...
分类:
其他好文 时间:
2015-06-24 16:30:48
阅读次数:
124
navicat导入.sql文件出错 2006 - MySQL server has gone away...
分类:
数据库 时间:
2015-06-24 16:33:35
阅读次数:
138
#查看日期情况
#show variables like '%general%';
#开启日志
#SET GLOBAL general_log = 'On';
#指定日志文件
#SET GLOBAL general_log_file = 'E:/my.log';...
分类:
数据库 时间:
2015-06-24 16:33:13
阅读次数:
173
开发环境:Eclipse3.2、CDT3.1、MinGW5.1
1、Eclipse及CDT的安装
到Eclipse的官方网站http://www.eclipse.org上下载Eclipse。
安装CDT。CDT的全称是C/C++ DevelopmentTools,是使Eclipse能够支持C/C++开发的插件,保健康。进入CDT的官方网站,http://www/eclipse.org/cdt...
分类:
编程语言 时间:
2015-06-24 16:30:41
阅读次数:
194