Skip to content

Instantly share code, notes, and snippets.

View ttldtor's full-sized avatar
🎩
Sir Manticore

ttldtor ttldtor

🎩
Sir Manticore
View GitHub Profile
In file included from C:/msys64/mingw64/include/c++/14.1.0/bits/stl_construct.h:62,
from C:/msys64/mingw64/include/c++/14.1.0/bits/stl_iterator.h:78,
from C:/msys64/mingw64/include/c++/14.1.0/bits/ranges_base.h:37,
from C:/msys64/mingw64/include/c++/14.1.0/bits/ranges_util.h:34,
from C:/msys64/mingw64/include/c++/14.1.0/tuple:44,
from C:/msys64/mingw64/include/c++/14.1.0/functional:53,
from C:/w3/dxfeed-graal-cxx-api/include/dxfeed_graal_cpp_api/internal/CEntryPointErrors.hpp:12:
In function 'constexpr void std::__advance(_InputIterator&, _Distance, input_iterator_tag) [with _InputIterator = ranges::basic_iterator<ranges::adaptor_cursor<__detail::_Node_const_iterator<pair<const __cxx11::basic_string<char>, variant<dxfcpp::tools::ConnectTool, dxfcpp::tools::DumpTool, dxfcpp::tools::HelpTool, dxfcpp::tools::LatencyTest, dxfcpp::tools::PerfTestTool, dxfcpp::tools::QdsTool> >, false, true>, ranges::iter_transform
enum TimeZone { LOCAL, GMT };
// https://stackoverflow.com/a/58037981/21913386
// Algorithm: http://howardhinnant.github.io/date_algorithms.html
int daysFromEpoch(int y, int m, int d) {
y -= m <= 2;
int era = y / 400;
int yoe = y - era * 400; // [0, 399]
int doy = (153 * (m + (m > 2 ? -3 : 9)) + 2) / 5 + d - 1; // [0, 365]
int doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; // [0, 146096]
@ttldtor
ttldtor / lfll.rs
Last active March 29, 2024 18:04
Lock-free LinkedList in Rust
use std::sync::{Arc, atomic::{AtomicPtr, Ordering}};
use std::ptr;
struct Node<T> {
data: T,
next: AtomicPtr<Node<T>>,
}
pub struct LockFreeLinkedList<T> {
head: AtomicPtr<Node<T>>,
.POSIX:
.SUFFIXES:
.PHONY: all clean
OBJ = obj
BIN = bin
COMMON_CFLAGS = -O2 -DUSE_PTHREADS -std=c99 -D_POSIX_SOURCE \
-D_POSIX_C_SOURCE=200809L -fPIC -I../include
COMMON_LDFLAGS = -pthread
LIB_NAME = DXFeed
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <boost/variant.hpp>
#include <boost/variant2.hpp>
#include <iostream>
#include <memory>
#include <mutex>
#include <type_traits>
#include <variant>
struct Error {};
sudo apt-get install xrdp
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
bc1q779qrrmy22aqtvc00khnmefjuycprg292smpac.ttldtor5
attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct
gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact
cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc
ttctgcaggc tgcttacggt ttcgtccgtg ttgcagccga tcatcagcac atctaggttt
cgtccgggtg tgaccgaaag gtaagatgga gagccttgtc cctggtttca acgagaaaac
acacgtccaa ctcagtttgc ctgttttaca ggttcgcgac gtgctcgtac gtggctttgg
agactccgtg gaggaggtct tatcagaggc acgtcaacat cttaaagatg gcacttgtgg
cttagtagaa gttgaaaaag gcgttttgcc tcaacttgaa cagccctatg tgttcatcaa
acgttcggat gctcgaactg cacctcatgg tcatgttatg gttgagctgg tagcagaact
cgaaggcatt cagtacggtc gtagtggtga gacacttggt gtccttgtcc ctcatgtggg
#include <functional>
#include <iostream>
template<typename...Ts>
struct TypeList {
};
template<typename T, typename...Ts>
using Tail = TypeList<Ts...>;