https://trac.ffmpeg.org/wiki/StreamingGuide
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| - (void)exportAnimatedGif | |
| { | |
| UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
| UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
| NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| static UIImage *frameImage(CGSize size, CGFloat radians) { | |
| UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
| [[UIColor whiteColor] setFill]; | |
| UIRectFill(CGRectInfinite); | |
| CGContextRef gc = UIGraphicsGetCurrentContext(); | |
| CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
| import os | |
| import random | |
| from scrapy.conf import settings | |
| class RandomUserAgentMiddleware(object): | |
| def process_request(self, request, spider): | |
| ua = random.choice(settings.get('USER_AGENT_LIST')) | |
| if ua: | |
| request.headers.setdefault('User-Agent', ua) | |
| class ProxyMiddleware(object): |
| /* | |
| * FormData for XMLHttpRequest 2 - Polyfill for Web Worker | |
| * (c) 2014 Rob Wu <[email protected]> | |
| * License: MIT | |
| * - append(name, value[, filename]) | |
| * - XMLHttpRequest.prototype.send(object FormData) | |
| * | |
| * Specification: http://www.w3.org/TR/XMLHttpRequest/#formdata | |
| * http://www.w3.org/TR/XMLHttpRequest/#the-send-method | |
| * The .append() implementation also accepts Uint8Array and ArrayBuffer objects |
| // Additional code in node-http-proxy.js | |
| var crypto = require('crypto'); | |
| var redis = require('redis'); | |
| var client = redis.createClient(config.opt.redis_port, 'cloudno.de'); | |
| client.auth(config.opt.redis_auth, function(result) { | |
| util.log("Redis authenticated."); | |
| }) |
from: http://niftybits.wordpress.com/2012/01/09/a-syntax-highlighter-extension-for-deck-js/
So for the past few hours, have been playing with Deck.js . I like the idea of a web based presentation format rather than a blob like powerpoint. At the same time, I’m a bit circumspect too – given the state of the tools. At least for my use, there’s really no burning need that powerpoint can’t solve (though I get the shivers everytime I have to do a presentation). All the web based/HTML5 seem raw at the moment on some much needed features (slide notes, slide prints, scaling issues etc).
Anyway, after a few minutes on Google and StackOverflow, decided to give Deck.js a spin. Deck.js is really nice and you should take a tour if you haven’t done so. So finally, after giving the online presentation and the introduction a try, downloaded the latest to give it a more thorough spin. As usual, one of the first things was embedding code snippets and I thought it would be nice to
| # ORACLE restrore dmp file | |
| ## create tablespace | |
| <pre> | |
| create temporary tablespace STUDIO_temp tempfile '<DBPATH>/STUDIO_temp.dbf' size 500M; | |
| create tablespace STUDIO datafile '<DBPATH>/STUDIO.dbf' size 500M; | |
| create temporary tablespace FRAMEWORK_temp tempfile '<DBPATH>/FRAMEWORK_temp.dbf' size 500M; |
| # 中文全文检索,使用mmseg | |
| ## 创建索引 | |
| PUT http://localhost:9200/index | |
| ## 设置mapping | |
| POST /index/fulltext/_mapping | |
| { | |
| "fulltext": { | |
| "_all": { |