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
// ES6 section 20.3.4.41.1 ToDateString(tv) | |
std::string ToDateString(double time_val, DateCache* date_cache, | |
ToDateStringMode mode = kDateAndTime) { | |
std::stringstream ss; | |
ss.sync_with_stdio(false); // to speed up by enabling buffering | |
if (std::isnan(time_val)) { | |
ss << "Invalid Date"; | |
return ss.str(); | |
} | |
int64_t time_ms = static_cast<int64_t>(time_val); |
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
SELECT Клиент.ФИО, SUM(ТоварыЗаказа.Цена) | |
FROM Клиент | |
INNER JOIN Заказ ON Клиент.КлиентID = Заказ.КлиентID | |
INNER JOIN ТоварыЗаказа ON ТоварыЗаказа.ЗаказID = Заказ.ЗаказID | |
WHERE Заказ.Дата >= '2013-12-01' AND | |
Заказ.Дата <= '2013-12-31' | |
GROUP BY Клиент.КлиентID | |
HAVING SUM(ТоварыЗаказа.Цена) >= 10000; |
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 <hpx/util/tuple.hpp> | |
#include <hpx/runtime/serialization/serialize.hpp> | |
#include <hpx/runtime/naming/name.hpp> | |
int main() | |
{ | |
std::vector<char> buf; | |
{ | |
hpx::serialization::output_archive oar{buf}; | |
hpx::util::tuple<hpx::naming::gid_type> tuple = |
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 <vector> | |
#include <numeric> | |
#include <algorithm> | |
#include <hpx/include/serialization.hpp> | |
#include <hpx/util/lightweight_test.hpp> | |
int main() | |
{ | |
static constexpr auto vector_size = HPX_ZERO_COPY_SERIALIZATION_THRESHOLD + 1u; |
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
template <class T> | |
auto futurized(const T& t) | |
{ | |
auto fut = hpx::async(...); | |
return fut.then( | |
[&t](auto){...}); | |
} | |
int main() | |
{ |
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
using namespace hpx::parallel; | |
std::vector<int> vec(20), vec1(20); | |
std::iota(std::begin(vec), std::end(vec), 0); | |
transform(std::cbegin(vec), std::cend(vec), std::begin(vec1), [](int n){ return n * 2; }); |
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
template <class T, class = void> | |
struct has_something: std::false_type {}; | |
template <class T> | |
struct has_something<T, void_t<decltype(std::declval<T>().something)> > : std::true_type | |
{ | |
}; |
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
#!/usr/bin/env ruby | |
require './color.rb' | |
require './os.rb' | |
def read_int_param(name, default) | |
param = default | |
if(ARGV.include?(name)) | |
idx = ARGV.index(name) | |
param = ARGV[idx+1].to_i | |
ARGV.delete_at(idx) |
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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | |
index 9460024..aa82dae 100644 | |
--- a/src/CMakeLists.txt | |
+++ b/src/CMakeLists.txt | |
@@ -6,7 +6,7 @@ | |
add_subdirectory(components) | |
-foreach(lib "hpx hpx_serialization") | |
+foreach(lib "hpx") |