Forwarded from 「VoP」維尼之聲 - Voice of Pooh🔊
===== 评论区 =====
钰: 👍
Shilier Ra...: Taiwanese Mandarin 翻译为“臺灣正體“更恰当一些
Caleb: 小粉红用不到notepad++
Hifumi Tak...: 台湾普通话可还行🤣🤣有一说一,notepad++真的好使
新津暴徒 孙笑川: 建议粉红程序员转行嗷
duangsuse: 作为程序员不支持,老祖宗的规矩还真不应该随便改。
zh_CN 和 zh_TW *明明* 都是中文,弄个 Chinese 和 Taiwanese 让人感觉莫名其妙。
钰: 👍
Shilier Ra...: Taiwanese Mandarin 翻译为“臺灣正體“更恰当一些
Caleb: 小粉红用不到notepad++
Hifumi Tak...: 台湾普通话可还行🤣🤣有一说一,notepad++真的好使
新津暴徒 孙笑川: 建议粉红程序员转行嗷
duangsuse: 作为程序员不支持,老祖宗的规矩还真不应该随便改。
zh_CN 和 zh_TW *明明* 都是中文,弄个 Chinese 和 Taiwanese 让人感觉莫名其妙。
PowerEditor/installer/nativeLang/chinese.xml → PowerEditor/installer/nativeLang/taiwaneseMandarin.xml
PowerEditor/installer/nsisInclude/langs4Installer.nsh
PowerEditor/installer/nsisInclude/langs4Npp.nsh
PowerEditor/src/Parameters.cpp
PowerEditor/src/localizationString.h
总体来看改的不多,大概就是一个文件重命名和 GUI text (language display name,这个还是蛮特殊的) 的修改
咳咳,是这样的。 installer 会多 delete 一个因为他把原来统一的一种语言翻译分割为两个文件了 不对,因为 Chinese 默认指 traditional 所以搞错了,我以为可以写在一起的。
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8039 比如这个 🤔
所以到底就是重命名而已,模块分 NsInstaller 和 PowerEditor 两个。
Installer nsh 改了 LangString , Npp nsh 里 UI entry + CopyFiles 里两个,最后完整安装流程也是有 DeleteFile 的
Parameters.hpp
struct initializer
PowerEditor/installer/nsisInclude/langs4Installer.nsh
PowerEditor/installer/nsisInclude/langs4Npp.nsh
PowerEditor/src/Parameters.cpp
PowerEditor/src/localizationString.h
总体来看改的不多,大概就是一个文件重命名和 GUI text (language display name,这个还是蛮特殊的) 的修改
咳咳,是这样的。 installer 会多 delete 一个
taiwaneseMandarin.xml ,https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8039 比如这个 🤔
所以到底就是重命名而已,模块分 NsInstaller 和 PowerEditor 两个。
Native-Langue name="台灣繁體" filename="taiwaneseMandarin.xml" 这是翻译文件里的定义Installer nsh 改了 LangString , Npp nsh 里 UI entry + CopyFiles 里两个,最后完整安装流程也是有 DeleteFile 的
Parameters.hpp
if (localizationCode == TEXT("zh-tw") || ...)
return TEXT("taiwaneseTraditional.xml");
localizationString.hstruct initializer
{TEXT("台灣繁體"), TEXT("taiwaneseMandarin.xml")}GitHub
Update chineseSimplified.xml by popcorner · Pull Request #8039 · notepad-plus-plus/notepad-plus-plus
make the translation file up to date
git config --global http.proxy http://localhost:12333[DuangSUSE@duangsuse]~/Projects%
git clone https://github.com/duangsuse/notepad-plus-plus.git
正克隆到 'notepad-plus-plus'...remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
接收对象中: 16% (5818/36362), 7.02 MiB | 1.72 MiB/s
草总算能下了
Parameters.hpp
3769 行
改掉所谓的『台湾繁体』,反正都是弱智级别的 literal string (
PowerEditor/installer/nsisInclude/langs4Installer.nsh: (诡异的是,installer 定义里写的明明白白TRADCHINESE,他们偏偏要弄什么 Taiwanese Chinese,自己没注意到么?这是接口问题不是政治问题
3769 行
generic_string NppParameters::getLocPathFromStr(const generic_string & localizationCode)
2798 return TEXT("taiwaneseMandarin.xml"); 改成 return TEXT("chineseTridational.xml");
localizationString.h改掉所谓的『台湾繁体』,反正都是弱智级别的 literal string (
const char[N]) 替换。grep -r taiwanese 然后改 installerPowerEditor/installer/nsisInclude/langs4Installer.nsh: (诡异的是,installer 定义里写的明明白白TRADCHINESE,他们偏偏要弄什么 Taiwanese Chinese,自己没注意到么?这是接口问题不是政治问题
LangString langFileName ${LANG_TRADCHINESE} "taiwaneseMandarin.xml"
PowerEditor/installer/nsisInclude/langs4Npp.nsh:CopyFiles "$PLUGINSDIR\nppLocalization\taiwaneseMandarin.xml" "$INSTDIR\localization\taiwaneseMandarin.xml"PowerEditor/installer/nsisInclude/langs4Npp.nsh:
Delete "$INSTDIR\localization\taiwaneseMandarin.xml"${MementoUnselectedSection} "Chinese (Traditional)" chineseTraditional
CopyFiles "$PLUGINSDIR\nppLocalization\chineseTraditional.xml" "$INSTDIR\localization\chineseTraditional.xml"
${MementoSectionEnd}
${MementoUnselectedSection} "Chinese (Simplified)" chineseSimplified
CopyFiles "$PLUGINSDIR\nppLocalization\chineseSimplified.xml" "$INSTDIR\localization\chineseSimplified.xml"
(这段是相应 installer script)不对,而且上面那个 uninstaller 有 bug 吧……CopyFiles "$PLUGINSDIR\nppLocalization\chineseTraditional.xml" "$INSTDIR\localization\chineseTraditional.xml" 你看,这个带
if 的安装过程最后移除过程,还算是好看
Delete "$INSTDIR\localization\chineseTraditional.xml" Parameters.cpp 和 localizationString.h 里的return TEXT("chineseTridational.xml");
{TEXT("正體中文"), TEXT("chineseTridational.xml")} chineseTraditional.xml里的
<Native-Langue name="正體中文" filename="chineseTraditional.xml" version="7.8.6">Author: Don HO <don.h@free.fr>
Date: Thu Apr 9 00:04:13 2020 +0200
Changes localization file name "chinese.xml" to "taiwaneseMandarin.xml"
Saying Taiwan is part of China is like saying Java is part of JavaScript.
🤔怎么写 commit message 好呢
Changes localization file name "chinese.xml" back from "taiwaneseMandarin.xml"
Saying Traditional Chinese is basically different from Simplified Chinese
is likely saying ([''] != 0) in JavaScript
is likely saying Hong Kong is a part of Taiwan
Fix unnecessary Delete (chinese.xml) in langs4Npp.nsh
[master 419e0cf6] Changes localization file name "chinese.xml" back from "taiwaneseMandarin.xml"
5 files changed, 7 insertions(+), 8 deletions(-)
rename PowerEditor/installer/nativeLang/{taiwaneseMandarin.xml => chineseTraditional.xml} (99%)
总结一下。
1. installer resources 里的语言文件,只需重命名(包含文件内部的文件名…)
2. langs4Installer.nsh, langs4NPP.nsh
3. Parameters.cpp, localizationString.h
duangsuse::Echo
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8104 #GitHub
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8104#issuecomment-612408059 #China #GitHub
I see your view-point, though I don't agree with you.
It's an open source project so you can fork this project, and do things in your way in your repository.GitHub
Changes localization name back from "taiwaneseMandarin.xml" by duangsuse · Pull Request #8104 · notepad-plus-plus/notepad-plus…
So, Hong Kong is using Chinese Traditional now, is HK a part of Taiwan?
Or have they need to use "台灣繁體" instead of "香港繁體"?
I'm a radical Honkongness, so ...
Or have they need to use "台灣繁體" instead of "香港繁體"?
I'm a radical Honkongness, so ...
duangsuse::Echo
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/8104#issuecomment-612408059 #China #GitHub I see your view-point, though I don't agree with you. It's an open source project so you can fork this project, and do things in your way in your repository.
donho.github.io
CV - Don HO
http://suggestion.baidu.com/su?&wd=不同意的
npm install -g gbk-dict (屑百度默认 GBK
["不做了怎么跟老板说","不做了睡大觉","不做了我要走打一字","不做了老板不发工资怎么办","不做了营业执照要注销吗","不做软饭男","不做了,清仓处理广告语","不做了股份可以退的吗","不做了亏本甩卖广告词","不做了直接走可以吗"]
window.baidu.sug({q:"别看",p:false,s:["别看今天闹得欢就怕将来","小兵张嘎别看今天闹得欢就怕将来","别看我只是一只羊","别看今天闹得欢
["那些错误执行者"]
["不仅在于找准了合作之道,关键在于找准了合作之道","一个国家的文化底蕴是否深厚,不仅在于","驾驶的乐趣不仅在于","清明节的意义不仅在于"]
["全世界都在笑qf话","全世界都在笑我太痴","全世界都在笑特朗普","全世界都在笑我","全世界都在笑中国人傻歌曲","全世界都在笑只有我听不见","全世界都在笑我说说","全世界都在笑话我们吃不起肉了","全世界都在笑只有你在哭"]
function baiduSuggest() {
node -e 'var text=process.argv[1]; console.log((text.match(/s:(.*)}/) || [null,text]) [1])' `curl -s "http://suggestion.baidu.com/su?ie=utf-8&wd=$1"`
} for wd in 不同意的 不做了 别看 那些错误 不仅在于 全世界都在笑 这个宇宙太疯狂; do; baiduSuggest $wd ; done
window.baidu.sug({q:"不同意的",p:false,s:["不同意的英文","不同意的请举手","不同意的请举手["不做了怎么跟老板说","不做了睡大觉","不做了我要走打一字","不做了老板不发工资怎么办","不做了营业执照要注销吗","不做软饭男","不做了,清仓处理广告语","不做了股份可以退的吗","不做了亏本甩卖广告词","不做了直接走可以吗"]
window.baidu.sug({q:"别看",p:false,s:["别看今天闹得欢就怕将来","小兵张嘎别看今天闹得欢就怕将来","别看我只是一只羊","别看今天闹得欢
["那些错误执行者"]
["不仅在于找准了合作之道,关键在于找准了合作之道","一个国家的文化底蕴是否深厚,不仅在于","驾驶的乐趣不仅在于","清明节的意义不仅在于"]
["全世界都在笑qf话","全世界都在笑我太痴","全世界都在笑特朗普","全世界都在笑我","全世界都在笑中国人傻歌曲","全世界都在笑只有我听不见","全世界都在笑我说说","全世界都在笑话我们吃不起肉了","全世界都在笑只有你在哭"]
https://airethuele.github.io/WongChiFung-Accelerator/ #China #bear #web #drawing
总结:
事件参数 🤔 啊,才想起来
function() {
if (!event.target.files[0]) return false
ctx.clearRect(0, 0, 701, 701)
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.drawImage(bg, 0, 0);
var reader = new FileReader()
reader.readAsDataURL(event.target.files[0])
reader.onload = function() {
var ru = new Image();
ru.src = event.target.result
ru.onload = function() {
ctx.setTransform(1, -0.045, 0, 1, 0, 0);
ctx.drawImage(ru, 0, 0, ru.width, ru.height, 53, 342, 453, 259)
}
}
} 总结:
FileReader readAsDataURL ,然后 img.src = event.target.result 事件参数 🤔 啊,才想起来
event.target 是 event 的 receiver DOMElement… 就是 Qt 里 slot 函数被调用的 this…#web #PLT #JavaScript #zhihu https://www.zhihu.com/question/385711203#write
牛逼啊,竟然还扯出了 extonic object, 稀疏数组, 2^53-1 一大堆术语
牛逼啊,竟然还扯出了 extonic object, 稀疏数组, 2^53-1 一大堆术语
Zhihu
为什么js没有array初始大小和扩容的概念? - 知乎
在谈论js时,很少听人谈论array,object等引用型数据类型初始大小以及扩容的问题?这是为什么?也没有听…
duangsuse::Echo
https://www.pythonhunter.org/episodes/ep11
#PLT #Python #parsing 快看
http://news.sciencenet.cn/htmlnews/2020/1/434911.shtm
Lark - a modern parsing library for Python
PLY (Python Lex-Yacc)
https://en.wikipedia.org/wiki/Lambda_lifting
一句话总结:把不支持 (相对的)local function 化为 global function,可能需要把 free var 变成 parameter。 可能是被用于对 no first-class closure 低级化的。
https://stackoverflow.com/questions/1233448/no-multiline-lambda-in-python-why-not
一句话总结:
https://github.com/tiangolo/fastapi
一句话:基于 Python type hints ,支持 Go 和 NodeJS
https://github.com/vstinner/bytecode
一句话:生成和修改 Python bytecode
https://docs.python.org/3/library/ast.html
https://bgm.tv/subject/271145 一句话:大概是BGM 来源?
红姐说《刀剑神域》是引他加入 CS 的一个契机,开始别人让他做 Hanoni 但没有引起他的兴趣
http://news.sciencenet.cn/htmlnews/2020/1/434911.shtm
Lark - a modern parsing library for Python
PLY (Python Lex-Yacc)
https://en.wikipedia.org/wiki/Lambda_lifting
一句话总结:把不支持 (相对的)local function 化为 global function,可能需要把 free var 变成 parameter。 可能是被用于对 no first-class closure 低级化的。
https://stackoverflow.com/questions/1233448/no-multiline-lambda-in-python-why-not
一句话总结:
apply(lambda x: y = x+1; return y, 2) 这对 Python 的 layout parsing 策略有很大破坏,而且完全可以用 local def 的https://github.com/tiangolo/fastapi
一句话:基于 Python type hints ,支持 Go 和 NodeJS
https://github.com/vstinner/bytecode
一句话:生成和修改 Python bytecode
https://docs.python.org/3/library/ast.html
https://bgm.tv/subject/271145 一句话:大概是
红姐说《刀剑神域》是引他加入 CS 的一个契机,开始别人让他做 Hanoni 但没有引起他的兴趣
GitHub
GitHub - lark-parser/lark: Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity. - lark-parser/lark
duangsuse::Echo
#PLT #Python #parsing 快看 http://news.sciencenet.cn/htmlnews/2020/1/434911.shtm Lark - a modern parsing library for Python PLY (Python Lex-Yacc) https://en.wikipedia.org/wiki/Lambda_lifting 一句话总结:把不支持 (相对的)local function 化为 global function,可能需要把 free var 变成…
“他们不需要去分析 scoping,他们不需要知道什么是 free var 什么是 local var” 🤔
其实我之前也在想这个问题
所以现在我给 ParserKt 设计了 LexicalScopedPattern ,我很想利用 ParserKt 的可扩展性完成一遍做完所有事情的操作
但目前还没实现,对 incremental parsing 我也很迷,好像需要
其实我之前也在想这个问题
所以现在我给 ParserKt 设计了 LexicalScopedPattern ,我很想利用 ParserKt 的可扩展性完成一遍做完所有事情的操作
但目前还没实现,对 incremental parsing 我也很迷,好像需要
SortedSet (还是叫 TreeSet 好吧……)如果有了 LexicalScopedPattern,很轻松就能创建调用栈了,很轻松就可以实现 Scheme 了,啊…… 直接一步登天实现 Lexical Scoping