Skip to content

Instantly share code, notes, and snippets.

@yangacer
yangacer / preview-event.html
Last active October 6, 2017 16:40
Preview event test sample
<html>
<style>
body {
display: flex;
flex-flow: row wrap;
}
.container {
width: 30%;
height: 400px;
#!/usr/bin/env python
def main():
years_remain = int(raw_input('Years remain: '))
rental_price = int(raw_input('Rental price (month): '))
construction_value = (rental_price * 12) / (1.0 / years_remain)
print 'Construction value: {:,}'.format(construction_value)
land_quota = float(raw_input('Land quota (m^2): '))
land_announced_value = int(raw_input('Land anno. valuation (/m^2): '))
land_value = (land_announced_value / 0.9) * land_quota
@yangacer
yangacer / cxx14-serialization.cpp
Created July 24, 2019 08:30
C++14 De/serialization structures made simple
#include <iostream>
#include <sstream>
#include <string>
#include <tuple>
template <size_t First, size_t Last>
struct ReadAux {
template <typename Tuple>
static auto& Exec(std::istream& os, Tuple&& args) {
os >> std::get<First>(args);