Start off with some Rust source code
hw.rs :
#[link(name = "extern")]
extern {
fn hello();
}
| I added these lines to near the top of CMakeLists.txt | |
| set(Qt5Core_DIR /Users/<username>/Qt5.4//5.4/clang_64/lib/cmake/Qt5Core) | |
| set(Qt5Gui_DIR /Users/<username>/Qt5.4//5.4/clang_64/lib/cmake/Qt5Gui) | |
| set(Qt5Xml_DIR /Users/<username>/Qt5.4//5.4/clang_64/lib/cmake/Qt5Xml) | |
| set(Qt5Widgets_DIR /Users/<username>/Qt5.4//5.4/clang_64/lib/cmake/Qt5Widgets) | |
| set(Qt5Test_DIR /Users/<username>/Qt5.4//5.4/clang_64/lib/cmake/Qt5Test) | |
| LINK_DIRECTORIES(/opt/local/lib) | |
| I removed support for GObject introspection (whatever that is??) |
| FROM ubuntu:16.04 | |
| MAINTAINER jxy | |
| RUN apt-get -y update && apt-get install -y dpkg-dev | |
| COPY usr/share/xyz/debs /debs | |
| WORKDIR /debs | |
| RUN dpkg-scanpackages -m . | gzip -c > Packages.gz | |
| RUN echo "deb [trusted=yes] file:///debs ./" > /etc/apt/sources.list.d/xyz.list | |
| RUN apt-get update |
| #!/usr/bin/awk -f | |
| # $ ./filter.awk filter_list data_file | |
| # http://stackoverflow.com/questions/14062402/awk-using-a-file-to-filter-another-one-out-tr | |
| BEGIN { | |
| FS=","; | |
| } | |
| FNR==NR { | |
| a[$0]; | |
| next | |
| } |
| #include <stdint.h> | |
| #include <iostream> | |
| #include <sstream> | |
| typedef struct pcap_hdr_s { | |
| uint32_t magic_number; /* magic number */ | |
| uint16_t version_major; /* major version number */ | |
| uint16_t version_minor; /* minor version number */ | |
| int32_t thiszone; /* GMT to local correction */ | |
| uint32_t sigfigs; /* accuracy of timestamps */ |
Start off with some Rust source code
hw.rs :
#[link(name = "extern")]
extern {
fn hello();
}
| #include <iostream> | |
| #include <dlib/statistics/dpca.h> | |
| #include <dlib/statistics/dpca_abstract.h> | |
| #include <dlib/matrix.h> | |
| #include <initializer_list> | |
| using namespace dlib; | |
| int main() |
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| typedef std::vector<uint8_t> choices_t; | |
| void printVec( choices_t& picked ) { | |
| for (uint8_t num : picked) cout << (int) num << " "; | |
| cout << "\n"; |
| Flattening Iterators | |
| ==================== | |
| Summary | |
| ------- | |
| This is an interator template that fits a pattern whereby you need to | |
| return a list of objects streamed out of a sorted list of files. | |
| For instance, the Bitcoin blockchain comes in block files (blk00000.dat). |
| txt_files := $(wildcard *.txt) | |
| int_files := $(txt_files:.txt=.int) | |
| hexdump_files := $(int_files:.int=.hexdump) | |
| all: | |
| echo $(txt_files) | |
| echo $(int_files) | |
| echo $(hexdump_files) | |
| $(hexdump_files): $(INT_FILES) |