首页 软件开发 代码片段 ( Page 43 )

代码片段 8064

#Groovy
在 Gwitter 中添加 File 菜单

import groovy.swing.SwingBuilder import javax.swing.* import java.awt.* class Gwitter{ sta…

2015-12-14 167

#Lua
Lua实现类继承的一种写法

--[[ author:looyer@sina.com date:2014/7/18 purpose:lua的继承演示 --]] --- base class "Object" l…

lua
2015-12-14 962

#Lua
重载基础工具

function overloaded() local fns = {} local mt = {} local function oerror() return error("I…

lua
2015-12-14 280

#Lua
打印表数据改进版

------------------------------------------------------------------- -- This library define…

lua
2015-12-14 887

#Perl
用win32的internet模块来查看网页源代码

use Win32::Internet; use Encode; $INET = new Win32::Internet(); $file = $INET ->FetchUR…

2015-12-14 1,002

#Perl
不想做诗人的程序员不是一个好爸爸

#!/usr/bin/perl use strict; #use warnings; use encoding 'utf8'; use Data::Dumper; sub dump…

2015-12-14 405

#Perl
三行perl代码即可批量下载页面里面所有的图片

$html=`curl http://www.u148.net/article/69164.html`; @img=$html=~m{<img.*?src="([^"]*)"…

2015-12-14 311

#Perl
生成字符串连接文本

#!perl use strict; use warnings; #原始字符串 my $src_str='select username, userid, deptid, role…

2015-12-14 819

#Perl
根据缩进深度格式化Lua代码

package LuaTidy; # 对 Lua 代码进行缩进重排 use Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = …

2015-12-14 945

#Perl
匹配服务器

#!/usr/bin/perl -w sub usage(){ print "\n"; print "Usage : perl extract_host.pl <filena…

2015-12-14 414

#Perl
dijkstra的perl实现

use strict; my @path = (); my @lastpath = (); my $count; my $inputfile = "input"; my $max …

2015-12-14 828

#Perl
查看Linux下的个人主目录文件变化

#!/usr/bin/perl use strict; use warnings; for (qw <"system" "system.bak">){ die "err…

2015-12-14 370
1 41 42 43 44 45 672