メモ

mysqlにログインするshell

memo #!/bin/sh PATH=/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin export PATH USER='' PASS='' DBNAME='' HOST='localhost' mysql --user=$USER --password=$PASS --database=$DBNAME --host=$HOST

ぼくの .vimrc

随時追加中+学び中. set encoding=japan set fileencodings=sjis,utf-8,iso-2022-jp,euc-jp set nu colorscheme darkblue set expandtab set tabstop=4 set shiftwidth=4 set nocompatible set title " 対応する括弧の表示時間を2にする set matchtime=2 " …

FireFoxで表示がおかしいのでメモる

<html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title></title> </head> <body> <style type="text/css"> </body></html>

MysqlProcedureかいた

DROP FUNCTION IF EXISTS procedure_name; DELIMITER // CREATE FUNCTION procedure_name (param_id INT) RETURNS TINYINT BEGIN SET @result = 0; SET @total = (SELECT ...); IF (ISNULL(@total)) THEN SET @result = 1; ELSEIF (@current < @total_calc) …

かんたんな整形

<html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>整形</title> </head> <body> <h4>整形</h4> <script type="text/javascript"> </body></html>

cssで画面中央へ常に表示する

LightBoxっぽい感じで。prototype.js,jQuery使ってません。IE6無理 そのたの主要ブラウザ(chrome,Fx,IE7+8,Opera,Safari,Lunascape)はOK div#certification { position: fixed!important; position: absolute; top:0; left:0; width:100%; height:100%; z-in…

外部サイト判定?

"http://juice.com".match(/https?:\/\/([^\.]*\.?juice\.com)/); link_Href.search(/([a-z0-9]*\.ABCDE|^ABCDE)\.com/); "juice.com".match(/^[^\.]*\.?juice\.com/i); "juice.com".match(/^[^\.]*\.juice\.com/i); "juice.com".search(/^([^\.]*\.)?juice\…

(memo)Javascript 正規表現

http://www.tohoho-web.com/js/regexp.htm "12:34:56".match(/(\d+):(\d+):(\d+)/); document.write(RegExp.$1 + "<br>"); // → 12 document.write(RegExp.$2 + "<br>"); // → 34 document.write(RegExp.$3 + "<br>"); // → 56RegExpが定義されていないような感じだけど…

(memo)DOMとか

querySelector や querySelectorAll http://d.hatena.ne.jp/amachang/20080306/1204787459 document.querySelectorAll("タグ.class"); document.querySelectorAll("div.strong");とか Allは全部取得するけど、querySelectorは先頭の一つだけ取得する。 文字…

java 正規表現 memo

public class Test public static void main(String[] args){ String str = "Ab9Ab9"; System.out.println(str.replaceAll("([A-Z])([a-z])([0-9])", "$2$1$3")); } } // bA9bA9

強引に文字を綺麗に縁取りする

memo程度. PhotoshopElements4.0 には文字を綺麗に縁取る機能が恐らく存在しない気がする。 選択範囲の拡大や境界線を描く機能では大きく拡大すると角張る性質がある。 文字マスクツールで文字を入力して文字の範囲を作る。 範囲を保存しておく。 レイヤース…