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
| void Main() | |
| { | |
| string[] formats = | |
| { | |
| "yyyy-MM-dd'T'HH:mm:ss.fffffffK", | |
| "yyyy-MM-dd'T'HH:mm:ss.ffffffK", | |
| "yyyy-MM-dd'T'HH:mm:ss.fffffK", | |
| "yyyy-MM-dd'T'HH:mm:ss.ffffK", | |
| "yyyy-MM-dd'T'HH:mm:ss.fffK", | |
| "yyyy-MM-dd'T'HH:mm:ss.ffK", |
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
| class Spec { | |
| [string]$url | |
| [string]$product | |
| Spec([string]$url, [string]$product) { | |
| $this.url = $url | |
| $this.product = $product | |
| } | |
| } |
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
| function Open-Exercise { | |
| param( | |
| [Parameter(ValueFromPipeline = $true, Mandatory = $false)] | |
| [string]$outputFromCommand | |
| ) | |
| Process { | |
| $goLandPath = "goland" | |
| Write-Host $outputFromCommand | |
| $path = $outputFromCommand -split "`n" | Select-Object -Last 1 |
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
| function Open-Exercise { | |
| param( | |
| [Parameter(ValueFromPipeline = $true, Mandatory = $false)] | |
| [string]$outputFromCommand | |
| ) | |
| Process { | |
| $goLandPath = "goland" | |
| Write-Host $outputFromCommand | |
| $path = $outputFromCommand -split "`n" | Select-Object -Last 1 |
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
| piVersion: v1 | |
| kind: Pod | |
| metadata: | |
| creationTimestamp: null | |
| labels: | |
| run: pod1 | |
| name: pod1 | |
| namespace: default | |
| spec: | |
| containers: |
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
| /* | |
| Have you ever played Minesweeper? Well, the goal of the game is to find all the mines within an MxN field. To help you, | |
| the game shows a number in a square which tells you how many mines there are adjacent to that square. For instance, take | |
| the following 4x4 field with 2 mines (which are represented by an * character): | |
| * . . . | |
| . . . . | |
| . * . . | |
| . . . . |
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
| kubeadm init --apiserver-advertise-address $(hostname -i) --pod-network-cidr 10.5.0.0/16 | |
| kubectl apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml | |
| kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/master/content/en/examples/application/nginx-app.yaml |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: your-deployment-name | |
| namespace: your-namespace | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: your-app |
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
| void Main() | |
| { | |
| var g = new Graph(); | |
| var p = new Player(); | |
| p.Location = g.Edges[3]; | |
| var destination = g.Nodes[0]; | |
| PathFinder finder = new PathFinder(); | |
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
| void Main() | |
| { | |
| var g = new Graph(); | |
| var p = new Player(); | |
| p.Location = g.Nodes[0]; | |
| var destination = g.Edges[3]; | |
| PathFinder finder = new PathFinder(); | |
| finder.FindPath(g, p.Location, destination).Dump(); |