- This is a work in progress.
- The content is optimized to retrieve necessary information quickly, so the content is in this single page, searchable by tags and using full-text search.
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
| fun main() { | |
| input.let(::calculatePassword) | |
| .let(::println) | |
| } | |
| fun calculatePassword(input: List<String>): Int = | |
| input.map(::parseMoveDelta) | |
| .scan(50) { position, delta -> | |
| normalize(position + delta) | |
| } |
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 Solution { | |
| fun increasingBST(root: TreeNode?): TreeNode? { | |
| val dummy = TreeNode(0) | |
| var current = dummy | |
| inorder(root) { node -> | |
| node.left = null | |
| current.right = node | |
| current = node | |
| } |
This document serves as a consolidated knowledge base for GCP PCD preparation and reference.
It includes concepts, best practices, and architectural details relevant to professional cloud developers.
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
| interface ApiSettings<T> | |
| @Component | |
| class TimeApiConfig(val someString: String = "SeeMeAvailableInInjectedInRuntime") : ApiSettings<String> | |
| @Component | |
| class OtherApiConfig : ApiSettings<Integer> | |
| @Service |
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 Main { | |
| public static void main(String[] args) { | |
| Exception exception = new Main().invokeTopLevel(); | |
| exception.printStackTrace(); | |
| } | |
| Exception invokeTopLevel() { | |
| return invokeSecondLevel(); |
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
| package main | |
| import "fmt" | |
| type FifthLevelA struct{} | |
| func (f FifthLevelA) ExecuteA() string { | |
| return "executed in fifth level" | |
| } |
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
| import os | |
| import sys | |
| import subprocess | |
| def handle_cd(args): | |
| target_dir = os.path.expanduser(args[0] if args else "~") | |
| try: | |
| os.chdir(target_dir) | |
| except OSError: |
NewerOlder