How to use the newly added dark mode system added in recent Windows 11 builds. They added a dark mode variant of almost every control.
Whether apps should use dark mode or not.
typedef bool (WINAPI* ShouldAppsUseDarkMode_t)(); // ordinal 132| # MIT License | |
| # Copyright (c) 2023 Dawid Goslawski | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| /** | |
| * | |
| * MIT License | |
| * | |
| * Copyright (c) 2017-2022 Cody Tilkins | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| """Provides a rule that outputs a monolithic static library.""" | |
| load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") | |
| TOOLS_CPP_REPO = "@bazel_tools" | |
| def _cc_static_library_impl(ctx): | |
| output_lib = ctx.actions.declare_file("{}.a".format(ctx.attr.name)) | |
| output_flags = ctx.actions.declare_file("{}.link".format(ctx.attr.name)) |
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.
Update system packages in Termux:
$ pkg update -y
В предыдущей серии мы изобретали нечто, называемое XXX_traits, где под XXX скрывается какой-то концепт. А сам трейт описывает, какие операции доступны для типов, реализующих данный концепт. И все взаимодействие с шаблонными параметрами происходило с помощью вспомогательной структуры.
template <class T, class S>
auto accumulate(const std::vector<T>& arr, S&& op)
-> RESULT<T>::REQUIRES<SummatorTraits<S>::value> {
using STraits = SummatorTraits<S>;| /* | |
| c++: 17 | |
| deps: | |
| - org.sw.demo.jtv.pqxx | |
| - org.sw.demo.apolukhin.magic_get | |
| */ | |
| #include <boost/pfr/precise/core.hpp> | |
| #include <pqxx/pqxx> |
В предыдущей серии мы пытались сделать нечто, напоминающее проверку концепции C++20 средствами C++14/17.
У нас была функция sum, от типов аргументов которой мы требовали применимости операции +.
И выглядело в конечном итоге это так:
template<typename T>
auto sum(T a, T b) -> RESULT::REQUIRES> {