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
| function Happiness(t){ | |
| return t + "free"; | |
| } |
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
| template < class T, int n > struct mvector_tool{ | |
| typedef vector< typename mvector_tool<T,n-1>::type > type; | |
| static type gen_vector( std::array<unsigned int, n> index, T initvalue ){ | |
| std::array<unsigned int,n-1> index_next; | |
| std::copy_n( index.begin()+1, n-1, index_next.begin() ); | |
| return type( index.front(), mvector_tool<T,n-1>::gen_vector( index_next, initvalue )); | |
| } | |
| }; | |
| template < class T > struct mvector_tool<T,0>{ |
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
| find . -type f -print0 | xargs -0 md5sum > md5list.txt | |
| perl -ne '/^(\S+)\s+(.+)/ and push @{$h{$1}},$2}{@$v>1&&print join"\n\t",$k,@$v,"\n"while($k,$v)=each%h' md5list.txt |
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
| #!/bin/bash | |
| TargetNumber=${1:-5712925402340856} | |
| { | |
| echo "##### Target Number = $TargetNumber" | |
| echo | |
| echo -n "##### primeFactor.pl : perl ";perl -E'say $^V' | |
| time ./primeFactor.pl $TargetNumber | |
| echo |
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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| my @PNS = ( 3, 4, 5, 6 ); | |
| my $lambda = 0.1; | |
| for my $PN ( @PNS ){ |
NewerOlder