minitech
|
codepad
|
|
minitech
|
Saved pastes by minitech:
<?php
$file = array('one.zip', 'two.zip', 'three.zip');
$name = array('ZIP number one', 'ZIP #2', 'ZIP file 3!');
foreach(array_combine($file, $name) as $f => $n) {
|
view (8 lines, 3 lines of output) |
<?php
$file = array('one.zip', 'two.zip', 'three.zip');
$name = array('ZIP number one', 'ZIP #2', 'ZIP file 3!');
foreach(array_combine($file, $name) as $f => $n) {
|
view (8 lines, 1 line of output) |
sub p{($c,$r)=@_;$r=$r||$c;eval"*p$c=sub{print'$r'}";}p chr foreach(97..122);p"J";p"P";p"S"," ";p"C",",";
pC(pr(pe(pk(pc(pa(ph(pS(pl(pr(pe(pP(pS(pr(pe(ph(pt(po(pn(pa(pS(pt(ps(pu(pJ()))))))))))))))))))))))))
|
view (2 lines, 1 line of output) |
#--------|---------|----------|--------+
####### ######## ######### ###
### ### ### ### ### ###
###### ###### ####### ###
### ### ### ### ###
|
view (11 lines, 1 line of output) |
#--------|---------|----------|--------+
####### ######## ######### ###
### ### ### ### ### ###
###### ###### ####### ###
### ### ### ### ###
|
view (12 lines, 1 line of output) |
#--------|---------|----------|--------+
####### ######## ######### ###
### ### ### ### ### ###
###### ###### ####### ###
### ### ### ### ###
|
view (12 lines, 1 line of output) |
#--------|---------|----------|--------+
####### ######## ######### ###
### ### ### ### ### ###
###### ###### ####### ###
### ### ### ### ###
|
view (11 lines, 1 line of output) |
<?php
// A function to sort by last name.
function lastNameSort($a, $b) {
$aLast = end(explode(' ', $a));
$bLast = end(explode(' ', $b));
|
view (20 lines, 6 lines of output) |
string = 'this_should_not have emphasis but _this_ one should. **Strong emphasis**'
string.gsub!(%r{(^|\s)(\*\*|__)(.+?)\2(\s|$)}x, %{\\1<strong>\\3</strong>\\4})
string.gsub!(%r{(^|\s)([*_])(.+?)\2(\s|$)}x, %{\\1<em>\\3</em>\\4})
puts string
|
view (4 lines, 1 line of output) |
string = 'this should have _emphasis_ but this_one_should_not'
string.gsub!(%r{(^|\s)([*_])(.+?)\2(\s|$)}x, %{\\1<em>\\3</em>\\4})
puts string
|
view (3 lines, 1 line of output) |
<?php
$toPutIntoColumns = array('One', 'Seven', 'Thirteen',
'Two', 'Eight', 'Fourteen',
'Three', 'Nine', 'Fifteen',
'Four', 'Ten', 'Sixteen',
|
view (33 lines, 64 lines of output) |
#include <stdio.h>
int main(int argc, char *argv[]) {
char start[80] = "C:\\I am\\Testing\\something.exe";
char *str = start;
|
view (18 lines, 1 line of output) |
<?php
echo "~0 = " . ~0 . "\n";
echo "1 << 2 = " . (1 << 2) . "\n";
echo "7 >> 2 = " . (7 >> 2) . "\n";
echo "7 ^ 3 = " . (7 ^ 3) . "\n";
|
view (6 lines, 4 lines of output) |
Dictionary<string, int> dictionary = new Dictionary<string, int>();
foreach(string recordline in tags) {
string recordstag = recordline.Split('\t')[1];
string tagToDic = recordstag.Substring(0, recordstag.Length - 1);
|
view (11 lines) |
#}Tk~*~xy|roo*Z*|vmrk|uo6
open Q,$0;@r=split/\n/,<Q>;$_=join'',(map{chr(ord() - 10)}split//,$r[0]);$_=~s/(.)(..)/$2$1/g;$_='Jus'.substr$_,2;print
|
view (2 lines, 1 line of output) |
#}Tk~*~xy|roo*Z*|vmrk|uo6
#10
open Q,$0;@r=split/\n/,<Q>;print join'',(map{chr(ord() - 10)}split//,$r[0]);
|
view (3 lines, 1 line of output) |
#include "stdio.h"
const char * placeSuffix(int n){static char*s[]={"th","st","nd","rd"};return n/10%10==1?s[0]:s[n%10<4?n%10:0];}
int main(void) {
|
view (13 lines, 150 lines of output) |
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(int argc, char * argv[]) {
|
view (17 lines, 1 line of output) |
(1..100).map do|x|
if x%3==0
if x%5==0 then puts"FizzBuzz"else puts"Fizz"end
elsif x%5==0
puts"Buzz"
|
view (9 lines, 100 lines of output) |
no warnings;$s='$_=$x;tr/';$s.=chr for(97..122);$s.='/';$s.=chr-$_ for(-122..-97);$_='$_=$s;eval';$s.='/;print';$x='Jfhg zmlgsvi Pvio szxpvi,';eval
|
view (1 line, 1 line of output) |
no warnings;$s='$_=$x;tr/';$s.=chr for(97..122);$s.='/';$s.=chr-$_ for(-122..-97);$_='$_=$s;eval';$s.='/;print';$x='Hvool dliow!';eval
|
view (1 line, 1 line of output) |
sub x{open T,$0;$_=substr<T>,42,25}print "Just another Perl hacker,"if!x;print
|
view (1 line, 1 line of output) |
use MIME::Base64;print map chr,map{$c+=ord>128?-((ord)-128):ord;}split//,decode_base64"SiuCAdRBDQEFjIMN0jAVDYbMSIcCCIYNxg"
|
view (1 line, 1 line of output) |
print map chr,map{$c+=$_}(74,43,-2,1,-84,65,13,1,5,-12,-3,13,-82,48,21,13,-6,-76,72,-7,2,8,-6,13,-70)
|
view (1 line, 1 line of output) |
int main(){int i=0;while(++i<=100)printf(i%15==0?"FizzBuzz\n":i%3==0?"Fizz\n":i%5==0?"Buzz\n":"%d\n",i);return 0;}
|
view (1 line, 100 lines of output) |
int main(){int i=0;while(++i<=100)if(i%3==0)if(i%5==0)printf("FizzBuzz\n");else printf("Fizz\n");else if(i%5==0)printf("Buzz\n");else printf("%d\n",i);return 0;}
|
view (1 line, 100 lines of output) |
use MIME::Base64;print map{map{(++$i,'Fizz','Buzz','FizzBuzz')[$_]."\n"}(3&ord,3&ord>>2,3&ord>>4,3&ord>>6)}split//,decode_base64"EAZJMIRBEgxhkARDGCTBEAZJMIRBEgxhkA"
|
view (1 line, 100 lines of output) |
use MIME::Base64;print map{map{(++$i,'Fizz','Buzz','FizzBuzz')[$_]."\n"}(3&(ord),3&(ord>>2),3&(ord>>4),3&(ord>>6))}split//,decode_base64"EAZJMIRBEgxhkARDGCTBEAZJMIRBEgxhkA"
|
view (1 line, 100 lines of output) |
# Another FizzBuzz script. Technically only one line if you don't include the
# comment or the "use MIME::Base64" part.
use MIME::Base64;print map{$r=ord;map{(++$i,'Buzz','Fizz','FizzBuzz')[$_]."\n"}(3&($r),3&($r>>2),3&($r>>4),3&($r>>6))}split//,decode_base64"EAZJMIRBEgxhkARDGCTBEAZJMIRBEgxhkA"
|
view (3 lines, 100 lines of output) |
# A "cheating" way to write FizzBuzz in one line.
# This is preparation.
use MIME::Base64;
@b=();
for(my $i = 0; $i < 25; $i++) {
|
view (20 lines, 101 lines of output) |
#--------|---------|----------|--------+
####### ######## ######### ###
### ### ### ### ### ###
###### ###### ####### ###
### ### ### ### ###
|
view (9 lines, 1 line of output) |