これは超訳です。
CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!
この訳はCSSLintと同じライセンスで提供されます。
# See original post at http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone | |
cmake_minimum_required(VERSION 2.8) | |
cmake_policy(SET CMP0015 NEW) | |
cmake_policy(SET CMP0016 NEW) | |
project(test) | |
set(NAME test) |
@interface UILabel (dynamicSizeMe) | |
-(float)resizeToFit; | |
-(float)expectedHeight; | |
@end |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Put necessary initialization steps here... | |
// Add imageView overlay with fade out and zoom in animation | |
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame]; | |
imageView.image = [UIImage imageNamed:@"Default"]; // assuming your splash image is "Default.png" or "[email protected]" | |
[self.window addSubview:imageView]; | |
[self.window bringSubviewToFront:imageView]; | |
[UIView transitionWithView:self.window |
// Based on fantastic jQuery useragent parser plugin https://gist.github.com/373298 | |
function parse(uaStr) { | |
var agent = { | |
platform: {}, | |
browser: {}, | |
engine: {} | |
}; | |
var ua = uaStr, | |
p = agent.platform, |
var express = require('express'); | |
var app = express.createServer(); | |
require('./settings').boot(app); | |
app.dynamicHelpers({ | |
base: function(){ | |
// return the app's mount-point | |
// so that urls can adjust. For example | |
// if you run this example /post/add works |
app.get('/', function(req, res){ | |
var ua = req.header('user-agent'); | |
if(/mobile/i.test(ua)) { | |
res.render('mobile.html'); | |
} else { | |
res.render('desktop.html'); | |
} | |
}); |
var oldSync = Backbone.sync; | |
Backbone.sync = function(method, model, options){ | |
options.beforeSend = function(xhr){ | |
xhr.setRequestHeader('X-CSRFToken', CSRF_TOKEN); | |
}; | |
return oldSync(method, model, options); | |
}; |
import re | |
import simplejson | |
from django.http import HttpResponse | |
from django.conf import settings | |
class JSONResponse(HttpResponse): | |
def __init__(self, request, data): | |
indent = 2 if settings.DEBUG else None |