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
| MIT License | |
| Copyright (c) [YEAR] [COPYRIGHT HOLDER] | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
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
| """ | |
| Convert a image syntax to mpe import style from markdown style. | |
|  | |
| to | |
| @import "../image/my-image.png" {alt="my-image.png"} | |
| """ | |
| import re | |
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
| 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 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
| @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 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> | |
| 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 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 <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; |