Skip to content

Instantly share code, notes, and snippets.

View sugarHoge's full-sized avatar

sugar.hoge sugarHoge

View GitHub Profile
@sugarHoge
sugarHoge / new_gist_file
Created July 22, 2013 02:56
iFrameへの中の操作
$(document).ready(function() {
$('#iframe00').load(function(){
$(this).contents().find('#dc_sisan1').css('height','424px');
$(this).contents().find('#dc_sisan2').css('height','404px');
$(this).contents().find('#dc_sisan3').css('display','');
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>文書のタイトル</title>
<style type="text/css">
div.example {
width: 100%;
}
<div id="page">
 <h1>アイススプレー【使用上の注意】</h1> ← 見出し1
 <p>使用前に次の説明を必ずお読みください。</p>
 <div id="section1">
  <h2>してはいけないこと</h2>
  <p>守らないと現在の症状が悪化したり、副作用が起こりやすくなる。</p>
  <p>次の部位には使用しないこと。</p>
  <ul> ← 順序のないリスト
   <li>目や目の周囲、粘膜。</li>
   <li>湿疹。</li>
@sugarHoge
sugarHoge / new_gist_file
Created July 1, 2013 04:48
日時取得
date("Y/m/d H:i:s", time())
<?php
require_once 'Zend/Registry.php';
Zend_Registry::set('foo', $data); // set()メソッドを使い(キー, 値)をセット
$data = Zend_Registry::get('foo'); // get()メソッドを使いキーを指定して値取得
@sugarHoge
sugarHoge / ライフタイム延期
Created June 24, 2013 01:49
セッション情報
$nSess = new Zend_Session_Namespace("piyo");
$nSess->setExpirationSeconds(10); // ここから10秒
$nSess->setExpirationSeconds(10); // 更にここから10秒伸びる
@sugarHoge
sugarHoge / アクション名の取得
Created June 20, 2013 01:09
リクエスト情報取得
$actionName = $this->getRequest()->getActionName();
@sugarHoge
sugarHoge / 多次元配列
Created June 17, 2013 07:48
配列数分ループして値を取り出す方法
$test03=array(
array('111', '222'),
array('333', '444')
);
foreach ($test03 as $key1 =>$val1) {
foreach ($val1 as $key2 => $val2) {
debug($key2 . "=>" . $val2);
}
include 'ChromePhp.php';
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
ChromePhp::warn('something went wrong!');
<?php
// demo.php
include 'ChromePhp.php';
ChromePhp::log('Hello console!日本語もOK');
@sugarHoge
sugarHoge / view
Created June 17, 2013 05:14
form action属性
<form method="post" action="/プロジェクト/public/コントローラー/アクション">