What is Kubernetes?
- Deploy a Kubernetes cluster on Digital Ocean using kubeadm
| - (void)presentModalView | |
| { | |
| CGFloat bounceDistance = 10.0; | |
| CGFloat modalWidthPercentage = 0.9; | |
| CGFloat modalHeightPercentage = 0.8; | |
| UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow]; | |
| CGRect frame = keyWindow.bounds; | |
| // The screenView is a plain black view with opacity |
| import UIKit | |
| // Conform the `Polygon` protocol to specify the vertices of the polygon. | |
| protocol Polygon { | |
| var vertices: [CGPoint] { get } | |
| } | |
| // UIView conforms the protocol `Polygon` to specified the vertices of the rectangle. | |
| extension UIView: Polygon { |
| - (UIViewController *)topViewController{ | |
| return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
| } | |
| - (UIViewController *)topViewController:(UIViewController *)rootViewController | |
| { | |
| if (rootViewController.presentedViewController == nil) { | |
| return rootViewController; | |
| } | |
| from typing import List | |
| import numpy as np | |
| import random | |
| import math | |
| def perform_iron_condor( | |
| trade_days: int, | |
| initial_capital: float, | |
| spread: float = 50.0, | |
| profit_rate_daily: float = 0.02, |
| from aws import bucket_exists, upload_path | |
| bucket_name = 'cnns-music-vids' | |
| directory_to_upload = 'data/' | |
| output_s3_directory = 'data/' | |
| if bucket_exists(bucket_name): | |
| print('the bucket exists!') | |
| else: | |
| raise ValueError('nah the bucket does not exist') |
| git config --global diff.tool bc | |
| git config --global difftool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe" | |
| git config --global merge.tool bc | |
| git config --global mergetool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe" | |
| git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt" |
| // path: store/basket/basket.ts (module) | |
| import { RootState } from "../../store" | |
| import inventory, { Product } from "../inventory/inventory" | |
| export interface Item { productId: string, quantity: number } | |
| export interface DisplayItem { product: Product, quantity: number } | |
| export interface BasketState { items: Item[], isLoading: boolean } | |
| const initialBasketState: BasketState = { items: [], isLoading: false } |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| ) | |
| var path = "/Users/novalagung/Documents/temp/test.txt" |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| ) | |
| var path = "/Users/novalagung/Documents/temp/test.txt" |