码迷,mamicode.com
首页 > 2015年03月28日 > 全部分享
JAVA学习笔记(三十六)- 文件的拆分和合并
文件的拆分和合并import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.SequenceInputStream; import java.util.Enumeration; import...
分类:编程语言   时间:2015-03-28 11:36:34    阅读次数:131
华为(C++实现字符串压缩程序)
#include #include using namespace std; void string_zip(string input,string &output) { if(input.empty()) return ; char last='\0'; char current; int count=0; for(int i=0;i<input.size();++i) { ...
分类:编程语言   时间:2015-03-28 11:36:29    阅读次数:473
kmp 算法总结
肯定有很多人对kmp算法,学了很多遍了,还是不懂,其实,很简单,我们简单的来看两个问题,就可以了! 一般的暴力算法,大家,应该都知道,扫两次,直接比较,就可以得到答案了, 我们直接来看,有没有可以简化 首先,和一般的算法一样,直接匹配,直到p[i]!=p[j];这时,如果是一般的算法i要回退回去,j也要从新开始,但我们没有好好的利用已经得到的有用信息 如图已经知道了,前面一段是相等...
分类:编程语言   时间:2015-03-28 11:37:19    阅读次数:184
微信公众号自动回复示例代码
responseMsg(); class wechatCallbackapiTest { public function responseMsg() { //get post data, May be ...
分类:微信   时间:2015-03-28 11:34:29    阅读次数:264
jquery选择器总结。
jquery选择器,以前在面试的时候,面试官问了我jquery的选择器,然后我只答出了几个,看来要多总结才行: jQuery 的选择器可谓之强大无比,这里简单地总结一下常用的元素查找方法   $("#myELement")    选择id值等于myElement的元素,id值不能重复在文档中只能有一个id值是myElement所以得到的是唯一的元素 $("div")    ...
分类:Web程序   时间:2015-03-28 11:36:51    阅读次数:210
js 一些小技巧
1,表单中,回车导致下一个表单元素聚焦 Js代码 /*** enter to make next object focus */ var pressFocusNext=function(event,next22){ if(!event ||event==undefined){ event=window.event; } if(eve...
分类:Web程序   时间:2015-03-28 11:35:51    阅读次数:261
Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the fo...
分类:其他好文   时间:2015-03-28 11:34:30    阅读次数:102
请做一缕阳
老朋友聊天,除了吐槽还是吐槽。暂且称呼这位老友叫老A吧。       老A胸怀壮志,去了一间创业型公司,准备大干一番。进去之后发现里面的员工士气低落,毫无激情,工作能推则推。有些年轻的小伙子一开始也是非常有干劲的,过了两个三个月后,也变得跟其他人一样了。       然后啪啪啪的一个小时过去了。老A开始冷静下来,喝了口水,似乎打算继续进行下半场。...
分类:其他好文   时间:2015-03-28 11:36:15    阅读次数:147
android intent和intent action大全
android intent和intent action大全...
分类:移动开发   时间:2015-03-28 11:35:09    阅读次数:174
迪杰斯特拉算法 hdu 2066
一个人的旅行 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21805    Accepted Submission(s): 7574 Problem Description 虽然草儿是个路痴(就是在杭电待了一年...
分类:编程语言   时间:2015-03-28 11:33:36    阅读次数:182
Leetcode解题-链表(2.2.2)ReverseLinkedList
题目:2.2.2 Reverse Linked List IIReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->nullptr, m = 2 and n = 4,return 1->4->3->2->5->nullptr.Note: ...
分类:其他好文   时间:2015-03-28 11:33:15    阅读次数:154
Leetcode解题-链表(2.2.3)PartitionList
题目:2.2.3 Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of ...
分类:其他好文   时间:2015-03-28 11:35:33    阅读次数:145
[c++]cylinder显示每个对象的体积
#include using namespace std; #define p 3.1415926 class Cylinder { private: double v; public: Cylinder(double r = 0,double h = 0) { v = p * r * r * h; } double vol()...
分类:编程语言   时间:2015-03-28 11:34:32    阅读次数:150
Leetcode解题-树(5.0.0)基础类
与第二章类似,LeetCode指定了TreeNode实现。为了方便后续习题的编写和测试,创建一个基础父类,包含TreeNode实现,以及create()和print()创建和打印树的方法。其中create()采用类似“堆”的方式,用数组表示树形结构,复习一下,左右子结点就是2*i和2*i+1。而print()方法采用前序遍历的方式,通过额外一个参数level确定当前结点的深度,从而打印一些制表符或...
分类:其他好文   时间:2015-03-28 11:34:43    阅读次数:130
Binary Tree Level Order Traversal
问题来源:https://leetcode.com/problems/binary-tree-level-order-traversal/package cn.edu.shu;import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue;/** * *...
分类:其他好文   时间:2015-03-28 11:34:43    阅读次数:155
Leetcode解题-链表(2.2.6)RotateList
1 题目:Rotate ListGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->nullptr and k = 2, return 4->5->1->2->3->nullptr.2 实现首先确定题目要求的旋转都需要哪些结点...
分类:其他好文   时间:2015-03-28 11:33:32    阅读次数:124
一些常用的SQL查询语句
学习网站:http://www.w3cschool.cc/sql/sql-tutorial.html一:查询所有表的属性SELECT 'ALTER TABLE '+ CASE WHEN O.schema_id IS NOT NULL THEN (SELECT NAME+'.' FROM ...
分类:数据库   时间:2015-03-28 11:34:30    阅读次数:200
1448条   上一页 1 ... 59 60 61 62 63 64 65 ... 86 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!