自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

钟宇的栏目

不断提升自己

  • 博客(26)
  • 资源 (10)
  • 收藏
  • 关注

转载 Python 获得命令行参数的方法

Python 获得命令行参数的方法本篇将介绍python中sys, getopt模块处理命令行参数如果想对python脚本传参数,python中对应的argc, argv(c语言的命令行参数)是什么呢?需要模块:sys参数个数:len(sys.argv)脚本名:    sys.argv[0]参数1:     sys.argv[1]

2016-04-01 14:36:49 425

原创 verify who reload the lab with shell

#!/bin/kshif [[ "${1}" = "" ]]then   print "\nEnter labname: \c"   read LABelse   LAB="${1}"fiif [[ ! -f /home/fsbu/logs/reloadlog-${LAB} ]]then   print "\nInvalid labname

2015-06-30 09:41:03 385

原创 compute the su procedure time with python

#!/usr/bin/python2.6import re,datetimefile_name='sim.log'file=open(file_name,'r')acnum=[];time_res=[];lnum=0def trans_time(time):    t1=datetime.datetime.strptime(time,'%y/%m/%d %H:%M:%S')

2015-06-30 09:39:26 652

原创 tools save the logs during su procedure

"ts" 5 lines, 235 characters #!/bin/bash#logsaver tat07 2 apply-comit-backout-bld1 R2711.01.38#logsaver tat04 2 apply-reapply-commit-so-bld3  R2860.01.26logsaver qisc2 2 apply-commit-backout-b

2015-06-30 09:37:16 694

原创 generate hss profile via shell

#!/bin/kshprintf "data generation is beginning ...\n"#rm -rf pstn2ue_dataorig_num=6002042001printf "SEQUENTIAL# USER;  AUTHENTICATION; local Port; Media Port\n">reg_datafor ((i=0;ido

2015-06-30 09:34:36 382

原创 generate the call load file

#!/usr/bin/perl -w$e911_call_percent = 0.0;$ims_node_number = 12;$local_ip = "10.86.52.2";$local_port_base = 18000;$media_port_base = 19000;$SIPP_BIN="/home/lss/QCBCb/bin/sipp";$

2015-06-30 09:27:08 656

原创 oil spill areas mark

clear all;datasub=imread('c:\Users\Administrator\Desktop\dark_spots.png');[row,col] = size(datasub);flag = zeros(row,col);flag=datasub;figure,imagesc(imadjust(flag)),colormap(gray),title('SA

2014-11-11 22:38:48 689 1

原创 利用python 提取log 文件中的关键句子,并进行统计分析

利用python开发了一个提取sim.log 中的各个关键步骤中的时间并进行统计的程序:#!/usr/bin/python2.6import re,datetimefile_name='/home/alzhong/logs/qtat1/R2860.01.13/sim-applycommitrollback-bld1.log'file=open(file_name,'r')acnum=[

2014-06-25 11:07:34 6848

原创 分割RGB中物体并计算数目

I=imread(im_path); axes(handles.axes1); imshow(I),% title('原始图像'); %计算每个像素点的真实长度 [x,y]=ginput(2); length=str2double(get(handles.edit5,'st

2014-06-05 18:24:05 1059

原创 利用matlab提取并分割RGB图像中的某一个已知像素值的图像

已知一副RGB图像中的的像素值,利用matlab将其分割出来并以二进制图像形式显示:%extract.mclear all;I=imread('new_original.png');figure,imshow(I),title('Original Image');bw=im2bw(I,0.3);%figure,imshow(bw),title('Gray Image');rgb=[

2014-05-29 23:16:43 9341 2

原创 matlab 2014a 改为英文版本

1. 在 Matlab 的安装目录下面找到如下的路径,X:\MATLAB\R2014a\java\jar,其中 X 为安装盘符,这个不用过多解释了,然后找到文件夹 zh_CN,此文件夹就是中文界面的语言包,可以将此文件夹改成其他的名字,总之不能是 zh_CN,就OK了,以后想用中文界面的时候还可以改回来。本方法不足在于命令行为中文,而且有网友反映过一段时间还会自动改回中文。2. 添加系统变量 

2014-05-29 07:04:27 5979

原创 matlab 修改rbg图像中指定范围内像素点的rgb值

function imgto=color_mark(img, diam,color_to )%UNTITLED2 Summary of this function goes here% img is input image which is a rgb image% diam is a pixel scale in image [208,313,375,705]; [208 313

2014-05-24 18:24:57 11197

原创 令人耳目一新的女神

来自博客中的一个图片,耳目一新!!!

2014-05-10 11:07:17 841 1

原创 ASP.NET web express中使用arcgis sliverlight

1. 在visual studio 2013 工具扩展中搜ESRI,选择合适的模版安装2. 项目新建,刚刚安装的模版3. 通常会报一个错误,interactions的4. 工具-》nugit程序管理包,搜索interactivity 进行安装(这里需要使用IE打开,否则会报一个指针错误)

2014-05-04 13:00:13 848

原创 利用winform 操作access 数据库

最近给师兄写了个一个程序,在winform 中利用c# 操作access 数据

2014-04-22 13:08:32 3049

原创 sulogsaver with shell and expect

1. comand:#!/bin/bashlogsaver tat07 1 applycommit-test-abc R2618.01.222. main script:#!/bin/bashtat07=(tat07 135.2.85.98 135.2.85.99 4)tat04=(tat04 135.1.68.238 135.1.68.239 4)qtat1=(qtat1 135

2014-03-12 10:09:23 737

原创 auto deft involve data with shell

#!/bin/bashautodef R29.13.50 R29.13.55 dbload_13.50 135.1.68.98#!/bin/bash #####################################define the param####################################data=$3host=$4username="l

2014-03-11 10:11:09 589

原创 计算sim.log 的各个点的时间

#!/usr/bin/pythonimport sys, refile=open('/storage/sim/log/update/sim.log','r')begin_flag=cpw_flag=vs_flag=0resume_flag=commit_flag=end_flag=0for line in file:    if(re.search("BEG

2013-11-21 09:35:45 839

转载 Bring up lab --from Leo Li

#! /usr/bin/env python'''@File: bringup.py@Author: Leo Li@Version: 1.0'''import telnetlibimport loggingimport sysimport stringimport reimport timeimport threadimport osimport ftplibim

2013-11-05 16:01:46 824

原创 generate IFC profile with python

for num in range(1,65001):#!/usr/bin/pythonout_file = open("profile_data","w+")num=0ll=5flag=1 for num in range(1,65001): out_file.write("\n# trigger for invite and register b2b AS\n"+'%d'%fla

2013-11-01 17:53:55 1109

原创 循环显示CNFG status with python

#!/usr/bin/pythonimport os,syscmd="FScmd state cnfg vc"cmd2="sleep 2"cmd3="print $(date) cnfg switch|tee -a cnfg_status.log"for i in range(5000): os.system(cmd) os.system(cmd2)

2013-11-01 17:47:14 514

原创 一个用Python 在linux下批量文件名和去掉linux文件中^M的脚本

今天帮同事用Python写了一个小工具,实现了在linux下批量文件名和去掉windows 文件到linux过程中产生^M的脚本,代码如下:#!/opt/exptools/bin/pythonimport os,os.path,sysimport shutil,stringdir ='/home/alzhong/tools/zch/filedir'for i in os.

2013-10-10 11:18:11 2182

原创 对 autoscape case 报告的统计

#-*- coding: utf-8 -*-# Filename: try_except.pyimport sysimport csv#generate the cases for certain release and statusdef reporter_for_rel(rel,status,func): num_func=0 for line in reader: if line[8] ==

2013-09-29 17:32:05 531

转载 Redis及phpredis安装配置

Redis及phpredis安装配置分类: Mysql/Redis/Memcached 2013-07-09 16:07279人阅读 评论(0)收藏 举报1,安装Redis1.1,下载及安装wget http://redis.googlecode.com/files/redis-2.6.14.tar.gztar -zxvf redis-2.6.1

2013-08-17 04:06:03 514

原创 c/c++ unsigned char 的学习

unsigned char a=257;int(a)=1;//257-256unsigned char a=-1;int(a)=255; //256-1unsigned char a=-257;int(a)=255;//256-1

2013-06-27 15:20:15 746

原创 python 获取文件夹下所有文件大小

#python 获取文件夹下所有文件大小import osfrom os.path import join, getsizedef getDirSize(dir): size = 0L for root, dirs, files in os.walk(dir): for filespath in files: pri

2013-06-04 22:09:13 1534

数据结构与算法分析(英文C版)高清 pdf

内容简介   《数据结构与算法分析:C语言描述》曾被评为20世纪顶尖的30部计算机著作之一,作者在数据结构和算法分析方面卓有建树,他的数据结构和算法分析的著作尤其畅销,并受到广泛好评,已被世界500余所大学选作教材。   在《数据结构与算法分析:C语言描述》中,作者精炼并强化了他对算法和数据结构方面创新的处理方法。通过C程序的实现,着重阐述了抽象数据类型的概念,并对算法的效率、性能和运行时间进行了分析。   《数据结构与算法分析:C语言描述》特色:着重讨论了算法设计技巧,包括贪婪算法、分治算法、动态规划、随机化算法以及回溯算法。系统介绍了当前流行的论题和新的数据结构,如斐波那契堆、斜堆、二项队列、跳跃表和伸展树。详细讨论了摊还分析,考查书中介绍的一些高级数据结构。增加了高级数据结构及其实现的内容,包括红黑树、自顶向下伸展树、treap树、k-d树、配对堆等。整合了堆排序平均情况分析的一些新结果。 作者简介   Mark Allen Weiss 1987年在普林斯顿大学获得计算机科学博士学位。师 从Roberl Sedgewick,现任美国佛罗里达国际大学计算与信息科学学院教授。他曾担任全美AP(Advanced Placement)考试计算机学科委员会主席。其主要研究方向是数据结构、算法和教育学。 目录 Introduction 1 1.1. Whats the Book About? 1 1.2. Mathematics Review 3 1.2.1. Exponents 3 1.2.2. Logarithms 3 1.2.3. Series 4 1.2.4. Modular Arithmetic 5 1.2.5. The P Word 6 1.3. A Brief Introduction to Recursion Summary 12 Exercises 12 References 13 2 Algorithm Analysis 15 2.1. Mathematical Background 15 2.2. Model 18 2.3. What to Analyze 18 2.4. Running Tune Calculations 20 2.4.1. A Simple Example 21 2.4.2. General Rules 21 2.4.3. Solutions for the Maximum Subsequence Sum Problem 24 2.4.4. Logarithms in the Running Tune 28 2.4.5. Checking Your Analysis 33 2.4.6. A Grain of Salt 33 Summary 34 Exercises 35 References 39 3 Lists, Stacks, and Queues 41 3.1. Abstract Data Types (AnTs) 41 3.2. The List ADT 42 3.2.1. Simple Array Implementation of Lists 43 3.2.2. Linked Lists 43 3.2.3. Programming Details 44 3.2.4. Common Errors 49 3.2.5. Doubly Linked Lists 51 3.2.6. Circularly Unked Lists 52 3.2.7. Examples 52 3.2.8. Cursor Implementation of Linked Lists 57 3.3. The Stack ADT 62 3.3.1. Stack Model 62 3.3.2. Implementation of Stacks 63 3.3.3. Applications 71 3.4. The Queue ADT 79 3.4.1. Queue Model 79 3.4.2. Array Implementation of Queues 79 3.4.3. Applications of Queues 84 Summary 85 Exercises 85 4 Trees 89 4.1. Preliminaries 89 4.1.1. Implementation of Trees 90 4.1.2. Tree Traversals with an Application 91 4.2. Binary Trees 95 4.2.1. Implementation 96 4.2.2. Expression Trees 97 4.3. The Search Tree ADT-Binary Search Trees 100 4.3.1. MakeEmpty 101 4.3.2. Find 101 4.3.3. FindMin and FindMax 103 4.3.4. Insert 104 4.3.5. Delete 105 4.3.6. Average-Case Analysis 107 4.4. AvI Trees 110 4.4.1. Single Rotation 112 4.4.2. Double Rotation 115 4.5. Splay Trees 123 4.5.1. A Simple Idea (That Does Not Work) 124 4.5.2. Splaying 126 4.6. Tree Traversals (Revisited) 132 4.7. B-Trees 133 Summary 138 Exercises 139 References 146 5 Hashing 149 5.1. General Idea 149 5.2. Hash Function 150 5.3. Separate Chaining 152 5.4. Open Addressing 157 5.4.1. Linear Probing 157 5.4.2. Quadratic Probing 160 5.4.3. Double Hashing 164 5.5. Rehashing 165 5.6. Extendible Hashing 168 Summary 171 Exercises 172 References 175 6 Priority Queues (Heaps) 177 6.1. Model 177 6.2. Simple Implementations 178 6.3. Binary Heap 179 6.3.1. Strocture Property 179 6.3.2. Heap Order Property 180 6.3.3. Basic Heap Operations 182 6.3.4. Other Heap Operations 186 6.4. Applications of Priority Queues 189 6.4.1. The Selection Problem 189 6.4.2. Event Simulation 191 6.5. d-Heaps 192 6.6. Leftist Heaps 193 6.6.1. Leftist Heap Properly 193 6.6.2. Leftist Heap Operations 194 6.7. Skew Heaps 200 6.8. Binomial Queues 202 6.8.1. Binomial Queue Structure 202 6.8.2. Binomial Queue Operations 204 6.8.3. Implementation of Binomial Queues 205 Summary 212 Exercises 212 References 216 7 Sorting 219 7.1. Preliminaries 219 7.2. Insertion Sort 220 7.2.1. The Algorithm 220 7.2.2. Analysis of Insertion Sort 221 7.3. A Lower Bound for Simple Sorting Algorithms 221 7.4. SheUsort 222 7.4.1. Worst-Case Analysis of Shellsort 224 7.5. Heapsort 226 7.5.1. Analysis of Heapsort 228 7.6. Mergesort 230 7.6.1. Analysis of Mergesort 232 7.7. Quicksort 235 7.7.1. Picking the Pivot 236 7.7.2. Partitioning Strategy 237 7.7.3. Small Arrays 240 7.7.4. Actual Quicksort Routines 240 7.7.5. Analysis of Quicksort 241 7.7.6. A Linear-Expected-Time Algorithm for Selection 245 7.8. Sorting Large Structures 247 7.9. A General Lower Bound for Sorting 247 7.9.1. Decision Trees 247 7.10. Bucket Sort 250 7.11. External Sorting 250 7.11.1. Why We Need New Algorithms 251 7.11.2. Model for External Sorting 251 …… 8 The Disjoint Set ADT 9 Graph Algorithms 10 Algorithm Design Techniques 11 Amortized Analysis 12 Advanced Data Structures and Implementation 收起全部 前言   This book describes data structures, methods of organizing large amounts of data,and algorithm analysis, the estimation of the running time of algorithms. As com-puters become faster and faster, the need for programs that can handle large amountsof input becomes more acute. Paradoxically, this requires more careful attention toefficiency, since inefficiencies in programs become most obvious when input sizes arelarge. By analyzing an algorithm before it is actually coded, students can decide if aparticular solution will be feasible. For example, in this text students look at specificproblems and see how careful implementations can reduce the time constraint forlarge amounts of data from 16 years to less than a second. Therefore, no algorithmor data structure is presented without an explanation of its running time. In somecases, minute details that affect the running time of the implementation are explored.   Once a solution method is determined, a program must still be written. Ascomputers have become more powerful, the problems they must solve have becomelarger and more complex, requiring development of more intricate programs. Thegoal of this text is to teach students good programming and algorithm analysis skillssimultaneously so that they can develop such programs with the maximum amountof efficiency.   This book is suitable for either an advanced data structures (CS7) course ora first-year graduate course in algorithm analysis. Students should have some know-ledge of intermediate programming, including such topics as pointers and recursion,and some background in discrete math. 精彩书摘   This example illustrates what we call randomized algorithms. At least onceduring the algorithm, a random number is used to make a decision. The runningtime of the algorithm depends not only on the particular input, but also on therandom numbers that occur.   The worst-case running time of a randomized algorithm is almost always thesame as the worst-case running time of the nonrandomized algorithm. The importantdifference is that a good randomized algorithm has no bad inputs, but only badrandom numbers (relative to the particular input). This may seem like only aphilosophical difference, but actually it is quite important, as the following exampleshows.   Consider two variants of quicksort. Variant A uses the first element as pivot,while variant B uses a randomly chosen element as pivot. In both cases, the worst-case running time is (N2), because it is possible at each step that the largestelement is chosen as pivot. The difference between these worst cases is that there is aparticular input that can always be presented to variant A to cause the bad runningtime. Variant A will run in (N2) time every single time it is given an already-sortedlist. If variant B is presented with the same input twice, it will have two differentrunning times, depending on what random numbers occur.

2013-07-24

ATL Internals: Working with ATL 8, Second Edition

ATL Internals: Working with ATL 8, Second Edition

2011-06-14

Android开发指南中文

详细介绍了Android开发指南中文,对手机开发的it同仁一定不要错过

2011-04-10

An Introduction+to+Programming+with+IDL

对idl 较详细介绍的国外原版教程 希望感兴趣的可以共享

2009-12-29

IDL中的数组操作 介绍了idl数组操作函数

主要介绍idl 数组操作的几个函数 详细介绍了数组操作

2009-12-29

ENVI与IDL二次开发教程

 1. IDL-Interactive Data Language   IDL 是一种数据分析和图像化应用程序及编程语言,先由美国ITT公司所有。最初在七十年代后期用于帮助科学家分析火星探险卫星发回的数据,将浩瀚的数据转换为图形。从此后,IDL 得到广泛运用,使用者日众,呈几何级别增长。   IDL 使用者可以迅速且方便地运用此软件将数据转换为图象,促进分析和理解。通过软件转化的图像既可以是简单色彩,也可以是全色三维图像和模型。   一。 IDL开发环境   IDLDE是用户快速编写、测试并调试代码的最佳环境,用户可以在该环境中方便地   进行应用开发。IDLDE具有完善的代码编译、调试环境。IDLGUIBuilder 可以迅速开发跨   平台的用户图形界面(GUI),而无需熟悉IDL控件编程知识。用户可以拖放式建立图形用户   界面GUI,非常灵活、快速地产生应用程序的界面。IDL GUIBuilder已被集成到Idl开发   环境中(IDLDE)。用户还可方便地输出project,生成可执行文件。   二。 灵活的数据输入和输出   IDL是完全面向矩阵的,因此它具有快速分析超大规模数据的能力。IDL可以通过灵   活方便的I/O分析任何数据。可以读取和输出任意有格式或者无格式的数据类型,支持通   用文本及图形数据,并且支持在NASA、TPT、NOAA等机构中大量使用的HDF、CDF及netCD   F等科学数据格式,以及医学扫描设备的DICOM标准格式。IDL还支持字符、字节、16位整   型、长整型、浮点、双精度、复数等多种数据类型。从IDL5.5起还可以支持MrSID压缩数   据格式。   三。 IDL——快速实现可视化   IDL支持OpenGL软件或硬件加速,可加速交互式的2D及3D数据分析、图像处理及可视化,   除了保留传统的直接图形法外,IDL还采用了先进的面向对象技术;可以实现曲面的旋转   和飞行; 用多光源进行阴影或照明处理;可观察实体(Volume)内部复杂的细节;一旦创   建对象后,可从各个不同的视角对对象进行可视分析,而不用费时地反复重画。   IDL具有强大的数据分析能力,从IDL5.5起支持多进程运算,IDL带有完善的数学分析和   统计软件包,提供强大的科学计算模型,支持IMSL函数库。它的图像处理软件包提供了   大量方便的分析工具、地图投影变换软件包,使您开发GIS易如反掌。   IDL提供了可缩放的TrueType字体,可以注记中文;能将结果存为标准图像格式或PostSc   ript格式,并尽可能地使图像质量最优化。   例如: 2-D 绘图   等直线分析   四。外部语言接口   IDL支持COM/ActiveX组件,可将您的IDL应用开发集成到与COM兼容的环境中。   从Visual Basic、Visual C++等访问IDL,还可以通过动态连接库和COM组件方式在IDL程   序里调用C 、Fortran 等程序。   用 IDL DataMiner 可快速访问、查询并管理与ODBC兼容的数据库,支持Oracl   e, Informix, Sybase, MS SQL 等数据库。可以创建、删除、查询表格,执行任意的SQ   L命令,读取/设置/查询/增加/删除记录等操作。   例如:图像和信号处理   3D、4D曲线和曲面分析   三维体数据分析   IDL的小波变换工具包,主要用于信号处理和图像处理、去除噪声、图像压缩、   特征提取、提取图像细节、其信息量损失比 FFT小得多。   五。应用领域   IDL为用户提供了可视数据分析的解决方案,早在1982年NASA火星飞越航空器的开   发就使用了IDL软件。IDL使科学家无须写传统程序就可直接研究数据。IDL还被广泛应用   于地球科学、医学影像、图像处理、软件开发、大学教学、实验室研究、测试技术、天   文、信号处理、防御工程、数学分析、统计等诸多领域。   六。 广泛的支持平台:   Microsoft Windows 95/98/2000   Microsoft Windows NT(x86/Alpha)   Open VMS   SunOS   Solaris   Solaris X86   AIX   Digital UNIX   HP-UX   IRIX   Linux(Intel x86)   MacOS   2。 接口定义语言(Interface Definition Language)的缩写,使用Java(TM)编写的API提供基于标准的和CORBA的交互性和连接性。   ·Used to describe "interfaces"   similar to RPC .x file   Like a contract   Defines protocol to access objects   ·Builds on OOP principle of encapsulation   Clear boundary between implementation and interface   ·Well-specified, Language-independent   interface specifies names and methods that clients can use (invoke)   same lexical rules as C++ syntax   IDL modules   – logical grouping of interface and type definitions   – defines naming scope   IDL interface   – methods that are available in CORBA objects implementing the interface   – inheritance using ’:’ for example interface Z inherits interfaces A and B interface Z:A,B{ };   IDL methods   – specify signatures   – parameters are labeled as in, out and inout   – one way indicates that client will not be blocked when invoking this method   these methods use maybe invocation semantics   – raises: user-defined exceptions

2009-05-11

空空如也

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

TA关注的人

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