Skip to content

Instantly share code, notes, and snippets.

View kemchenj's full-sized avatar
😵
拖延癌末期,不爱回复

Kem Chen kemchenj

😵
拖延癌末期,不爱回复
View GitHub Profile
@kemchenj
kemchenj / index.swift
Last active November 2, 2020 05:13
index
struct SampleCollection<C: RandomAccessCollection>: RandomAccessCollection {
let storage: C
let sampleInterval: Int
var startIndex: C.Index { storage.startIndex }
var endIndex: C.Index { storage.endIndex }
func index(before i: C.Index) -> C.Index {
if i == endIndex {
return storage.index(endIndex, offsetBy: -storage.count.remainderReportingOverflow(dividingBy: sampleInterval).partialValue)
} else {
var sessions = []
var sessionsNodes = document.querySelectorAll("#sessions section.video-container")
for (var i=0;i<sessionsNodes.length;i+=1) {
var section = sessionsNodes[i]
var date = section.querySelector("section.sticky section section section span span").textContent
var sessionsInDateNodes = section.querySelectorAll("ul.videos li.video div.grid div.row")
var sessionsInDate = []
@kemchenj
kemchenj / summary.md
Last active June 28, 2021 04:29
摘要
/*
See LICENSE folder for this sample’s licensing information.
Abstract:
Blur Detector Object.
*/
import AVFoundation
import Accelerate
import UIKit