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
<?php | |
/** | |
* ランダムな文字列を返します。 | |
* | |
* 使用例: | |
* randomstr(); | |
* randomstr(6, array('unique'=>true, 'chars'=>'abcdef')); | |
* randomstr(6, array('unique'=>true, 'chars'=>range('c', 'h'))); | |
* | |
* オプション: |
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
/** | |
* jQuery rollover plugin (習作) | |
* public domain | |
* | |
* | |
* 使用例: | |
* // 例えば button_off.png をhover時に button_on.png に変更します。 | |
* $("img").rollover(); | |
* // 例えば button.png をhover時に button_over.png に変更します。 | |
* $("img").rollover('', '_over'); |
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
<?php | |
// tweet test | |
require_once 'HTTP/OAuth/Consumer.php'; | |
require_once 'Services/Twitter.php'; | |
require_once 'Services/Bitly.php'; | |
// http://dev.twitter.com/apps/{数字} 内の「Consumer key」 | |
$consumer_key = ''; | |
// http://dev.twitter.com/apps/{数字} 内の 「Consumer secret」 |
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
DELIMITER $$ | |
CREATE FUNCTION `apppass`(s TEXT) RETURNS text CHARSET utf8 | |
COMMENT 'CakePHPアプリケーション固有のパスワードを生成して返します' | |
BEGIN | |
DECLARE salt TEXT DEFAULT '{Security.Saltの値}'; | |
RETURN SHA1(CONCAT(salt, s)); | |
END$$ |
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
''' <summary> | |
''' </summary> | |
''' <remarks>http://dobon.net/vb/dotnet/programing/makeentrypoint.html</remarks> | |
Public Class Program | |
<STAThread()> _ | |
Public Shared Sub Main() | |
Application.EnableVisualStyles() | |
Application.SetCompatibleTextRenderingDefault(False) | |
Application.Run(New Form1) | |
End Sub |
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
<?php | |
require_once 'PHPUnit/Framework.php'; | |
class ExampleTest extends PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @dataProvider dataDataProvider | |
*/ | |
function testDataProvider($expected, $input) | |
{ |
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
Public Class Form | |
Sub New() | |
InitializeComponent() | |
End Sub | |
Protected Overrides Sub OnVisibleChanged(ByVal e As System.EventArgs) | |
If Me.Visible Then Me.FadeIn() Else Me.FadeOut() | |
MyBase.OnVisibleChanged(e) | |
End Sub |
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
javascript:(function(){ | |
var sheet = []; | |
[].forEach.call(document.querySelectorAll('[id]'), function(i){ | |
var selector = i.tagName + '#' + i.id; | |
sheet.push( | |
selector + ' { outline: 1px solid #f66 }', | |
selector + '::before { ' | |
+ 'content: "' + selector + '";' | |
+ 'position: absolute; z-index: 100;' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery Validation Pluginの簡単なサンプル</title> | |
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.min.js"></script> | |
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script> | |
<script>(function(){ | |
// 標準メッセージの上書き(日本語化等)とカスタム項目のメッセージを設定します。 | |
$.extend($.validator.messages, { | |
email: 'メールアドレスの形式で入力して下さい。(例: [email protected])', |
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
<select name="pref"> | |
<option value=""></option> | |
<optgroup label="北海道・東北"> | |
<option value="北海道">北海道</option> | |
<option value="青森県">青森県</option> | |
<option value="岩手県">岩手県</option> | |
<option value="宮城県">宮城県</option> | |
<option value="秋田県">秋田県</option> | |
<option value="山形県">山形県</option> | |
<option value="福島県">福島県</option> |
OlderNewer