いつも忘れてしまうのでメモ。
ssh-keygen -p -f ~/.ssh/id_rsa
いつも忘れてしまうのでメモ。
ssh-keygen -p -f ~/.ssh/id_rsa
メモ。
<?php
App::uses('Mysql', 'Model/Datasource/Database');
class MysqlCustom extends Mysql{
public function connect() {
$r = parent::connect();
if ( $r ) {
if ( isset($this->config['time_zone']) ) {
$qry = sprintf( "SET @@time_zone = '%s'", $this->config['time_zone'] );
$this->query( $qry );
//CakeLog::debug($qry);
}
}
return $r;
}
}
?>
$.removeCookie('the_cookie');
$.cookie('the_cookie','',{expires:-1});
$.cookie('the_cookie',null);
$.cookie('the_cookie'); // 'null' String
おもいっきり省略!!
twitteroauth
https://github.com/abraham/twitteroauth
require_once('twitteroauth/twitteroauth.php');
$connection = new TwitterOAuth('CONSUMER_KEY', 'CONSUMER_SECRET', 'ACCESS_TOKEN', 'ACCESS_TOKEN_SECRET');
$connection->post('statuses/update', array('status' => 'text to tweet'));
url
https://github.com/einars/js-beautify
perlの JSDecoderで上手くデコード出来ないコードも整形できました。
「stage.displayState」 プロパティーを「FULL_SCREEN_INTERACTIVE」に設定するとOKでした。AIRのみがOKで、ブラウザ上で実行されるswfは基本入力できない。
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
参考:
フルスクリーンウィンドウの表示
AptanaStudio3で’Folder xxxx/xxxx is not empty’のエラーでプロジェクトが作成できない現象がすこし前からでる 用になっていたのでなぜかとらべてみて解決出来ました。
(※明らかにフォルダーはあるが、新規プロジェクトではダメな様子。)
既存のフォルダが既にある場合に、プロジェクトを作成しようとするとエラーが発せする様子です。
以下のとおり[File]メニューの[Import]を選択して、[Existing Folder as New Project] を選ぶとOKでした。
メモ:HTMLヘルパーのtype=>’date’で作ったセレクトメニューをそのまま Validateionクラスにおくって、rule=>array(‘date’)でチェックしようとするとエラーになったので、オリジナルのチェック関数でバリデーション
class AppModel extends Model {
public function dateArray($check,$config){
if(
is_numeric($check['date']['year']) &&
is_numeric($check['date']['month']) &&
is_numeric($check['date']['day'])
){
$dateStr = implode('-',$check['date']);
if(preg_match('/^\d{4}-\d{2}-\d{2}$/',$dateStr)){
return true;
}else{
return false;
}
}else{
return false;
}
}
public function timeArray($fields,$config){
foreach($fields as $field){
if(
is_numeric($field['hour']) &&
is_numeric($field['min'])
){
$timeStr = implode('-',$field);
if(!preg_match('/^\d{2}-\d{2}$/',$timeStr)){
return false;
}
}else{
return false;
}
}
return true;
}
}
マウスイベントが拾えずはまった。メモ
panes.overlayLayer.appendChild(img); //×とするとひろえず panes.overlayMouseTarget.appendChild(img); //◯とすると拾えた
Powered by WordPress & Theme by Anders Norén