自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(84)
  • 收藏
  • 关注

原创 component不能正常显示

我没有认真读文档,但是我发现好像componnet的name第一个字母如果不大写的话我们就无法正常显示我们的componnent var Danxuan = React.createClass({ getDefaultProps: function() { re

2016-03-24 17:06:27 1178

原创 几个小问题weblogic

1.invalid or corrupt jarfile wlsoracle的软件比较奇葩,你自己注意下自己下的完整不,比较一下两个软件的大小就可以发现啦!2. Error: could not open 'C:/Program Files/Java/jre7/lib/amd64/jvm.cfg这个问题可能是你的jre有问题,下个新版的jre就迎刃而解了!3

2015-11-24 23:11:40 555

原创 ios NSMutableArray

@implementation TableViewController{ NSMutableArray *_items;}- (void)viewDidLoad { [super viewDidLoad]; _items = [[NSMutableArray alloc]initWithCapacity:20]; ChecklistIt

2015-11-12 23:38:14 390

原创 ios @interface @implementation

在ios中,@interface & @ implementation  共同组成了类似java中的一个class我们在@interface中进行声明,而在@implementation中进行函数的实现。

2015-11-03 22:37:50 437

原创 move zeros leetcode

Just use the thought of Bubble sort.I think it would have an O(n) algriothm, I would try it later.public class Solution { public void moveZeroes(int[] nums) { for(int j = 0;j < nums.length

2015-10-30 16:50:29 457

原创 Implement Queue using Stacks leetcode

This is really a classic problem, no more word need for this.class MyQueue { Stack stack1 = new Stack(); Stack stack2 = new Stack(); // Push element x to the back of queue. public void push

2015-10-30 15:39:30 294

原创 TableViewController for IOS8

some tricks about table view controller.1.what you should do is to fist fo alldelete the old view and then create a new table view controller in the storyboard.in the old version of the ios.Le

2015-10-28 23:56:44 426

转载 ios 中的开源框架

1.AFNetworking轻量级而又超级高效的iOS网络编程框架,它支持iOS5.0及以上版本。关于这个框架的使用,大家可以参考:How To Create an App Like Instagram With a Web Service Backend – Part 12.SSToolKit非常简单有用的工具,除了提供一些UI界面元素外,它还可以帮我们解决一些常见问题3.GPUIm

2015-10-26 22:03:39 331

转载 leetcode contains duplicate III

基本就是遍历的过程中不断的用hash表进行判断,然后不断的维持着这个仍然在范围内的集合。class Solution {public: bool containsNearbyAlmostDuplicate(vector& nums, int k, int t) { map m; int j = 0; for (int i = 0; i

2015-10-26 21:22:04 320

原创 dupicateII leetcode

map是一个接口而hashmap是它的一种实现方式for  this problem, if you use eclipse,you will find that we need a () after the fucthion "new";another should be pay attention is when I use eclipse as the edcitior

2015-10-25 23:28:07 371

原创 Contains Duplicate leetcode

easy problempublic class Solution { public boolean containsDuplicate(int[] nums) { if(nums.length<2) return false; Arrays.sort(nums); for(int i = 1;i<nums.lengt

2015-10-25 22:55:31 326

原创 expected method body

在ios开发中遇到这个问题多半是因为语句输入出现了问题,比如说漏掉了:或者括号等等。

2015-10-23 00:17:38 4766

原创 上海各大商圈汇总

{"status":"OK","cities":[{"city_name":"上海","districts":[{"district_name":"卢湾区","neighborhoods":["淮海路","打浦桥","新天地","瑞金宾馆区"]},{"district_name":"徐汇区","neighborhoods":["徐家汇","万体馆","衡山路","复兴西路/丁香花园","肇嘉浜路沿

2015-08-05 23:22:46 1744

转载 hosts 本机DNS域名解析

hosts 本机DNS域名解析一. Hosts文件的位置 很多用户都知道在Window系统中有个Hosts文件(没有后缀名),在Windows 98系统下该文件在Windows文件夹。 在Windows 2000/XP系统中位于\%Systemroot%\System32\Drivers\Etc 文件夹中,其中,%Systemroot%指系统安装路径。例如,Windows XP 安

2015-03-18 15:33:37 866

原创 如何找到scs(SAP central services)的instance number

首先打开ssm也就是我们solman的gui键入al11(folder sap directory)进入 DIR_PROFILE这个文件目录下面在DEFULT.PFL这个目录下面就可以看到我们的Scs instanc number了

2015-03-18 15:22:08 1436

原创 construct binary tree from preorder and inorder

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2015-01-19 22:11:43 372

原创 Construct Binary Tree from Inorder and Postorder Traversal

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Soluti

2015-01-19 21:29:13 400

原创 longest consecutive sequence

for this problem.wu can use unordered_map to know whether this was visited.we don't need sorted this array now.class Solution {public: int longestConsecutive(vector &num) { int length =

2015-01-19 13:03:03 395

原创 majority element

纪录一个数,初始为1,相同则数量+1否则-1;class Solution {public: int majorityElement(vector &num) { int temp = num[0]; int count = 1; for(int i = 1;i < num.size();i++) { if(num[i]!= t

2015-01-17 19:53:55 358

原创 pascal's triangle II leetcode c++

Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?for this

2015-01-17 16:35:34 599

原创 leetcode triangle c++

class Solution {public: int minimumTotal(vector > &triangle) { if(triangle.size() == 0) return 0; vector f(triangle.size()); f[0] = triangle[0][0];

2015-01-17 16:07:38 469

转载 input() and raw_input() for python

raw_input() 与 input() __ Python这两个均是 python 的内建函数,通过读取控制台的输入与用户实现交互。但他们的功能不尽相同。举两个小例子。 1 >>> raw_input_A = raw_input("raw_input: ") 2 raw_input: abc 3  >>> input_A = input("Input: ") 4 In

2015-01-06 16:24:57 487

原创 java实现心形图案|桃心

There is something wrong when you use thedouble type minus an int type. Because when you refer to a double type.Eg. Double 1.0;Some ide may get the value 1.00000000000And others may get 0.999999

2014-12-10 17:12:39 54228 2

转载 三种单例模式浅析

在什么情况下使用单例模式,请写出三种单例模式的代码实现。简单比较下此三种方法的优缺点。使用单例模式的情况:和名字中说的一样,单例模式即我们在只使用一个例子时候所要采取的一种模式。下面具体说说单例模式的应用场景。1.最简单的就是windows的taskmanager。我们尝试后可以发现我们在同一时刻只能打开一个taskmanager。这既是用单例模式实现的。2. wind

2014-12-05 14:55:42 573

转载 Java多线程编程详解

线程的同步 由于同一进程的多个线程共享同一片存储空间,在带来方便的同时,也带来了访问冲突这个严重的问题。Java语言提供了专门机制以解决这种冲突,有效避免了同一个数据对象被多个线程同时访问。 由于我们可以通过 private 关键字来保证数据对象只能被方法访问,所以我们只需针对方法提出一套机制,这套机制就是 synchronized 关键字,它包括两种用法:synchronized 方

2014-12-04 16:52:19 477

原创 简单的 java 多线程编程练习。

9.     Java多线程编程题:启动3个线程打印递增的数字,线程1先打印1,2,3,4,5,然后是线程2打印6,7,8,9,10,然后是线程3打印11,12,13,14,15.接着再由线程1打印16,17,18,19,20....以此类推,直到打印到75.程序的输出结果应该为: 线程1: 1线程1: 2线程1: 3线程1: 4线程1: 5

2014-12-04 16:49:20 3995

转载 leetcode gas station

转载自felix博客园原题如下Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[

2014-12-04 14:00:08 447

转载 JVM GC log file configuration

Solution Manager may collect and analyze JVM GC logs for Apache Tomcat. However, by default no GC log is enabled on the Tomcat server.To enable GC logging please set the following JVM system propert

2014-12-03 13:50:46 579

原创 axis2的简单实例

使用axis2调用最简单的webservice。编写一段java代码如下 public class HelloService { public String sayHello(){ return "hello"; } public String sayHelloToPerson(String name){

2014-12-03 13:17:56 480

原创 count and say leetcode c++

pay attention to n and the string.it is easy to understand the code below.class Solution {public: string countAndSay(int n) { // Start typing your C/C++ solution below // DO

2014-12-02 23:40:41 488

原创 jdk+tomcat+axis2配置及常见问题

Axis2的环境配置比较麻烦,与jdk,tomcat等的版本均有关系。所以如配置均不存在问题时,请选择较新的版本进行重新配置。1.  首先下载jdk文件自动安装。2.  配置java_home等环境变量。3.  下载tomcat并解压。配置catalina_base以及catalina_home两个参数,均为tomcat的安装路径,注意配置的时候不要修改tomcat本身的文件名,以及不

2014-12-02 20:33:54 1580

转载 soap简介

SOAP(Simple Object Access Protocol)简单对象访问协议是在分散或分布式的环境中交换信息的简单的协议,是一个基于XML的协议。它包括四个部分:SOAP封装(envelop),封装定义了一个描述消息中的内容是什么,是谁发送的,谁应当接受并处理它以及如何处理它们的框架;SOAP编码规则(encoding rules),用于表示应用程序需要使用的数据类型的实例; SOAP

2014-12-02 10:25:12 854

原创 zigzag conversion leetcode c++

for this problem,you must divided the problem into two part.then find the change rule. the precise rule please see it in the code bellow.class Solution {public: string convert(string s, int n

2014-12-01 22:44:58 440

转载 sunday 算法

SUNDAY 算法描述:字符串查找算法中,最著名的两个是KMP算法(Knuth-Morris-Pratt)和BM算法(Boyer-Moore)。两个算法在最坏情况下均具有线性的查找时间。但是在实用上,KMP算法并不比最简单的c库函数strstr()快多少,而BM算法则往往比KMP算法快上3-5倍。但是BM算法还不是最快的算法,这里介绍一种比BM算法更快一些的查找算法。例如我们要在"

2014-12-01 14:36:30 376

原创 intersection of two linked list|leetcode c++

about this problem,1.calculate the precise length of the two linked list.2.calculate the difference value of two length of the linked list.then move the head node difference value of steps behin

2014-12-01 14:14:32 419

转载 jdbc的连接及操作

JDBC连接数据库   •创建一个以JDBC连接数据库的程序,包含7个步骤:    1、加载JDBC驱动程序:       在连接数据库之前,首先要加载想要连接的数据库的驱动到JVM(Java虚拟机),       这通过java.lang.Class类的静态方法forName(String  className)实现。       例如:       try{       //加载M

2014-11-27 15:43:34 398

转载 java socket程序

package test;import java.net.*;import java.io.*;public class Server{ private ServerSocket ss; private Socket socket; private BufferedReader in; private PrintWriter out; public S

2014-11-26 16:19:06 350

原创 valid Palindrome | Leetcode c++

for this problem , you just need to use two pointers to judge whether it is a palindorome

2014-11-20 13:50:22 409

原创 rotate List|Leetcode c++

for this problem, I draw a picture.1.I use pointer q to reach the tail of the list and let q->next point to p let the whole list bis

2014-11-19 18:04:12 405

原创 longest substring without repeating character leetcode c++

this problem broaden its test set,so that we should use sign[xxxx]-'a' two record;

2014-11-19 16:37:54 384

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除