韩半仙

  博客园  ::  :: 新随笔  ::  :: 订阅 订阅  :: 管理

2011年12月5日

摘要: 一般性的语法:#!/usr/bin/perluse strict;use warnings;main(@ARGV);sub main{ message("This is the template.pl exercise file from Perl 5 Essential Training.");}sub message{ my $m = shift or return; print("$m\n");}sub error{ my $e = shift || 'unkown error'; print("$0: $e\n" 阅读全文
posted @ 2011-12-05 00:06 韩英武 阅读(266) 评论(0) 推荐(0)

2011年12月4日

摘要: 磨刀不误砍柴工。作为手机应用开发者,你需要向应用商店提交应用审核,迅速通过审核可以让你抢占先机。对苹果iOS应用开发者来说尤其如此。苹果应用商店的审核近乎吹毛求疵,下面这些清单可以让你知道苹果会在哪些地方找茬。基本要点首先,你的应用程序:- 不能导致手机故障(比如崩溃或屏幕问题)- 长时间/过度使用之后反应仍然很快- 应用内的所有价格信息中不能用固定值代替可变变量- 不要使用任何SDK里面的私人API- 不要使用任何SDK文档里面没有列出的功能- 不要提及用户设备上不存在的硬件功能- 如果需要网络连接,在没有网络的情况下要告知用户- 不要(过度)模仿任何本地应用程序- 不要(过度)山寨某个本地 阅读全文
posted @ 2011-12-04 22:18 韩英武 阅读(241) 评论(0) 推荐(0)

2011年12月2日

摘要: 〇、前言 意见反馈,请mailto:datouwang...at...gmail.com。 一、AWK简介 AWK名字来源于三位创造者Aho、Weinberger和Kernighan统称。 AWK擅长处理文本数据。 二、AWK的调用方式 awk [-Ffs] [-v var=value] [program | -f progfile ...] [file ...] 1、命令行方式 例如: awk '{print $1}' file ps -ef|grep program|awk '{print $2}' 2、文件方式 ... 阅读全文
posted @ 2011-12-02 02:51 韩英武 阅读(275) 评论(0) 推荐(0)

摘要: open a file and return its number of lines.Version 1st:#!/usr/bin/perluse strict;use warnings;my $filename = "linesfile.txt"; # the name of the fileopen(FH, $filename); # open the filemy @lines = <FH>; # read the fileclose(FH); # close the filemy $count = scalar @lines; # the number 阅读全文
posted @ 2011-12-02 00:51 韩英武 阅读(210) 评论(0) 推荐(0)

2011年12月1日

摘要: 1. prerequistites:have a basic understanding of programmingshould have experience writing working code in modern programming language: C, java, JSP, PHP, Python.Use a system with Perl 5 installed. recommended: Perl 5.10.have a text editor.2. what is Perl?Perl is a programming language.it's inter 阅读全文
posted @ 2011-12-01 01:21 韩英武 阅读(204) 评论(0) 推荐(0)