由于在spring的xml文件中配置了 在这种情况下通过正常的程序去读取Properties文件,会出现读取失败的结果。 例如: Propertiesprop=newProperties();InputStreamin=Object.class.getResourc...
分类:
编程语言 时间:
2015-04-25 14:57:15
阅读次数:
355
问题描述:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are t...
分类:
编程语言 时间:
2015-04-25 14:54:15
阅读次数:
167
问题描述:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique l...
分类:
编程语言 时间:
2015-04-25 14:54:13
阅读次数:
145
何为多线程?在月一个程序当中可能在同一时间运行多个任务,这里的每一个任务都可以称为一个线程,再一起同时运行就是多线程了。例如:当我们去浏览一个网页的时候,在浏览网页的同时也还在加载网页,这就是多线程的体现。 java多线程编程最主要的核心接口和类为:Thread类、Runnable接口、Obj...
分类:
编程语言 时间:
2015-04-25 14:52:19
阅读次数:
121
问题描述:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see be...
分类:
编程语言 时间:
2015-04-25 14:51:50
阅读次数:
148
typedef struct task_queue { pthread_mutex_t mutex; pthread_cond_t cond; /* when no task, the manager thread wait for ;when a new task come,...
分类:
编程语言 时间:
2015-04-25 14:52:57
阅读次数:
160
问题描述:Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good question...
分类:
编程语言 时间:
2015-04-25 14:50:25
阅读次数:
111
问题描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
分类:
编程语言 时间:
2015-04-25 14:50:46
阅读次数:
131
我的学习环境是Windows 7,首先安装Python,我安装的版本是Python 2.7,之后需确认“C:\Python27\Scripts;C:\Python27;”这两个路径添加到Path系统变量里面了。 图一 然后下载Django。我下载的版本是Django-1.8.tar.gz。然后解压,...
分类:
编程语言 时间:
2015-04-25 14:51:25
阅读次数:
183
Iterator迭代器-ListIterator-Enumeration枚举类接口的特点和区别
1、Iterator的特点:
API中是这样解释的:
对collection进行迭代的迭代器。它取代了Enumeration.迭代器与枚举有两点不同:
A.迭代器允许调用者利用定义良好的语义在迭代期间从迭代器所指向的collection移除元素。
B.在方法名上得到了改进。...
分类:
编程语言 时间:
2015-04-25 13:46:09
阅读次数:
285
Linux进程创建一个新线程时,线程将拥有自己的栈(因为线程有自己的局部变量),但与它的创建者共享全局变量、文件描述符、信号句柄和当前目录状态。
Linux通过fork创建子进程与创建线程之间是有区别的:fork创建出该进程的一份拷贝,这个新进程拥有自己的变量和自己的PID,它的时间调度是独立的,它的执行几乎完全独立于父进程。
进程可以看成一个资源的基本单位,而线程是程序调度的基本单位,一个进程内部的线程之间共享进程获得的时间片。...
分类:
编程语言 时间:
2015-04-25 13:47:23
阅读次数:
216
分析:本题判断一个图是否是有向强连通分量,这里使用tarjan算法求解。
#include
#include
#include
using namespace std;
vector map[10002];
stack tarjan_stack;
int low[10002];
int dfn[10002];
bool vis[10002];
int cnt,pos;
void Init(i...
分类:
编程语言 时间:
2015-04-25 13:46:55
阅读次数:
150
??
Microsoft封装了许多类在.net里面,而.net最主要的语言是c#。
Microsoft 给 C++添加了许多 Microsoft 专用的关键字, 并把 VB 演变为 VB.NET,保留了一些基本的 VB 语法,但在设计上 完全不同,从实际应用的角度来看,VB.NET 是一种新语言。 在这里,Microsoft 决定给开发人员另一个选择—— 专门用于.NET、 具有新起点的语言,...
分类:
编程语言 时间:
2015-04-25 13:46:06
阅读次数:
143
什么是二叉排序树:二叉排序树或者是一颗空树,或者具有以下性质的二叉树:
(1)若它的左子树不为空,则左子树上的所有节点的值都小于他的父节点的值;
(2)若它的右子树不为空,则右子树上的所有节点的值都大于他的父节点的值;
(3)它的左右子树也分别为二叉排序树;
java实例:
package com.test.linked;
public class HeapSort {
publi...
分类:
编程语言 时间:
2015-04-25 13:45:51
阅读次数:
112
在python中, 模块即一个后缀名为”.py”文件,python用文件组织一个模块.
模块导入遵循作用域原则, 在什么作用域导入就只能在当前作用域生效.
一个模块只被加载一次,无论导入它多少次.
from module import name 是把名字导入到当前的名称空间
单行导入单个模块import json单行导入多个模块import os, sys, time导入指定的模块属性from os...
分类:
编程语言 时间:
2015-04-25 13:43:45
阅读次数:
154
问题描述:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si...
分类:
编程语言 时间:
2015-04-25 13:37:32
阅读次数:
129