Skip to content

Instantly share code, notes, and snippets.

View voldikss's full-sized avatar
💭
I may be slow to respond.

voldikss

💭
I may be slow to respond.
  • Shanghai
  • 12:59 (UTC -12:00)
View GitHub Profile
@voldikss
voldikss / fft.txt
Created May 16, 2018 03:21 — forked from MaskRay/fft.txt
FFT技巧
https://www.hackerrank.com/contests/w23/challenges/sasha-and-swaps-ii
感谢ftiasch老师教导,参考了 https://async.icpc-camp.org/d/408-fft 和其他一些地方的东西
P = 1e9+7
Q = ceil(sqrt(P))
a, b为两个向量
c = convolution(a, b)
c系数取值为 [0, n*(P-1)^2] 的整数,若n*(P-1)^2的表示需要超过53 bits(double mantissa)则很可能会出错
@voldikss
voldikss / AssemblyLanguage.md
Created October 20, 2017 08:48 — forked from v4lour/AssemblyLanguage.md
汇编语言(王爽著)笔记

汇编语言(王爽著)笔记

@v4lour

第一章 基础知识

汇编语言是直接在硬件上工作的编程语言,由以下3类指令组成:

  • 汇编指令:机器码的助记符,有对应的机器码
  • 伪指令:没有对应的机器码,由编译器执行
@voldikss
voldikss / actionlist.vim
Created August 15, 2019 05:03 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@voldikss
voldikss / effective_modern_cmake.md
Created February 29, 2020 13:49 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

" ============================================================================
" FileName: textobj.vim
" Author: voldikss <dyzplus@gmail.com>
" GitHub: https://github.com/voldikss
" ============================================================================
function! lib#textobj#(pattern) abort
let pos = getpos('.')
let lnum = pos[1]
let cnum = pos[2]
@voldikss
voldikss / floaterm_nested_pic.vimrc
Created August 27, 2020 02:34
The config used to generate floaterm's nested-nvim demo
set statusline=
set showtabline=0
set laststatus=0
set ruler!
set noshowmode
set noshowcmd
let g:floaterm_width = 0.8
let g:floaterm_height = 0.8
let g:floaterm_title = ''
augroup cmdline
@voldikss
voldikss / gh-check
Created January 22, 2021 05:35 — forked from lilydjwg/gh-check
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):

Some useful custom text objects for vim

Collection of my custom text objects I use quite often.

97975602 6e90ee00 1dda 11eb 9286 6894300457e3

Numbers

Put it into your .vimrc:

@voldikss
voldikss / asdf
Created September 3, 2021 11:18
asdf
asdf
@classDecFactory()
class Student {
@propertyDecFactory()
name: string
@methodDecFactory()
run(@parameterDecFactory() arg: string) {
console.log(arg)
}
}