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 <boost/current_function.hpp> // BOOST_CURRENT_FUNCTION | |
| #include <boost/predef.h> // checkXXX | |
| #include <boost/config.hpp> // buildEnvInfo | |
| #include <boost/version.hpp> // buildEnvInfo | |
| #include <iostream> | |
| struct App { | |
| void checkOs() { | |
| std::cout << BOOST_CURRENT_FUNCTION << std::endl; |
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
| /** | |
| * Understanding the New Set and Map Containers in the C++11 Standard Library | |
| * http://www.oracle.com/technetwork/articles/servers-storage-dev/new-set-and-map-containers-cpp11-2187367.html | |
| */ | |
| #include <iostream> | |
| #include <unordered_map> | |
| #include <unordered_set> | |
| #include <algorithm> | |
| int test_unordered_map() { |
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
| /** | |
| * gcc -std=gnu99 inotify.c | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <stdarg.h> | |
| #include <limits.h> |
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
| CC = gcc | |
| CFLAGS = -Wall | |
| CCLD = $(CC) | |
| define COMPILE_C | |
| $(CC) $(CFLAGS) -o $@ -c $< | |
| endef | |
| define LINK_EXECUTABLE | |
| $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) |
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
| PROJECT(sort) | |
| ADD_LIBRARY (pystring pystring.cpp) | |
| ADD_LIBRARY (sort sort.cpp ins.cpp merge.cpp) | |
| ADD_EXECUTABLE(test main.cpp) | |
| TARGET_LINK_LIBRARIES (test pystring sort) |
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
| package s.runcommand; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.widget.TextView; | |
| import java.io.BufferedInputStream; | |
| import java.io.BufferedOutputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; |
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 <limits> | |
| #include <sstream> | |
| #include <string> | |
| using namespace std; | |
| /** | |
| * This program helps to convert sorted numbers to counted numbers. | |
| * |
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
| #!/bin/bash | |
| infile="mylist.txt" | |
| verbose="warning" | |
| true > ${infile} | |
| for photo in *.JPG; do | |
| tag=$(exiv2 -K Exif.Image.ImageDescription pr "${photo}" 2>/dev/null | cut -b60-) | |
| case "${tag}" in |
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 <array> | |
| #include <vector> | |
| template <size_t M, size_t N, class T> | |
| using Matrix = std::array<std::array<T, N>, M>; | |
| template <size_t M, size_t N, class T> | |
| std::ostream& operator<<(std::ostream& os, Matrix<M, N, T>& matrix) { | |
| for (auto row = matrix.begin(); row != matrix.end(); row++) { |
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
| package com.simplo.netapp; | |
| public class RateStatistics { | |
| private int num_buckets_; | |
| private long[] buckets_; | |
| private long accumulated_count_; | |
| private long oldest_time_; | |
| private int oldest_index_; |