Skip to content

Instantly share code, notes, and snippets.

@Darktt
Darktt / 教學指南
Created September 18, 2025 01:53
swift-algorithms 教學指南
# Swift Algorithms 教學指南
本指南將帶您深入了解 Swift Algorithms 程式庫中的各種序列和集合演算法,並學習如何在實際專案中運用這些強大的工具。
## 目錄
1. [入門介紹](#入門介紹)
2. [安裝與設定](#安裝與設定)
3. [核心概念](#核心概念)
4. [分塊演算法 (Chunking)](#分塊演算法-chunking)
@Darktt
Darktt / AprilFoolEvent.py
Last active April 1, 2025 05:28
April Fool Event
class 說:
def __init__(self, value):
self.value = value
def 次(self, content):
for i in range(self.value):
print(i + 1, content)
說(100).次("I am developer")
#!/bin/bash
# https://www.pxqlvr.cc/h5/card/all?paramCode=RING_HINT
API_KEY="c79fe37edemsh165b76202e16625p1c775ajsnd00bc8f4cc15"
sendRequest() {
curl --request POST \
--url 'https://bin-ip-checker.p.rapidapi.com/?bin=111111' \
--header 'Content-Type: application/json' \
@Darktt
Darktt / DTReachability.swift
Created January 14, 2025 07:21
DTReachability
//
// DTReachability.swift
//
// Created by Darktt on 16/11/24.
// Copyright © 2016 Darktt. All rights reserved.
//
import Foundation
import Network
@Darktt
Darktt / NSAttributedStringExtension.swift
Created October 24, 2024 08:56
NSAttributedStringExtension
//
// NSAttributedStringExtension.swift
//
// Created by Darktt on 19/9/3.
// Copyright © 2019 Darktt. All rights reserved.
//
import Foundation
#if canImport(AppKit) && !targetEnvironment(macCatalyst)
@Darktt
Darktt / DTAnimationLabel.swift
Last active August 30, 2024 06:56
DTAnimationLabel
//
// DTAnimationLabel.swift
//
// Created by Darktt on 18/1/29.
// Copyright © 2018 Darktt. All rights reserved.
//
import UIKit
private let kMaximumTimes: Double = 100.0
@Darktt
Darktt / EventPublisher.swift
Created July 21, 2024 04:41
UIControlPublishers
//
// EventPublisher.swift
//
// Created by Darktt on 23/4/14.
// Copyright © 2023 Darktt. All rights reserved.
//
import UIKit.UIControl
import Combine
@Darktt
Darktt / DTCircleProgressView.swift
Created June 17, 2024 07:11
DTCircleProgressView
//
// DTCircleProgressView.swift
//
// Created by Darktt on 19/1/21.
// Copyright © 2019 Darktt. All rights reserved.
//
import UIKit
public class DTCircleProgressView: UIView
@Darktt
Darktt / DTButtonContentView.h
Created February 7, 2024 03:08
DTButtonContentView
//
// DTButtonContentView.h
//
// Created by Darktt on 16/11/17.
// Copyright © 2016 Darktt Personal Company. All rights reserved.
//
@import UIKit;
/**
@Darktt
Darktt / JSContextExtension.swift
Created January 19, 2024 06:07
JavaScriptCoreExtension
//
// JSContextExtension.swift
//
// Created by Darktt on 23/8/30.
// Copyright © 2023 Darktt. All rights reserved.
//
import JavaScriptCore
public