码迷,mamicode.com
首页 >  
搜索关键字:condition    ( 2031个结果
Python 基础之三条件判断与循环
If……else 基本结构: If condition: do something else: do something If condition: do something else: do something 或者 If condition: do something elif conditio ...
分类:编程语言   时间:2016-09-25 00:54:53    阅读次数:231
java 线程 Lock 锁使用Condition实现线程的等待(await)与通知(signal)
在调用await()方法前线程必须获得重入锁(第17行代码),调用await()方法后线程会释放当前占用的锁。同理在调用signal()方法时当前线程也必须获得相应重入锁(代码32行),调用signal()方法后系统会从condition.await()等待队列中唤醒一个线程。当线程被唤醒后,它就会... ...
分类:编程语言   时间:2016-09-23 11:24:33    阅读次数:255
HDU 3530 Subsequence(单调队列)
传送门 Description There is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference b ...
分类:其他好文   时间:2016-09-22 13:17:43    阅读次数:235
使用Spring缓存的简单Demo
使用Spring缓存的简单Demo 1. 首先创建Maven工程,在Pom中配置 2. 创建Student类和StudentServer 类 StudentServer 注意:getStudent方法要定义为Public才能使用缓存。 有条件的缓存 condition = "#id < 2",表示只 ...
分类:编程语言   时间:2016-09-21 19:55:28    阅读次数:139
awk控制语句
一、awk控制语句类型 {statements;…}组合语句 if(condition){statements;…} if(condition){statements;…}else{statements;…} while(conditon){statments;…} do{statements;…}while(condition) for(expr1;expr2;expr3){statements;…} break continue deletearray[index] ..
分类:其他好文   时间:2016-09-21 08:01:58    阅读次数:369
跳出for循环
如下面,有两个循环,break只能退出一个for循环,不能直接跳过第二个for循环 for (Type type : types) { for (Type t : types2) { if (some condition) { // Do something and break... break; ...
分类:其他好文   时间:2016-09-19 14:30:30    阅读次数:159
3Sum Smaller
Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + ...
分类:其他好文   时间:2016-09-18 01:16:08    阅读次数:173
mysql存储过程中的异常处理
http://www.cnblogs.com/cookiehu/p/4994278.html 定义异常捕获类型及处理方法: 这里面需要注意几点: a、condition_value [,condition_value],这个的话说明可以包括多种情况(方括弧表示可选的),也就是一个handler可以定 ...
分类:数据库   时间:2016-09-15 07:32:25    阅读次数:270
LeetCode-3Sum Smaller
Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + ...
分类:其他好文   时间:2016-09-15 06:23:40    阅读次数:200
Javascript中大括号“{}”的多义性
Javascript中大括号“{}”的多义性 JS中大括号有四种语义作用语义1,组织复合语句,这是最常见的 1 2 3 4 5 6 7 8 if( condition ) { //... }else { //... } for() { //... } 1 2 3 4 5 6 7 8 if( cond ...
分类:编程语言   时间:2016-09-14 15:12:51    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!