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
<?php | |
while(true){ | |
if ($handle = opendir('./')) { | |
/* ディレクトリをループする際の正しい方法です */ | |
while (false !== ($file = readdir($handle))) { | |
if(endWith($file, '.txt')) { | |
printComment($file); | |
} | |
} |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
var ezXMLParser = {}; | |
ezXMLParser.splitXML = function(XMLstr) { | |
var ret = new Array(); | |
for(var count = 0; ezXMLParser.isExistStrictXML(XMLstr); count++){ | |
// | |
var xml_end_char_index = XMLstr.indexOf('>'); | |
var xml_start_char_index = XMLstr.indexOf('<'); | |
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
<?php | |
var_dump(empty('test')); |
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 getPageTitle($url) { | |
$html = @file_get_contents($url); | |
$html = mb_convert_encoding($html, 'UTF-8', 'auto'); | |
if ( preg_match( "/<title>(.*?)<\/title>/i", $html, $matches) ) { | |
return $matches[1]; | |
} else { | |
return false; | |
} | |
} |
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
"^ " | |
=~ ( | |
("(").("~"^"."^"^"^(""=="")."").("^" | |
^"="^(""=="").""^")").("^"^".").("=" | |
^"~"^(""=="")."").("("^(""=="^").""^ | |
"."^"^").("("^(""=="").""^"^"^")").( | |
(" ^( " | |
== " | |
") . | |
"" ^ |
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
Option Explicit | |
On Error Resume Next | |
Dim objWshShell | |
Dim objFSO | |
Dim objFile | |
Set objWshShell = WScript.CreateObject("WScript.Shell") | |
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") |
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 number2alphabet($instr) { | |
$alphabettbl = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); | |
$outstr = ''; | |
$len = strlen($instr); | |
for ($i = 0; $i < $len; $i++) { | |
$char = substr($instr, $i, 1); | |
if(is_numeric($char)){ | |
$outstr .= $alphabettbl[$char]; | |
}else{ | |
$outstr .= $char; |
NewerOlder