Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
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
==> Downloading http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.8.4.tar.gz | |
File already downloaded and cached to /Users/yudi/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/yudi/Library/Caches/Homebrew/pyqt-mac-gpl-4.8.4.tar.gz | |
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/pyqt-mac-gpl/4.8.4 | |
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/pyqt-mac-gpl/4.8.4 | |
Error: #<BuildError: Failed executing: ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/pyqt-mac-gpl/4.8.4> | |
/usr/local/Library/Homebrew/formula.rb:469:in `system' | |
/usr/local/Library/Formula/pyqt-mac-gpl.rb:11:in `install' | |
/usr/local/Library/Homebrew/install.rb:92:in `install' | |
/usr/local/Library/Homebrew/formula.rb:246:in `brew' |
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
==> Downloading http://downloads.basho.com/riak/riak-0.14/riak-0.14.1.tar.gz | |
File already downloaded and cached to /Users/yudi/Library/Caches/Homebrew | |
==> make all rel | |
fatal: Not a git repository (or any of the parent directories): .git | |
./rebar get-deps | |
fatal: Not a git repository (or any of the parent directories): .git | |
fatal: Not a git repository (or any of the parent directories): .git | |
fatal: Not a git repository (or any of the parent directories): .git | |
==> cluster_info (get-deps) | |
==> skerl (get-deps) |
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
// interface class, String ID of implementer class, testImpl is an alternative implementation of PreviewController | |
Lookup.Template template = new Lookup.Template(PreviewController.class, "org.gephi.preview.testImpl", null); | |
Result result = Lookup.getDefault().lookup(template); | |
Lookup.Item it=Lookup.getDefault().lookupItem(template); | |
PreviewController instance = it.getInstance(); | |
System.out.println("the instance is: " + instance.toString()); | |
// output: the instance is org.gephi.preview.testImpl@69fe571f | |
template = new Lookup.Template(PreviewController.class, "org.gephi.preview.PreviewControllerImpl", null); |
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
import threading | |
# Based on tornado.ioloop.IOLoop.instance() approach. | |
# See https://github.com/facebook/tornado | |
class SingletonMixin(object): | |
__singleton_lock = threading.Lock() | |
__singleton_instance = None | |
@classmethod |
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
#-*- coding:utf-8 -*- | |
import Queue | |
from contextlib import contextmanager | |
class ObjectPool(object): | |
"""A simple object pool with thread safe""" | |
def __init__(self,objectFn,*args,**kwargs): | |
super(ObjectPool, self).__init__() | |
self.objectFn = objectFn | |
self.objectCls = None |
I hereby claim:
- I am binarycrayon on github.
- I am binarycrayon (https://keybase.io/binarycrayon) on keybase.
- I have a public key ASCxZIyqISYZegFfEyIcC5-Vr6qEN75AxA7QY__9TXqPtgo
To claim this, I am signing this object:
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/
- Redo -
C-?
- Change case: 1. Camel Case :
M-c
2. Upper Case :M-u
- Lower Case :
M-l
OlderNewer