- 輸入符號為
+
-
*
/
(
)
- 輸入數字皆為
實數
- 製作包含括弧,考慮四則運算邏輯的計算機
- 輸入皆為合法算式,無須考慮算式錯誤
- 運算元之間皆以空格
- 運算元可為負數 (如:
1 * -3
)
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
localeIdentifier | Description | |
---|---|---|
af | Afrikaans | |
af-NA | Afrikaans (Namibia) | |
af-ZA | Afrikaans (South Africa) | |
agq | Aghem | |
agq-CM | Aghem (Cameroon) | |
ak | Akan | |
ak-GH | Akan (Ghana) | |
am | Amharic | |
am-ET | Amharic (Ethiopia) |
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
CountryCode | Description | |
---|---|---|
AD | Andorra | |
AE | United Arab Emirates | |
AF | Afghanistan | |
AG | Antigua and Barbuda | |
AI | Anguilla | |
AL | Albania | |
AM | Armenia | |
AN | Netherlands Antilles | |
AO | Angola |
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
.PHONY = inc | |
COUNTER_FILE = COUNTER | |
SOURCE_COUNTER = if [[ ! -e $(COUNTER_FILE) ]]; then touch $(COUNTER_FILE); fi; set -a; source $(COUNTER_FILE); | |
inc: | |
@$(SOURCE_COUNTER) \ | |
echo $$COUNTER; \ | |
echo 'export COUNTER='$$((COUNTER + 1)) > $(COUNTER_FILE) |
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
/** | |
* According to the example, we can know that Object-Destructuring | |
* has a left-to-right order (doesn't checked is it related to | |
* transpiler or is standard). | |
*/ | |
class Test { | |
get prop1 () { | |
this._prop2 = 'prop2' | |
return (this._prop1 = 'prop1') |
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
[alias] | |
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' | |
lga = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
range = show --oneline --quiet | |
tracked = ls-files --stage | |
untracked = ls-files --exclude-standard --others | |
ignored = ls-files --ignored --exclude-standard --others | |
conflicts = diff --name-only --diff-filter=U |
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
#!/bin/bash | |
REMOVE_DIRS=$(ls -d $(yarn cache dir)/* | grep $@) | |
if [ -z REMOVE_DIRS ]; then | |
echo Empty | |
else | |
for dir in $REMOVE_DIRS; do | |
read -p "rm -rf $dir? " -n 1 -r | |
echo # Present a newline |
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
[alias] | |
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' | |
lga = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
range = show --oneline --quiet | |
tracked = ls-files --stage | |
untracked = ls-files --exclude-standard --others | |
ignored = ls-files --ignored --exclude-standard --others |
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 <iomanip> | |
class Tromino { | |
public: | |
static int* Solve(int m, int block) { | |
int width = static_cast<int> (pow(2, m)); | |
int *matrix = new int[width * width] {0}; | |
n_ = 1; |
NewerOlder