Author: Chris Lattner
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
#include <optional> | |
#include <string> | |
#include <type_traits> | |
/** | |
@tparam T must be an Enum type. | |
@tparam C converter must have `toString` and `fromString` static methods | |
*/ | |
template<typename T, | |
typename C, |
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
def is_valid_state(state): | |
# check if it is a valid solution | |
return True | |
def get_candidates(state): | |
return [] | |
def search(state, solutions): | |
if is_valid_state(state): | |
solutions.append(state.copy()) |
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 SwiftUI | |
/// View model protocol | |
protocol ViewModel: ObservableObject { | |
var count: Int { get } | |
func increase() | |
} | |
/// Concrete implementation | |
class MyViewModel: ViewModel { |
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
template<typename T> | |
class Base | |
{ | |
public: | |
T someVariable; | |
}; |
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
// | |
// CoreDataController.swift | |
// | |
// Created by Keith Harrison http://useyourloaf.com | |
// Copyright (c) 2017 Keith Harrison. All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// 1. Redistributions of source code must retain the above copyright |
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
// | |
// SpinlockTestTests.swift | |
// SpinlockTestTests | |
// | |
// Created by Peter Steinberger on 04/10/2016. | |
// Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
// | |
import XCTest |
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
[+] Entered shellcode | |
[+] UID: 0, GID: 0 | |
[DIR]: . | |
[DIR]: .. | |
[DIR]: adm | |
[DIR]: app_tmp | |
[DIR]: data | |
[DIR]: dev | |
[DIR]: eap_user | |
[DIR]: eap_vsh |
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
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4 | |
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 | |
defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4 | |
defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 |
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
brew tap homebrew/versions | |
brew search gradle | |
brew install homebrew/versions/gradle112 | |
gradle -version | |
brew link --overwrite gradle112 | |
gradle -version |
NewerOlder