-
Win + R 并输入 services.msc, 开启 Remote Desktop Services
-
我的电脑 -> 属性 -> 远程桌面 -> 勾选
允许运行任意版本远程桌面的计算机连接
并 设置用户
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
string FormatTimeString(int ms) { | |
TimeSpan t = TimeSpan.FromMilliseconds(ms); | |
return $"{t.Hours:D2}h:{t.Minutes:D2}m:{t.Seconds:D2}s:{t.Milliseconds:D2}ms"; | |
} |
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
# reference: https://stackoverflow.com/questions/6027558/flatten-nested-dictionaries-compressing-keys | |
import collections | |
def flatten_nested_dict(d, parent_key='', sep='_'): | |
items = [] | |
for k, v in d.items(): | |
new_key = parent_key + sep + k if parent_key else k | |
if isinstance(v, collections.MutableMapping): | |
items.extend(flatten(v, new_key, sep=sep).items()) | |
else: |
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
# referenece: https://realpython.com/python-string-formatting/ | |
# 1. use % operator | |
'Hello, %s' % name | |
'Hey %s, there is a 0x%x error!' % (name, errno) | |
'Hey %(name)s, there is a 0x%(errno)x error!' % { "name": name, "errno": errno } | |
# 2. use `string.format` | |
'Hello, {}'.format(name) | |
'Hey {name}, there is a 0x{errno:x} error!'.format(name=name, errno=errno) |
-
Win + R 打开运行
-
输入 mstsc
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
string IntToMoney(int value) { | |
return $"$ {value:###,###}" | |
} |
-
Enable Pass Through
TickTrigger
Of Collider In Inspector -
Detect Collision Implement
OnTriggerEnter
method
private void OnTriggerEnter (Collider col) {
// do something
}
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
# Source https://51.ruyo.net/5369.html | |
# For Aliyun | |
## vim remove-aegis.sh | |
#!/bin/bash | |
## check linux Gentoo os | |
var=`lsb_release -a | grep Gentoo` | |
if [ -z "${var}" ]; then | |
var=`cat /etc/issue | grep Gentoo` | |
fi | |
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
Input.multiTouchEnabled = false; // disable |
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
// If using unity, find mainTemplate.gradle in `Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates` | |
// If want add other maven repo, find in `https://maven.aliyun.com/mvn/view` | |
buildscript { | |
repositories { | |
maven { url 'https://maven.aliyun.com/repository/google' } | |
maven { url 'https://maven.aliyun.com/repository/jcenter' } | |
// google() | |
// jcenter() | |
} |