text:
package manager not found using create-lunaria

┌  create-lunaria
│
◇  Which @lunariajs package would you like to set up?
│  @lunariajs/core
│
◇  Where should we set up Lunaria?
│  ./lunaria
│
◇  Does your project use TypeScript?
│  Yes
│
◇  Do you wish to install @lunariajs/core and its dependencies?
│  Yes
└  Could not find your package manager. Setup wizard cancelled.

npm ERR! code 1
npm ERR! path /Users/alexanderniebuhr/Developer/tmp
npm ERR! command failed
npm ERR! command sh -c create-lunaria

npm ERR! A complete log of this run can be found in: /Users/alexanderniebuhr/.npm/_logs/2023-11-23T09_54_33_434Z-debug-0.log

The create-lunaria wizard was deprecated in favor of lunaria init, this shouldn't be an issue anymore. Thanks for reporting!

authors: Yan-Thomas alexanderniebuhr

repo: Yan-Thomas/lunaria


text:
模型训练

请问有模型训练的代码吗？

同求

source: gharchive/issue

repo: YaoFANGUK/video-subtitle-generator

license_type: permissive

license_source: github-api


text:
[Build 525] HTML5 player reloads when forcing the flash player

When forcing the flash player, every time you load a video, a couple of seconds of it play in the new player, then it reloads and shows the flash player. This is mildly annoying, but I'm afraid it might be eating up resources that shouldn't even be a concern. Then again, I don't know much about this so I could be entirely wrong.

That is intentional and is not a bug. YouTube is automatically loading the HTML5 player, but your extension doesn't force Flash Player until the page stops loading. You should really be using the HTML5 player though, as it has the benefit of letting you watch videos at higher frame rates, instead of just a fixed 30fps.

The only reason I'm not using the HTML5 player is that it doesn't allow the progress bar to hide, and therefore I can only watch a letterboxed version of the video instead of the size I'm currently using with the flash player.

@Pikachuy It hides for me. If it's not disappearing, just move your cursor around the player, then move it off and it should disappear. Make sure you've also set the option to hide the progress bar. HTML5 player is superior to Flash, due to high fps playback, so you should definitely be using it over Flash. :)

In the HTML5 player there is a great problem with tearing (a problem with the vertical sync), if the Windows user is not used (disabled) Aero style. Aero style is bullshit, which immediately disable the normal people
Thus HTML5 player shit, that's why I only use the Flash Player, which supports the vertical sync.
The problem with refreshing the page is very annoying. If possible, try to fix it. Thank you.

@Hobbix Keep in mind that YouTube intends to drop the flash player support for their website soon, that is why they are moving towards the HTML5 player completely and you won't be able to use their flash player any longer when that time comes.

Yup, it's not because of YTC..
Closing...

authors: Hobbix Pikachuy SuperSajuuk Yonezpt ireun

repo: YePpHa/YouTubeCenter

license: mit

license_source: bigquery


text:
Referencing ElasticSearch query in a json file

Referencing ElasticSearch query  in filter would make life really easy.  I know that Kibana dashboard could be used but I think, this alternative also foce using ElastAlert  .yaml  rule file.  I think it would be much simpler if  we could have some placeholders in our  ElasticSearch query that ElastAlert replace.
We would reference this .json file in our filter section.
I appreciate your feedback on this.

Yelp/elastalert is no longer maintained. Please use jertel/elastalert2.
https://github.com/jertel/elastalert2

authors: hbarisik nsano-rururu

repo: Yelp/elastalert


text:
Adding Exotel sms Alerter support for alerting

This pull request adds sms support for Exotel sms api(https://www.exotel.in). I have tested it and works well in production

@danielpops can you please merge this.

source: gharchive/pull-request


text:
Support for FreeBSD.

All,
I'd like to use this puppet module on FreeBSD but there is not support. Would you be okay to a pull-request that addresses this issue?

Mike D.

I would accept any PR that expands the OS support of this module.

authors: madelaney solarkennedy

repo: Yelp/puppet-uchiwa


text:
missing link to github from npm

Noticed you're missing a field to link to github from https://www.npmjs.com/package/choo-tts. Can't PR right now, but might be worth fixing. Thanks!

That's because package.json is missing a repository property rihgt? I think it's happening in all my repos :anguished:
Thanks for reporting!

authors: YerkoPalma yoshuawuyts

repo: YerkoPalma/choo-tts

license: MIT


text:
[Bug] webdav同步问题

windows端目前关于使用webdav同步数据遇到的问题如下：
1、虽然使用的是坚果云webdav，但网络连接不稳定，很多时候都同步不上；
2、windows导出到本地的json文件为乱码，无法正常查看，也无法正常导入；
3、Windows通过webdav同步的json文件，是正常的，能正常查看。
综上：目前可能没法及时通过webdav同步，数据存在丢失风险（无法同步到云端，本地导出有故障）。
然后有个问题是，坚果云webdav是在国内，这个线路不应该有问题才对，这是我疑惑的地方。也许网络连接线路需要优化。谢谢

你买的谁网站你找他去啊你来UI论坛这里干嘛？

1、网络问题你买的谁网站你找他去啊你来UI论坛这里干嘛？

我是在正常反馈问题，坚果云dav在国内是可以正常访问的。什么叫来论坛干嘛？

坚果云的 webdav 不支持 cors 跨域，我提供了内置代理来解决这个问题，但不保证可用性。导出 json 乱码仅仅是因为是编码问题，这是 windows 平台老生常谈的问题，你可以自己去检索一下解决方法。

坚果云的 webdav 不支持 cors 跨域，我提供了内置代理来解决这个问题，但不保证可用性。导出 json 乱码仅仅是因为是编码问题，这是 windows 平台老生常谈的问题，你可以自己去检索一下解决方法。

我做了些测试，希望有帮助：
经测试，Windows2.9.7、2.9.6都没问题，能正常导出、正常查看、正常导入，但之后的版本都有问题。
其中有个细节是，通过2.9.7导出的json文件，大小为1727kb，能正常打开，能正常导入；而通过2.9.8、2.9.9、2.9.10导出时，大小分别为1102kb、1331kb、1079kb，文件明显偏小，且大小不一致。

今天更新2.10后发现坚果云同步失败才知道有这个问题，持续关注。

今天更新2.10后发现坚果云同步失败才知道有这个问题，持续关注。

我也是

坚果云的 webdav 不支持 cors 跨域，我提供了内置代理来解决这个问题，但不保证可用性。导出 json 乱码仅仅是因为是编码问题，这是 windows 平台老生常谈的问题，你可以自己去检索一下解决方法。

我做了些测试，希望有帮助： 经测试，Windows2.9.7、2.9.6都没问题，能正常导出、正常查看、正常导入，但之后的版本都有问题。
其中有个细节是，通过2.9.7导出的json文件，大小为1727kb，能正常打开，能正常导入；而通过2.9.8、2.9.9、2.9.10导出时，大小分别为1102kb、1331kb、1079kb，文件明显偏小，且大小不一致。

非常感谢，是这样的，我重新下载了2.9.7版本 成功的导出了数据后，下载安装了2.10.3版本，（也测试了后面多个版本）可以将2.9.7导出的数据成功导入，但是用后面的版本导出的数据仍热是乱码且无法重新导入。
尝试修改了系统语言等，都不行。
用notepad打开可以看到，完好的导出json文件为CRLF结尾，以及UTF-8编码，而其他版本导出的乱码皆为LF结尾以及ANSI编码（修改为CRLF以及UTF-8仍是乱码），看起来并不是您所说的“老生常谈的问题” @Yidadaa

感觉“同步”这块还有很大优化空间，一不小心就会得到不想要的结果。最好还是分成“上传”和“下载”备份两个按钮。

我在 v2.11.3 终于可以连通坚果云 WebDAV 了（感觉可能跟 #3972 的修复有关），但不知道为什么无法上传文件到坚果云

authors: PinkPanther-ny Robinson28years TCOTC Yidadaa jkjoker kitaev-chen reece00

repo: Yidadaa/ChatGPT-Next-Web


text:
能否自定义左侧应用名和应用描述

左侧的应用名是否支持自定义修改？

已解决，谢谢！

请问怎么解决呢，有劳指导一下

在文件app/components/home.tsx中进行修改，找到 function Home()，return的div标签里面有原始的应用名，改成自己的即可

请问怎么解决呢，有劳指导一下

在文件app/components/home.tsx中进行修改，找到 function Home()，return的div标签里面有原始的应用名，改成自己的即可

希望可以自定义应用名称（LOGO）和描述。因为想跟项目更新保持同步，手动修改后就会有冲突。希望可以像其它配置项那样添加环境变量的方式，自定义网站名称和描述。

问一下在哪里修改？

在文件app/components/home.tsx中进行修改，找到 function Home()，return的div标签里面有原始的应用名，改成自己的即可

请问现在是改不了了吗


text:
请问这个代码有对应的参考文献吗

您好，想对照文献学习一下，请问是否有参考文献

可以参考：[1] Waveform Design and Signal Processing Aspects for Fusion of Wireless Communications and Radar Sensing
[2] Performance analysis of joint radar and communication using OFDM and OTFS

authors: YongzhiWu YuetianZhou


text:
Compiling help: [Did what was told to and still got errors / source/funkin/system/MusicBeatState.hx:89: characters 43-45 : Expected )]

I have everything installed from the original source code for FNF, ran the update.bat and then tried to compile in debug, "Dbeta" and normal compile and all of them gave the below error
source/funkin/system/MusicBeatState.hx:89: characters 43-45 : Expected )
[EDIT]: I tried running the code on windows powershell and the command prompt and CMD crashes instead of giving me the above error, powershell is the one which gives me the error

[x] Windows
[ ] Mac
[ ] Linux
[ ] HTML5

Seems like your Haxe version does not support obj is Type statements
Are you sure you're using the latest version available?
If not, you can update to 4.2.5 here

I just realised that I'm using haxe 4.1.5, thank you!

I got a whole slew of errors after updating my version of haxe to 4.2.5 so I'm just going to wait for a full release

Update your lime version.
haxelib install lime

Alright thank you


text:
README.md: Missing formatting for

This is a drive-by PR to fix an invisible reference to <size> due to missing formatting.

I do not know the answer

repo: YosysHQ/yosys

license: isc


text:
synth_ice40: switch -relut to be always on

As far as I know this switch either does nothing or makes the design faster. People like @smunaut have been using it extensively and it appears robust.

As I mentionned on IRC, wouldn't it be better to ignore the "-relut" option and not remove it ? Just to not break all existing scripts that have it.
Else you need in a Makefile to test yosys's version to know if you need to explicitely add that option or leave it out :/

I think Yosys has never done that for any other options, did it?

Note: with -abc9, -relut doesn't seem to do much of anything on the designs I tested it on. Which is strange, because it should, in principle, on a techmapped adder followed by a mux with a constant or one of the operands. Nevertheless it doesn't hurt to enable it there as well.

I couldn't find any instance in synth_ice40 of any option being removed.
But in synth_xilinx for instance, I could at least find one example ( 6c256b8cda66e2ba128d5fa3ba344fe4717711f8 ) where -arch got replace by -family but the code still has -arch support as compatibility.
But I can also find examples of non-compatible changes as well ( 36e6da53964b406ad379a60fc289aa3af9beb8a9 ).
So not sure what the policy is here. But -relut is definitely a pretty popular option currently ...

@smunaut It is now parsed and ignored.

But I can also find examples of non-compatible changes as well ( 36e6da5 ).
So not sure what the policy is here. But -relut is definitely a pretty popular option currently ...
This incompatible example was a new option made on a branch and changed on that same branch before it was merged into master. Generally, I would say we preserve them as much as possible, even silently.
I've knowingly broken this once I think, for an option that was wrong to begin with and was there only for a short time....

Could we please have a -no-relut option now. My design actually runs around 30% slower with -relut.
Not sure if there are other designs that suffer the same fate but I have been tracking this as the cause of a regression where the design used to run at 44 MHz but now only does 33 MHz.
I'm a little surprised that this went from optional to always on without the means to opt-out.

@janrinze Please see #1187

I'm a little surprised that this went from optional to always on without the means to opt-out.

This regression was caused by commit 437fec0d88b4a2ad172edf0d1a861a38845f3b1d, which changed the semantics of SB_LUT4 without considering all in-tree users of SB_LUT4, which unfortunately sometimes happens and leads to undesirable results. There is nothing wrong with -relut itself though.

authors: eddiehung janrinze smunaut whitequark


text:
hocuspocus.dev usage example

Do you know of a usage example of using SyncedStore with hocuspocus.dev as the server?

Hi and welcome @hangtwenty !
This should be similar to how other providers work, as described at https://syncedstore.org/docs/sync-providers.
I haven't tried this yet, but when setting up the store, try this:
import { syncedStore, getYjsValue } from "@syncedstore/core";

export const store = syncedStore({ arrayData: [] });

const doc = getYjsValue(store);

const provider = new HocuspocusProvider({
  url: 'ws://127.0.0.1:1234',
  name: 'example-document',
  document: doc,
  onAwarenessUpdate: ({ states }) => {
    currentStates = states
  },
})

Feel free to reopen if you have additional questions! Looking forward to hearing your experience with syncedstore :)

authors: YousefED hangtwenty

repo: YousefED/SyncedStore


text:
Training error

Hello, I built PPDM as it is written in Installation.
But when I launch the training I got this:
What might be the problem ?

I'm using AWS g4dn.xlarge machine.

It may be caused by the wrong cuda version. I guess that you use cuda 10，but the dcn only supports cuda 9. I plan to rewrite the repo by cuda 10 and pytorch1.4 recently.

@YueLiao thanks for quick response !
Yep, I know about CUDA version, for that reason I've changed the symlink of the CUDA from 10 to 9.
like this:
sudo rm -fr  /usr/local/cuda
ln -s /usr/local/cuda-9 /usr/local/cuda

The error is caused by the mismatching cuda version when compiling DCN and running the code. You need to modify the PATH likes:
export PATH="$CUDA_HOME/bin:${PATH}"
export CUDA_TOOLKIT_ROOT_DIR=$CUDA_HOME
export LD_LIBRARY_PATH="$CUDA_HOME/extras/CUPTI/lib64:$LD_LIBRARY_PATH"
export LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
export CFLAGS="-I$CUDA_HOME/include $CFLAGS"

Sorry for a long reply.
Unfortunately, it didn't work.
Looking forward for the solution for CUDA 10.
Thanks !

抱歉，回复很长。 不幸的是，它没有用。 期待 CUDA 10 的解决方案。 谢谢
Did you solve it? I encountered the same problem, I also checked the version and still reported this error

抱歉，回复很长。 不幸的是，它没有用。 期待 CUDA 10 的解决方案。 谢谢
Did you solve it? I encountered the same problem, I also checked the version and still reported this error

pt1 branch has already supported cuda10~

authors: Alasile YueLiao ghost volodymyrkepsha

repo: YueLiao/PPDM


text:
Crash Alert low

[SF - ERROR] SF:lanai/processor/systems/ai_decoder.txt:137: attempt to call global 'CheckAutoMode' (a nil value)
[starfall_processor [2081]] Server Error
SF:lanai/processor/systems/ai_decoder.txt:137: attempt to call global 'CheckAutoMode' (a nil value)
stack traceback:
SF:lanai/processor/systems/ai_decoder.txt:137: in function 'OnChatMessage'
SF:lanai/processor/systems/ai_utils.txt:22: in function 'ReadData'
SF:lanai/processor/systems/protocol.txt:85: in function SF:lanai/processor/systems/protocol.txt:61

Does this happen after the core is completely initialized (that means no more yellow ligh) or does this happen while the core is initializing ?

#3

on initialiez is done completely

Ok then I'll have a look asap.

I checked it and I can't reproduce the crash when LanAI is completely initialized...

Should be fixed now, comment if it's not...

#4


text:
Support for Persona 3 Reload

Game name:  Persona 3 Reload

Game package name: SEGAofAmericaInc.L0cb6b3aea_s751p9cej88mt

wgs.zip
SteamSave.zip

Duplicate of #114.
Please follow that issue.
Also thanks for the saves, they'll help!


text:
use of closed network connection

Hey,
i recently added your container to the helm chart  SQLJames/factorio-server-charts
while the container works as intended it sometimes crashes:
{"level":"info","ts":1730878872.1065865,"caller":"cmd/local.go:115","msg":"Healthcheck server started"}
⇨ http server started on [::]:34197
{"level":"info","ts":1730878872.106785,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"127.0.0.1","Port":34197}
{"level":"info","ts":1730878877.758352,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
{"level":"info","ts":1730878880.5381744,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
{"level":"info","ts":1730878880.5382175,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"127.0.0.1","Port":34197}
{"level":"error","ts":1730878882.7584276,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp 127.0.0.1:60707: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
{"level":"info","ts":1730878887.7583582,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
{"level":"error","ts":1730878892.7618413,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp 127.0.0.1:50433: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
{"level":"info","ts":1730878895.554898,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
{"level":"info","ts":1730878895.5549371,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"127.0.0.1","Port":34197}
{"level":"info","ts":1730878897.7583709,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
{"level":"error","ts":1730878898.8152833,"caller":"cmd/local.go:132","msg":"net.ReadFromUDP() error: read udp 127.0.0.1:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.3\n\t/app/cmd/local.go:132\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75"}
{"level":"error","ts":1730878902.7591352,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp 127.0.0.1:55703: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
{"level":"info","ts":1730878903.0005345,"caller":"cmd/local.go:190","msg":"graceful shutting down"}
{"level":"error","ts":1730878903.000601,"caller":"cmd/local.go:195","msg":"exit reason: read udp 127.0.0.1:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1\n\t/app/cmd/local.go:195\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968\ngithub.com/zcube/factorio-port-fixer/cmd.Execute\n\t/app/cmd/root.go:31\nmain.main\n\t/app/main.go:10\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

when the container crashes the clients disconnect with "server not responding" despite the fact that the game server logs do look good.

It doesn't just sometimes crash, it crashes within 10 minutes which makes it not playable.
Related: https://github.com/SQLJames/factorio-server-charts/issues/62

@Kariton @samip5 It's probably a health check issue. Isn't the health check failing because it's 127.0.0.1?

upstream
https://github.com/SQLJames/factorio-server-charts/blob/main/charts/factorio-server-charts/templates/deployment.yaml#L218

my chart
https://github.com/ZCube/factorio-server-charts/blob/64f817b163a947a71aa53844afe6be78482191a0/charts/factorio-server-charts/templates/deployment.yaml#L205

There were no problems with chart-based server operation in the past (I did not include a health check), and the docker-based server I recently started operating has been running without problems for more than 3 days.
    healthcheck:
      test: curl --fail pingpong:34197/health || exit 1
      interval: 20s
      retries: 5
      start_period: 20s
      timeout: 10s

hmpf.
absolutely. you cannot listen on localhost and expect livenessProbes to work on a "public" site...
the port_fixer should listen to "0.0.0.0" and then work as expected.
nice catch!
gonna test, confirm and patch ASAP.

well.
the livenessProbe check seems to be the problem - not the listen IP.
Thu, Nov 7 2024 3:08:42 pm {"level":"info","ts":1730988522.3731894,"caller":"cmd/local.go:115","msg":"Healthcheck server started"}
Thu, Nov 7 2024 3:08:42 pm {"level":"info","ts":1730988522.3731928,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:08:42 pm ⇨ http server started on [::]:34197
Thu, Nov 7 2024 3:08:55 pm {"level":"info","ts":1730988535.616322,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
Thu, Nov 7 2024 3:08:55 pm {"level":"info","ts":1730988535.6163716,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:08:56 pm {"level":"info","ts":1730988536.461232,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:09:01 pm {"level":"error","ts":1730988541.462053,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:58875: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:09:06 pm {"level":"info","ts":1730988546.460379,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:09:10 pm {"level":"info","ts":1730988550.6329925,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
Thu, Nov 7 2024 3:09:10 pm {"level":"info","ts":1730988550.6330307,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:09:11 pm {"level":"error","ts":1730988551.4609427,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:60609: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:09:16 pm {"level":"info","ts":1730988556.4605217,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:09:17 pm {"level":"error","ts":1730988557.5172606,"caller":"cmd/local.go:132","msg":"net.ReadFromUDP() error: read udp [::]:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.3\n\t/app/cmd/local.go:132\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75"}
Thu, Nov 7 2024 3:09:21 pm {"level":"error","ts":1730988561.4610858,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:36376: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:09:21 pm {"level":"info","ts":1730988561.7004497,"caller":"cmd/local.go:190","msg":"graceful shutting down"}
Thu, Nov 7 2024 3:09:21 pm {"level":"error","ts":1730988561.7005007,"caller":"cmd/local.go:195","msg":"exit reason: read udp [::]:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1\n\t/app/cmd/local.go:195\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968\ngithub.com/zcube/factorio-port-fixer/cmd.Execute\n\t/app/cmd/root.go:31\nmain.main\n\t/app/main.go:10\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

          periodSeconds: 10
          initialDelaySeconds: 5
          failureThreshold: 3

the container gets killed.
now udp [::]:34197 looks like an ipv6 problem to me. but i dont have dualstack enabled...

is ReadFromUDP actually related to http probes?

Thu, Nov 7 2024 3:37:14 pm ⇨ http server started on [::]:34197
Thu, Nov 7 2024 3:37:14 pm {"level":"info","ts":1730990234.3001275,"caller":"cmd/local.go:115","msg":"Healthcheck server started"}
Thu, Nov 7 2024 3:37:14 pm {"level":"info","ts":1730990234.3001416,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:37:27 pm {"level":"info","ts":1730990247.8176143,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
Thu, Nov 7 2024 3:37:27 pm {"level":"info","ts":1730990247.8176613,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:37:28 pm {"level":"info","ts":1730990248.2562778,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:37:33 pm {"level":"error","ts":1730990253.256902,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:55627: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:37:38 pm {"level":"info","ts":1730990258.256299,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:37:42 pm {"level":"info","ts":1730990262.8342316,"caller":"cmd/local.go:135","msg":"Read from socket","Bytes":1,"Remote":"127.0.0.1:31497"}
Thu, Nov 7 2024 3:37:42 pm {"level":"info","ts":1730990262.8342786,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"0.0.0.0","Port":34197}
Thu, Nov 7 2024 3:37:43 pm {"level":"error","ts":1730990263.2572982,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:39508: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:37:48 pm {"level":"info","ts":1730990268.256682,"caller":"cmd/local.go:92","msg":"Wrote to socket","Bytes":3,"Remote":"10.41.3.197:31497"}
Thu, Nov 7 2024 3:37:53 pm {"level":"error","ts":1730990273.2570317,"caller":"cmd/local.go:103","msg":"net.ReadFromUDP() error: %sread udp [::]:44050: i/o timeout","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.1\n\t/app/cmd/local.go:103\ngithub.com/labstack/echo/v4.(*Echo).add.func1\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:546\ngithub.com/labstack/echo/v4.(*Echo).ServeHTTP\n\t/go/pkg/mod/github.com/labstack/echo/v4@v4.10.0/echo.go:633\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2947\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1991"}
Thu, Nov 7 2024 3:37:53 pm {"level":"error","ts":1730990273.2741623,"caller":"cmd/local.go:132","msg":"net.ReadFromUDP() error: read udp [::]:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1.3\n\t/app/cmd/local.go:132\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75"}
Thu, Nov 7 2024 3:37:53 pm {"level":"info","ts":1730990273.2743487,"caller":"cmd/local.go:190","msg":"graceful shutting down"}
Thu, Nov 7 2024 3:37:53 pm {"level":"error","ts":1730990273.2743661,"caller":"cmd/local.go:195","msg":"exit reason: read udp [::]:34197: use of closed network connection","stacktrace":"github.com/zcube/factorio-port-fixer/cmd.glob..func1\n\t/app/cmd/local.go:195\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968\ngithub.com/zcube/factorio-port-fixer/cmd.Execute\n\t/app/cmd/root.go:31\nmain.main\n\t/app/main.go:10\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

      livenessProbe:
        failureThreshold: 3
        httpGet:
          path: /health
          port: port-fixer
          scheme: HTTP
        initialDelaySeconds: 10
        periodSeconds: 10
        successThreshold: 1
        timeoutSeconds: 5
      ports:
        - containerPort: 34197
          name: port-fixer
          protocol: TCP

unless http v3 (quic), yes.
http is tcp.
im unable to figure out what exactly is going on.
removing the probe entirely is working.
greater thresholds or delays do not help.
to me it looks like an issue in the /health endpoint or something related.
is there a way to get debug logging going?

Liveness probe failed: Get "http://10.41.3.219:34197/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

root@factorio-server-7c8497fdc-srv9l:/# curl 127.0.0.1:34197/health
OKroot@factorio-server-7c8497fdc-srv9l:/#

i have disabled the livenessProbe upstream.
i dont understand why that is a problem.
from within the factorio container it works with listener 127.0.0.1 (i think i have tested that before hardcoding it in the chart...)
port-fixer:
    - args:
        - local
        - '--ip=127.0.0.1'
        - '--port=34197'
        - '--remotePort=31497'

{"level":"info","ts":1730994447.8460875,"caller":"cmd/local.go:115","msg":"Healthcheck server started"}
{"level":"info","ts":1730994447.8460903,"caller":"cmd/local.go:126","msg":"Accepting a new packet","IP":"127.0.0.1","Port":34197}
⇨ http server started on [::]:34197

probe test:
root@factorio-server-5bcbf95db8-s4gft:/# curl 127.0.0.1:34197/health
OKroot@factorio-server-5bcbf95db8-s4gft:/# curl 10.41.3.152:34197/health # pod IP
OKroot@factorio-server-5bcbf95db8-s4gft:/#

so listening to 0.0.0.0 or 127.0.0.1 does not make a difference here.
re-tested both and neither of them worked as expected. higher timeouts / thresholds / delay did not help.
but when deploying rcon-api within the same pod that probe does work.

@Kariton I finally remembered. The /health API was an API for checking the health of the Factorio server, not factorio-port-fixer.

would you mind adding an "correct" /healthz endpoint?

would you mind adding a "correct" /healthz endpoint?

use /health
services:
  pingpong:
    image: ghcr.io/zcube/factorio-port-fixer:main
    command: /factorio-port-fixer local --ip=0.0.0.0 --port=34197 --remotePort=${PORT:-34197}
    healthcheck:
      test: curl --fail 127.0.0.1:34197/health || exit 1

  factorio:
    image: factoriotools/factorio:stable
    environment:
      - PORT=${PORT:-34197}
    healthcheck:
      test: curl --fail pingpong:34197/health_for_factorio || exit 1

I am closing this as I believe it has been resolved in v1.0.4.

authors: Kariton ZCube samip5

repo: ZCube/factorio-port-fixer


text:
🛑 ZEENKEY CDN is down

In d6f37ae, ZEENKEY CDN (https://zeenkeycdn.ga) was down:

HTTP code: 500
Response time: 247 ms

Resolved: ZEENKEY CDN is back up in 0f223d0.

repo: ZEENKEY/statuspage


text:
Problème avec mon CustomRoleProvider

Hello I have perhaps not understood the doc but I have declared this in my zfc_rbac.global.php file :
'role_provider_manager' => [
    'factories' => [
        'role_db_provider'  =>  'ShishiUser\Factory\RoleProviderFactory',
     ]
],
'role_provider' => [
    'role-db-provider' => [
    ],
],

My factory :
<?php
namespace ShishiUser\Factory;

use Zend\ServiceManager\FactoryInterface;
use ShishiUser\Role\RoleDbProvider;
class RoleProviderFactory implements FactoryInterface
{
 /* (non-PHPdoc)
     * @see \Zend\ServiceManager\FactoryInterface::createService()
     */
    public function createService(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
    {
        // TODO Auto-generated method stub
        $sm = $serviceLocator->get('ServiceManager');
        $roleRepository = $sm->get('shishi-user-role-repository');
        $roleDbProvider = new RoleDbProvider();
        $roleDbProvider->setRoleRepository($roleRepository);
        return $roleDbProvider;
    }
}
?>

And the RoleProviderClass :
<?php
namespace ShishiUser\Role;

use ZfcRbac\Role\RoleProviderInterface;
use ShishiUser\Repository\RoleRepository;
use ZfcRbac\Exception\RoleNotFoundException;
use Rbac\Role\HierarchicalRole;
use Rbac\Role\Role;
class RoleDbProvider implements RoleProviderInterface{
    public $roleRepository;
    public function getRoles(array $roleNames)
    {
         $roles = $this->roleRepository->findByLibelles($roleNames);
        $rbacRoles = [];
        if (count($roles) >= count($roleNames)) {
            foreach ($roles as $role){
                if ($role->getChilds() !== null){
                    $rbacRole = new HierarchicalRole($role->getRol_libelle());
                    foreach ( (array) $role->getChilds() as $childRole){
                        $rbacRole->addChild($childRole);
                    }
                }else{
                    $rbacRole = new Role($role->getRol_libelle());
                }
                $permissions = ($role->getRol_permissions() !== null) ? [] : $role->getRol_permissions();
                if ($role->getRol_permissions() !== null){
                    foreach ($permissions as $permission){
                        $rbacRole->addPermission($permission->getPerm_libelle());
                    }
                }
                $rbacRoles[] = $rbacRole;
            }
            return $rbacRoles;
        }
        // We have roles that were asked but couldn't be found in database... problem!
        foreach ($roles as &$role) {
            $role = $role->getName();
        }
        throw new RoleNotFoundException(sprintf('Some roles were asked but could not be loaded from database: %s', implode(', ', array_diff($roleNames, $roles))));
    }
    public function setOptions($options)
    {
        $this->options = $options;
        return $this;
    }
    public function setRoleRepository(RoleRepository $roleRepository)
    {
        $this->roleRepository = $roleRepository;
        return $this;
    }
}
?>

I try to retrieve roles from my database, could you explain me what I am doing wrong please?
Thank you in advance
cordially

Ping @bakura10 for transalation :P

Shishi, penses à écrire en anglais stp, je suis le seul à être français ici ^^. Pense également à ajouter le coloriage pour ton code, c'est impossible à lire (https://help.github.com/articles/github-flavored-markdown/#syntax-highlighting).
Haha yup @danizord, I'll try to help him ;).

I have edited my question

Hi,
I think the error come from this:
class RoleProviderFactory implements FactoryInterface
{
 /* (non-PHPdoc)
     * @see \Zend\ServiceManager\FactoryInterface::createService()
     */
    public function createService(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
    {
        // TODO Auto-generated method stub
        $sm = $serviceLocator->get('ServiceManager');
        $roleRepository = $sm->get('shishi-user-role-repository');
        $roleDbProvider = new RoleDbProvider();
        $roleDbProvider->setRoleRepository($roleRepository);
        return $roleDbProvider;
    }
}

This object is constructed using a plugin manager (the role provider plugin manager).
The $serviceLocator you received in the factory is a plugin manager. If you want to retrieve the main service locator, you have to replace:
$sm = $serviceLocator->get('ServiceManager');

to:
$sm = $serviceLocator->getServiceLocator();

getServiceLocator is a method defined on each plugin manager that allows to retrieve the amin plugin manager.
Let me know if that works!
Et merci d'avoir traduit en anglais ;).

Hi,
I get the same error when i replace this code :
$sm = $serviceLocator->get('ServiceManager');

by
$sm = $serviceLocator->getServiceLocator();

the error :
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'ZfcRbac\Role\RoleProviderPluginManager::get was unable to fetch or create an instance for role-db-provider' in E:\Zend studio 12 Workspace\ShishiBlog\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php:555 Stack trace: #0 E:\Zend studio 12 Workspace\ShishiBlog\vendor\zendframework\zendframework\library\Zend\ServiceManager\AbstractPluginManager.php(116): Zend\ServiceManager\ServiceManager->get('role-db-provide...', true) #1 E:\Zend studio 12 Workspace\ShishiBlog\vendor\zf-commons\zfc-rbac\src\ZfcRbac\Factory\RoleServiceFactory.php(56): Zend\ServiceManager\AbstractPluginManager->get('role-db-provide...', Array) #2 [internal function]: ZfcRbac\Factory\RoleServiceFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'zfcrbacservicer...', 'ZfcRbac\\Service...') #3 E:\Zend studio 12 Workspace\ShishiBlog\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php( in E:\Zend studio 12 Workspace\ShishiBlog\vendor\zendframework\zendframework\library\Zend\ServiceManager\ServiceManager.php on line 555

thanks a lot for your help

Ha maybe I get it.  In your "role_provider" key you called it "role-db-provider", but in your plugin manager config you called it "role_db_provider". Those are different names!

I'll assume that the problem was the incorrect config key. Closing due to lack of activity.

repo: ZF-Commons/zfc-rbac


text:
Bug: Unown has no levels in sent JSON

Hi, for battle type gen7randombattle.
I noticed Unown JSON does not have details attribute sent when the request action is sent.
Example websocket data recv from server.
|request|{"active":[{"moves":[{"move":"Mirror Coat","id":"m
   ...: irrorcoat","pp":32,"maxpp":32,"target":"scripted","disabled":false},{"move":"Le
   ...: ech Life","id":"leechlife","pp":16,"maxpp":16,"target":"normal","disabled":fals
   ...: e},{"move":"Liquidation","id":"liquidation","pp":16,"maxpp":16,"target":"normal
   ...: ","disabled":false},{"move":"Toxic","id":"toxic","pp":16,"maxpp":16,"target":"n
   ...: ormal","disabled":false}]}],"side":{"name":"Sooham Rafiz","id":"p1","pokemon":[
   ...: {"ident":"p1: Araquanid","details":"Araquanid, L79, F","condition":"237/237","a
   ...: ctive":true,"stats":{"atk":156,"def":191,"spa":125,"spd":254,"spe":112},"moves"
   ...: :["mirrorcoat","leechlife","liquidation","toxic"],"baseAbility":"waterbubble","
   ...: item":"leftovers","pokeball":"pokeball","ability":"waterbubble"},{"ident":"p1:
   ...: Unown","details":"Unown","condition":"258/258","active":false,"stats":{"atk":14
   ...: 9,"def":153,"spa":201,"spd":153,"spe":153},"moves":["hiddenpowerpsychic60"],"ba
   ...: seAbility":"levitate","item":"choicespecs","pokeball":"pokeball","ability":"lev
   ...: itate"},{"ident":"p1: Aurorus","details":"Aurorus, L81, M","condition":"331/331
   ...: ","active":false,"stats":{"atk":129,"def":163,"spa":207,"spd":196,"spe":141},"m
   ...: oves":["freezedry","stealthrock","blizzard","ancientpower"],"baseAbility":"snow
   ...: warning","item":"leftovers","pokeball":"pokeball","ability":"snowwarning"},{"id
   ...: ent":"p1: Tapu Fini","details":"Tapu Fini, L75","condition":"229/229","active":
   ...: false,"stats":{"atk":117,"def":216,"spa":186,"spd":239,"spe":171},"moves":["moo
   ...: nblast","surf","calmmind","substitute"],"baseAbility":"mistysurge","item":"left
   ...: overs","pokeball":"pokeball","ability":"mistysurge"},{"ident":"p1: Garbodor","d
   ...: etails":"Garbodor, L81, F","condition":"262/262","active":false,"stats":{"atk":
   ...: 201,"def":179,"spa":144,"spd":179,"spe":168},"moves":["toxic","gunkshot","haze"
   ...: ,"toxicspikes"],"baseAbility":"aftermath","item":"blacksludge","pokeball":"poke
   ...: ball","ability":"aftermath"},{"ident":"p1: Claydol","details":"Claydol, L81","c
   ...: ondition":"230/230","active":false,"stats":{"atk":160,"def":217,"spa":160,"spd"
   ...: :241,"spe":168},"moves":["toxic","earthquake","icebeam","rapidspin"],"baseAbili
   ...: ty":"levitate","item":"leftovers","pokeball":"pokeball","ability":"levitate"}]}
   ...: ,"rqid":2}

notice the following
{u'ability': u'levitate',
 u'active': False,
 u'baseAbility': u'levitate',
 u'condition': u'258/258',
 u'details': u'Unown',
 u'ident': u'p1: Unown',
 u'item': u'choicespecs',
 u'moves': [u'hiddenpowerpsychic60'],
 u'pokeball': u'pokeball',
 u'stats': {u'atk': 149, u'def': 153, u'spa': 201, u'spd': 153, u'spe': 153}}

Usually details is of format pokemon_ident level gender_if_any i.e Araquanid, L79, F.

level is left off of details if it's 100. Unown is level 100 in Random Battle.
details is documented in PROTOCOL.md in the |switch| major action.
https://github.com/Zarel/Pokemon-Showdown/blob/master/PROTOCOL.md#major-actions

Relevant excerpt of PROTOCOL.md:

DETAILS is a comma-separated list of all information about a pokemon visible on the battle screen: species, shininess, gender, and level. So it starts with SPECIES, adding , shiny if it's shiny, , M if it's male, , F if it's female, , L## if it's not level 100.

authors: Zarel sooham

repo: Zarel/Pokemon-Showdown


text:
Refactor Gen 1/Stadium code to eliminate the modifiedStats table

Can you also see if you can eliminate Gen 1's reliance on the modifiedStats table? It probably doesn't need to be separate from storedStats.

Originally posted by @Zarel in https://github.com/Zarel/Pokemon-Showdown/pull/5274#issuecomment-470981380

I'm not sure what the idea behind using modifiedStats was, but it seems like we'd still need to use more than one stat table just for Transformed Pokemon. Gen 1 Transform keeps the user's original stats somewhere, and copies the current modified stats of the target, and stores the original stats of the target for the purposes of calculating damage during a critical hit.

I'm not sure what the idea behind using modifiedStats was, but it seems like we'd still need to use more than one stat table just for Transformed Pokemon.

We currently have baseStoredStats (user's original stats) and storedStats (where the transformed stats would be copied to).

and copies the current modified stats of the target

transformInto currently copies over volatiles and boosts to handle this, but I think this is where Gen 1 is weird (thanks to the Crystal_ discovery) and where the ordering of how boosts got applied relative to status forcing stat recalculation matters? And thus we need some way of tracking that, hence the current modifiedStats table?

and stores the original stats of the target for the purposes of calculating damage during a critical hit.

Do we do this today :S? It seems like we'd need another stats table for that.

From what you're saying, it seems we need at least 3 stats tables (user's original, target's modified + original), though I'm not sure the 3 we currently have cover everything.

Yes, I think baseStoredStats, storedStats, and a third table would be necessary just for Transform. The current modifiedStats can be rolled into storedStats safely.
I also think there's probably a bug with how Transform currently calculates stats but I haven't had time to look into it yet. https://www.smogon.com/forums/threads/gen-1-and-tradebacks-dev-post-bugs-here.3524844/page-14#post-8064239

authors: Marty-D scheibo


text:
Add -ability tag to Imposter activation

The other option is to modify transformInto in such a way that it broadcasts -transform messages to use the correct [from] parameter, then add a client change to check for it.
Either way will allow Imposter to be properly tracked by the client.

I was going to say the other option would be better, since otherwise Imposter will be revealed even when it doesn't activate against Illusion and substitutes.

Imposter doesn't activate on Illusion and substitutes? Oh, my bad.

authors: Marty-D ascriptmaster


text:
🛑 Panel Excelencia is down

In b887ef5, Panel Excelencia (http://excelenciadigital.info:3002/PaneldeValidacion/Login.Aspx) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Panel Excelencia is back up in 65fc7f1.

repo: ZarzueloM/status


text:
Reject checkpointed blocks that would increase note commitment trees beyond their max sizes

Motivation

This was an implicit consensus rule, now made explicit.
Specifications

Designs

Related Work

Zebra already returns an error in all relevant cases:

the non-finalized state returns an error if a note commitment tree becomes full
the checkpoint verifier binds the transaction IDs to the block header

v1-v4 transactions bind all transaction data to the transaction ID
v5 transactions bind note commitments to the transaction ID

repo: ZcashFoundation/zebra


text:
🛑 Game Server Proxy (prod) is down

In 5d171d3, Game Server Proxy (prod) (https://proxy.zebr-a.com/api/Version) was down:

HTTP code: 502
Response time: 328 ms

Resolved: Game Server Proxy (prod) is back up in 772dc47.

repo: Zebrainy/upptime


text:
log entries are off by one

I am using version 2.2.6 of the adapter with an nuki soft bridge adapter installation.
The entries in nuki-extended.0.smartlocks.<lock>.logs are always missing the last entry.
on('nuki-extended.0.smartlocks.<lock>.logs', () => {
  const log = JSON.parse(getState('nuki-extended.0.smartlocks.<lock>.logs').val);
  console.log(log[0]);
});

is only logging the action before the last one.
I am able to validate this by manually checking the log entries from the object after any action.
How can i get the most recent action (with triggering user) triggered on the lock?

I can't confirm this with my installation.
The log entries are retrieved from the Web API, which means that it matches the log you can find on https://web.nuki.io/. Could you please check if the most recent entries are available or missing there as well?
Furthermore, the up-to-dateness of the log depends on the refresh time you have set in the adapter settings for the Nuki Web API. What refresh frequency have you set?

Thanks for your input @Zefau
Refresh frequency has been to 0, but the log object has been refreshed / changed on actions to the nuki (always 1 entry off).
I changed the frequency to 5 seconds, now its working fine.
Where does the log changes come from while the setting is beeing set to 0?

could the issue be https://github.com/Zefau/ioBroker.nuki-extended/blob/f655657a5f8689fb684a8f7c6eb2c7463cdf879a/nuki-extended.js#L386 ?
on callback by the bridge for any action, the adapter is refreshing the webApi as well.
But if there is any latency on the bridge -> nuki web log, the log may not have the most recent update by the bridge yet.
This would explain the off-by-one error.

Yes, I guess that's it

I quickly added a timeout for this case. Could you install the current Github version (no version number change for now) and verify the fix?

kind of working - the nuki log is really weird.
I tried verifying the delay by stopping time from action to logs available in https://web.nuki.io/#/pages/activity-log (pressing "clear filter" continuously, as this fetchs the logs again).
The logs are sometimes delayed by 2-3 minutes - not sure if this has something todo with nukis android bridge.
is it currently possible to trigger nukiWebApi.getSmartlockLogs by script?

So it is fixed with regards to the ioBroker adapter, but not fixed with regards to Nuki Bridge vs. Web API ?
I assigned foreign issue to this. Let's see what answer you get in the Nuki Developer forum.

Yes, it cannot be fixed within this adapter as the nuki web logs are delayed themself.
The software bridge is not able to provide logs recording to the bridge api documentation, not sure about the details the hardware bridge could provide.
Hopefully nuki will provide a solution from their side, otherwise this adapter should mention the log delay within the documentation and maybe provide some kind of trigger object to fetch logs from web api again.
This way scripts would be able to handle the unknown delay to get details about the last action from a bridge-callback (e.g. the user which triggered the action).
Also nuki notification callbacks could be a solution for this, but they are still in beta.
I will keep this up2date if there is any response by nuki.

authors: Zefau cyptus


text:
Airboat sometimes corrupts the view.

Seems to happen when one bumps into stuff with a bigger latency.

This was fixed in Garrys Mod, if it happens again I'll reopn it.

repo: ZehMatt/Lambda


text:
2048 Game

🛠 Fixes Issue (Number)
#677
I have made a 2048 game using javascript
✅ Check List (Check all the applicable boxes)

[ ✅  ] My code doesn't break any part of the project (Zero Octave-Javascript-Projects).
[ ✅ ] This PR does not contain plagiarized content.
[ ✅ ] My Addition/Changes works properly and matches the overall repo pattern.
[ ✅ ] The title of my pull request is a short description of the requested changes.

📷 Screenshots

don't delete any line of code from readme just add yours

@Astrodevil  Please review the changes once. I have updated the README.md and cards.json files.


text:
Rotating Causes Collider to Jitter on Y-Axis on Remote Client

For reasons I'm currently not able to investigate right now. Rotating the player object causes the Collider game object to experience drifting on the Y-Axis. This results from the delayed loop and some constraint behavior or incorrect understanding.

The issue appears to be unrelated to my setup. Rather likely a bug with VRChat?

https://github.com/Zexxx/Smart-Floor-Collider/assets/21136842/450426da-bf49-4abd-9ed2-ac1374d17b78

repo: Zexxx/Smart-Floor-Collider


text:
第三章 3.5.1 节 代码清单 3-63

页码与行数

第85页
代码清单 3-63

文本或排版错误

暂无

代码错误
match & x {    // 这里应该是 match &*x 才对
//...
}

还可以是
match &x[..] { // 或者是 match x.as_ref() {
// ...
}

match 这块和 rust 编译器版本有关系，2021 edition中对match 人体工程学有很多改进

authors: ZhangHanDong codergege m104ngc4594

repo: ZhangHanDong/tao-of-rust-codes


text:
msgtype -2007 表情包表情 的解码

https://github.com/ZhangJun2017/QQChatHistoryExporter/issues/4 的方式进行解码
可以看到 key value 已经非常明显了，但是还是需要通过重写 Class 结构 来匹配进行解码，Java 代码无能为力了。
java -jar SerializationDumper-v1.13.jar ACED000573720029636F6D2E74656E63656E742E6D6F62696C6571712E646174612E4D61726B466163654D6573736167650000000000018F4E02000E4900096346616365496E666F490008635375625479706549000D64774D53474974656D547970654900076477546162494449000B696D61676548656967687449000A696D61676557696474684A0005696E6465784900096D65646961547970654900057753697A654C0008666163654E616D657400124C6A6176612F6C616E672F537472696E673B5B000B6D6F62696C65706172616D7400025B425B0008726573764174747271007E00025B00067362664B657971007E00025B000673627566494471007E000278700000000100000003000000060003106B000000C8000000C800000000000000000000000000000025740003E795A5757200025B42ACF317F8060854E00200007870000000007571007E0005000000120A0608AC0210AC020A0608C80110C80140017571007E000500000010653233323937616361363634343037327571007E000500000010F6FF8700520167181B71D1286B673C2A

STREAM_MAGIC - 0xac ed
STREAM_VERSION - 0x00 05
Contents
  TC_OBJECT - 0x73
    TC_CLASSDESC - 0x72
      className
        Length - 41 - 0x00 29
        Value - com.tencent.mobileqq.data.MarkFaceMessage - 0x636f6d2e74656e63656e742e6d6f62696c6571712e646174612e4d61726b466163654d657373616765
      serialVersionUID - 0x00 00 00 00 00 01 8f 4e
      newHandle 0x00 7e 00 00
      classDescFlags - 0x02 - SC_SERIALIZABLE
      fieldCount - 14 - 0x00 0e
      Fields
        0:
          Int - I - 0x49
          fieldName
            Length - 9 - 0x00 09
            Value - cFaceInfo - 0x6346616365496e666f
        1:
          Int - I - 0x49
          fieldName
            Length - 8 - 0x00 08
            Value - cSubType - 0x6353756254797065
        2:
          Int - I - 0x49
          fieldName
            Length - 13 - 0x00 0d
            Value - dwMSGItemType - 0x64774d53474974656d54797065
        3:
          Int - I - 0x49
          fieldName
            Length - 7 - 0x00 07
            Value - dwTabID - 0x64775461624944
        4:
          Int - I - 0x49
          fieldName
            Length - 11 - 0x00 0b
            Value - imageHeight - 0x696d616765486569676874
        5:
          Int - I - 0x49
          fieldName
            Length - 10 - 0x00 0a
            Value - imageWidth - 0x696d6167655769647468
        6:
          Long - L - 0x4a
          fieldName
            Length - 5 - 0x00 05
            Value - index - 0x696e646578
        7:
          Int - I - 0x49
          fieldName
            Length - 9 - 0x00 09
            Value - mediaType - 0x6d6564696154797065
        8:
          Int - I - 0x49
          fieldName
            Length - 5 - 0x00 05
            Value - wSize - 0x7753697a65
        9:
          Object - L - 0x4c
          fieldName
            Length - 8 - 0x00 08
            Value - faceName - 0x666163654e616d65
          className1
            TC_STRING - 0x74
              newHandle 0x00 7e 00 01
              Length - 18 - 0x00 12
              Value - Ljava/lang/String; - 0x4c6a6176612f6c616e672f537472696e673b
        10:
          Array - [ - 0x5b
          fieldName
            Length - 11 - 0x00 0b
            Value - mobileparam - 0x6d6f62696c65706172616d
          className1
            TC_STRING - 0x74
              newHandle 0x00 7e 00 02
              Length - 2 - 0x00 02
              Value - [B - 0x5b42
        11:
          Array - [ - 0x5b
          fieldName
            Length - 8 - 0x00 08
            Value - resvAttr - 0x7265737641747472
          className1
            TC_REFERENCE - 0x71
              Handle - 8257538 - 0x00 7e 00 02
        12:
          Array - [ - 0x5b
          fieldName
            Length - 6 - 0x00 06
            Value - sbfKey - 0x7362664b6579
          className1
            TC_REFERENCE - 0x71
              Handle - 8257538 - 0x00 7e 00 02
        13:
          Array - [ - 0x5b
          fieldName
            Length - 6 - 0x00 06
            Value - sbufID - 0x736275664944
          className1
            TC_REFERENCE - 0x71
              Handle - 8257538 - 0x00 7e 00 02
      classAnnotations
        TC_ENDBLOCKDATA - 0x78
      superClassDesc
        TC_NULL - 0x70
    newHandle 0x00 7e 00 03
    classdata
      com.tencent.mobileqq.data.MarkFaceMessage
        values
          cFaceInfo
            (int)1 - 0x00 00 00 01
          cSubType
            (int)3 - 0x00 00 00 03
          dwMSGItemType
            (int)6 - 0x00 00 00 06
          dwTabID
            (int)200811 - 0x00 03 10 6b
          imageHeight
            (int)200 - 0x00 00 00 c8
          imageWidth
            (int)200 - 0x00 00 00 c8
          index
            (long)0 - 0x00 00 00 00 00 00 00 00
          mediaType
            (int)0 - 0x00 00 00 00
          wSize
            (int)37 - 0x00 00 00 25
          faceName
            (object)
              TC_STRING - 0x74
                newHandle 0x00 7e 00 04
                Length - 3 - 0x00 03
                Value - ??? - 0xe795a5
          mobileparam
            (array)
              TC_ARRAY - 0x75
                TC_CLASSDESC - 0x72
                  className
                    Length - 2 - 0x00 02
                    Value - [B - 0x5b42
                  serialVersionUID - 0xac f3 17 f8 06 08 54 e0
                  newHandle 0x00 7e 00 05
                  classDescFlags - 0x02 - SC_SERIALIZABLE
                  fieldCount - 0 - 0x00 00
                  classAnnotations
                    TC_ENDBLOCKDATA - 0x78
                  superClassDesc
                    TC_NULL - 0x70
                newHandle 0x00 7e 00 06
                Array size - 0 - 0x00 00 00 00
                Values
          resvAttr
            (array)
              TC_ARRAY - 0x75
                TC_REFERENCE - 0x71
                  Handle - 8257541 - 0x00 7e 00 05
                newHandle 0x00 7e 00 07
                Array size - 18 - 0x00 00 00 12
                Values
                  Index 0:
                    (byte)10 - 0x0a
                  Index 1:
                    (byte)6 - 0x06
                  Index 2:
                    (byte)8 - 0x08
                  Index 3:
                    (byte)-84 - 0xac
                  Index 4:
                    (byte)2 - 0x02
                  Index 5:
                    (byte)16 - 0x10
                  Index 6:
                    (byte)-84 - 0xac
                  Index 7:
                    (byte)2 - 0x02
                  Index 8:
                    (byte)10 - 0x0a
                  Index 9:
                    (byte)6 - 0x06
                  Index 10:
                    (byte)8 - 0x08
                  Index 11:
                    (byte)-56 - 0xc8
                  Index 12:
                    (byte)1 - 0x01
                  Index 13:
                    (byte)16 - 0x10
                  Index 14:
                    (byte)-56 - 0xc8
                  Index 15:
                    (byte)1 - 0x01
                  Index 16:
                    (byte)64 (ASCII: @) - 0x40
                  Index 17:
                    (byte)1 - 0x01
          sbfKey
            (array)
              TC_ARRAY - 0x75
                TC_REFERENCE - 0x71
                  Handle - 8257541 - 0x00 7e 00 05
                newHandle 0x00 7e 00 08
                Array size - 16 - 0x00 00 00 10
                Values
                  Index 0:
                    (byte)101 (ASCII: e) - 0x65
                  Index 1:
                    (byte)50 (ASCII: 2) - 0x32
                  Index 2:
                    (byte)51 (ASCII: 3) - 0x33
                  Index 3:
                    (byte)50 (ASCII: 2) - 0x32
                  Index 4:
                    (byte)57 (ASCII: 9) - 0x39
                  Index 5:
                    (byte)55 (ASCII: 7) - 0x37
                  Index 6:
                    (byte)97 (ASCII: a) - 0x61
                  Index 7:
                    (byte)99 (ASCII: c) - 0x63
                  Index 8:
                    (byte)97 (ASCII: a) - 0x61
                  Index 9:
                    (byte)54 (ASCII: 6) - 0x36
                  Index 10:
                    (byte)54 (ASCII: 6) - 0x36
                  Index 11:
                    (byte)52 (ASCII: 4) - 0x34
                  Index 12:
                    (byte)52 (ASCII: 4) - 0x34
                  Index 13:
                    (byte)48 (ASCII: 0) - 0x30
                  Index 14:
                    (byte)55 (ASCII: 7) - 0x37
                  Index 15:
                    (byte)50 (ASCII: 2) - 0x32
          sbufID
            (array)
              TC_ARRAY - 0x75
                TC_REFERENCE - 0x71
                  Handle - 8257541 - 0x00 7e 00 05
                newHandle 0x00 7e 00 09
                Array size - 16 - 0x00 00 00 10
                Values
                  Index 0:
                    (byte)-10 - 0xf6
                  Index 1:
                    (byte)-1 - 0xff
                  Index 2:
                    (byte)-121 - 0x87
                  Index 3:
                    (byte)0 - 0x00
                  Index 4:
                    (byte)82 (ASCII: R) - 0x52
                  Index 5:
                    (byte)1 - 0x01
                  Index 6:
                    (byte)103 (ASCII: g) - 0x67
                  Index 7:
                    (byte)24 - 0x18
                  Index 8:
                    (byte)27 - 0x1b
                  Index 9:
                    (byte)113 (ASCII: q) - 0x71
                  Index 10:
                    (byte)-47 - 0xd1
                  Index 11:
                    (byte)40 (ASCII: () - 0x28
                  Index 12:
                    (byte)107 (ASCII: k) - 0x6b
                  Index 13:
                    (byte)103 (ASCII: g) - 0x67
                  Index 14:
                    (byte)60 (ASCII: <) - 0x3c
                  Index 15:
                    (byte)42 (ASCII: *) - 0x2a

样本文件
6618684157263489480.txt

sudo pip intstall javaobj-py3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import javaobj
>>> j = javaobj.JavaObjectUnmarshaller(open('6618684157263489480.txt', 'rb')).readObject()
>>> j.
j.annotations j.cSubType j.dwMSGItemType j.faceName j.imageHeight j.index j.mobileparam j.sbfKey j.wSize
j.cFaceInfo j.classdesc j.dwTabID j.get_class( j.imageWidth j.mediaType j.resvAttr j.sbufID
>>> j.

sudo pip intstall javaobj-py3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import javaobj
>>> j = javaobj.JavaObjectUnmarshaller(open('6618684157263489480.txt', 'rb')).readObject()
>>> j.
j.annotations j.cSubType j.dwMSGItemType j.faceName j.imageHeight j.index j.mobileparam j.sbfKey j.wSize
j.cFaceInfo j.classdesc j.dwTabID j.get_class( j.imageWidth j.mediaType j.resvAttr j.sbufID
>>> j.

通过对QQ安装程序的逆向，得到了表情实体类的定义。
其它消息格式的定义也可使用这种方式获取。
逆向工具来自pxb1988/dex2jar
public class MarkFaceMessage implements Serializable
{
    public static final long serialVersionUID = 102222L;

    public String backColor;

    public long beginTime = 0L;

    public int cFaceInfo = 1;

    public int cSubType = 3;

    public String copywritingContent;

    public int copywritingType = 0;

    public int dwMSGItemType = 6;

    public int dwTabID;

    public long endTime = 0L;

    public String faceName = null;

    public String from;

    public boolean hasIpProduct = false;

    public int imageHeight = 0;

    public int imageWidth = 0;

    public long index = 0L;

    public boolean isAPNG = false;

    public boolean isReword = false;

    public String jumpUrl;

    public int mediaType = 0;

    public byte[] mobileparam;

    public byte[] resvAttr;

    public byte[] sbfKey;

    public byte[] sbufID;

    public boolean shouldDisplay = false;

    public boolean showIpProduct = false;

    public StickerInfo stickerInfo = null;

    public List<Integer> voicePrintItems;

    public String volumeColor;

    public int wSize = 37;
}

sudo pip intstall javaobj-py3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import javaobj
>>> j = javaobj.JavaObjectUnmarshaller(open('6618684157263489480.txt', 'rb')).readObject()
>>> j.
j.annotations j.cSubType j.dwMSGItemType j.faceName j.imageHeight j.index j.mobileparam j.sbfKey j.wSize
j.cFaceInfo j.classdesc j.dwTabID j.get_class( j.imageWidth j.mediaType j.resvAttr j.sbufID
>>> j.

谢谢，我对 Python 也不懂，我看了下 https://pypi.org/project/javaobj-py3/ 文档也不知道如何遍历Key
能请教下怎么遍历 J 对象转成 JSON 并写入新文件么？

sudo pip intstall javaobj-py3
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import javaobj
>>> j = javaobj.JavaObjectUnmarshaller(open('6618684157263489480.txt', 'rb')).readObject()
>>> j.
j.annotations j.cSubType j.dwMSGItemType j.faceName j.imageHeight j.index j.mobileparam j.sbfKey j.wSize
j.cFaceInfo j.classdesc j.dwTabID j.get_class( j.imageWidth j.mediaType j.resvAttr j.sbufID
>>> j.

谢谢，我对 Python 也不懂，我看了下 https://pypi.org/project/javaobj-py3/ 文档也不知道如何遍历Key 能请教下怎么遍历 J 对象转成 JSON 并写入新文件么？
从这里找了一个 https://github.com/tcalmant/python-javaobj/issues/42#issuecomment-631925681 源码如下，应该没问题吧
from json import JSONEncoder
class MyCustomEncoder(JSONEncoder):
      def default(self,o):
             return o.__dict__

import javaobj
import json
j = javaobj.JavaObjectUnmarshaller(open('emoji.txt', 'rb')).readObject()
data=json.dumps(j, cls=MyCustomEncoder)
print(data)

解出来并不是很完美，能用。 估计还是要用 Java 原生弄。
{
    "classdesc": {
        "name": "com.tencent.mobileqq.data.MarkFaceMessage",
        "serialVersionUID": 102222,
        "flags": 2,
        "fields_names": [
            "cFaceInfo",
            "cSubType",
            "dwMSGItemType",
            "dwTabID",
            "imageHeight",
            "imageWidth",
            "index",
            "mediaType",
            "wSize",
            "faceName",
            "mobileparam",
            "resvAttr",
            "sbfKey",
            "sbufID"
        ],
        "fields_types": ["I", "I", "I", "I", "I", "I", "J", "I", "I", "Ljava/lang/String;", "[B", "[B", "[B", "[B"],
        "superclass": null
    },
    "annotations": [],
    "cFaceInfo": 1,
    "cSubType": 3,
    "dwMSGItemType": 6,
    "dwTabID": 107538,
    "imageHeight": 200,
    "imageWidth": 200,
    "index": 0,
    "mediaType": 0,
    "wSize": 37,
    "faceName": "吃饺子",
    "mobileparam": {
        "classdesc": {
            "name": "[B",
            "serialVersionUID": -5984413125824720000,
            "flags": 2,
            "fields_names": [],
            "fields_types": [],
            "superclass": null
        },
        "annotations": [],
        "_data": []
    },
    "resvAttr": {
        "classdesc": {
            "name": "[B",
            "serialVersionUID": -5984413125824720000,
            "flags": 2,
            "fields_names": [],
            "fields_types": [],
            "superclass": null
        },
        "annotations": [],
        "_data": [10, 6, 8, -84, 2, 16, -84, 2, 10, 6, 8, -56, 1, 16, -56, 1, 64, 1]
    },
    "sbfKey": {
        "classdesc": {
            "name": "[B",
            "serialVersionUID": -5984413125824720000,
            "flags": 2,
            "fields_names": [],
            "fields_types": [],
            "superclass": null
        },
        "annotations": [],
        "_data": [51, 101, 98, 98, 50, 56, 101, 57, 100, 55, 101, 55, 49, 100, 57, 100]
    },
    "sbufID": {
        "classdesc": {
            "name": "[B",
            "serialVersionUID": -5984413125824720000,
            "flags": 2,
            "fields_names": [],
            "fields_types": [],
            "superclass": null
        },
        "annotations": [],
        "_data": [101, -72, 46, -83, -1, 8, -111, -111, -8, -48, -86, -27, -70, 85, -66, 104]
    }
}

解出来了~ 但是不知道如何对应上文件
{
    "index": 0,
    "faceName": "吃饺子",
    "dwMSGItemType": 6,
    "cFaceInfo": 1,
    "wSize": 37,
    "sbufID": [101, -72, 46, -83, -1, 8, -111, -111, -8, -48, -86, -27, -70, 85, -66, 104],
    "dwTabID": 107538,
    "cSubType": 3,
    "hasIpProduct": false,
    "showIpProduct": false,
    "sbfKey": [51, 101, 98, 98, 50, 56, 101, 57, 100, 55, 101, 55, 49, 100, 57, 100],
    "mediaType": 0,
    "imageWidth": 200,
    "imageHeight": 200,
    "mobileparam": [],
    "resvAttr": [10, 6, 8, -84, 2, 16, -84, 2, 10, 6, 8, -56, 1, 16, -56, 1, 64, 1],
    "isReword": false,
    "copywritingType": 0,
    "copywritingContent": "null",
    "jumpUrl": "null",
    "shouldDisplay": false,
    "stickerInfo": null
}

从里这里 https://luotianyi.vc/391.html 得知
文件夹中储存着的gif经过简单加密，可以通过16进制编辑器将00000000位的47 48 46 39 39 60 xx xx更改为标准的GIF89a编码47 49 46 38 39 61 xx xx，即可正确识别。

解决“100k以上的表情无法照此实现提取”的问题：以四位16进制为一组，遇到偶数+1，遇到奇数-1。比如4748是偶数，+1变成4749，322F是奇数，-1变成322E。整个文件头都要一一改变，直到不加密的地方为止。比如“4E44 5452 4340 5044 322F 3002 0101 0001 21FE 0B59 4D51 2045 6175 6159”解密后就变成“4E45 5453 4341 5045 322E 3003 0100 0000 21FF 0B58 4D50 2044 6174 6158”。这种方法可以解决“只改文件头会转换失败”的问题。

要是能拿到原文件和加密文件对比就好了。

找到两组样本，加密文件和源文件大小不一致。但是头部加密是 以四位16进制为一组，遇到偶数+1，遇到奇数-1
{
  "imageWidth": 200,
  "sbufID": [
    41, -64, -90, 30, 33, -87, -83, -93, -47, 8, 16, -71, -18, -4, -104, -102
  ],
  "copywritingType": 0,
  "index": 0,
  "cFaceInfo": 1,
  "showIpProduct": false,
  "mediaType": 0,
  "wSize": 37,
  "imageHeight": 200,
  "faceName": "哼",
  "dwTabID": 195484,
  "hasIpProduct": false,
  "resvAttr": [
    10, 6, 8, -84, 2, 16, -84, 2, 10, 6, 8, -56, 1, 16, -56, 1, 64, 1
  ],
  "mobileparam": [],
  "sbfKey": [49, 97, 54, 57, 55, 54, 99, 98, 56, 48, 50, 56, 99, 99, 102, 101],
  "cSubType": 3,
  "dwMSGItemType": 6,
  "isReword": false,
  "shouldDisplay": false
}

防止图片被压缩，我放到 Zip 里面了。
15094.zip

部分目录 可以获取到 /Android/data/com.tencent.mobileqq/Tencent/MobileQQ/.emotionsm/[dwTabID]/[dwTabID].jtmp 文件，格式是 Json，可以获取到表情包的名字 Package Name,
但是没有 jtmp 文件的表情包不知道如何获取 表情包名字 Package Name
从 Android QQ 打开相应表情会显示表情包名字，不知道藏哪了。
qqfav_[QQ号].db 应该已经废弃了，修改日期还是去年的

感谢，已经支持解码和导出：https://github.com/ZhangJun2017/QQChatHistoryExporter/commit/bfcf855be67e9f3320de5c5f9e5b2ace3cc7b845


text:
添加对HTML和XML的支持

下个版本考虑

添加对XML的支持，对HTML不予支持

repo: ZhaoKaiQiang/KLog


text:
2022-01-09

2022-01-09

function slowestKey(releaseTimes: number[], keysPressed: string): string {
    let key = ''
    let time = 0
    let lastKeyTime = 0
    const len = releaseTimes.length
    for (let i = 0; i < len; i += 1) {
        const tempTime = releaseTimes[i] - lastKeyTime
        const char = keysPressed[i]
        if (tempTime > time) {
            key = char
            time = tempTime
        }
        if (tempTime === time) {
            key = key >= char ? key : char
        }
        lastKeyTime = releaseTimes[i]
    }
    return key
};

#
# @lc app=leetcode.cn id=1629 lang=python3
#
# [1629] 按键持续时间最长的键
#

# @lc code=start
from typing import List

class Solution:
    def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str:
        res_map = {}
        for i, key in enumerate(keysPressed):
            res_map[key] = max(
                res_map.get(key, 0), releaseTimes[i] - (releaseTimes[i - 1] if i else 0)
            )

        return max(res_map, key=lambda key: res_map[key] + ord(key) / 1000)

# @lc code=end

微信id: 而我撑伞
来自 vscode 插件

/*
 * @lc app=leetcode.cn id=1629 lang=csharp
 *
 * [1629] 按键持续时间最长的键
 */

// @lc code=start
public class Solution
{
    public char SlowestKey(int[] releaseTimes, string keysPressed)
    {
        var key = keysPressed[0];
        var max = releaseTimes[0];
        for (int i = 1; i < keysPressed.Length; i++)
        {
            var elapsed = releaseTimes[i] - releaseTimes[i - 1];
            if (elapsed < max)
            {
                continue;
            }

            if (elapsed == max)
            {
                key = keysPressed[i] > key ? keysPressed[i] : key;
                continue;
            }

            key = keysPressed[i];
            max = elapsed;
        }

        return key;
    }
}
// @lc code=end

微信id: 我要成為 Dr. 🥬
来自 vscode 插件

repo: Zheaoli/do-something-right


text:
Code Error.

We have fixed.

repo: Zhiquan-Wen/DDG


text:
Fix reading Groups token information when compiling for x86_64

The struct we're reading from the buffer is defined as such:
typedef struct _TOKEN_GROUPS {
  DWORD              GroupCount;
  SID_AND_ATTRIBUTES *Groups[];
} TOKEN_GROUPS, *PTOKEN_GROUPS;

which would translate to this in rust:
pub struct _TOKEN_GROUPS {
    pub GroupCount: u32,
    Groups: *const c_void,
}

The previous code used to assume that the offset of Groups was 4,
which is true on i686 but not on x86_64.
Output of rustc -Zprint-type-sizes on i686
print-type-size type: `_TOKEN_GROUPS`: 8 bytes, alignment: 4 bytes
print-type-size     field `.GroupCount`: 4 bytes
print-type-size     field `.Groups`: 4 bytes

Output of rustc -Zprint-type-sizes on x86_64
print-type-size type: `_TOKEN_GROUPS`: 16 bytes, alignment: 8 bytes
print-type-size     field `.GroupCount`: 4 bytes
print-type-size     padding: 4 bytes
print-type-size     field `.Groups`: 8 bytes, alignment: 8 bytes

Oh dear god I forgot I made this. I'll assume you tested this and its all good.

authors: Eijebong ZoeyR

repo: ZoeyR/windows-accesstoken


text:
Added a java program to find the number of unique characters in a string

This java program finds the number of unique characters in a string.

This java program finds the number of unique characters in a string.

@pritika163 kindly move program to Java/Data Structures/String problems

@pritika163 Your PR has been merged successfully, Thank you for your contribution.
Give repo a star if it was useful.
Happy hacking.


text:
A Soul's Bane: Confusion Beast Room

The quest helper says to find the correct confusion beast and highlights all of them. The correct confusion beast to attack is always the one with NPC ID 1067.
Fix should be pretty simple: remove this line and update the message above it: https://github.com/Zoinkwiz/quest-helper/blob/master/src/main/java/com/questhelper/helpers/quests/asoulsbane/ASoulsBane.java#L249-L250

This is intentional, as we don't want to provide information to the player that they'd otherwise be unable to obtain themselves, as adjusted in https://github.com/Zoinkwiz/quest-helper/commit/530d2ee28fd4a6a712e2da8a1bcde2aa8646dccf.

authors: Zoinkwiz larsiny

repo: Zoinkwiz/quest-helper


text:
SkeletonStray & ZombieHusk

Hi,
I report those two creatures don't gain any payments from the jobs for killing them, i just installed the plugin (which means i have the default jobConfig.yml) I just add the Stray and Husk with same gain from their parents (skeleton and zombie) but when I kill them, there nothing.
      STRAY:
        income: 10.0
        points: 10
        experience: 15

Spigot 1.12.2
Jobs 4.8.0
Vault 1.6.1

there are many items/blocks missing from the default jobConfig.yml file.  It hasn't been kept as current as the release, so you'll need to add/remove the items for each job as you like.
FWIW - I've been going thru the same file the last couple days and revising it quite a bit to pull in more recent released items, converting all numeric ID's to namespaceID's and making each job be more of real life scenario.  I'll be sharing with @Zrips once I'm done so he can decide to include it as a new default, revise as he deems necessary or not use it at all. :-)

I know there some missing, that's why I add them in my jobs but like I said earlier stray and husk didn't work and I don't know why because polar_bear, evoker, etc... everything work expect for these two.
I even try to put their ID from words_en.yml but without success.

081edff7cb733cdcf528bd1f1567ddbccb0357bb

authors: Zrips smmmadden weberlepecheur

repo: Zrips/Jobs


text:
phylopandas DataFrame is not really a phylopandas DataFrame

Need to figure out how to make sure all pandas.DataFrame methods return phylopandas.DataFrames when called by phylopandas.

Solved in #9

repo: Zsailer/phylopandas


text:
Be able to set working directory or use the project path as default working directory

What would you like to be added:
As far as I can tell, horusec assumes that the current directory as the working dir. It would be useful if horusec supports a different working dir or if treats the project path as so.
Actual usage.
$ cd `project diretory` (where my horusec-config.json is in)
$ ./horusec start -e -p ./

If I don't do the first step, horusec does not find horusec-config.json file. Would be very nice if it does.
I could pass the working dir:
$ ./horusec start -e -p ./ -W ./

Or use the project path as working dir. (maybe it could be a brocking change)
Why is this needed:
Basically, I wanted to create a gradle task the wrap the horusec binary. I couldn't make it work because of this behave.

Hi @leandrorodrigueszup thanks for the suggestion.
Use the --config-file-path would not help you in this case?
./horusec start -e -p ./ --config-file-path path/to/your/config-file

Hi @matheusalcantarazup thanks for the reply!
Yes,  it works! :-)
But still a little verbose and unnatural in my opinion.
But anyways, I can move on now. Thanks!

This is good! I'll let this issue open for further discussion.
Thank very much for your suggestion.

authors: leandrorodrigueszup matheusalcantarazup

repo: ZupIT/horusec


text:
Unexpected behavior when constructing vectors from wrong-dtype numpy arrays

In the wiki, it is stated that the vector objects support both construction from iterables and from objects that supports the buffer protocol (such as numpy arrays). It seems that the buffer protocol construction has precedence over the iterable construction. This makes sense, but it has an unfortunate side-effect.
When constructing an integer vector using a numpy array of integers of the wrong size, the resulting vector is not as I would expect:
>>> a = np.array([1,1,1], dtype=np.int64)
>>> glm.ivec3(a)
ivec3( 1, 0, 1 )

On my system, dtype=int64 is the default, so ivec3(np.array([1,1,1])) produces this "bug". This effect only seems to occur for integer and boolean vectors.
If the vector had used the iterable construction method here, the result would be as expected.
This effect makes combining glm and numpy quite a bit more dangerous. This "bug" is subtle and easy to miss. For safety, vectors always have to be constructed using the unpacking operator (ivec3(*np.array([1,1,1]))). Even worse: since arbitrary iterables may also support the buffer protocol, this precaution has to be taken in all functions that accept a generic iterable.
My feature request:
Could PyGLM be changed to only use buffer protocol construction if the types match, and use iterable construction otherwise?

Hi there @avdstaaij ,
you seem to have found a bug.
On my system, the same code runs without issues:
>>> a = np.array([1,1,1], dtype=np.int64)
>>> glm.ivec3(a)
ivec3( 1, 1, 1 )

However, running the code on linux produces the error you've mentioned.
T he bug persists with any given vector size:
>>> a = numpy.array([1,1,1], dtype="int64")
>>> glm.ivec3(a)
ivec3( 1, 0, 1 )
>>> glm.i8vec3(a)
i8vec3( 1, 0, 1 )
>>> glm.i64vec3(a)
i64vec3( 1, 0, 1 )

I haven't been able to look at possible causes in the code yet.
The way PyGLM converts a given object to e.g. a 32-bit int vector is by following a simple checklist:

Is the object a number?
Is the type of the object a PyGLM type?
Does the object support the buffer protocol?
Is the object a tuple or list?

If the object does support the buffer protocol, PyGLM extracts its data and identifies, which PyGLM type it corresponds to. Afterwards, it uses a suitable constructor for the target type.
I.e. in your example, PyGLM would first convert the numpy array to a 64-bit int vector (i64vec3) and continue by converting that to a 32-bit int vector (ivec3). This way you can convert from any bit-width to any other bit-width as you would expect - unless there is a bug, as is the case here.

The reason for this bug is that the data given by numpy is interpreted based on its format string. On the linux platform I've tested on, the C datatype long appears to be 8 bytes wide, unlike on my Windows OS, where it's 4 bytes wide.
Therefore, on the Windows machine, numpy reports the format (np.array((1,1,1), dtype=np.int64).data.format) as "q" (long long) and on Linux it reports as "l" (long). PyGLM always interprets "l" as 4-bit, regardless of the actual size of long, according to this table: https://docs.python.org/3/library/struct.html#format-characters.
This needs to be fixed.

Looks like I was too eager assuming what the issue was :).

authors: Zuzu-Typ avdstaaij

repo: Zuzu-Typ/PyGLM

license: Zlib


text:
No documentation

Hi,
this repo I couldn't find any documents about PyALL in this repo.
Where can I find documents describing PyALL in detail?

Hello Sean,
I'm not sure this is what you're looking for at all.
First of all, "PyALL" doesn't exist. There is no such library (at least in the PyPI.
This (PyOpenAL) is a library that provides bindings to OpenAL.
You'll find advanced documentation on their site.
Aside from that, PyOpenAL provides a few of it's own methods. They're documented in the README.

authors: SeanTolstoyevski Zuzu-Typ

repo: Zuzu-Typ/PyOpenAL

license: Unlicense


text:
Develop

modified:   controller/conexion.php

a


text:
feat: include systems as part of Netlify collections

The about pages for Design System and Application Framework are not part of the Netlify CMS collections, so hoping this will surface them there.

Aaaayyyooo it worked!

repo: Zywave/booster


text:
Discuss ways to merge separately mapped sidewalks and bike lanes

This conversation started at https://github.com/a-b-street/abstreet/discussions/789 (search term "separate" and "multiple OSM ways")
The main question is:

…how will the library figure out if separate ways are geometrically located to the left or right of the main road?

Preprocess data
I think we should continue the search for a solution for this. AFAIK there is no way to solve this in JavaScipt/Node. But it is possible to solve it in QGIS and likely the underlying Python libraries.
So it should be possible to preprocess the data in a way, that osm2lanes can then work with.
I think we should check if this could be solved (in a performant way) with Osmium or osm2pgsql or Overpass, … – I don't know enough about those tools ATM.
I assume, one of those tools would be able to merge the separately mapped ways to the central way. This could be done just by proximity, but I assume that would be error prone. But there are tags, that we can use, to reduce the error rate:
Sidewalks

highway=footway + footway=sidewalk on the separately mapped way is a strong indicator, that the way belongs to the main road

sidewalk=separate/sidewalk:(left|right|both)=separate on the main road are a strong indicator, that there is a sidewalk to look for nearby

Cycleways

is_sidewalk=yes on the separately mapped way is a strong indicator, that the way belongs to the main road. This tag is still experimental, though, but could help a lot. We are experimenting with it to improve routing for footways and cycleways, more on this wiki page footway mapping (GER) and this wiki page on cycleways mapping (GER) The additional experimental tags is_sidepath:of=(secondary|residential|<HighwayValueOfMainRoad) and is_sidepath:of:name=<NameValueOfMainRoad> might also be useful, but are likely better automatically processed by the script.

cycleway=separate/cycleway:(left|right|both)=(separate|optional_sidepath) on the main road are a strong indicator, that there is a cycleway to look for nearby (Germany wiki page)

Thank you! Great issue.
I've faced this problem a couple of times. We can certainly add multiple way processing, but I'm not sure how to identify them in the first place. As you mentioned, probably all the approaches are error-prone.

I've attempted this before, https://github.com/a-b-street/abstreet/issues/330 tells the full story. Some of the problems are https://github.com/a-b-street/abstreet/issues/330#issuecomment-758173792.
But I did make some headway on this -- https://github.com/a-b-street/abstreet/blob/master/map_model/src/make/snappy.rs for reference. This code only tries to deal with merging separate cycleways with the main road. As a first pass, it only looks at ways with separation:left|right (https://wiki.openstreetmap.org/wiki/Proposed_features/cycleway:separation). Partly this helps us know which direction to search and partly this was a way for me to slowly "opt in" some cycleways around Seattle into the experimental merging, by filling out the tag.
Walking through how it works...

Find the center-line and estimated width of every separate cycleway
Create a quadtree (spatial partitioning structure that can quickly answer questions like "what's nearby") containing all of the left and right edge of every "regular" road segment
Look for matches
Delete any way that was snapped, and insert the lanes (and separators) into the main road

I have a few different ideas for how to look for matches. The thing currently implemented steps every 5 meters along a cycleway, projects a perpendicular test line 3 meters from the left or right edge (based on the separation tags), and looks for the nearest collision with one of the main road edges. Based on problems I hit, the match also has to have the same layer (z-ordering). And I was also requiring the cyclepath and main road to have a similar angle where the perpendicular line connects them -- within 30 degrees.
One of the biggest complications is when the main road or the cycleway are chopped up into different pieces. Around some intersections in Seattle where I was testing, some of the curb cuts are micro-mapped, so there will be tiny cycleway segments at a bunch of different angles. https://www.openstreetmap.org/way/835195091 is a simpler example of that. The current snapping code requires at least 80% of the cycleway to snap to some roads (maybe multiple). An example where this is tricky is the Burke Gilman trail at https://www.openstreetmap.org/node/53108420#map=19/47.66568/-122.30189. It's mostly a separate trail, but around here, it physically joins up and becomes part of the sidewalk on NE Blakeley Street:

(The screenshot is without any snapping)
Sometimes we might have to logically split a longer main road's way to indicate where a cyclepath runs parallel to it or not.
These're just some of the problems I hit. Many might be specific to a certain area.

AFAIK there is no way to solve this in JavaScipt/Node. But it is possible to solve it in QGIS and likely the underlying Python libraries.

If we can get a robust approach working using any language/dependencies, it's definitely possible to get it working everywhere. If GDAL or Shapely or libraries in some language make it easy to come up with good heuristics, then we can adapt the approach elsewhere

I feel like this should be beyond the scope of osm2lanes because it involves spatial reasoning. (Probably any problem involving multiple osm ways will end up needing some).
There are some great insights in this thread, and I would like to add that the calculated or estimated width that osm2lanes produces would be an valuable input into any algorithm that was able to do this snapping. It might even be useful to be able to request "minimum sensible" "likely" or "maximum sensible" estimated widths from osm2lanes.

authors: BudgieInWA dabreegster enzet tordans


text:
No locales were configured, but expected at least the default locale

I get the error: No locales were configured, but expected at least the default locale en. Perhaps you need to add it to your a2lix_translation_form.locales bundle configuration?
I'm using Symfony 7 and just set up the translation bundle. Also I did the required steps:
in config/packages/a2lix.yaml
a2lix_translation_form:
    locale_provider: default
    locales: [en, fr, es, de]
    default_locale: en
    required_locales: [fr]
    templating: "@A2lixTranslationForm/bootstrap_4_layout.html.twig"

and in my formType
$builder->add('translations', TranslationsType::class, [
    'locales' => ['en', 'fr', 'es', 'de'],
    'default_locale' => ['en'],
    'required_locales' => ['fr'],
    'fields' => [
        'description' => [
            'field_type' => 'textarea',
            'label' => 'descript.',
            'locale_options' => [
                'es' => ['label' => 'descripción'],
                'fr' => ['display' => false]
            ]
        ]
    ],
    'excluded_fields' => ['details'],
    'locale_labels' => [
        'fr' => 'Français',
        'en' => 'English',
    ],
]);

in config/bundles.php
    A2lix\AutoFormBundle\A2lixAutoFormBundle::class => ['all' => true],
    A2lix\TranslationFormBundle\A2lixTranslationFormBundle::class => ['all' => true],

in config/packages/translation.yaml
framework:
    default_locale: en
    translator:
        default_path: '%kernel.project_dir%/translations'
        fallbacks:
            - en
        providers:

I went trough the documentation and the other issues but still couldn't resolve the problem.

@Paradonized I got the exact same error as you..
Also working on Symfony 7.
Any update ?

authors: Paradonized c-vandendyck-kbr


text:
Controller 'asSortable', required by directive 'asSortableItem', can't be found!

Hey, I'm getting this error, even though my code is almost exactly the same as in the demo.
View:

 0"
       as-sortable="dragControlListeners"
       ng-model="items"
       class="mappa-block">
        List:

                test

Controller:
app.controller('MainCtrl', function ($scope, dataStorage) {
    $scope.items = [];
    $scope.newName = '';
    $scope.newUrl = '';
    $scope.dragControlListeners = dragControlListeners = {
        accept: function (sourceItemHandleScope, destSortableScope) {return true},
        itemMoved: function (event) { },
        orderChanged: function(event) { }
    };

    dataStorage.load().then(function (items) {
        $scope.items = items;
    });
...

Am I making some silly mistake? Any advice on how to debug it? Thanks in advance!

why do u do this ?
$scope.dragControlListeners = dragControlListeners = {
how do u initialize  the module dependencies?

Perhaps related to this? https://github.com/a5hik/ng-sortable/issues/230

authors: a5hik anorudes rhclayto


text:
custommedia extension markup validation failed (W3C)

Hi
I am using the custom media extension with media="--small" a.s.o. like in the examples.
Unfortunatley this markup is no valid html and so highlighted by the W3C-Validator:
"Bad value --small for attribute media on element source: Expected ( or letter at start of a media query part but saw - instead."
"Stray end tag source."
Is this a normal behavior or do I make something wrong? How could this be avoided?
Thanks,
Frank

You make everything right. Custom media queries might be a future feature and therefore the validator does not validate. We basically polyfill this with lazySizes. It doesn't harm your page.
You can avoid this by using the data-media attribute instead:
<source
    srcset="data:,pixel"
    media="(max-width: 1px)"
    srcset="your_srces"
    data-media="--small" />

authors: LDSign aFarkas

repo: aFarkas/lazysizes


text:
Tests are not running

Closes #12

looks good


text:
Improve logging

Description of changes

[x] Add user id to the logs
[x] Separate db and normal logs
[x] Log when calling A+
[x] Document log format
[x] Improve logging documentation
[x] Remove unnecessary log files

Related issues
Closes #725
Closes #247

server/logs is not gitignored

Not necessary as log files won't be created. In the production environment the docker container forwards the cli logs automatically.

repo: aalto-grades/aalto-grades


text:
HTML showing in post

The feed of Peter Rukavina's blog shows fine in my feedreader (image below) but in Monocle it shows the HTML content of the post. When I check the debug-screen, I see there's HTML in the JSON as well. I'm not sure if this is some bad rendering on the side of Peter's feed, forgiveness of Inoreader, sanitization in Aperture or maybe something else?

I need a little more information in order to track this down:

What Microsub server are you using? It looks like it's not Aperture.
What feed of his are you following? I looked at his site and he has Microformats as well as an RSS feed.

Looking at the debug JSON you posted, I see a couple problems with the data there, which is a problem with whatever Microsub server you're using.

author should never be a string, it should always be an object with the name, url and photo properties. https://indieweb.org/Microsub-spec#card
summary is a plaintext value, and cannot contain HTML, which is why you're seeing the HTML tags in Monocle. I need to know what feed of his you're following and which Microsub server you're using in order to tell exactly where the problem is here.

Thanks. I thought I had Aperture enabled but later today I found out I still had Yarns activated in my WordPress environment. So that's the Microsub server I use for this feed. I am subscribed to https://ruk.ca/rss/feedburner.xml on this server. I will do some more testing with both servers and feed. I'll post my findings later.

@frankmeeuwsen, This is definitely a Yarns issue then, I'll check it out and will update you when I have it fixed

I just switched to Monocle to see what would happen. I am subscribed to the same feed, now Monocle show the correct parsed HTML. Thanks for the update @jackjamieson2. Do you need me to file an issue at your repo?

Thanks Frank, Aaron already filed https://github.com/jackjamieson2/yarns-microsub-server/issues/75

authors: aaronpk frankmeeuwsen jackjamieson2

repo: aaronpk/Monocle


text:
Generated schema filename times are not UTC

When multiple team members are in different timezones, migrations may get out of sync because the times used in the generated filenames are local.

I changed the print_new command to use UTC datetime string. It's in 0.7.1 release.

Thanks!

repo: aartur/mschematool


text:
Fail to init BITStarPlanner

It seems like bit_star_planner.py is not fully finished, such as some abstract method is not implemented, using undeclared variable.

There is another issue that in bit_star_planner.ipynb,
This line:
result_refined = BITStarPlanner(num_batch=200, stop_when_success=False).plan(env, start, goal, timeout=('time', 10))
cannot return a valid result.
In addition, in the GNN planner, is the path smoother module missing?

repo: aaucsd/lemp


text:
Didn't find parameter 'mode' in signature of z2ui5_cl_xml_view->generictile

error complains no parameter mode found in generictile

error resolved, thanks!


text:
Docker Service.docker fails in linux build validation pipeline

https://github.com/abbgrade/psdocker/actions/workflows/build-validation.yml?query=branch%3Adevelop
Message:

ProcessCommandException: Cannot find a process with the name "com.docker.service". Verify the process name and call the cmdlet again.

linux and windows agents are effected

repo: abbgrade/psdocker


text:
Retag existing image instead of building image without additional layers

Closes https://github.com/abcxyz/github-metrics-aggregator/pull/262

Sigh https://github.com/apache/beam/pull/31010

Sigh apache/beam#31010

Is it time to give up on Beam and just build some simple cloud run jobs for our pipelines? We aren't doing anything fancy and we've only ever had one customer look at them as a reference.

Is it time to give up on Beam and just build some simple cloud run jobs for our pipelines? We aren't doing anything fancy and we've only ever had one customer look at them as a reference.

I was ready to give up on day 1, but yes. I think we should give up on Beam and use Cloud Run jobs instead. Any performance benefit we're getting using Beam is outweighed by lost engineering cycles.

authors: bradegler sethvargo

repo: abcxyz/github-metrics-aggregator


text:
feat: home page integrate api:

extract components
add redux toolkit
add RTK query(TBC)

報告patrick哥
忘了還有

報告沒問題patrick哥
都忘了還有CORS的問題  真是抱歉
我過幾天再來修他

RTKQ是很麻煩的東西
Boilerplate爆多  不過功能很多
最實用的功能是他的cache
就是像youtube那樣  我們搜尋影片->點某一部進去看->按上一頁回到搜尋結果
那些搜尋結果會馬上出現  看chrome的network tab會發現他沒有真的發request去取資料  因為他用的是cache的資料
Cache很難做  不過RTKQ幫我們做好了
他的核心概念就是把API的動作/狀態跟store綁在一起
真的就是RTK + Query的意思
RTK就是redux那一套  您已經知道了
Query就是跟呼叫api有關的東西
包含endpoint的定義(網址/HTTP method/參數之類的)  還有response handler等等
Endpoint的行為分成兩類  分別是query和mutation
Query endpoint是查詢用的  得到response之後可以把結果cache起來
Mutation endpoint就是修改用的 得到response之後可以修改現有cache的內容
每個endpoint都會被他轉換成hook  這些hook都有自己的state
因為他是存在store裡面的  所以每個endpoint hook的狀態都是整個app共用  像我們把使用者資料存在redux store一樣的概念
例如我可能有 useGetArticlesQuery 這個hook  裡面就會有 isLoading, data 這些state
也會有 refetch 這種方法可以呼叫
雖然體驗不是太好  第一眼看會滿難懂的
不過您有興趣的話還是可以試試看  畢竟也是大框架

我們的pagination type分成 basic 和 cursor 兩種
basic 是一般的分頁  可以選要取第幾頁的資料  然後一頁幾筆的分頁方式
例如說我寫 /articles?page=2&limit=25 就是代表取第3頁 (我們的index是從0開始)  然後一頁25筆  所以我會拿到第51 ~ 75筆資料
這種分頁方式適合跟bootstrap的那種pagination一起用
另一種 cursor 是給infinite scroll用的
就是像instagram那樣  每次滑到最下面就會再拿N筆資料回來
雖然乍看之下好像可以用basic pagination做  但是其實不行
因為這樣新資料加進來就會導致取的結果不對了
例如剛才的 /articles?page=2&limit=25 會拿到第51 ~ 75筆資料  假設他是由新到舊排序
現在有5筆新料被加進來  我再去呼叫 /articles?page=3&limit=25
雖然 page = 3, limit = 25 會給我第76 ~ 100筆資料  但是因為前面有新的5筆
所以我的76 ~ 80其實是剛才51 ~ 75的最後面5筆  所以畫面上就會出現重複id的資料了
不曉得您能不能理解這個概念
cursor pagination就是用來解決這個問題
我們的cursor代表資料的id 他是數字
API只會回傳id大於這個數字的資料
就跟書本一樣  假設一開始總共200頁  0在左  200在右  由左至右遞增
我把書籤插在第25頁  永遠只往右翻
這樣不管0的左邊加了多少頁  我永遠都不會拿到那些東西. 因為我只會往右找
所以只要cursor設對  每次都不重疊  我每次得到的結果就絕對不會重複
不過經您這麼一說  我們應該要允許使用者決定cursor是要往左還是往右才對
這樣才可以讓用API的人自己決定要由新到舊顯示  還是由舊到新
之後再把它加上去

最近也發現了一些不錯的圖
當做中秋節之前的糧食  請您享用

這種分頁方式適合跟bootstrap的那種pagination一起用
報告史蒂芬哥
可以理解新增資料之後 basic pagination會亂掉的部分
但這樣的話即使是bootstrap 那種 pagination也會亂掉吧？？
比方說一頁25個 我在第二頁 結果前往第三頁的之前 又新增了26筆資料 這樣第三頁就還會是原本的第二頁
還是說因為每一頁都會重新取資料 不會像infinite scroll那樣保留先前取回來的資料導致畫面上有重複的資料 所以就沒什麼關係？？

就跟書本一樣 假設一開始總共200頁 0在左 200在右 由左至右遞增
我把書籤插在第25頁 永遠只往右翻
所以流程會是：
原本cursor = 0
page = 0
limit = 5
當我往下滑到第5個資料(cursor = 5)的時候就會去取後5筆資料
page = 1
limit = 5
繼續滑倒第10個資料(cursor = 10)的時候 就會再去取後5筆資料
這個樣子嗎

最近也發現了一些不錯的圖 當做中秋節之前的糧食 請您享用

這個雙眼皮真的可愛史蒂芬哥
雙眼皮大眼睛跟單眼皮小眼睛就像巨乳之於平胸一樣
真的是很難抉擇
如果可以我都要就太好了

另外報告史蒂芬哥 想跟您討論一下
當瀏覽器寬度縮小到700px左右的時候
文章縮圖的字會擠在一起 有些還會超出去
要再把左邊的board往左邊靠 還是給右邊的文章區加上一個min width呢

報告patrick哥  在經過N年的等待之後我們終於又回歸了

當瀏覽器寬度縮小到700px左右的時候
更新時間的部分會超出去
這部分是也要讓他ellipsis嗎 還是左邊board再往左移呢

我們讓 文章分類 ‧ 作者 ‧ 發佈時間 的那一排wrap如何  這樣他就不會爆開了
隨意做  簡單做

報告patrick哥
Snapshot testing是比對整個HTML  只要跟上次的snapshot比對有任何一個字元不一樣都會造成測試不通過
他的核心精神就是檢查我們改完之後的UI是不是跟上次一模一樣  如果不是就要看看這個改動是刻意的還是意外
如果是刻意的  就要把舊的snapshot換成新的  如果是意外就代表有地方被改壞了
所以他比較適合用在底層UI這種久久才改一次的東西
要用在大頁面也可以  只是大頁面小地方改動的機會比較大
例如某個地方的文字從 #1 改成 No.1  或是span改label這種不影響功能的東西都會造成snapshot testing失敗
所以對大頁面做snapshot testing就會常常要更新那個snapshot
通常開發的流程都是做完直接建PR  要等Github actions跑過才會知道測試是不是都通過
因為測試太多了  大部分情況很難知道自己改了這個檔案要跑哪幾個test file
不過jest的snapshot testing也有支援存取component props/methods的功能
所以他也可以做到Cypress那種e2e testing  但是肯定會常常要更新snapshot  做起來就不是這麼方便
e2e testing指的是模擬使用者的環境和使用情境  按照使用者真正的操作流程操作一次
所以他只在乎東西是否存在  能不能點  點了有沒有用
假設某個頁面的流程是這樣：

進入頁面會看到商品圖和商品描述
點擊數量左/右箭頭可以減少/增加購買數量
點擊購買之後會跳到下個頁面

E2E testing可能就會這樣：

取得圖片的element，檢查圖片連結是否等於 https://.../xxx.jpg
取得商品描述的element，檢查內文是否等於 ...
點擊左/右箭頭，檢查商品數量是否減少/增加
點擊購買按鈕，檢查網頁url是否從 xxx 變成 ooo

這些element通常都是用 class 或 id 去取的  所以他不在乎按鈕到底是 button 還是 span
也不在乎文字到底是 p 還是 div
只要取得到  而且點下去有用就算通過
Snapshot testing則是會從上到下去比對這些東西的HTML  這個對使用者來說就不是這麼重要
因為使用者在乎的是東西有沒有用  整個流程有沒有串起來
Jest的官網有個 Why Snapshot Testing 的區塊  您也可以看看

另外如果大家都連到同一個資料庫  這樣會造成測試根本無法進行
因為資料會一直變動  那些需要依照資料內容來做的測試就會常常失敗
所以老派作法是大家都在自己的電腦上裝資料庫  然後開發/測試的時候都去連本地端的後台
每次後台跑起來就會用固定的資料包 (fixture) 重置本地資料庫
這樣就可以保證工程師之間不會互相影響  每次的資料也都相同
比較新的方式是用docker  這樣工程師就不用自己裝資料庫和架後端環境
一個docker就把所有東西都包進去  真的方便
不過我們在這裡沒有用docker  您可以試試在前端自己寫一個本地端的API
以axios為例  我們可以在request url是 xxx 的時候每次都做固定的事情
具體的作法可以參考這個 axios-mock-adapter
這樣就算沒有後台和資料庫  我們也能在前端模擬出有連資料庫的樣子

authors: PatrickKuei abemscac

repo: abemscac/inet-PatrickKuei