This file contains 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 bash | |
today=`date +%Y-%m-%d` | |
check_modify_time() { | |
file=$1 | |
modify_date=`stat $file | grep -i Modify | awk -F. '{print $1}' | awk '{print $2}'` | |
if [ ${today} = ${modify_date} ]; then | |
return 0 | |
fi |
This file contains 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> | |
template <size_t Input> | |
constexpr size_t OnesCount = (Input % 2) + OnesCount<(Input / 2)>; | |
template <> constexpr size_t OnesCount<0> = 0; | |
int main() { | |
std::cout << OnesCount<45> << std::endl; | |
return 0; |