On a un problème de maximisation :
Max f(x1, x2, x3) = 1 x1 + 2 x2 + 3 x3
| sc : x1 + x2 <= 5
| 2 x2 + 5 x3 <= 6
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:/home/jpenuchot/node_modules/.bin:$HOME/.cargo/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" |
cmake_minimum_required(VERSION 2.8.9) | |
project(prog) | |
find_package(PkgConfig REQUIRED) | |
# Adding compiler optimizations | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -march=native") | |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") | |
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG") |
#include <iostream> | |
#include <limits> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cmath> | |
#include <queue> | |
using namespace std; | |
#define TABSIZE 4 |
cmake_minimum_required( VERSION 2.8.9 ) | |
project( Proj LANGUAGES CXX ) | |
# Compiler stuff | |
set( CMAKE_C_COMPILER /usr/bin/clang ) | |
set( CMAKE_CXX_COMPILER /usr/bin/clang++ ) | |
set( CMAKE_CXX_STANDARD 17 ) | |
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O3" ) |
So you want to decrypt switch content ? Well, the good news is that all the tools required to do that are written up! The great news is, since this is crypto we're talking about, you'll have to find the keys. Yourself. Like it's easter.
So here you can find a template of the $HOME/.switch/prod.keys
file that hactool uses to decrypt content. It contains all the SHA256 and location of the keys and seeds, so you can find them yourselves.
Note that all the seeds (the keys that end with _source
) are used along with the master_key_##
to derive an actual key.
If you have somehow obtained the key without the seed, you can rename xxx_source
to xxx_##
(where ## is the master key number) and put your key there.
#include <tuple> | |
#include <iostream> | |
int main() | |
{ | |
// Creates a tuple<float, int, std::string> object | |
auto tup = std::make_tuple(1.f, 10, "Hello !"); | |
// Apply the lambda with the members | |
// of the tuple as arguments |
#include <vector> | |
#include <numeric> | |
#include <utility> | |
#include <iostream> | |
#include <xsimd/xsimd.hpp> | |
using namespace std; | |
namespace xs = xsimd; |
. { | |
# DNS rewriting method (to connect using hostnames) | |
#rewrite name exact mco.lbsg.net <HOSTNAME> | |
# DNS host method (to connect using IP addresses) | |
hosts { | |
<IP> mco.lbsg.net | |
fallthrough | |
} |
#!/bin/sh | |
git clone https://gitlab.com/lock3/clang.git llvm-project | |
cd llvm-project | |
git checkout feature/metaprogramming | |
cd .. | |
mkdir -p build | |
cd build |