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
""" | |
Convert a image syntax to mpe import style from markdown style. | |
![my-image.png](../image/my-image.png) | |
to | |
@import "../image/my-image.png" {alt="my-image.png"} | |
""" | |
import re | |
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
import string | |
def get_range_address(row, col): | |
"""Convert to range address string | |
ex) | |
(4, 1) => 'A4' | |
(1, 52) => 'AZ1' | |
Same as follows: |
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
@echo off | |
setlocal | |
:QUESTION | |
set answer= | |
set /p answer="Will you execute it? ([y]/n) : %answer%" | |
if "%answer%"=="" ( | |
echo "default start" | |
) else if "%answer%"=="y" ( | |
echo "start" |
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<typename T, std::size_t N> | |
std::size_t array_length(const T (&a)[N]) | |
{ | |
return N; | |
} | |
int main(int argc, char *argv[]) | |
{ |
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> | |
#include <vector> | |
int range_base_for_loop() | |
{ | |
std::vector<int> integers{2, 3, 5, 7, 13}; | |
for (auto&& x : integers) | |
{ | |
std::cout << "x = " << x << std::endl; | |
x += 1; |