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 class StopWatch { | |
private var elapsed: Double = 0 | |
private var isRunning: Bool = false | |
private var startTime: Double = 0 | |
public init() {} | |
public var elapsedTimeSeconds: Double { | |
if isRunning { |
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 unittest | |
from collections import defaultdict | |
''' | |
find_lines | |
ON^2 complexity find lines eq with ON space extra space complexity (not counting retval) | |
returns array of arrays of points | |
''' | |
def find_lines(points): |
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.Collections.Generic; | |
namespace mastermind.core.immutable | |
{ | |
public interface ITrieMap<K,V> | |
{ | |
int GetHashCode(K key); | |
V this[K key] { get; } |
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
from cssutils import profile | |
from cssutils.profiles import Profiles, properties, macros | |
#patch um up | |
properties[Profiles.CSS_LEVEL_2]['-ms-interpolation-mode'] = r'none|bicubic|nearest-neighbor' | |
properties[Profiles.CSS_LEVEL_2]['-ms-text-size-adjust'] = r'none|auto|{percentage}' | |
properties[Profiles.CSS_LEVEL_2]['mso-table-lspace'] = r'0|{num}(pt)' | |
properties[Profiles.CSS_LEVEL_2]['mso-table-rspace'] = r'0|{num}(pt)' | |
properties[Profiles.CSS_LEVEL_2]['-webkit-text-size-adjust'] = r'none|auto|{percentage}' | |
#re-add | |
profile.addProfiles([(Profiles.CSS_LEVEL_2, |
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
openssl rsa -in ssl.key -out ssl.nopass.key | |
cat ssl.crt sub.class2.server.ca.pem ca.pem > concatenated.crt | |
heroku certs:update concatenated.crt ssl.nopass.key --app <APP_NAME> |
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
{ | |
"ab":"Abkhazian", | |
"af":"Afrikaans", | |
"an":"Aragonese", | |
"ar":"Arabic", | |
"as":"Assamese", | |
"az":"Azerbaijani", | |
"be":"Belarusian", | |
"bg":"Bulgarian", | |
"bn":"Bengali", |