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
UIGraphicsBeginImageContext(imgSize); | |
// | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
// | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
self.drawView.layer.contents = image; |
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
class DownloadModelBase(object): | |
DOWNLOAD_NEW = 1 << 0 | |
DOWNLOAD_MORE = 1 << 1 | |
FINISH_DOWNLOAD = 1 << 2 | |
@classmethod | |
def start(cls): | |
return DownloadModelIdle() # initial state | |
def process(self, action): | |
if self.mask & action: |
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
= 命名 | |
*.dat: ファイルのリストが改行区切り | |
*.idx: ファイルのリストが改行区切りであるのに加えて、正解画像の位置が後ろにくっついている形式 | |
= compile in linux | |
TBB on | |
http://opencv.willowgarage.com/wiki/InstallGuide |
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
typedef void (^YMMKEditRegionBlock)(YMMKRegionNotificationInfo *regionInfo); |
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
public interface ILLEntityRepository<TEntity> where TEntity : class | |
{ | |
IEnumerable<TEntity> FetchAll(); | |
void Add(TEntity entity); | |
void Edit(TEntity entity); | |
void Delete(TEntity entity); | |
void Commit(); | |
} | |
public interface ILLEntityRepositoryContext |
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
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using MokemokeDataSource; | |
namespace UserBehavior | |
{ |
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
class MockRepositoryContext : ILLEntityRepositoryContext | |
{ | |
Dictionary<Type, object> _hash = new Dictionary<Type, object>(); | |
public ILLEntityRepository<TEntity> GetRepository<TEntity>() where TEntity : class | |
{ | |
var type = typeof(TEntity); | |
if (!_hash.ContainsKey(type)) | |
{ | |
_hash[type] = new MockRepository<TEntity>(); | |
} |
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
private IEnumerable<TEntity> FetchPagedContent(DataServiceQuery<TEntity> query) | |
{ | |
// http://msdn.microsoft.com/en-us/library/ee358709.aspx | |
// http://teruc.dnsalias.net/blog/2012/04/19/171 | |
// With a paged response from the service, use a do...while loop | |
// to enumerate the results before getting the next link. | |
string nextPartitionKey = null; | |
string nextRowKey = null; | |
QueryOperationResponse<TEntity> response; | |
do |
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
$(function () { | |
var watchID; | |
$("#watch").click(function () { | |
if (Modernizr.geolocation) { | |
var nav = window.navigator; | |
if (nav != null) { | |
var geoloc = nav.geolocation; | |
watchID = geoloc.watchPosition(showMap, handle_errors); | |
} | |
} |
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
set tabstop=4 | |
set expandtab | |
set autoindent | |
set shiftwidth=4 | |
filetype off | |
set rtp+=~/.vim/vundle/ | |
call vundle#rc() |