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 Foundation | |
public func IntPow(_ base: Int, exp: Int) -> Int { | |
guard exp >= 0 else { | |
return 0 | |
} | |
guard exp > 0 else { | |
return 1 | |
} | |
return (1..<exp).reduce(base) { (accu, _) in accu * abs(base) } |
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 XCTest | |
import xProcs | |
class IntTests: XCTestCase { | |
func testIntPow() { | |
XCTAssertEqual(IntPow(5, exp: 2), 25) | |
XCTAssertEqual(IntPow(5, exp: 1), 5) | |
XCTAssertEqual(IntPow(5, exp: 0), 1) | |
} |
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
// swift-tools-version:4.0 | |
// The swift-tools-version declares the minimum version of Swift required to build this package. | |
import PackageDescription | |
let package = Package( | |
name: "xProcs", | |
products: [ | |
// Products define the executables and libraries produced by a package, and make them visible to other packages. | |
.library( |
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
.DS_Store | |
/.build | |
/Packages | |
/*.xcodeproj | |
Package.resolved | |
!*.xcodeproj/project.pbxproj | |
!*.xcodeproj/xcshareddata/ | |
!*.xcodeproj/*_Info.plist |
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.Collections.Generic; | |
using Superpower.Model; | |
using Superpower.Parsers; | |
using Superpower; | |
using System; | |
namespace datavault.dsl { | |
class DataVaultTokenizer : Tokenizer<DataVaultToken> { |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1f8FlqHY9rraoXNiw56ESSl2WYM68j5sMruqLQe47Km1GOwCM3yeWUNKx+CKoDGHSyU4wxd9Dzs+JaCrhVdCF8rE5sqDxmK6d2fCIAHShlTs5vEfHqGbnKEipFptgMHvKE8+EHjR32bFzyjkOHzIiOtfs+9H69/OfvbLr3AcNvxAgtV8AM9hzXH8N7Qo5A6ZfI9UBtoFSTzUnKikh4Mw92+XDRDwraWMiEc/8TvVnfK7BX9d4NaKWfRwSh3qBCbh0wZhWBWRNdsX+YYrmmkyd6eVnkhEpnhbbNVbHw0xBScStqM/VuU4NVF6UJaZt9DRcq+UCwJz76KS2LTY75wjt [email protected] |
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.Collections.Generic; | |
using System.Linq; | |
using Nancy; | |
using Nancy.Bootstrapper; | |
using FeatureSwitcher; | |
using txs.nextgen.apigateway.todo; | |
namespace txs.nextgen.apigateway | |
{ |
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 AufnehmenAufgabe : IDomainCommand { | |
public Guid Id { get; } | |
public string Titel { get; } | |
public AufnehmenAufgabe(Guid id, string titel) | |
{ | |
Id = id; | |
Titel = titel; | |
} | |
} |
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
[Unit] | |
Description=Docker Socket for the API | |
[Socket] | |
ListenStream=2375 | |
BindIPv6Only=both | |
Service=docker.service | |
[Install] | |
WantedBy=sockets.target |
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 static ulong fib1(int n) | |
{ | |
ulong a = 0; | |
ulong b = 1; | |
for (int i = 0; i < n; i++) | |
{ | |
ulong temp = a; | |
a = b; | |
b = temp + b; | |
} |
NewerOlder