这是我之前在个人博客3yj上面写的一篇文章,如今转载过来,原文地址(这不是广告哦)几年前,刚接触java的是,就想用一些方法把自己的劳动果实保护起来,曾经也用过非常多这种工具,有一个特别好用,今天写篇文章跟大家分享。今天要用到的工具有 JSmooth 0.9.9-7 汉化版,能够到本站下载:JSmo...
分类:
编程语言 时间:
2015-02-05 10:50:56
收藏:
0 评论:
0 赞:
0 阅读:
330
Tomcat 7 'javax.el.ELException' 的解决方式tomcat 7对EL表达式的语法要求比较严格,例如"${owner.new}"因包含关键字new就会导致解析出错。问题是出来了,怎么解决呢?有三种,如下:第一种:严格遵守java规范,修改对象的属性名称,要求不包含java关...
分类:
编程语言 时间:
2015-02-05 10:49:16
收藏:
0 评论:
0 赞:
1 阅读:
1653
1.反射 反射库(Reflection Library)提供一个丰富的工具集,以便编写能够动态操作Java代码的程序。这项功能被 大量的应用在JavaBeans中,它是Java组件的体系结构。能够分析类能力的程序称为反射(Reflection),即可以将一个类(或基本数据类型),类成员当成一个对象来...
分类:
编程语言 时间:
2015-02-05 10:48:26
收藏:
0 评论:
0 赞:
0 阅读:
278
1.如果参数是指针,且仅作输入用,则应该在类型前加const,防止指针在函数体外被修改。2.如果输入参数以值传递的方式传递对象,则宜改用 const&方式来传递,这样可以省去临时对象的构造和析构过程。3.正常值用输出参数获得,错误标识用return语句返回。4.参数缺省值只能出现在函数的定义中,并且...
分类:
编程语言 时间:
2015-02-05 10:46:37
收藏:
0 评论:
0 赞:
0 阅读:
251
自己看了官方文档,也到网上查了下,目前理解如下:相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。是对包进行...
分类:
编程语言 时间:
2015-02-05 10:42:56
收藏:
0 评论:
0 赞:
0 阅读:
267
一、拦截器介绍
springmvc中的拦截器,简单来说就是对用户的请求进行拦截,我们可以在拦截用请求后进行预处理和后处理,可以在这里做日志记录、权限控制、请求用时计算等操作。和Servlet api中的Filter有点类似。
二、拦截器使用
1、编写拦截器
我们要自己编写拦截器,比较常用的方法是实现org.springframework.web.servlet.HandlerInt...
分类:
编程语言 时间:
2015-02-05 09:39:16
收藏:
0 评论:
0 赞:
0 阅读:
302
题目:
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where ...
分类:
编程语言 时间:
2015-02-05 09:39:06
收藏:
0 评论:
0 赞:
0 阅读:
341
package com.winwill.nio;
/**
* @author qifuguang
* @date 15-2-4 下午2:07
*/
public class TimeServerMain {
public static void main(String[] args) throws Exception {
// 启动时间服务器
new...
分类:
编程语言 时间:
2015-02-05 09:38:36
收藏:
0 评论:
0 赞:
0 阅读:
323
Non-abundant sums
Problem 23
A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be ...
分类:
编程语言 时间:
2015-02-05 09:37:06
收藏:
0 评论:
0 赞:
0 阅读:
292
二维数组在内存中使按数组的排列规则存储(按行存放),因此在函数原型中的二维数组的形参必须给定列的大小
对于如下数组
int main()
{
int a[3][2] = {1,2,3,4,5,6};
print1(a);
return 0;
}
错误范例:
void print1(int **b)void print1(int b[3][])
没有给定列的大小,编译器不...
分类:
编程语言 时间:
2015-02-05 09:36:56
收藏:
0 评论:
0 赞:
0 阅读:
245
实现思路:
获取class="dropdown"的所有元素验证其data-toggle是否为dropdown添加 onclick 事件在dropdown 上增加/删除
"open" class
判断open实现相应的toggle进行开/关
目前只完成了:
SimpleDropdown : 无动画效果, 通过修改display实现...
分类:
编程语言 时间:
2015-02-05 09:36:16
收藏:
0 评论:
0 赞:
0 阅读:
366
if( third_name.find('*')!=string::npos || third_name.find('@')!=string::npos ){
printf("third_name[%s] is a email or a mobilenum", third_name.c_str());
return -1;
}
查到一个string 字符串中知否有 * 字符,或者有 @ 字符...
分类:
编程语言 时间:
2015-02-05 09:35:56
收藏:
0 评论:
0 赞:
0 阅读:
291
#include
#include
#include
#include //使用向量 ,就包含向量的头文件
#include
#include
using namespace std;
int main()
{
cout << "please enter your first name :" <> name;
cout << "H...
分类:
编程语言 时间:
2015-02-05 09:35:46
收藏:
0 评论:
0 赞:
0 阅读:
357
Lexicographic permutations
Problem 24
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutation...
分类:
编程语言 时间:
2015-02-05 09:35:26
收藏:
0 评论:
0 赞:
0 阅读:
297
For example,
a = "11"
b = "1"
Return "100".
这题的做法和前面一题plus one 一样,区别在于需要将两个string先相加,再判断是否要进位。
直接上代码吧。
class Solution:
# @param a, a string
# @param b, a string
# @return a string
...
分类:
编程语言 时间:
2015-02-05 09:34:46
收藏:
0 评论:
0 赞:
0 阅读:
291
十一、点击事件
图片加个触摸Physics2D,关联的脚本void OnMouseDown(){}函数里点击就进入
十二、碰撞检测
两个图片相遇交互想要做些操作
给图片加组件碰撞器,Componet->Physics->Box Colider(Colider都是碰撞器,区别在于形状不同,我常用Box,加了后图片身上有绿色边框,如果是模型用Mesh更精准)
组件附带的Is Trigge...
分类:
编程语言 时间:
2015-02-05 09:34:36
收藏:
0 评论:
0 赞:
0 阅读:
456
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
定义一个pre 和cur
1.当二者...
分类:
编程语言 时间:
2015-02-05 09:34:16
收藏:
0 评论:
0 赞:
0 阅读:
230
Unity3D游戏开发之动画模型导入
导入动画文件后,在工程(Porject)面板中选中,通过Inspector面板修改参数设置。
在项目视图中选中模型文件。如果想用旧版3.x的动画系统导入和编辑动画,请选择legacy选项。如果你有一个人性角色,比如,一个脑袋两条胳膊的两足动物,请选择Humanoid和‘Create from this model’,这样,一个完美匹配你角色骨骼关系...
分类:
编程语言 时间:
2015-02-05 09:32:16
收藏:
0 评论:
0 赞:
0 阅读:
462
#include
#include
using namespace std;
class base
{
public:
virtual int fcn()
{
cout<<"base::fcn()"<<endl;
}
};
class D1:public base{
public:
// using base::fcn;//如果解注释的话,则在...
分类:
编程语言 时间:
2015-02-05 09:31:00
收藏:
0 评论:
0 赞:
0 阅读:
252
来个例子就明了了:
#include
using namespace std;
class Base1
{
public:
virtual ~Base1(){
cout<<"Base1"<<endl;
}
};
class Base2
{
public:
virtual ~Base2(){
cout<<"Base2"<<endl;...
分类:
编程语言 时间:
2015-02-05 09:31:00
收藏:
0 评论:
0 赞:
0 阅读:
353