This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <condition_variable> | |
#include <mutex> | |
#include <thread> | |
#include <iostream> | |
#include <queue> | |
#include <chrono> | |
using namespace std; | |
class Queue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <condition_variable> | |
#include <mutex> | |
#include <thread> | |
#include <iostream> | |
#include <queue> | |
#include <chrono> | |
using namespace std; | |
class Queue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <condition_variable> | |
#include <mutex> | |
#include <thread> | |
#include <iostream> | |
#include <queue> | |
#include <chrono> | |
using namespace std; | |
class Queue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include <mutex> | |
#include <chrono> | |
std::mutex a_lock; | |
std::mutex b_lock; | |
void philosophe() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <queue> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
class Dish { | |
public: | |
virtual string name() =0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
class Service { | |
vector<string> menu; | |
vector<int> choices; | |
vector<string> plates; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cassert> | |
#include <vector> | |
using namespace std; | |
class Service { | |
vector<string> menu; | |
unsigned int places; | |
unsigned int available_places; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trying to build: | |
named!(no_compiler, | |
do_parse!( | |
length: be_u8 >> | |
bytes: take!(length) | |
) | |
); | |
you would get the following error |