wjswxp's repos on GitHub
Java · 18 人关注
netty-socks
A netty4-based socks5 repeater/server and shadowsocks repeater.
9 人关注
alfred-iterm2
A guide to use `>` with iTerm2 in Alfred 2.
PHP · 8 人关注
feishu-bot-sdk-php
A 3rd-party Feishu/Lark Bot SDK for PHP.
C++ · 5 人关注
judger
Yet another judge implement for oj.
C++ · 5 人关注
leetcode-solutions
leetcode a day, offers throw away.
Ruby · 1 人关注
alfred-process-killer
Process Killer is an Alfred 2 workflow that makes it easy to kill misbehaving processes. It is, in essence, a way to easily find processes by name and kill them using command `kill`.
Shell · 1 人关注
dotmy
个人开发环境配置
JavaScript · 1 人关注
http2socks-js
A HTTP tunnel proxy to SOCKS proxy. in Node.js.
0 人关注
Advanced-Bash-Scripting-Guide-in-Chinese
Advanced Bash-Scripting Guide(Revision 10)翻译计划
0 人关注
aria2
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
Ruby · 0 人关注
brew
:beer: The missing package manager for macOS
0 人关注
czkawka
Multi functional app to find duplicates, empty folders, similar images etc.
Rust · 0 人关注
date-cli.rs
"date" cmd alternative in rust.
0 人关注
dramatiq
A fast and reliable background task processing library for Python 3.
Java · 0 人关注
easydao
Java Package: A easy way to Spring JDBC.
0 人关注
gotify-server
A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
0 人关注
hsupu.github.io
Start a remarkable life here. \(≧▽≦)/
Python · 0 人关注
id3gbk
Convert text from GBK (disguised as latin1) to UTF-8 for ID3 tags.
Java · 0 人关注
incubator-dolphinscheduler
Dolphin Scheduler is a distributed and easy-to-extend visual workflow scheduling platform, dedicated to solving the complex dependencies in data processing, making the scheduling system out of the box for data processing.(分布式易扩展的可视化工作流任务调度)
Java · 0 人关注
junit-parallel-ext
A JUnit extension to enable parallel tests.
Vim script · 0 人关注
molokai
Molokai color scheme for Vim
Java · 0 人关注
mqc
A message queue consumer framework for Java.
0 人关注
mutagen-gbk
Python module for handling audio metadata. Support to fix broken charset encoding.
Java · 0 人关注
mybatis-3
MyBatis SQL mapper framework for Java
0 人关注
ntfy
Send push notifications to your phone or desktop using PUT/POST
0 人关注
ntfy-cli-rtfd
🖥️📱🔔 A utility for sending notifications, on demand and when commands finish.
C · 0 人关注
odhcpd
OpenWRT DHCP Server.
Makefile · 0 人关注
openwrt-vm-tools
vmware tools open-vm-tools for OpenWRT, segfault and crashes free😊😊
0 人关注
osmc
OSMC (Open Source Media Center) is a free and open source media center distribution
0 人关注
pmon-ls2k
Universal PMON source for LS2K targets
wjswxp

wjswxp

I AM NOT A.I.
V2EX 第 109718 号会员,加入于 2015-04-08 02:36:37 +08:00
软件重构工程师。
根据 wjswxp 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
wjswxp 最近回复了
嗐,有些匹配但又不十分匹配,比如做过 Win32 Driver 但对 Linux Kernel 只有迁移知识。感觉远程是很难了。
312 天前
回复了 wjx0912 创建的主题 FFmpeg ffmpeg 最近大版本发布为啥这么快
突发奇想:当公告完某版本起删除废弃功能后,快速提升大版本可以迅速甩掉他们( doge
2022-03-06 13:15:00 +08:00
回复了 fengsien1999 创建的主题 PowerShell 现在 PowerShell 是不是没有什么用?
又想到一个例子 2333

```ps1
$files = Get-Item -Path "."
# foreach..in 和 ForEach-Object 的语法(和效率)是两回事,参见 "about_Foreach"
foreach ($file in $files) {
# 这里是和其他字符串替换略有不同的地方,pwsh 不提供单独的 ${file.Name} 写法
Write-Host "name=$($file.Name)"
}
```
2022-03-06 13:07:51 +08:00
回复了 fengsien1999 创建的主题 PowerShell 现在 PowerShell 是不是没有什么用?
> 个人认为用作交互式 shell 不好用,但是写脚本还是有用的

同感。pwsh 相比 bash 有参数的类型系统,不必借助 sed awk 能够处理字符串,写起来也感觉更可靠。

但语法不统一的问题,使学习过程很令人迷惑。

举几个例子:

```ps1
# 借助 C# String 类型的方法
if ([string]::IsNullOrEmpty($s)) {
$s = "default-value"
}

# 使用 PowerShell 内置操作符的写法不同 -match
if ($s -match $regex_pattern) {
# use $Matches
}

# 没有比较直觉的 "==" 而是 "-eq"(一致却不常规
if ($s -eq "sth") {
# ...
}

# 调用 PowerShell Cmdlet 的传参写法又有不同
# 为了使用内一表达式其结果(这里取反),要用 () 或 $() 包起来
if (-not (Test-Path -Path "path/to/not-exist")) {
# ...
}

# 如果想在传参时写表达式,同上,要用 () $() 包起来
$a = Join-Path -Path (Resolve-Path -Path ".") "filename"
```

```ps1
# 这里的 Add() 不 Out-Null 会 Out-Default ,如果在脚本的最外层那就是向 stdout 输出
$dict = [System.Collections.Generic.Dictionary[string, string]]::new()
$dict.Add("key", "value") | Out-Null

# pwsh 函数的返回值就是函数内的输出,参见文档 "about_Return"
function foo() {
# 赋值语句不会 Out-Default
$s = "Hello"
# 结尾没有 ";" 的表达式会 Out-Default
$s
# return 仅表示跳出
return
}
$a = foo() # "Hello"

# 但是在 PowerShell 5 起引入了 class 支持,在 class 里 return 符合常规编程语言的直觉
# 看文档吧 "about_Classes"
```
2021-08-27 18:20:27 +08:00
回复了 chencc48111 创建的主题 分享发现 Onenote 几个不能忍的点
OneNote 无法轻易修改内容格式,直接劝退
2021-07-02 13:00:55 +08:00
回复了 wasd6267016 创建的主题 问与答 极米投影仪不要升级系统!卡爆
要是有 root 的方法就好了
2021-05-14 08:54:27 +08:00
回复了 panky 创建的主题 创业组队 [搭团队] 开发 App,找后端研发加入
nulladmin at 163 dot com
2021-02-26 13:05:25 +08:00
回复了 yeqizhang 创建的主题 问与答 经常会纠结一些名词怎么办
不受管理的内存叫泄露可能是不准确,只是个惯用语?击穿也许只是形象的用法,因为也会说“把流量打到某台机器上”。对名词敏锐希望表述更精确是好事呀。
2021-02-04 14:49:25 +08:00
回复了 formulahendry 创建的主题 酷工作 微软,招 Java 了!
据我所知是因为要改开源项目才有这种岗位需要。.net 本身一直在用甚至与 cpp 嵌套着用,而且虽然国内生态奇怪了一点,国际上使用还蛮多的。此外,pwsh 它不香吗?
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   896 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 289ms · UTC 19:58 · PVG 03:58 · LAX 12:58 · JFK 15:58
Developed with CodeLauncher
♥ Do have faith in what you're doing.