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
/* パンくずリストの「>」を生成する例 */ | |
/* li + li:before */ | |
/* li要素の直後にあるli要素の前に、新しい要素を生成してスタイルを適用する */ | |
.nav-topicpath li * li:before { | |
margin : 0 3px; | |
content: ">"; | |
} | |
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
CGFloat height = 45.0f; | |
CGRect toolBarBounds = CGRectMake( | |
self.view.bounds.origin.x, | |
//self.view.bounds.origin.y - 1.0f, // TOP表示時 | |
self.view.bounds.origin.y + self.view.bounds.size.height - height, // Bottom表示時 | |
self.view.bounds.size.width, | |
height | |
); | |
toolBar = [[UIToolbar alloc] initWithFrame:toolBarBounds]; |
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
/* http://www.bookofzeus.com/articles/create-css-arrows/ */ | |
ul | |
{ | |
list-style-type: none; | |
position: relative; | |
} | |
li { | |
list-style-type: none; | |
background-color: #ddd; | |
border-right: solid 1px #aaa; |
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
// 出所:http://stackoverflow.com/questions/9038625/detect-if-device-is-ios | |
var iOSversion = false, | |
w = window, | |
p = navigator.platform; | |
if( p === 'iPad' || p === 'iPhone' || p === 'iPod' ){ | |
!!w.history && !!w.history.pushState ? iOSversion = '4+' : iOSversion = '4-'; | |
!!w.matchMedia ? iOSversion = '5+' : ''; | |
} |
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
// 出所:http://wizard.st/blog/archives/156 | |
// :http://fredandrandall.com/blog/2011/03/31/how-to-change-the-color-of-a-uibarbuttonitem/ | |
UIBarButtonItem *item = nil; | |
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) { | |
item = [[UIBarButtonItem alloc] initWithTitle:title | |
style:useStyle | |
target:self | |
action:@selector(toolBarButtonTapped:)]; |
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
// 出所:http://stackoverflow.com/questions/6341503/uinavigationbar-custom-background-image | |
// 関連:http://www.mladjanantic.com/setting-custom-background-for-uinavigationbar-what-will-work-on-ios5-and-ios4-too/ | |
toolBar = [[UIToolbar alloc] initWithFrame:toolBarBounds]; | |
[toolBar sizeToFit]; | |
// set BackgroudImage | |
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) { | |
//iOS 5 |
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
// 嫌悪感を抱いた返却結果 | |
// f,p,gというキーがあるが、これらはテーブルのalias名 | |
array(3) { | |
[0]=> | |
array(3) { | |
["f"]=> | |
array(3) { | |
["favorite_id"]=> | |
string(2) "12" |
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
// 出所 http://members.jcom.home.ne.jp/jintrick/Personal/DOM_Range.html#EMPT_DIV | |
// http://moz-addon.g.hatena.ne.jp/ZIGOROu/20080917/1221636061 | |
// jQueryのやり方 | |
// http://james.padolsey.com/jquery/#v=1.6.2&fn=jQuery.fn.empty | |
while(div.lastChild){ | |
div.removeChild(div.lastChild); | |
} | |
// エレガントなやり方 |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="./parse_url.js"></script> | |
<script type="text/javascript"> | |
var url1 = "http://jblas:[email protected]:8080/mail/inbox?msg=1234&type=unread#msg-content"; |
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
for FILE in `grep -rl 置換前 *`; do cp $FILE $FILE.bak; sed -e "s/置換前/置換後/g" $FILE.bak > $FILE; rm $FILE.bak; done |