- leecode100题-双指针-三数之和
JianminZheng
C++学习笔记算法
给你一个整数数组nums,判断是否存在三元组[nums[i],nums[j],nums[k]]满足i!=j、i!=k且j!=k,同时还满足nums[i]+nums[j]+nums[k]==0。请你返回所有和为0且不重复的三元组。答案中不可以包含重复的三元组。示例1:输入:nums=[-1,0,1,2,-1,-4]输出:[[-1,-1,2],[-1,0,1]]解释:nums[0]+nums[1]+n
- leecode 31.下一个排列(Golang)
讨吃的讨吃了
数据结构算法
题目:整数数组的下一个排列是指其整数的下一个字典序更大的排列。更正式地,如果数组的所有排列根据其字典顺序从小到大排列在一个容器中,那么数组的下一个排列就是在这个有序容器中排在它后面的那个排列。如果不存在下一个更大的排列,那么这个数组必须重排为字典序最小的排列(即,其元素按升序排列)。如何解决题目:主要实现目标可以拆分为几点:1.比之前要大2.在比之前要大的基础上,要最小的那个3.如果没有比之前更大
- 数据结构【栈和队列、循环队列、Leetcode刷题--5】
北方留意尘
数据结构链表数据结构
目录1.栈的概念2.1栈的结构2.2初始化栈2.3入栈2.4出栈2.5判空2.6获取栈顶元素2.7销毁栈2.8栈代码2.9Leecode有效的括号3.1队列的概念3.2队列结构3.3队列初始化3.4队尾入队列3.5队头出队列3.6检测队列是否为空3.7获取队列元素3.8销毁队列3.9队列代码4.1用队列实现栈4.2用栈实现队列4.3设计循环队列1.栈的概念栈:一种特殊的线性表,其只允许在固定的一端
- LeeCode打卡第十六天
一只大毛吖
leetcode算法数据结构java
LeeCode打卡第十六天第一题:回文链表(LeeCode第234题):给你一个单链表的头节点head,请你判断该链表是否为回文链表。如果是,返回true;否则,返回false。解法一:暴力求解法主要思想:将链表中的所有元素存到数组中,然后数组首尾进行遍历,看是否相等,相等即为回文链表,不相等则返回false/***Definitionforsingly-linkedlist.*publiccla
- LeeCode 200. 岛屿数量(深度优先搜索)
牛肋排
给你一个由'1'(陆地)和'0'(水)组成的的二维网格,请你计算网格中岛屿的数量。岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向上相邻的陆地连接形成。此外,你可以假设该网格的四条边均被水包围。示例:输入:grid=[["1","1","0","0","0"],["1","1","0","0","0"],["0","0","1","0","0"],["0","0","0","1","1"
- LeeCode 200. 岛屿数量(广度优先搜索)
牛肋排
给你一个由'1'(陆地)和'0'(水)组成的的二维网格,请你计算网格中岛屿的数量。岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向上相邻的陆地连接形成。此外,你可以假设该网格的四条边均被水包围。示例:输入:grid=[["1","1","0","0","0"],["1","1","0","0","0"],["0","0","1","0","0"],["0","0","0","1","1"
- 每日一练:LeeCode-501、二叉搜索树中的众数【二叉搜索树+pre辅助节点+DFS】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode深度优先
本文是力扣LeeCode-LeeCode-501、二叉搜索树中的众数【二叉搜索树+pre辅助节点+DFS】学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给你一个含重复值的二叉搜索树(BST)的根节点root,找出并返回BST中的所有众数(即,出现频率最高的元素)。如果树中有不止一个众数,可以按任意顺序返回。假定BST满足如下定义:结点左子树中所含节点的值小于等于
- 每日一练:LeeCode-236、二叉树的最近公共祖先【二叉树+DFS+从下往上】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣每日一练:LeeCode-236、二叉树的最近公共祖先【二叉树+DFS+从下往上】学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给定一个二叉树,找到该树中两个指定节点的最近公共祖先。百度百科中最近公共祖先的定义为:“对于有根树T的两个节点p、q,最近公共祖先表示为一个节点x,满足x是p、q的祖先且x的深度尽可能大(一个节点也可以是它自己的祖先)。”示例
- Leetcode With Golang 二叉树 part1
Kyookk
Golangleetcode算法数据结构
这一部分主要来梳理二叉树题目最简单最基础的部分,包括遍历,一些简单题目。一、Leecode144-二叉树的前序遍历https://leetcode.cn/problems/binary-tree-preorder-traversal/description/二叉树的遍历是入门。我们需要在程序一开始就创建一个空的数组,然后递归遍历左右节点,将节点放进这个数组内。下面直接给出代码:funcpreord
- 每日一练:LeeCode-617、合并二叉树【二叉树+DFS】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-617、合并二叉树【二叉树+DFS】学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给你两棵二叉树:root1和root2。想象一下,当你将其中一棵覆盖到另一棵之上时,两棵树上的一些节点将会重叠(而另一些不会)。你需要将这两棵树合并成一棵新二叉树。合并的规则是:如果两个节点重叠,那么将这两个节点的值相加作为合并后节点的新值;否则,不为nu
- 每日一练:LeeCode-654、最大二叉树【二叉树+DFS+分治】
666-LBJ-666
#每日一道LeeCode算法题数据结构算法leetcode
本文是力扣LeeCode-654、最大二叉树【二叉树+DFS+分治】学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给定一个不重复的整数数组nums。最大二叉树可以用下面的算法从nums递归地构建:创建一个根节点,其值为nums中的最大值。递归地在最大值左边的子数组前缀上构建左子树。递归地在最大值右边的子数组后缀上构建右子树。返回nums构建的最大二叉树。示例1:
- 每日一练:LeeCode-106、从中序与后序遍历序列构造⼆叉树、LeeCode-106、从前序与中序遍历序列构造二叉树【二叉树+DFS+分治】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-106、从中序与后序遍历序列构造二叉树LeeCode-105、从前序与中序遍历序列构造二叉树学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。106、从中序与后序遍历序列构造⼆叉树给定两个整数数组inorder和postorder,其中inorder是二叉树的中序遍历,postorder是同一棵树的后序遍历,请你构造并返回这颗二叉树。示例1
- 每日一练:LeeCode-112、路径总和【二叉树+DFS+回溯】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-112、路径总和学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给你二叉树的根节点root和一个表示目标和的整数targetSum。判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和targetSum。如果存在,返回true;否则,返回false。叶子节点是指没有子节点的节点。示例1:输入:root=[5,4,8
- 每日一练:LeeCode-113、路径总和 II【二叉树+DFS+回溯+是否有返回值】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-113、路径总和II【二叉树+DFS+回溯+是否有返回值】学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给你二叉树的根节点root和一个整数目标和targetSum,找出所有从根节点到叶子节点路径总和等于给定目标和的路径。叶子节点是指没有子节点的节点。示例1:输入:root=[5,4,8,11,null,13,4,7,2,null,nu
- Leecode 14-环形链表
*Summer
数据结构LeeCode
题目给定一个链表,判断链表中是否有环。如果链表中有某个节点,可以通过连续跟踪next指针再次到达,则链表中存在环。为了表示给定链表中的环,我们使用整数pos来表示链表尾连接到链表中的位置(索引从0开始)。如果pos是-1,则在该链表中没有环。注意:pos不作为参数进行传递,仅仅是为了标识链表的实际情况。如果链表中存在环,则返回true。否则,返回false。进阶:你能用O(1)(即,常量)内存解决
- Leecode之相交链表
一枕眠秋雨>o<
数据结构与算法题集链表数据结构
一.题目及剖析https://leetcode.cn/problems/intersection-of-two-linked-lists/description/这道题无非就是要做两件事,一是判断链表是否相交,而是找到这个交点二.思路引入1.判断链表是否相交只需要判断尾节点地址是否相同(注意一定不能去判断value是否相同)2.如果尾节点相同,则遍历链表拿到两个链表的长度3.让长链表先走,走到剩余
- Leecode之分割链表
一枕眠秋雨>o<
链表数据结构
一.题目及剖析https://leetcode.cn/problems/partition-list-lcci/description/二.思路引入就是将其分成大小两个链表,以x为分界线进行分堆,最后再将两链表合并三.代码引入/***Definitionforsingly-linkedlist.*structListNode{*intval;*structListNode*next;*};*/st
- LEECODE-链表-链表相交
码润万鼠
链表数据结构
面试题02.07.链表相交难度简单269给你两个单链表的头节点headA和headB,请你找出并返回两个单链表相交的起始节点。如果两个链表没有交点,返回null。图示两个链表在节点c1开始相交:题目数据保证整个链式结构中不存在环。注意,函数返回结果后,链表必须保持其原始结构。示例1:输入:intersectVal=8,listA=[4,1,8,4,5],listB=[5,0,1,8,4,5],sk
- Leecode之环形链表
一枕眠秋雨>o<
数据结构与算法题集链表数据结构
一.题目及剖析https://leetcode.cn/problems/linked-list-cycle/description/这道题就是去判断一个链表是否带环,分两种情况,链表中只有一个元素则一定不带环,链表中有两个及以上的元素则要引入快慢指针二.思路引入设置两个快慢指针,快指针走2步,慢指针走1步(不论快慢指针怎么走,如果链表带环则两指针一定能相遇,只不过当两指针走的步数差为1时,相遇所用
- Leecode之环形链表进阶
一枕眠秋雨>o<
链表数据结构
一.题目及剖析https://leetcode.cn/problems/linked-list-cycle-ii/description/这道题就是找到链表中环的入口二.思路引入假设起点到环的入口的距离为L,环的长度为C,入口到相遇点的距离为C-N设定一个快慢指针,速度分别为2,1则有(L+kC-N)=2*(L+C-N)即L=(k-1)C+N说明,如果我设定两个速度相同的指针,一个从起点开始遍历,
- LeeCode(哈希表)128_ 最长连续序列
追影少年*
leetcode算法leetcodejava哈希表数据结构
LeeCode(哈希表)128_最长连续序列题目:给定一个未排序的整数数组nums,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。进阶:你可以设计并实现时间复杂度为O(n)的解决方案吗?示例1:输入:nums=[100,4,200,1,3,2]输出:4解释:最长数字连续序列是[1,2,3,4]。它的长度为4。示例2:输入:nums=[0,3,7,2,5,8,4,6,0,1]输出:9
- leecode-C语言实现-28. 找出字符串中第一个匹配项的下标
阳光九叶草LXGZXJ
#leecode练习-c语言实现c语言算法数据结构开发语言学习
一、题目给你两个字符串haystack和needle,请你在haystack字符串中找出needle字符串的第一个匹配项的下标(下标从0开始)。如果needle不是haystack的一部分,则返回-1。1、示例一输入:haystack="sadbutsad",needle="sad"输出:0解释:"sad"在下标0和6处匹配。第一个匹配项的下标是0,所以返回0。2、示例二输入:haystack="
- go 版本 LeeCode 刷题 在线
nongcunqq
go笔记算法
https://books.halfrost.com/leetcode/ChapterFour/0001~0099/0001.Two-Sum/参考https://github.com/anzhihe/learning/tree/master/shell/book/abs-3.9.1_cn
- 每日一练:LeeCode-513、找树左下角的值【二叉树】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-513、找树左下角的值学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给定一个二叉树的根节点root,请找出该二叉树的最底层最左边节点的值。假设二叉树中至少有一个节点。示例1:输入:root=[2,1,3]输出:1示例2:输入:[1,2,3,4,null,5,6,null,null,7]输出:7提示:二叉树的节点个数的范围是[1,10^4
- 每日一练:LeeCode-112、路径总和【二叉树+DFS+回溯】
666-LBJ-666
#每日一道LeeCode算法题算法数据结构leetcode
本文是力扣LeeCode-112、路径总和学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。给你二叉树的根节点root和一个表示目标和的整数targetSum。判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和targetSum。如果存在,返回true;否则,返回false。叶子节点是指没有子节点的节点。示例1:输入:root=[5,4,8
- 从猿辅导一面挂,怒刷1000道Android面试题,成功入职字节跳动!
Kepler_II
缘起从16年毕业至今,就职过两家公司,大大小小项目做了几个,非常感谢我的两位老大,在我的android成长路上给予我很多指导,亦师亦友的关系。从年前至今参加面试了很多公司,从猿辅导一面挂,我深刻意识到Android开发内卷太严重了,面试都是需要背八股文,狂刷leecode。最后顺利拿到了字节跳动offer。总结下经验,也是对过去的一个回顾和总结吧。猿辅导(一面挂)自我介绍怎么学Android的聊了
- leecode #对称二叉树#二叉树的最大深度
非畅6 1
leetcode算法职场和发展
题目描述:给你一个二叉树的根节点root,检查它是否轴对称。分析:如果一个树的左子树与右子树镜像对称,那么这个树是对称的。故问题转化成两个树在什么情况下互为镜像。满足一下条件互为镜像:它们的两个根结点具有相同的值每个树的右子树都与另一个树的左子树镜像对称classSolution:defisSymmetric(self,root:Optional[TreeNode])->bool:defsearc
- Catalan数
林小果1
数据结构与算法(java实现)算法java数据结构
文章目录Catalan数Leecode96不同的二叉搜索树题目描述解题思路代码Leecode22括号生成题目描述代码Catalan数Catalan数是一种组合数学的计数方法,常用于解决一些计数问题,例如括号匹配问题、二叉树的节点问题等。Catalan数的计算公式如下:C0=1,C1=1,C2=2,C3=5,C4=14,C5=42,C6=132,C7=429,C8=1430,C9=4862,C10=
- Java实现每日一道算法面试题(8):leecode7 整数反转
alexlee1987
1.算法题目给出一个32位的有符号整数,你需要将这个整数中每位上的数字进行反转。示例1:输入:123输出:321示例2:输入:-123输出:-321示例3:输入:120输出:21注意:假设我们的环境只能存储得下32位的有符号整数,则其数值范围为[−2^31,2^31−1]。请根据这个假设,如果反转后整数溢出那么就返回0。2.算法思路算法总思路是弹出末位和推入数字&溢出前进行检查,具体步骤:依次构建
- 每日一练:LeeCode-404、左叶子之和【二叉树】
666-LBJ-666
#每日一道LeeCode算法题leetcode数据结构算法
本文是力扣LeeCode-404、左叶子之和学习与理解过程,本文仅做学习之用,对本题感兴趣的小伙伴可以出门左拐LeeCode。404、左叶子之和给定二叉树的根节点root,返回所有左叶子之和。示例1:输入:root=[3,9,20,null,null,15,7]输出:24解释:在这个二叉树中,有两个左叶子,分别是9和15,所以返回24示例2:输入:root=[1]输出:0提示:节点数在[1,100
- LeetCode[位运算] - #137 Single Number II
Cwind
javaAlgorithmLeetCode题解位运算
原题链接:#137 Single Number II
要求:
给定一个整型数组,其中除了一个元素之外,每个元素都出现三次。找出这个元素
注意:算法的时间复杂度应为O(n),最好不使用额外的内存空间
难度:中等
分析:
与#136类似,都是考察位运算。不过出现两次的可以使用异或运算的特性 n XOR n = 0, n XOR 0 = n,即某一
- 《JavaScript语言精粹》笔记
aijuans
JavaScript
0、JavaScript的简单数据类型包括数字、字符创、布尔值(true/false)、null和undefined值,其它值都是对象。
1、JavaScript只有一个数字类型,它在内部被表示为64位的浮点数。没有分离出整数,所以1和1.0的值相同。
2、NaN是一个数值,表示一个不能产生正常结果的运算结果。NaN不等于任何值,包括它本身。可以用函数isNaN(number)检测NaN,但是
- 你应该更新的Java知识之常用程序库
Kai_Ge
java
在很多人眼中,Java 已经是一门垂垂老矣的语言,但并不妨碍 Java 世界依然在前进。如果你曾离开 Java,云游于其它世界,或是每日只在遗留代码中挣扎,或许是时候抬起头,看看老 Java 中的新东西。
Guava
Guava[gwɑ:və],一句话,只要你做Java项目,就应该用Guava(Github)。
guava 是 Google 出品的一套 Java 核心库,在我看来,它甚至应该
- HttpClient
120153216
httpclient
/**
* 可以传对象的请求转发,对象已流形式放入HTTP中
*/
public static Object doPost(Map<String,Object> parmMap,String url)
{
Object object = null;
HttpClient hc = new HttpClient();
String fullURL
- Django model字段类型清单
2002wmj
django
Django 通过 models 实现数据库的创建、修改、删除等操作,本文为模型中一般常用的类型的清单,便于查询和使用: AutoField:一个自动递增的整型字段,添加记录时它会自动增长。你通常不需要直接使用这个字段;如果你不指定主键的话,系统会自动添加一个主键字段到你的model。(参阅自动主键字段) BooleanField:布尔字段,管理工具里会自动将其描述为checkbox。 Cha
- 在SQLSERVER中查找消耗CPU最多的SQL
357029540
SQL Server
返回消耗CPU数目最多的10条语句
SELECT TOP 10
total_worker_time/execution_count AS avg_cpu_cost, plan_handle,
execution_count,
(SELECT SUBSTRING(text, statement_start_of
- Myeclipse项目无法部署,Undefined exploded archive location
7454103
eclipseMyEclipse
做个备忘!
错误信息为:
Undefined exploded archive location
原因:
在工程转移过程中,导致工程的配置文件出错;
解决方法:
 
- GMT时间格式转换
adminjun
GMT时间转换
普通的时间转换问题我这里就不再罗嗦了,我想大家应该都会那种低级的转换问题吧,现在我向大家总结一下如何转换GMT时间格式,这种格式的转换方法网上还不是很多,所以有必要总结一下,也算给有需要的朋友一个小小的帮助啦。
1、可以使用
SimpleDateFormat SimpleDateFormat
EEE-三位星期
d-天
MMM-月
yyyy-四位年
- Oracle数据库新装连接串问题
aijuans
oracle数据库
割接新装了数据库,客户端登陆无问题,apache/cgi-bin程序有问题,sqlnet.log日志如下:
Fatal NI connect error 12170.
VERSION INFORMATION: TNS for Linux: Version 10.2.0.4.0 - Product
- 回顾java数组复制
ayaoxinchao
java数组
在写这篇文章之前,也看了一些别人写的,基本上都是大同小异。文章是对java数组复制基础知识的回顾,算是作为学习笔记,供以后自己翻阅。首先,简单想一下这个问题:为什么要复制数组?我的个人理解:在我们在利用一个数组时,在每一次使用,我们都希望它的值是初始值。这时我们就要对数组进行复制,以达到原始数组值的安全性。java数组复制大致分为3种方式:①for循环方式 ②clone方式 ③arrayCopy方
- java web会话监听并使用spring注入
bewithme
Java Web
在java web应用中,当你想在建立会话或移除会话时,让系统做某些事情,比如说,统计在线用户,每当有用户登录时,或退出时,那么可以用下面这个监听器来监听。
import java.util.ArrayList;
import java.ut
- NoSQL数据库之Redis数据库管理(Redis的常用命令及高级应用)
bijian1013
redis数据库NoSQL
一 .Redis常用命令
Redis提供了丰富的命令对数据库和各种数据库类型进行操作,这些命令可以在Linux终端使用。
a.键值相关命令
b.服务器相关命令
1.键值相关命令
&
- java枚举序列化问题
bingyingao
java枚举序列化
对象在网络中传输离不开序列化和反序列化。而如果序列化的对象中有枚举值就要特别注意一些发布兼容问题:
1.加一个枚举值
新机器代码读分布式缓存中老对象,没有问题,不会抛异常。
老机器代码读分布式缓存中新对像,反序列化会中断,所以在所有机器发布完成之前要避免出现新对象,或者提前让老机器拥有新增枚举的jar。
2.删一个枚举值
新机器代码读分布式缓存中老对象,反序列
- 【Spark七十八】Spark Kyro序列化
bit1129
spark
当使用SparkContext的saveAsObjectFile方法将对象序列化到文件,以及通过objectFile方法将对象从文件反序列出来的时候,Spark默认使用Java的序列化以及反序列化机制,通常情况下,这种序列化机制是很低效的,Spark支持使用Kyro作为对象的序列化和反序列化机制,序列化的速度比java更快,但是使用Kyro时要注意,Kyro目前还是有些bug。
Spark
- Hybridizing OO and Functional Design
bookjovi
erlanghaskell
推荐博文:
Tell Above, and Ask Below - Hybridizing OO and Functional Design
文章中把OO和FP讲的深入透彻,里面把smalltalk和haskell作为典型的两种编程范式代表语言,此点本人极为同意,smalltalk可以说是最能体现OO设计的面向对象语言,smalltalk的作者Alan kay也是OO的最早先驱,
- Java-Collections Framework学习与总结-HashMap
BrokenDreams
Collections
开发中常常会用到这样一种数据结构,根据一个关键字,找到所需的信息。这个过程有点像查字典,拿到一个key,去字典表中查找对应的value。Java1.0版本提供了这样的类java.util.Dictionary(抽象类),基本上支持字典表的操作。后来引入了Map接口,更好的描述的这种数据结构。
&nb
- 读《研磨设计模式》-代码笔记-职责链模式-Chain Of Responsibility
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
/**
* 业务逻辑:项目经理只能处理500以下的费用申请,部门经理是1000,总经理不设限。简单起见,只同意“Tom”的申请
* bylijinnan
*/
abstract class Handler {
/*
- Android中启动外部程序
cherishLC
android
1、启动外部程序
引用自:
http://blog.csdn.net/linxcool/article/details/7692374
//方法一
Intent intent=new Intent();
//包名 包名+类名(全路径)
intent.setClassName("com.linxcool", "com.linxcool.PlaneActi
- summary_keep_rate
coollyj
SUM
BEGIN
/*DECLARE minDate varchar(20) ;
DECLARE maxDate varchar(20) ;*/
DECLARE stkDate varchar(20) ;
DECLARE done int default -1;
/* 游标中 注册服务器地址 */
DE
- hadoop hdfs 添加数据目录出错
daizj
hadoophdfs扩容
由于原来配置的hadoop data目录快要用满了,故准备修改配置文件增加数据目录,以便扩容,但由于疏忽,把core-site.xml, hdfs-site.xml配置文件dfs.datanode.data.dir 配置项增加了配置目录,但未创建实际目录,重启datanode服务时,报如下错误:
2014-11-18 08:51:39,128 WARN org.apache.hadoop.h
- grep 目录级联查找
dongwei_6688
grep
在Mac或者Linux下使用grep进行文件内容查找时,如果给定的目标搜索路径是当前目录,那么它默认只搜索当前目录下的文件,而不会搜索其下面子目录中的文件内容,如果想级联搜索下级目录,需要使用一个“-r”参数:
grep -n -r "GET" .
上面的命令将会找出当前目录“.”及当前目录中所有下级目录
- yii 修改模块使用的布局文件
dcj3sjt126com
yiilayouts
方法一:yii模块默认使用系统当前的主题布局文件,如果在主配置文件中配置了主题比如: 'theme'=>'mythm', 那么yii的模块就使用 protected/themes/mythm/views/layouts 下的布局文件; 如果未配置主题,那么 yii的模块就使用 protected/views/layouts 下的布局文件, 总之默认不是使用自身目录 pr
- 设计模式之单例模式
come_for_dream
设计模式单例模式懒汉式饿汉式双重检验锁失败无序写入
今天该来的面试还没来,这个店估计不会来电话了,安静下来写写博客也不错,没事翻了翻小易哥的博客甚至与大牛们之间的差距,基础知识不扎实建起来的楼再高也只能是危楼罢了,陈下心回归基础把以前学过的东西总结一下。
*********************************
- 8、数组
豆豆咖啡
二维数组数组一维数组
一、概念
数组是同一种类型数据的集合。其实数组就是一个容器。
二、好处
可以自动给数组中的元素从0开始编号,方便操作这些元素
三、格式
//一维数组
1,元素类型[] 变量名 = new 元素类型[元素的个数]
int[] arr =
- Decode Ways
hcx2013
decode
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, det
- Spring4.1新特性——异步调度和事件机制的异常处理
jinnianshilongnian
spring 4.1
目录
Spring4.1新特性——综述
Spring4.1新特性——Spring核心部分及其他
Spring4.1新特性——Spring缓存框架增强
Spring4.1新特性——异步调用和事件机制的异常处理
Spring4.1新特性——数据库集成测试脚本初始化
Spring4.1新特性——Spring MVC增强
Spring4.1新特性——页面自动化测试框架Spring MVC T
- squid3(高命中率)缓存服务器配置
liyonghui160com
系统:centos 5.x
需要的软件:squid-3.0.STABLE25.tar.gz
1.下载squid
wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE25.tar.gz
tar zxf squid-3.0.STABLE25.tar.gz &&
- 避免Java应用中NullPointerException的技巧和最佳实践
pda158
java
1) 从已知的String对象中调用equals()和equalsIgnoreCase()方法,而非未知对象。 总是从已知的非空String对象中调用equals()方法。因为equals()方法是对称的,调用a.equals(b)和调用b.equals(a)是完全相同的,这也是为什么程序员对于对象a和b这么不上心。如果调用者是空指针,这种调用可能导致一个空指针异常
Object unk
- 如何在Swift语言中创建http请求
shoothao
httpswift
概述:本文通过实例从同步和异步两种方式上回答了”如何在Swift语言中创建http请求“的问题。
如果你对Objective-C比较了解的话,对于如何创建http请求你一定驾轻就熟了,而新语言Swift与其相比只有语法上的区别。但是,对才接触到这个崭新平台的初学者来说,他们仍然想知道“如何在Swift语言中创建http请求?”。
在这里,我将作出一些建议来回答上述问题。常见的
- Spring事务的传播方式
uule
spring事务
传播方式:
新建事务
required
required_new - 挂起当前
非事务方式运行
supports
&nbs