ImportError: No module named time
なぜかこんなエラーが
インストールディレクトリの lib/python{VERSION}/lib-dynload
が空になっている
インストール元ディレクトリの build/lib.*/*
をコピーして解決
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} | |
module Googl | |
( shorten | |
, expand | |
) where | |
import Control.Applicative ((<$>), (<*>), empty) | |
import Control.Monad | |
import Data.Aeson |
#import <Cocoa/Cocoa.h> | |
void applicationMain() | |
{ | |
NSString *str = @"abcdefghijklmnopqrstuvwxyz"; | |
s | |
str = [str stringByReplacingOccurrencesOfString:@"a" withString:@"b"]; | |
str = [str stringByReplacingOccurrencesOfString:@"b" withString:@"c"]; | |
} |
test |
function! s:hd2str(hd) | |
" a:hd is a list because to avoid copying the value. | |
" Old routine. | |
let start1 = reltime() | |
let _ = join(map(split(a:hd[0], '..\zs'), 'v:val == "00" ? "" : eval(''"\x'' . v:val . ''"'')'), '') | |
echomsg '1:'.reltimestr(reltime(start1)) | |
" To use nr2char(), change encoding option. | |
" nr2char(255) => "\xc3\xbf" (utf8) |
require 'cgi' | |
require 'nokogiri' | |
xml = <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<Tokens version="1.0"> | |
EOF | |
doc = nil |
@interface Range : NSObject <NSFastEnumeration> | |
@property (readwrite, nonatomic, retain) NSNumber *start; | |
@property (readwrite, nonatomic, retain) NSNumber *end; | |
+ (Range *)createWithStart:(NSUInteger)start End:(NSUInteger)end; | |
- (id)initWithStart:(NSUInteger)start End:(NSUInteger)end; | |
@end | |
@implementation Range | |
@synthesize start = _start; |
int main(void) { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSString *str = @"hello"; | |
NSLog(@"%@", [str uppercaseString]); | |
NSLog(@"%@", [str performSelector:@selector(uppercaseString)]); | |
NSLog(@"%@", [str performSelector:NSSelectorFromString(@"uppercaseString")]); | |
[pool release]; |
(-> | |
lodash = require('lodash') | |
((root, _) -> | |
class _Kernel | |
class: 'Kernel' | |
constructor: (v) -> | |
@v = v | |
@updateProperties() |