Skip to content

Instantly share code, notes, and snippets.

View k1LoW's full-sized avatar
🦓

Ken’ichiro Oyama k1LoW

🦓
View GitHub Profile
@k1LoW
k1LoW / diff.js
Created May 3, 2009 18:42 — forked from ucnv/diff.js
// http://ido.nu/kuma/2007/10/01/diff-onp-javascript-implementation/
/*
Copyright (c) 2007, KUMAGAI Kentaro
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<?php
class AppModel extends Model {
//Validation message i18n
function invalidate($field, $value = true){//$value example > __('Users Error' ,true)
parent::invalidate($field, $value);
$this->validationErrors[$field] = $value;
}
}
<?php
class AppModel extends Model {
var $withFieldName = false;
var $error_messages = array();
function _setErrorMessageI18n() {
$this->error_messages['empty'] = __('Error Hoge',true);
}
<?php
require_once 'qdmail.php';
class ExceptionNotifierComponent extends Object
{
public $ERR_TYPE = array(
E_ERROR => 'FATAL',
E_WARNING => 'WARNING',
E_NOTICE => 'NOTICE',
E_STRICT => 'STRICT'
<?php
require_once 'qdmail.php';
class ExceptionNotifierComponent extends Object
{
public $ERR_TYPE = array(
E_ERROR => 'FATAL',
E_WARNING => 'WARNING',
E_NOTICE => 'NOTICE',
E_STRICT => 'STRICT'
require 'formula'
class Canything < Formula
url 'https://github.com/keiji0/canything/zipball/master'
sha1 '3dc52483443211b19441f5f8732943475143cecf'
homepage 'https://github.com/keiji0/canything'
version '20130128'
def install
system "make"