0

if(typeof myObj.prop2 === 'function') { alert("It's a function"); } else if (typeof myObj.prop2 === 'undefined') { alert("It's undefined"); } else { alert("It's neither undefined nor a function. It's a " + typeof myObj.prop2); }

0
NSURL *url = [NSURL URLWithString:base64String];    
NSData *imageData = [NSData dataWithContentsOfURL:url];
UIImage *ret = [UIImage imageWithData:imageData];

base64 encode 后的字符串前面需要加上data:image/png;base64,
0
john
6 years ago 回复了 CSS 背景大图怎样居中
.head{
            width: 100%;
            background: url('/top.png');
            background-repeat: no-repeat;
            background-position: center;
}
0
john
6 years ago 回复了 textarea禁止拉伸
textarea {
    resize: none;
}

只允许改变高度, 不允许横向拉伸用下面这个。

textarea {
  resize: vertical;
}
0
john
6 years ago 回复了 Mac MySQL管理工具

免费开源的 Sequel Pro , 可以自己写插件。 下载地址:http://www.sequelpro.com/

Broadcast


JoyK
Better personal homepage
reddit style
GitHub Flavored Markdown syntax
Adaptive layout