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
| height: 650 |
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
| 1 | |
| 15 | |
| ............... | |
| ............... | |
| ............... | |
| ............... | |
| ............... | |
| ............... | |
| ............... | |
| ............... |
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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| import GameplayKit | |
| extension Collection { | |
| /// Returns the element at the specified index iff it is within bounds, otherwise nil. | |
| subscript (safe index: Index) -> Element? { | |
| return indices.contains(index) ? self[index] : nil |
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
| /** | |
| * Generate a unique name such as sim_batch042 | |
| * @param proposedName starting name | |
| * @param nameExists predicate that should return true if the name already exists | |
| * @return unique filename | |
| */ | |
| public static String generateUniqueName(String proposedName, String appendStringBeforeNumbers, Predicate<String> nameExists) | |
| { | |
| if (!nameExists.test(proposedName)) | |
| { |
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
| // MARK: UIViewControllerAnimatedTransitioning protocol methods | |
| extension DetailTransitionManager: UIViewControllerAnimatedTransitioning { | |
| // animate a change from one viewcontroller to another | |
| func animateTransition(transitionContext: UIViewControllerContextTransitioning) { | |
| // get reference to our fromView, toView and the container view that we should perform the transition in | |
| let container = transitionContext.containerView() | |
| // create a tuple of our screens | |
| let screens: (from: UIViewController, to: UIViewController) = (transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)!, transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!) | |
| // MARK: Setting the initial conditions for the transition animations | |
| container!.addSubview(screens.to.view) |
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
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| public class RegexTest { | |
| static Matcher m = Pattern.compile("(biba.*){5,}").matcher(""); | |
| public static void main(String[] args) { |
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 __future__ import division | |
| uo_dict = {"0,0": 1} | |
| def unordered_partition(n, k): | |
| if n < k: | |
| return 0 | |
| if k == 0: | |
| return 0 | |
| if n == k: |
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 flask import Flask | |
| from flask_oauthlib.client import OAuth | |
| from flask import session, redirect, request, url_for, jsonify | |
| import requests | |
| import json | |
| import config | |
| app = Flask(__name__) | |
| app.secret_key = "development" |
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 flask import Flask | |
| from flask_oauthlib.client import OAuth | |
| from flask import session, redirect, request, url_for, jsonify | |
| import requests | |
| import json | |
| import config | |
| app = Flask(__name__) | |
| app.secret_key = "development" |
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
| // autoexec.cfg for Counter-Strike: Global Offensive | |
| // Place in <steamfolder>\steamapps\common\Counter-Strike Global Offensive\csgo\cfg | |
| // Launch options: -novid -high -nojoy -threads 4 -tickrate 128 | |
| // performance | |
| sv_forcepreload 1 | |
| cl_forcepreload 1 | |
| fps_max 484 |