Please explain in detail what will happen if the following program is executed:
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
}
Did you ever run into some issue where a job would behave slightly different in you CI environment than on your local machine? Did you ever wish you could run just a few commands in a shell on your build machine?
These are, of course rhetorical questions. And if you're using Github Actions to run your CI jobs, you'll have noticed that this use case is not supported at all. Can't create a nice walled garden if anyone could just run a CI job, after all. There are some workarounds (e.g. https://github.com/nektos/act), but since they're not officially supported they can be a bit unstable. Also, even they usually don't reproduce the exact environment found on github's servers.
Did you ever run into some issue where a job would behave slightly different in you CI environment than on your local machine? Did you ever wish you could run just a few commands in a shell on your build machine?
These are, of course rhetorical questions. And if you're using Github Actions to run your CI jobs, you'll have noticed that this use case is not supported at all. There are some workarounds (e.g. https://github.com/nektos/act), but since they're not officially supported they can be a bit unstable. Also, even they usually don't reproduce the exact environment found on github's servers.
Problem 5 of the Google Code Jam 2020 qualifiers was to construct a N-by-N matrix with trace K, where each row and each column contains every number between 1 and N exactly once (aka a latin square).
The official write-up is pretty sparse, omitting the key insights of how to generate a valid trace pattern for K and how to extend the trace pattern to get a valid partial
#include <assert.h> // needed by vacuum.h | |
#include <atomic> | |
#include <cuckoofilter.h> | |
#include <xorfilter.h> | |
#include <iostream> | |
#include <morton_filter.h> | |
#include <ostream> | |
#include <random> | |
#include <string> | |
#include <thread> |
# A turing machine simulator implemented in pure GNU Make. | |
# (written for HackoverCTF 2018 organised by cyclopropenylidene) | |
blank = | |
space = $(blank) $(blank) | |
ascii-expand = \ | |
$(subst .,. ,\ | |
$(subst _,_ ,\ | |
$(subst 1,1 ,\ |
# Solving CTF challenges often involves a lot of work, which is very unfair to | |
# lazy competitors. | |
# | |
# To even things out, we designed this self-solving challenge: | |
# Just type `make flag` and make yourself a coffee while the solution is | |
# computed. | |
# | |
# | |
# Congratulations to all solvers! Writeups: | |
# https://github.com/EmpireCTF/empirectf/blob/master/writeups/2018-10-05-Hackover-CTF/README.md#500-reverse--flagmaker |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
// Implementation of a TLS "server" that sends an empty server | |
// certificate to clients that try to connect. |
# *************************************************************************** | |
# * (c) Benno Evers (bennoe@apache.org) 2019 * | |
# * * | |
# * This file is part of the FreeCAD CAx development system. * | |
# * * | |
# * This program is free software; you can redistribute it and/or modify * | |
# * it under the terms of the GNU Lesser General Public License (LGPL) * | |
# * as published by the Free Software Foundation; either version 2 of * | |
# * the License, or (at your option) any later version. * | |
# * for detail see the LICENCE text file. * |