This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
my $dir = $ARGV[0]; | |
if(! -d $dir){ | |
die "Invalid argument."; | |
} | |
$dir =~ s|\\|/|g; # Just in case, change '\' to '/' in the Windows path. | |
getFileList($dir); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use File::Basename 'fileparse'; | |
my $dir = $ARGV[0]; | |
if(! -d $dir){ | |
die "Invalid argument."; | |
} | |
$dir =~ s|\\|/|g; # Just in case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
my $dir = $ARGV[0]; | |
if(! -d $dir){ | |
die "Invalid argument."; | |
} | |
$dir =~ s|\\|/|g; # Just in case. | |
my @fileList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
public class FutureSample { | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ThreadTest { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
System.out.println("Start!"); | |
Runnable r1 = new Runnable() { | |
public void run() { | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
#--------------------------------------- | |
# Arg check. | |
#--------------------------------------- | |
my $dir = $ARGV[0]; | |
my $usage = << "END_USAGE"; | |
Usage: $0 directory | |
END_USAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPaddr: 192.168.0.1-20 | |
IPaddr: 192.168.0.30-40 | |
oid: .1.3.6.1.2.1.1.3 | |
com: public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.List; | |
import org.snmp4j.CommunityTarget; | |
import org.snmp4j.Snmp; | |
import org.snmp4j.TransportMapping; | |
import org.snmp4j.mp.SnmpConstants; | |
import org.snmp4j.smi.Address; | |
import org.snmp4j.smi.GenericAddress; | |
import org.snmp4j.smi.OID; | |
import org.snmp4j.smi.OctetString; |
NewerOlder