.Left: template component
.Right: Separated script component
Mapping Component on App.vue, the root component
.Left: template component
.Right: Separated script component
Mapping Component on App.vue, the root component
for an array of objects, to extract fields and map into a simpler array,
object : SomeObject = {a: 1, b:2, c:3}
array: SomeObject[] = ...
do:
newArray = array.map(x => ({x.a, x.b}))
instead of
newArray = array.map(x => {x.a, x.b})
Otherwise it doesn't work.
Reference:
"What you need to do is force the parser to treat the object literal as an expression so that it's not treated as a block statement. The trick is to add parentheses around the entire body: "
https://mariusschulz.com/blog/returning-object-literals-from-arrow-functions-in-javascript
Some issue faced with after creating new project the first time in Idea for Gradle-Kotlin project.
1. Make sure project root name consistent to package: src/main/kotlin/[packagename]/...
2. main() exist outside class
3. MainClass = [package].MainKt
The suffix Kt is required, or there will be a 'main() not exist in main class' error.
```
Windows Registry Editor Version 5.00
#https://superuser.com/questions/171917/force-a-program-to-run-without-administrator-privileges-or-uac
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker]
@="Run without privilege elevation"
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker\command]
@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""
```
This should be be used to install drivers or other software that actually need system mode access.
尋日搞python pip conda 好煩
pip 沒辦法安裝 scipy on M1 Mac
跟住見到教路如何清理pip cache
唔知頭唔知路,突然走左去跟 'git clean -f'
run 一次,當堂醒曬。
結語:
搞唔掂,用conda 算。
唔好亂跟。
# Install:
pip install --user pandoc-fignos pandoc-tablenos
# Usage:
## Command line:
pandoc ... --filter pandoc-xnos
## On markdown:
Add:
Table : This is a table {#tbl:id}
# Limitation:
- Generated number put captions above table. This is not the wanted style.
- For unknown reason, pandoc parser cannot recognize \rarr, while markdown-it previewer can.
做decryption exercise 用chr() 唔見有野出。原來result漏加base ascii code.
eg: 0 -> chr(0) is blank
x = 1+ ord('a') -> ch= chr(x) -> print(ch) -> 'b'