This file contains 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
# Generate all unique permutations of an array | |
# with possibly duplicate elements (multiset). | |
# unique_permutations(('A', 'B', 'B')) -> ABB BAB BBA | |
sub unique_permutations | |
{ | |
my @results; | |
my (@list) = @_; | |
if ($#list == -1) { | |
return [()]; |
This file contains 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
x = 'print "x = " + chr(39) + x + chr(39) + "; exec(x)"'; exec(x) |
This file contains 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/sh | |
FILES=' | |
Makefile.am | |
*.hpp | |
*.cpp | |
*.py | |
test/Makefile.am | |
test/*.cpp | |
test/*.py |
NewerOlder