Skip to content

Instantly share code, notes, and snippets.

#include <condition_variable>
#include <mutex>
#include <thread>
#include <iostream>
#include <queue>
#include <chrono>
using namespace std;
class Queue {
@Geal
Geal / gist:31e7e11bba655d3c662e738043422d72
Last active September 22, 2022 13:36
bounded_producer.cpp
#include <condition_variable>
#include <mutex>
#include <thread>
#include <iostream>
#include <queue>
#include <chrono>
using namespace std;
class Queue {
#include <condition_variable>
#include <mutex>
#include <thread>
#include <iostream>
#include <queue>
#include <chrono>
using namespace std;
class Queue {
#include <iostream>
#include <thread>
#include <mutex>
#include <chrono>
std::mutex a_lock;
std::mutex b_lock;
void philosophe()
{
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
class Dish {
public:
virtual string name() =0;
@Geal
Geal / css.rs
Created February 10, 2018 22:02
#[macro_use]
extern crate nom;
use nom::is_hex_digit;
#[derive(Debug,PartialEq)]
pub struct Color {
pub red: u8,
pub green: u8,
pub blue: u8,
$ readelf -a hello.o
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Linux BPF
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Service {
vector<string> menu;
vector<int> choices;
vector<string> plates;
#include <iostream>
#include <cassert>
#include <vector>
using namespace std;
class Service {
vector<string> menu;
unsigned int places;
unsigned int available_places;
trying to build:
named!(no_compiler,
do_parse!(
length: be_u8 >>
bytes: take!(length)
)
);
you would get the following error