码迷,mamicode.com
首页 >  
搜索关键字:if循环shell case until    ( 11788个结果
sed use case: Filter without editing
if we want to filter with sed pattern and just print the filtered lines without any further editing , we can do it like thisls -a1 ~ | sed -ne "/^\./p...
分类:其他好文   时间:2014-05-28 22:58:56    阅读次数:294
[leetcode]Climbing Stairs @ Python
原题地址:https://oj.leetcode.com/problems/climbing-stairs/题意:You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either cl...
分类:编程语言   时间:2014-05-28 03:27:49    阅读次数:267
正则表达式/g/i/d
/g意思就是:global可选标志,带这个标志表示替换将针对行中每个匹配的串进行,否则则只替换行中第一个匹配串。如:we.fdffddfwe.加上/g后,则2个we都会出来;/i意思就是 case insensitive,区分大小写小字。如:sw与sW不管;/d意思是digital.是一个数字如:/...
分类:其他好文   时间:2014-05-27 16:57:49    阅读次数:234
T端最新的将官员喊话/o修改为世界汉化的方法...
很多朋友喜欢一种修改魔兽世界,世界喊话的方式,就是修改官员喊话频道以前最老的Mangos端的方式也是这种,就直接修改/o 官员喊话频道这个也是魔兽世界私服中常用到的方式之一1、首先找到ChatHandler.cpp 这个TrinityCore中的文件。然后找到case CHAT_MSG_OFFICE...
分类:其他好文   时间:2014-05-26 18:15:18    阅读次数:314
朝花夕拾-4-shell
引言shell,我们经常会用到,以其强大的功能,会帮助我们解决很多棘手的问题。最近遇到一个问题,要跑很多case,如果串行的执行,需要很久。能不能让他们并行起来,但又不能所有case都并行运行呢?,因为所有case同时运行,机器会挂掉的。1,方式1比较直接的一种方式是,维护两个文件队列(*.start和*.stop)分别记录所有case的运行状态,然后根据并发数量来获取和分配资源。代码如下:mul...
分类:其他好文   时间:2014-05-26 05:07:22    阅读次数:262
C++的表驱动法
目的:使用表驱动法,替换复杂的if/else和switch/case语句。说明:JS 等其他语言也都支持的.表驱动发示例:http://blog.csdn.net/zhouyulu/article/details/6860907参考资料1. 《代码大全》(第2版)中文版,第18章 表驱动法。
分类:编程语言   时间:2014-05-26 00:55:26    阅读次数:758
LeetCode: Length of Last Word [057]
【题目】 Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is defined as a character sequence consists of non-space ...
分类:其他好文   时间:2014-05-25 07:39:05    阅读次数:256
需求用例分析之业务规则
在雅各布森用例分析方法和科伯恩用例分析方法中其实都没有“业务规则”的属性,在科伯恩方法中有个相近的属性是约束条件。但是业界使用中常常会给用例加上这个属性,这是为什么呢?为什么两位大师没有加上,是大师们疏忽了?而为什么不少人加上了呢? 从时间和传播上很容易推断,业务规则的来源是传统的需求规格说明书。在传统的需求规格说明书中,整理提炼业务规则或称业务逻辑是其中核心的分析产物。受到传统需求规格说明书的...
分类:其他好文   时间:2014-05-25 07:22:45    阅读次数:1809
【LeetCode】Climbing Stairs
题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 解答...
分类:其他好文   时间:2014-05-25 00:37:34    阅读次数:284
LeetCode: Anagrams [048]
【题目】 Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. For example: Input:  ["tea","and","ate","eat","den"] Output: ["tea","ate","eat"] 【题意】 anagrams指的是颠倒字母顺序构成的单词,以tea为例,则与它an...
分类:其他好文   时间:2014-05-24 18:36:01    阅读次数:317
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!