This file contains hidden or 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 final void onMeasure(final int widthMeasureSpec, | |
final int heightMeasureSpec) { | |
int mode = View.MeasureSpec.getMode(widthMeasureSpec); | |
int width = View.MeasureSpec.getSize(widthMeasureSpec); | |
int height = (int) (width / aspect.ratio); | |
int heightSpec = MeasureSpec.makeMeasureSpec(height, mode); | |
super.onMeasure(widthMeasureSpec, heightSpec); | |
} |
This file contains hidden or 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
package com.google.common.eventbus; | |
import com.google.common.collect.ClassToInstanceMap; | |
import com.google.common.collect.Multimap; | |
import com.google.common.collect.MutableClassToInstanceMap; | |
import roboguice.util.Ln; | |
import java.util.concurrent.Executor; | |
/** |
This file contains hidden or 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
from PIL import Image | |
from random import shuffle | |
from math import log, sqrt | |
from itertools import permutations | |
from heapq import heappush, heappop, nlargest | |
from sys import argv | |
NUMBER_OF_COLUMNS = 20 | |
def get_pixel_value(im, x, y): |
This file contains hidden or 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
package controllers; | |
import play.*; | |
import play.mvc.*; | |
import java.util.*; | |
import models.*; | |
import jobs.*; | |
public class Application extends Controller { |
This file contains hidden or 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
# Enable provisioning with chef solo, specifying a cookbooks path (relative | |
# to this Vagrantfile), and adding some recipes and/or roles. | |
# | |
# config.vm.provisioner = :chef_solo | |
# config.chef.cookbooks_path = "cookbooks" | |
# config.chef.add_recipe "mysql" | |
config.chef.add_role "gawker" | |
# | |
# You may also specify custom JSON attributes: | |
# config.chef.json = { :mysql_password => "foo" } |
This file contains hidden or 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
Traceback (most recent call last): | |
File "/home/edward/buildout/sl.webapi/bin/test", line 20, in <module> | |
import zope.testrunner | |
File "/home/edward/.buildout/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/__init__.py", line 21, in <module> | |
import zope.testrunner.interfaces | |
File "/home/edward/.buildout/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/interfaces.py", line 21, in <module> | |
import zope.interface | |
ImportError: No module named interface |
NewerOlder