What is Kubernetes?
- Deploy a Kubernetes cluster on Digital Ocean using kubeadm
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
// 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 } |
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" |
(from https://courses.codepath.com/courses/intro_to_ios/pages/ios_topic_questions)
Below you'll find questions that you should be able to answer after taking the iOS class. Some questions are commonly used in iOS interviews.
What properties of a view can be animated? (source: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/AnimatableProperties/AnimatableProperties.html) name a few: anchorPoint, backgroundColor, borderColor, borderWidth, contents, frame, mask, transform, zPosition
What is a CALayer? (source: https://www.raywenderlich.com/2502/calayers-tutorial-for-ios-introduction-to-calayers-tutorial)
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
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') |
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, |
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |
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 { |