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

代码片段 8064

#Groovy
使用groovy插件保存ci的状态文件

/** * @author petert * @since V1.0 * To save all logs into file if status is not success *…

2015-12-14 382

#Groovy
groovy grails 动态方法一例

//定义一个类 class GlobalService{ def grailsApplication def propertyMissing(String name){ grail…

2015-12-14 258

#Groovy
处理二进制文件

//---------------------------------------------------------------------------------- // Ja…

2015-12-14 372

#Groovy
gorm批量删除

def batchDelete(Class entityClass,ids){ entityClass.executeUpdate("delete ${entityClass.na…

2015-12-14 355

#Groovy
groovy读取类的函数签名的脚本

if (args) { def className = args[0] def theClass = Class.forName(className) def theMetaCla…

2015-12-14 784

#Lua
Lua闭包

function fuck() local i = 0 return function() i = i + 1 return i end end c1 = fuck() print…

lua
2015-12-14 808

#Lua
自动生成APK包

-- Authors: sails鸢@oschina -- Date: 20th , August , 2014 -- Note: -- This is used for Coco…

lua
2015-12-14 804

#Shell
shell脚本for和while的使用

#!/bin/bash sum=0; for ((i=1; i<=10; i++)); do let "sum=$sum+$i"; done echo $sum; for j…

2015-12-14 704

#Perl
About Matrix

#!/usr/bin/env perl6 use v6; sub MAIN(Str :f($file)) { my @lines = $file.IO.lines; my @sub…

2015-12-14 1,014

#Perl
2个线程间的对话,有点耳熟,有点忧郁

#!/usr/bin/perl use threads; use threads::shared; use Thread; use Thread::Queue; use POSIX…

2015-12-14 723

#Perl
遍历当前目录

my $path = `pwd`; chomp $path; # `pwd`命令结尾有个回车符,需要chomp去掉 print "$path\n "; opendir DIR ,$…

2015-12-14 845

#Perl
perl 删除过期文件

#!/usr/bin/perl `find /bak/ >list.txt`; open LIST,"/root/list.txt"; while (<LIST>…

2015-12-14 764
1 78 79 80 81 82 672