text:
npm run typegen - generate TypeScript declaration files

Fixes https://github.com/xenova/transformers.js/issues/25
This is a basic type setup, which enables type-checking/Intellisense aswell:

I just added two example JSDoc comments, to display how it works.
Since @chelouche9 asked for it, I would like to assign you to work out more types. Are you capable of doing so?
Whenever you have added more types, you can run:
npm run typegen
And commit both the JSDoc comments and the dist/types changes, so we have synchronized types.

Wow this is great! Thanks so much! I'll wait for @chelouche9 to respond before proceeding to merge into main.
Excuse the potentially silly question (I am not too familiar with typescript haha), but does it have to be a dependency on the library itself, or can it be made into a dev dependency?
I could also try to add types while I write the code. I assume I just follow what you did and add annotations to the methods?

@kungfooman sure, I would be happy to add more types to the project. Just to make sure I understand, I need to add new JSDoc comments, then run the typegen command and the declaration files will be created?
@xenova anything I need to know about running the project, tests, etc..?

@xenova anything I need to know about running the project, tests, etc..?

My "test-suite" (if you can even call it that) is very simple. I made it before actually creating the npm package, so it is still just an ugly script that I run with npm run test (https://github.com/xenova/transformers.js/blob/main/tests/index.js)
To run the tests with local models (ofc much faster for development), you need to have the models stored in the models folder (https://github.com/xenova/transformers.js/tree/main/models) with the same structure as the HF repo I use to store the remote models: https://huggingface.co/Xenova/transformers.js. For example, you will have folders like this:
./models/onnx/quantized/openai/whisper-tiny.en/speech2seq-lm-with-past
Alternatively, you can disable using local models:
https://github.com/xenova/transformers.js/blob/4ad2581604f2b8da37e8842f9453d02ae1c4f5e4/tests/index.js#L14
but since I haven't implemented local caching, you will end up downloading the model each time you run the tests (not ideal)

@xenova great, I will start working on that once you merge :)

@xenova great, I will start working on that once you merge :)

Actually, do you mind working on this branch (or a fork of it)? Then I can merge it when it's all ready?

Sure. Although it might take some time to complete all, I though we can split the work to not lose track of the master.

Sure. Although it might take some time to complete all, I though we can split the work to not lose track of the master.

Great! The library is expanding extremely quickly, so there might be quite a lot of breaking changes, but many functions should remain the same (and I will take responsibility to manage any conflicts before merging into main)

Excuse the potentially silly question (I am not too familiar with typescript haha), but does it have to be a dependency on the library itself, or can it be made into a dev dependency?

Sorry, my bad, TypeScript is of course a dev dependency only. I fixed the package.json and package-lock.json via npm install --save-dev typescript.

I could also try to add types while I write the code. I assume I just follow what you did and add annotations to the methods?

Right, it's rather simple but some types can become complicated aswell. JSDoc is pretty powerful, but if I don't know the syntax, I've had good experiences with just asking OpenAI :sweat_smile:

@kungfooman sure, I would be happy to add more types to the project. Just to make sure I understand, I need to add new JSDoc comments, then run the typegen command and the declaration files will be created?

That's right, everything is quite straight-forward with types. :+1:

Sure. Although it might take some time to complete all, I though we can split the work to not lose track of the master.

I have the same sentiment, typing is something that developes over time. Usually when I'm stuck with some code that I cannot understand so far, I add types as a mental prop e.g.
It doesn't take too much time, in VSCode you just move the cursor over e.g. a method, type /**[enter] and it will auto-generate the entire @param template.

Right, it's rather simple but some types can become complicated aswell. JSDoc is pretty powerful, but if I don't know the syntax, I've had good experiences with just asking OpenAI 😅

I am using it as well to do all the heavy lifting 😝

Sorry, my bad, TypeScript is of course a dev dependency only. I fixed the package.json and package-lock.json via npm install --save-dev typescript.

I added it to my PR. I cannot push to your branch @kungfooman. If you guys have a better idea to manage those branhes, let me know.

#28

I added it to my PR. I cannot push to your branch @kungfooman. If you guys have a better idea to manage those branhes, let me know.

Thank you for being pro-active! I added you both as collaborators on my fork, so that should work, once you accepted the invite.
I hope you know how to add remotes and pull/push to them

@kungfooman I applied all the changes on my fork already. I will keep doing it from there :)

@kungfooman I applied all the changes on my fork already. I will keep doing it from there :)

Nice, so either:

This will be merged first and you can merge main branch
Your PR will be merged directly

I have no hard feelings for either, I'm glad about your support :muscle: :+1:
Once a typing base exists, it will be easier to make more fine-tuned type fixes here and there in smaller/more-manageable PR's

@kungfooman are you actively work on this branch?
I though for some reason you have made the setup and stopped

@kungfooman are you actively work on this branch?

I just keep it up to date basically, so either way (1) or (2) should work out nicely

authors: chelouche9 kungfooman xenova


text:
更新留言为畅言。添加分类，并支持两级目录

1、建议更新留言为畅言。
2、建议分类支持两级目录。
3、建议首页底部可添加访问人数，和总数。。。
4、建议每页显示10片文章。而且文章显示为简述。并不是全部显示文章内容

显示摘要。。
正文中添加如下：
abc

首页摘要显示abc

source: gharchive/issue

repo: xiangming/landscape-plus

license: mit

license_type: permissive

license_source: bigquery


text:
内存溢出，程序崩快malloc(): memory corruption，Aborted (core dumped)

我在ubuntu 16.4中安装darknet2ncnn过程中，make和install过程均没有出错，运行cifiar历程也没有问题，但是当运行yolov3-tiny历程时，出现如下：
./yolo zoo/yolov3-tiny.param  zoo/yolov3-tiny.bin  data/dog.jpg  data/coco.names
malloc(): memory corruption
Aborted (core dumped)
请问这是什么原因，是生成的param和bin文件有问题吗？

the same problem.

authors: lisongtiankong michaelowenliu

license: WTFPL

license_source: github-api


text:
Message

https://xiangyingchang.com/3-comments/
Have questions? I have answers (maybe).

test


text:
The procedure entry point cabsf could not be located in the dynamic link library

Good day everyone.
I am trying to use OpenBLAS in Visual Studio (2013) and was able to build the latest develop branch using the command
$ make TARGET=HASWELL BINARY=32
However, while running the debugger in VS, I run into this error:
"The procedure entry point cabsf could not be located in the dynamic link library"
I think cabsf is part of the C complex support (complex.h). I am using the MinGW and followed the instructions in https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio. I read somewhere though that the MinGW version 4.x does not support complex numbers.
http://mingw-users.1079350.n2.nabble.com/Follow-up-Undefined-reference-to-cabsf-td7582564.html
The project that I am doing does not use complex numbers so I was thinking of just disabling the complex number support during compile. I am not sure how to do this so I tried commenting out the complex.h declarations and the functions that uses _Complex return type (like cdot.c and zdot.c) but I just run into more compile errors. Does anyone know how to disable complex numbers for the compilation?
Note: I am also using NO_LAPACK=1 option.

@frpunzalan ,  Could you try our pre built binary( http://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win32.zip/download)?
You may also need mingw32 dll. (http://sourceforge.net/projects/openblas/files/v0.2.14/mingw32_dll.zip/download)
If you want to only build single and double real numbers, please edit OpenBLAS/Makefile.tail.
Form
BLASOBJS    = $(SBLASOBJS)   $(DBLASOBJS)   $(CBLASOBJS)   $(ZBLASOBJS)
BLASOBJS_P  = $(SBLASOBJS_P) $(DBLASOBJS_P) $(CBLASOBJS_P) $(ZBLASOBJS_P)

to
BLASOBJS    = $(SBLASOBJS)   $(DBLASOBJS)
BLASOBJS_P  = $(SBLASOBJS_P) $(DBLASOBJS_P)

Then, you need to edit OpenBLAS/exports/gensymbol to delete complex functions (e.g. cgemm, zgemm and others).

Thanks for the suggestions, will try that. cheers!

I tried using the pre built binary to test the cblas gemm using the test code in the OpenBLAS install page:
#include "stdafx.h"
#include <cblas.h>
#include <stdio.h>
#include <intrin.h>
void main()
{
printf("openblastest! \n");
int i = 0;
double A[6] = { 1.0, 2.0, 1.0, -3.0, 4.0, -1.0 };
double B[6] = { 1.0, 2.0, 1.0, -3.0, 4.0, -1.0 };
double C[9] = { .5, .5, .5, .5, .5, .5, .5, .5, .5 };
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
for (i = 0; i<9; i++)
	printf("%lf ", C[i]);
printf("\n");

}
The result was [ 11.000 -9.000 5.000 -9.000 21.000 -1.000 5.000 -1.0000 3.000 ].
I then tried to build the develop source without the complex numbers code. I changed the Makefile.tail as you suggested above and also deleted the complex functions in OpenBLAS/exports/gensymbol. The build options I used are
$ make TARGET=NEHALEM HOSTCC=gcc BINARY=32 NO_LAPACK=1
After compiling, I installed using
$ make PREFIX=path/to/install install
Once I got the library and include files, I tried compiling the gemm test again but I run into some errors:
openblas_config.h error: long should be preceded by ";"
I looked into the openblas_config.h fiie and there seems to be a misplaced text in it:

...
#define OPENBLAS_HAVE_SSE4_1
#define OPENBLAS_HAVE_SSE4_2
#define OPENBLAS_CORE_NEHALEM
OPENBLAS_    <--- this was the source of the error
#define OPENBLAS_CHAR_CORENAME "NEHALEM"
I deleted the errant line and the project compiled. I run the test again and the result was the same.
Just a note, I noticed that the defined core name in the openblas_config.h file is NEHALEM even though I indicated HASWELL as the TARGET in the build and my PC's core is HASWELL.
Sorry for the long winded response but in summary, the build seems to be working. Thanks for the help and the quick response.
Cheers!

@frpunzalan , because you use 32-bit OpenBLAS, we didn't optimize sandy bridge, haswell on 32-bit OS. Therefore, it uses the old Nehalem kernels.

@xianyi ,
I see. Thanks for the info.

authors: frpunzalan xianyi

repo: xianyi/OpenBLAS


text:
Add protonation functions

Motivation or Problem
This PR adds several helper functions related to protonation & ionization.
Description of Changes
New "big" functions:

uncharge_mol(mol, method): Input = charged molecule (ion or zwitterion), output = uncharged form. Provides two algorithms for doing uncharging, default is to try both in case the other fails, starting with the rdkit algorithm.
is_symmetric_to_substructure(mol, substructure): Check whether a mol is symmetric to a provided substructure, i.e. return "True" for comparing ethylene glycol to "OH" substructure

Helper functions:

protonate_at_site(mol, site): Add a proton to a mol at a given idx and adjust formal charges
deprotonate_at_site(mol, site): Remove a proton of a mol at a given idx and adjust formal charges
is_implicit(mol) : Infer whether a molecule is an implicit or explicit mol object
find_symmetry_classes(mol): provides a set of symmetry classes for atoms in a mol object, based on code by Greg Landrum.

Testing
I included pytest modules for uncharge_mol and is_symmetric_to_substructure
Other notes
The two uncharging methods have different behaviors regarding explicit hydrogens.
Chem.MolToSmiles(uncharge_mol(mol_from_smiles("[C:1]([C:2]([C:3]([C:4](=[O:5])[O-:6])([H:12])[H:13])([H:10])[H:11])([H:7])([H:8])[H:9]"), method="rdkit"))
>> '[CH3:1][CH2:2][CH2:3][C:4](=[O:5])[OH:6]'

vs.
Chem.MolToSmiles(uncharge_mol(mol_from_smiles("[C:1]([C:2]([C:3]([C:4](=[O:5])[O-:6])([H:12])[H:13])([H:10])[H:11])([H:7])([H:8])[H:9]"), method="nocharge"))
>> '[H][O:6][C:4]([C:3]([C:2]([C:1]([H:7])([H:8])[H:9])([H:10])[H:11])([H:12])[H:13])=[O:5]'

Is the desired behavior to re-number?
They still return the same smiles if you use mol_to_smiles though.

Based on the codecov, may need to add additional tests to properly test implicit_h logic

@jonwzheng, thank you for this addition. I will work on reviewing this PR shortly.

Just run into this repo https://github.com/durrantlab/dimorphite_dl about protonation. Maybe worth to incorporate in the future due to its light-weight. It may be also helpful for your work @jonwzheng (just FYI, no action needed).

source: gharchive/pull-request

authors: jonwzheng xiaoruiDong

repo: xiaoruiDong/RDMC

license: MIT


text:
切换页面和展开菜单卡顿

Describe the bug
仓库演示环境，切换未打开的页面和展开菜单能感觉到很明显的卡顿。
To Reproduce
Steps to reproduce the behavior:
1、清空浏览器缓存（实际清不清空都有这个问题）
2、点系统管理和错误页面一级菜单，展开收起明细卡顿
3、未打开任何选项卡的时候进入401页面或者基础数据卡顿明显，在这些页面切换到首页也卡顿明显
Expected behavior
流畅
Screenshots

Desktop (please complete the following information):

OS: win10
Browser chrome 96
Version 2.6

Additional context
奇怪的是家里的电脑是win10，chrome9XX(忘记版本了)，8G内存，加固态不会有这个问题。只有公司的电脑会（环境见上方描述）

#128


text:
Benchmarking Batch Inference

Hello 🙌🏼 I'm running some benchmarks on TinySAM, trying to benchmark batch inference. However, I hit a wall during batch inference. All inputs are torch tensors with the shapes expected by docstrings in inference code:
point_prompt.shape # torch.Size([4, 1, 2]) BXNX2
input_label.shape # torch.Size([4, 1]) BXN
batched_image.shape # torch.Size([4, 3, 1024, 1024]), BCHW

predictor.set_torch_image(batched_image, original_image_size=batched_image[0, 0, :, :].shape) # goes well

# this fails
with torch.no_grad():
        _, _, _ = predictor.predict_torch(
        point_coords=point_prompt,
        point_labels=input_label)

I don't really have a lot of time to debug this as I already did couple of steps, I feel like I'm missing a step, can you let me know if so? I can post a full trace if you want but I really feel like I'm missing a step and hence it errors out.

Hi merveenoyan,
Thanks for your attempt to benchmark TinySAM. The original interface of SAM does not support batch inference on multiple images, and we‘ve followed this design. From the note of set_torch_image and predict_torch, we can find that,
def set_torch_image(
        self,
        transformed_image: torch.Tensor,
        original_image_size: Tuple[int, ...],
    ) -> None:
"""
Arguments:
          transformed_image (torch.Tensor): The input image, with shape
            1x3xHxW, which has been transformed with ResizeLongestSide.
"""

in which the shape of image is set as 1x3xHxW. And in predict_torch
def predict_torch(
        self,
        point_coords: Optional[torch.Tensor],
        point_labels: Optional[torch.Tensor],
        boxes: Optional[torch.Tensor] = None,
        mask_input: Optional[torch.Tensor] = None,
        return_logits: bool = False,
    ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
        """
        Predict masks for the given input prompts, using the currently set image.
        Input prompts are batched torch tensors and are expected to already be
        transformed to the input frame using ResizeLongestSide.

        Arguments:
          point_coords (torch.Tensor or None): A BxNx2 array of point prompts to the
            model. Each point is in (X,Y) in pixels.
          point_labels (torch.Tensor or None): A BxN array of labels for the
            point prompts. 1 indicates a foreground point and 0 indicates a
            background point.
        """

There is batch dimension for point_coords and point_labels, which means multiple points in one image. So the batch inference of SAM/TinySAM only supports multiple prompts for one image, not for multiple images.
As for benchmark, I think it is possible to eval SAM/TinySAM under the same batch settings since we have the same interface. So there is no necessity to implement batch inference for multiple images.

@Gaffey thanks a lot for the swift response! I'll keep this in mind 🙌🏼

authors: Gaffey merveenoyan

repo: xinghaochen/TinySAM


text:
Request the YML file of (realesr-general-x4v3.pth)

Dear xinntao,  it is really nice work !
However, I'm now looking for the more compact network, and found that realesr-general-x4v3.pth is suitable for me.
Can I have your .yml file please?  so that I can training based on the latest config.
Thanks.

Hello, has your problem been solved? I always have strange bad scenes in the second stage of reproduction. Do you have a good yml?

repo: xinntao/Real-ESRGAN


text:
🛑 Workbene is down

In 5369a6e, Workbene (https://workbene.com) was down:

HTTP code: 530
Response time: 78 ms

Resolved: Workbene is back up in f2a8737.

repo: xinzhixiang/uptime


text:
🛑 Blog is down

In b90f634, Blog (https://zhix.in) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Blog is back up in 4df7f3a after 35 minutes.


text:
I don't konw where is wrong

i use pytorch1.0
I encountered some warnings and errors.
I don't know if they are important .Maybe when i tried to  correct them the logic is wrong
here are the warnings and errors
1  UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
I replaced F.sigmoid() with torch,sigmoid in resnet_yolo.py and net.py
2  UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
I replaced size_average=False  with reduction='sum'  in yoloLoss.py
3 IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number
I replaced loss.data[0] with loss.item() in train.py
4 UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.  images = Variable(images,volatile=True)
i just change it to images = images.detach()
i don't konw if it's right
My result is bad .
so anyone can tell me why
thanks

Hi, this code in repo is implemented by <pytorch 1.0, so some code in old version pytorch(such as pytorch 0.4) have been deprecated, you should change your code by using pytorch 1.0
From point 1-3 you're right, but for point 4 is not exactly right, you should change as below:
original:
images = Variable(images,volatile=True)
change to:
with torch.no_grad():
images = Variable(image)
Only this can you change directly, for ' images.detach()', after you define you variable and feed into your network, and then you don't want to optimize the variable while backward, so you need to detach this variable, and it will happen on evaluation not train, like this way:
#use it during the evaluation
output = model(input)
image = Variable(images)
image.detach()
In conclusion, after you change all code(upon all is just UserWarning, not error), you should run your network fluently, but if you can not get your expected result, please double check you dataloader or hyperparameter, thanks.

after torch0.4, volatile=true was deprecated, you should try 'with torch.no_grad()', or just reduce your batch_size, but it's just not use best of your memory

authors: RenMao1314 ZzzackChen ladybirdhui


text:
Do not pass both BlockOffset and PlaneOffset

In motion estimation, several functions received both the offset expressed in blocks and in pixels for the luma plane. This information is redundant: a block offset is trivially convertible to a luma plane offset.
With tiling, we need to manage both absolute offsets (relative to the frame) and offsets relative to the current tile. This will be more simple without duplication.

Coverage increased (+3.2%) to 85.336% when pulling b9ba2e18d4f16bcbcdb3c4a5fc44922b2b815f27 on rom1v:blockplaneoffset into bec5484384505feab0dc93135efac21b7c48da9c on xiph:master.


text:
CI: Update libdav1d to 0.8.1-dmo1

This includes .travis/install-dav1d.sh.

Coverage remained the same at 66.121% when pulling 9c8f733df4c3c53f14f83271909e8170f7f5c8b1 on barrbrain:fix-ci into b5b5ce5f9c95245052b896dd08368e60c07db1fe on xiph:master.

Coverage remained the same at 66.121% when pulling 9c8f733df4c3c53f14f83271909e8170f7f5c8b1 on barrbrain:fix-ci into b5b5ce5f9c95245052b896dd08368e60c07db1fe on xiph:master.

authors: barrbrain coveralls


text:
Attribute error

Hi, I tried to run the code but it keeps throwing out "AttributeError: Can't pickle local object 'build_dataset..'
". I used the exact same configuration: Python 3+/PyTorch 0.4.0/Torchvision 0.2.0. Could you please provide me some hints to resolve this problem? Thanks

Are you using Windows operating system？

authors: Walter-pixel xjtushujun


text:
feat(table-column-dynamic-cell): ability to use dynamic components in…

… the table header

https://github.com/xm-online/xm-webapp/pull/1010

authors: Kaskyi Vlad-Gordienko

repo: xm-online/xm-webapp


text:
vscode intellsence智能提示问题，已尝试过所有能尝试的方法，还是无法解决

Xmake 版本
v2.8.3
操作系统版本和架构
win11 x64
描述问题
vscode上使用xmake插件时使用c++20的format库，智能提示出错，找不到format。
compile_commands.json,c_cpp_properties.json,settings.json均已配置。
xmake.lua里也设置了c++20。
编译器：VS2022附带的MSVC，ubuntu下的gcc-11(链接的fmt)的c++,intellsence均无法找到头文件，但是都可以正常编译
期待的结果
希望vscode xmake intellsence智能提示问题可以解决
工程配置
xmake.lua
尝试过set_languages("c++20")也不行
add_rules("plugin.compile_commands.autoupdate", {outputdir = ".vscode"})
add_rules("mode.debug", "mode.release")

target("x1")
    set_kind("binary")
    set_languages("cxx20")
    add_files("src/*.cpp")

main.cpp
#include <iostream>
#include <format>

using namespace std;

int main(int argc, char** argv)
{
    cout << std::format("{}","hello world!") << endl;
    return 0;
}

compile_commands.json
[
{
  "directory": "D:\\Project\\x1\\x1",
  "arguments": ["D:\\Program\\work\\ide\\VS2022\\ide\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX64\\x64\\cl.exe", "/c", "/nologo", "/Zi", "/FS", "/Fdbuild\\windows\\x64\\debug\\compile.x1.pdb", "/Od", "/std:c++20", "/EHsc", "/Fobuild\\.objs\\x1\\windows\\x64\\debug\\src\\main.cpp.obj", "src\\main.cpp"],
  "file": "src\\main.cpp"
}]

c_cpp_properties.json
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "${vcpkgRoot}/x64-windows/include",
                "${vcpkgRoot}/x86-windows/include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\Strawberry\\c\\bin\\gcc.exe",
            "cStandard": "c11",
            "cppStandard": "c++14",
            "intelliSenseMode": "windows-gcc-x86",
            "compileCommands": "${workspaceFolder}/.vscode/compile_commands.json"
        }
    ],
    "version": 4
}

settings.json
{
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript",
        "ostream": "cpp",
        "*.tcc": "cpp",
        "cctype": "cpp",
        "clocale": "cpp",
        "cstdarg": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "exception": "cpp",
        "initializer_list": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "istream": "cpp",
        "limits": "cpp",
        "new": "cpp",
        "streambuf": "cpp",
        "type_traits": "cpp",
        "typeinfo": "cpp"
    },
    "configuration": {
        "type": "object",
        "title": "XMake configuration",
        "properties": {
            "xmake.executable": {
                "type": "string",
                "default": "xmake",
                "description": "The xmake executable name / path"
            },
            "xmake.logLevel": {
                "type": "string",
                "default": "normal",
                "description": "The Log Level: normal/verbose/minimal",
                "enum": [
                    "verbose",
                    "normal",
                    "minimal"
                ]
            },
            "xmake.buildLevel": {
                "type": "string",
                "default": "normal",
                "description": "The Build Output Level: normal/verbose/warning/debug",
                "enum": [
                    "verbose",
                    "normal",
                    "warning",
                    "debug"
                ]
            },
            "xmake.buildDirectory": {
                "type": "string",
                "default": "${workspaceRoot}/build",
                "description": "The Build Output Directory"
            },
            "xmake.installDirectory": {
                "type": "string",
                "default": "",
                "description": "The Install Output Directory"
            },
            "xmake.packageDirectory": {
                "type": "string",
                "default": "",
                "description": "The Package Output Directory"
            },
            "xmake.workingDirectory": {
                "type": "string",
                "default": "${workspaceRoot}",
                "description": "The Project Working Directory with the root xmake.lua"
            },
            "xmake.androidNDKDirectory": {
                "type": "string",
                "default": "",
                "description": "The Android NDK Directory"
            }
        }
    }
}

附加信息和错误日志
emmm...

这部分includes 是在 msvc 的 INCLUDE env 里面的，不在 -I 里面，目前没导出到 compile commands

感谢大佬的回答，通过修改c_cpp_properties.json里的compilerPath指定为特定的msvc编译器路径后，显示正常了（还有在xmake里定义的宏在智能提示里并没有检测到），但是我希望xmake可以像cmake那样自动处理这些事情，我不知道cmake是怎么做到的，在vscode里他并没有生成c_cpp_properties.json等文件，也可以做到智能提示，祝xmake越来越好。最后问一下有没有可以完美支持xmake的编辑器

还有在xmake里定义的宏在智能提示里并没有检测到

检查下生成的 compile_command.json 里面有没有这个宏

[](https://github.com/xmake-io/xmake-vscode/issues/229#issuecomment-1769838149)
这个确定不要写到文档里面去吗？折腾了半天了终于才找到解决办法

这部分includes 是在 msvc 的 INCLUDE env 里面的，不在 -I 里面，目前没导出到 compile commands

这个现在已经实现了，不过只针对了 clangd。。应该给 cpptools 也搞一个

authors: LukeXeon star-hengxing waruqi xb1520

repo: xmake-io/xmake-vscode


text:
Version check has priority over commands

Describe the bug
The version check has priority over commands passed to xmake.
I wanted to update in a folder where I have a xmake.lua file with

set_xmakever("2.5.1")

Then, in order to check if the bug is still there in the latest version, I updated and changed this line to

set_xmakever("2.5.2")

The bug is still present.
Expected behavior
The expected behavior would be to avoid any reading of the xmake.lua file while running the command update
Error output
v2.3.9+202011250023
error: @programdir\core\project\project.lua:1064: xmake v2.3.9 < v2.5.1, please run `$xmake update` to upgrade xmake!
stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:787: in function 'raise'
        @programdir\core\project\project.lua:1064: in function 'tasks'
        @programdir\core\project\project.lua:1054: in function 'task'
        @programdir\core\main.lua:281: in function <@programdir\core\main.lua:219>

v2.5.1+202101210158
error: @programdir\core\project\project.lua:1070: xmake v2.5.1 < v2.5.2, please run `$xmake update` to upgrade xmake!
stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:787: in function 'raise'
        @programdir\core\project\project.lua:1070: in function 'tasks'
        @programdir\core\project\project.lua:1060: in function 'task'
        @programdir\core\main.lua:281: in function <@programdir\core\main.lua:219>

Related Environment
Please provide compiling and running environment information:

xmake version: v2.3.9+202011250023 + v2.5.1+202101210158
os: Windows 10
target platform: x64

Additional context
This is clearly a tiny bug, which can be avoided by running xmake update in a folder containing no xmake.lua file, but it's better to know existing bugs even if fixing them is not a priority.

I second this.
I had this problem with a xmake.lua not supporting one of the new functions of xmake 2.5.1, and couldn't run update in that folder.

I second this.
I had this problem with a xmake.lua not supporting one of the new functions of xmake 2.5.1, and couldn't run update in that folder.

I have fixed it.

I have fixed it.

authors: AntoineJT SirLynix waruqi

repo: xmake-io/xmake


text:
global io is a nil value

Xmake Version
2.8.6
Operating System Version and Architecture
Windows 11 x64
Describe Bug
The globally available io module returns a nil value. When calling it in the xmake.lua file I get  the following error: .\xmake.lua:15: attempt to index a nil value (global 'io')
Expected Behavior
For it to be the io module and callable.
Project Configuration
-- For the first run please configure the
add_rules("mode.debug", "mode.release")

-- checkout: https://github.com/xmake-examples/stm32-example-project/blob/master/armgcc.lua

set_plat("cross")
set_arch("cortex-m4")

includes("armgcc.lua")

function get_gcc_path()
    local envFile = path.join(os.projectdir(), ".stm32env")
    print(envFile)
    print(io)
    local envFileFile = io.readfile(envfile)
    print(envFileFile)

    local stmLines = io.lines(path.join(os.projectdir(), ".stm32env"))
    for line in stmLines do
        if line:startswith("ARM_GCC_PATH") then
            return string.trim(line:split("="))
        end
    end
    return os.getenv("ARM_GCC_TOOLCHAIN")
end

local arm_gcc_install_path = get_gcc_path()

use_toolchain(arm_gcc_install_path)
print("arm gcc path: %s", arm_gcc_install_path)

target("l4-test")
set_kind("binary")
add_files("Core/Src/**.c")
add_files("Source/**.c")
add_files("Drivers/**.c")
add_files("LWIP/**.c")
add_files("Middlewares/**.c")
add_files("*.s")
add_includedirs(
"Core/Src/board",
"Core/Src/board/ethernet",
"Core/Src/board/flash",
"Core/Src/board/rs485",
"Core/Src/board/temperature",
"Source/application",
"Source/artnet",
"Source/common",
"Source/driverCommunication",
"Source/libraries",
"Source/settings",
"Source/settingstorage",
"Source/libraries/artnet",
"Source/libraries/circularBuffer",
"Core/Inc",
"LWIP/App",
"LWIP/Target",
"Middlewares/Third_Party/LwIP/src/include",
"Middlewares/Third_Party/LwIP/system",
"Drivers/STM32H7xx_HAL_Driver/Inc",
"Drivers/STM32H7xx_HAL_Driver/Inc/Legacy",
"Drivers/BSP/Components/lan8742",
"Middlewares/Third_Party/LwIP/src/include/netif/ppp",
"Drivers/CMSIS/Device/ST/STM32H7xx/Include",
"Middlewares/Third_Party/LwIP/src/include/lwip",
"Middlewares/Third_Party/LwIP/src/include/lwip/apps",
"Middlewares/Third_Party/LwIP/src/include/lwip/priv",
"Middlewares/Third_Party/LwIP/src/include/lwip/prot",
"Middlewares/Third_Party/LwIP/src/include/netif",
"Middlewares/Third_Party/LwIP/src/include/compat/posix",
"Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa",
"Middlewares/Third_Party/LwIP/src/include/compat/posix/net",
"Middlewares/Third_Party/LwIP/src/include/compat/posix/sys",
"Middlewares/Third_Party/LwIP/src/include/compat/stdc",
"Middlewares/Third_Party/LwIP/system/arch",
"Drivers/CMSIS/Include"
)
add_defines(
    "USE_HAL_DRIVER",
    "STM32H723xx"
)
-- add_files("startup_stm32l412xx.s")
-- set_toolchains("gnu-rm")
add_cxflags(
-- "-mcpu=cortex-m4",
-- "-mfpu=fpv4-sp-d16",
-- "-mfloat-abi=hard",
    "-mthumb",
    "-Wall",
    "-fdata-sections",
    "-ffunction-sections",
    "-g",
    "-gdwarf-2"
)
add_ldflags(
    "-TSTM32H723ZGTx_FLASH.ld"
)
set_policy("check.auto_ignore_flags", false)
add_rules("arm-gcc")

Additional Information and Error Logs
error: .\xmake.lua:15: attempt to index a nil value (global 'io')
stack traceback:
[.\xmake.lua:15]: in function 'get_gcc_path'
[.\xmake.lua:27]: in main chunk

This is not a bug, you can't use io in the description scope.
You need to be in the script scope, you can do this by setting a on_config callback for your target, or a rule.

@SirLynix  Thanks a bunch, was not aware of this. Thank you so much for your speedy reply.

A helpful error message here would be great.

authors: Cons-Cat SirLynix jortbmd


text:
xmake support cp

Is your feature request related to a problem? Please describe.
After xmake build, the target may be in a deep path like:
build/linux/x86_64/release/

It's not convenient to copy the target out as the path is rather long.
Describe the solution you'd like
xmake may support a new command cp, and the target may be copied somewhere as below:
xmake cp target_name .   # copy to the current dir

you mean xmake l cp?

You can use xmake install or xmake package commands.
xmake install -o /xxx/installdir

or
xmake package -o /xxx/packagedir

You can also set the target output directory in xmake.lua
target("test")
    set_targetdir("$(buildir)")

It will generate target file to the build/test.exe after building.

@waruqi
我试了下 xmake install，在多项目情况下，可能不大好控制.
改天我自己研究下 xmake install/package.

@waruqi
我试了下 xmake install，在多项目情况下，可能不大好控制.
改天我自己研究下 xmake install/package.

你是指哪方面不好控制呢，xmake.lua里面也可以通过 add_installfiles 来细粒度控制安装文件的路径
也可以通过自定义 on_install或者 after_install脚本 来更灵活控制 安装逻辑，去调用os.cp 在里面复制安装文件

@waruqi
我试了下 xmake install，在多项目情况下，可能不大好控制.
改天我自己研究下 xmake install/package.

你是指哪方面不好控制呢，xmake.lua里面也可以通过 add_installfiles 来细粒度控制安装文件的路径
也可以通过自定义 on_install或者 after_install脚本 来更灵活控制 安装逻辑，去调用os.cp 在里面复制安装文件

有空我研究下 xmake 内部实现，看看能不能自己实现一下，免得老给你们添麻烦 😸

@waruqi
我试了下 xmake install，在多项目情况下，可能不大好控制.
改天我自己研究下 xmake install/package.

你是指哪方面不好控制呢，xmake.lua里面也可以通过 add_installfiles 来细粒度控制安装文件的路径
也可以通过自定义 on_install或者 after_install脚本 来更灵活控制 安装逻辑，去调用os.cp 在里面复制安装文件

有空我研究下 xmake 内部实现，看看能不能自己实现一下，免得老给你们添麻烦

这块文档里也有说明的，你可以查下 add_installfiles on_install这些的使用 也可以直接在issues问 没关系的

我先用 xmake install 吧，也能满足需求

authors: OpportunityLiu idealvin waruqi


text:
add_packages("protobuf-cpp") 下载失败

文档里的列子
add_requires("protobuf-cpp")

target("test")
    set_kind("binary")
    set_languages("c++11")

    add_packages("protobuf-cpp")

    add_files("*.cpp")
    add_files("proto/*.proto", {rules = "protobuf.cpp"})

> xmake
checking for the architecture ... x64
checking for the Microsoft Visual Studio (x64) version ... 2019
note: try installing these packages (pass -y to skip confirm)?
in xmake-repo:
  -> protobuf-cpp 3.8.0
please input: y (y/n)

  => download https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protobuf-cpp-3.8.0.zip .. failed
error: download failed!

add_packages和add_requires一样也会远程下载？有什么区别？
这个例子也依赖7z，7z下载成功了，工程目录下找不到，下载到哪里了？

xmake也是调用的curl下载，下载失败通常是网络问题，你可以xmake -v执行看下实际的包下载存储路径，然后自己下载后放置进去

add_packages和add_requires一样也会远程下载？有什么区别？

add_requires全局设置需要的packages依赖，以及设置版本和配置信息，然后下载
add_packagr对指定的target生效，包括links linkdirs，并不是下载了 所有target都会自动集成
具体详情看文档 https://xmake.io/#/zh-cn/manual/global_interfaces?id=add_requires
https://xmake.io/#/zh-cn/manual/project_target?id=targetadd_packages
这个例子也依赖7z，7z下载成功了，工程目录下找不到，下载到哪里了？
xmake require --info 7z

刚才开了代理忽然能下载了。
有个小问题，既然add_package能自动下载需要的依赖，为什么还要add_requires?

刚才开了代理忽然能下载了。
有个小问题，既然add_package能自动下载需要的依赖，为什么还要add_requires?

仔细看我刚说的，我哪说add_packages能下载了？

add_requires全局设置需要的packages依赖，以及设置版本和配置信息，然后下载

对的，这样就清楚了，谢谢。

xmake成功，可以运行了。
然后xmake p，安装过的protobuf-cpp没了，通过xmake require --info protobuf-cpp找到cachedir和installdir，都为空，这是什么情况？

xmake p 不会去干扰packages 两个完全没关系。

是啊，忽然就被清空了，7z还在

手动下载protobuf-cpp-3.8.0.zip，copy到AppData\Local\.xmake\cache\packages\2006\p\protobuf-cpp\3.8.0
然后xmake成功，但是AppData\Local\.xmake\packages\p\protobuf-cpp\3.8.0\aa7fbd80abda4d1a97f445168f6f3c1d是空的

如果xmake编译成功，说明还是在的 不然也不可能编译link通过 估计在其他目录 自己找找吧 或者 xmake -v看下

没有protobuf源文件，只有一个HelloWorld cpp文件，现在如果cache没有zip，xmake就会下载，如果手动拷一个zip过去，xmake不会解压，可能是因为build用不到吧，明天价格proto文件试试。

add_files加了protobuf源文件，xmake就安装protobuf-cpp了，否则就算add_requires("protobuf-cpp")，也只是下载zip不安装，有点智能。（PS：由于下载不了，手动下载拷贝到cache目录里）

authors: playgithub waruqi


text:
Add support for obfuscation

dotnet pack should use obfuscated packages

I will decline this for now. I believe you can integrate obfuscation directly in your csproj and dotnet-releaser will pick-up whatever you have setup from your csproj.
Also, the main goal of dotnet-releaser is to ease the publishing process for public OSS projects. You can definitely obfuscate your private projects but you are on your own.

authors: jaszczykj xoofx

repo: xoofx/dotnet-releaser


text:
🛑 Design Swan is down

In 674f79f, Design Swan (https://www.designswan.com) was down:

HTTP code: 500
Response time: 116 ms

Resolved: Design Swan is back up in 1d4f6d4 after 14 minutes.

repo: xoryorz/upptime


text:
🛑 Design Swan is down

In f297174, Design Swan (https://www.designswan.com) was down:

HTTP code: 500
Response time: 122 ms

Resolved: Design Swan is back up in e7addc2 after 24 minutes.


text:
🛑 Design Swan is down

In 5629d3c, Design Swan (https://www.designswan.com) was down:

HTTP code: 500
Response time: 101 ms

Resolved: Design Swan is back up in 7908bb0.


text:
fix overlap between timestamp and long song title

Fix issue#538.
column-span for song_title was set to 3, led to the overlap with song_length. It is fixed by reducing the field to 2.
Screenshot

Simple one line change, LGTM. Let's see what @xou816 thinks about this UI change.

sure yeah if you're confident with small changes feel free to review and even merge!

Ok, then, I'll press the button !

authors: Diegovsky XGZepto xou816


text:
みんなでモンスターを倒す？

実現したいこと
xpに合わせて攻撃力が決まる
（クリティカルヒットなどもある）
倒したあとそのモンスターが持っていたxpは試合に攻撃した人の中で山分け。
一定時間以内に倒せないと流れる。
ゴール
モンスター発生。一定時間で倒す。
相談したいこと
うまくxpコインが回る仕組みづくりをする方法はないのか

私も似たようなことを考えてました！！
botサーバとは別にPosする環境を用意して、stakeしたら敵がポップ。みんなで倒してそのxpを山分け。
stake量でボス出現、とか。。
ただ、stakeするための原資どうすんだって話ですが
アイデアとして…

repo: xpjp/xpfiat-bot


text:
XSpec report breaks when the XSLT and XSpec are located in folder containing simple quote.

I have a folder called "Radu's samples" (contains a simple quote in its name).
I have an XSLT and and XSpec there, I run the XSpec report, I get:
 [java] Syntax error at char 40 near {...ojects/eXml/samples/xspec/a...} in expression in xsl:variable/@select on line 16 column 84 of personal.xsl:

The problem is that in "generate-xspec-tests.xsl" the value of the "stylesheet-uri" variable ends up having a simple quote in it and then it is used as a string literal in various places.
A possible fix would be to escape simple quotes in the URI with the encoded equivalent character like:
  <xsl:variable name="aposVal">'</xsl:variable>
  <xsl:variable name="stylesheet-uri" as="xs:anyURI"
    select="resolve-uri(/x:description/@stylesheet, replace(base-uri(/x:description), $aposVal, '%27'))" />

Thanks for raising this issue. Would it be possible to post an example of XSLT and XSpec code as well as your folder structure so that we can reproduce the issue? Thanks.

I attached a zip containing a folder called "some'path" with two small XSLT and XSpec documents but their content does not matter much
some'path.zip
You should receive the following error running the XSpec:
 [xslt] Processing C:\Users\radu_coravu\Desktop\some'path\test.xspec to C:\Users\radu_coravu\Desktop\some'path\xspec\test.xsl
 [xslt] Loading stylesheet D:\projects\eXml\frameworks\xspec\src\compiler\generate-xspec-tests.xsl
 [xslt] log4j:WARN No appenders could be found for logger (ro.sync.util.security.Sandbox).
 [xslt] log4j:WARN Please initialize the log4j system properly.
 [java] Syntax error at char 41 near {...radu_coravu/Desktop/some'pa...} in expression in xsl:variable/@select on line 16 column 84 of test.xsl:
 [java]   XPST0003: Unexpected token name "path" beyond end of expression
 [java] Errors were reported during stylesheet compilation
 [java] Java Result: 2

I confirm I was able to reproduce the error, I file this as a bug. I submitted #120 using the fix you suggested.

👍

authors: cirulls raducoravu

repo: xspec/xspec


text:
ci: unset JVM environment variables in run-bats.sh

.travis.yml unsets _JAVA_OPTIONS in order to make Bats output line numbers predictable. _JAVA_OPTIONS affects not only Travis CI but also any other environment. So this pull request unsets the environment variables in run-bats.sh.
Windows is not affected in the first place, because it filters out the noise line:
https://github.com/xspec/xspec/blob/4197e367ae7487adac9ab5d952d7e258242706e0/test/win-bats/stub.cmd#L240-L243

run-bats.sh is working on Linux and macOS. Merging this.


text:
Send jetton with comment

how to add messge in jetton tansfer？

Hey, i've updated jetton-transfer example, now it also shows how to add comment.

Hey, i've updated jetton-transfer example, now it also shows how to add comment.

tried with v1.8.0, the transfer did succeed though, comment is still missing.
https://testnet.tonscan.org/address/EQDMHHszAZx0eeQLCR9yXuXf_LuqB_44qemM3pZLUWUvWKC0#transactions
https://testnet.tonscan.org/address/EQCWaXAdYlJcPayZdeXOuQZ24u0-FJnSTaWMj8dTXrD5tTcc#transactions

Hm, maybe tonscan not shows jetton comments, I tried to send and see comment in tonkeeper

Hm, maybe tonscan not shows jetton comments, I tried to send and see comment in tonkeeper

you are right, tonscan skipped jetton transfer message.

authors: newset xssnick

repo: xssnick/tonutils-go


text:
go-mips32 交叉编译go程序 编译kcptun例子

# 一、交叉编译环境配置
来源网友博文： 极路由1s(mt7620a)OpenWrt交叉编译go程序
// 下载go-mips32源
git clone https://github.com/gomini/go-mips32.git
cd go-mips32/src
// 配置GO编译参数
export GOOS=linux
export GOARCH=mips32le
// 执行编译
./make.bash
cd ..
// 创建编译后文件存放文件夹
sudo mkdir /opt/mipsgo
// 复制
sudo cp -R * /opt/mipsgo
// 如果第一步无报错完成后再继续下一步操作，如果出现问题请Google修复，或更换系统，我用ubuntukylin-15.10编译成功。
# 二、编译kcptun
源码来源：https://github.com/xtaci/kcptun
// 创建程序目录
mkdir /opt/kcptun
cd /opt/kcptun
// go工程参数配置
export GOPATH=/opt/mipsgo/src/gocode
export GOOS=linux
export GOARCH=mips32le
export GOROOT=/opt/mipsgo
export PATH=/opt/mipsgo/bin:$PATH
// 提前下载kcptun的依赖库
go get -v  golang.org/x/crypto/pbkdf2
go get -v  github.com/xtaci/kcp-go
go get -v  github.com/urfave/cli
go get -v  github.com/hashicorp/yamux
go get -v  github.com/golang/snappy
go get -v  golang.org/x/net/ipv4
// 由于依赖库没mips32le，需要填坑
// go get -v  golang.org/x/net/ipv4
// 运行以上命令时会提示报错：/golang.org/x/net/ipv4/icmp.go:34:2: error: use of undefined type 'sysICMPFilter'
// 参考补丁填坑：https://bugzilla.redhat.com/attachment.cgi?id=1147705&action=diff
// 填坑步骤：gen.go里面添加mips32le的判断。复制一个zsys_linux_mips64le.go文件，改名zsys_linux_mips32le.go
// zsys_linux_mips32.go和zsys_linux_mips32le.go文件里面的64字符也要修改。
// +build linux,mips32
// +build linux,mips32le
// 填坑完成后再运行一次：
go get -v  golang.org/x/net/ipv4
// 下载kcptun
go get -v  github.com/xtaci/kcptun/client
go get -v  github.com/xtaci/kcptun/server
// 编译
VERSION=date -u +%Y%m%d
LDFLAGS="-X main.VERSION=$VERSION -s -w"
env CGO_ENABLED=0 GOOS=linux GOARCH=mips32le go build -ldflags "$LDFLAGS" -o client_linux_mips  github.com/xtaci/kcptun/client
env CGO_ENABLED=0 GOOS=linux GOARCH=mips32le go build -ldflags "$LDFLAGS" -o server_linux_mips  github.com/xtaci/kcptun/server
// 几秒后出现程序文件，编译成功。我们路由只需要用client。
// 毕竟路由不做server，server主程序要去github下载或参考以上步骤，改export GOARCH=amd64就能自己编译amd64版本。
# 三、部署服务
// kcptun服务端部署教程
// https://blog.kuoruan.com/102.html
// http://www.cmsky.com/kcptun/
// 服务器:
./server_linux_amd64 -t "服务器IP地址:8388" -l ":554" -key hiboy -mtu 1400 -sndwnd 2048 -rcvwnd 2048 --crypt none --mode fast2 --nocomp  // 转发到服务器的本地8388端口
// crypt：xor/none都不算加密，通过参数 -nocomp 在两端同时设定以关闭压缩。key可以自定义
// kcptun配置客户端参考
// 客户端:
./client_linux_mips -r "服务器IP地址:554" -l ":8388" -key hiboy -mtu 1400 -sndwnd 256 -rcvwnd 2048 --crypt none --mode fast2 --nocomp  -dscp 46   // 监听客户端的本地8388端口
// xor/none都不算加密，通过参数 -nocomp 在两端同时设定以关闭压缩。key可以自定义
// D1双核4线程可以添加 [--conn 4] 参数实现多线程下载
// Shadowsocks 客户端配置
// 在SS服务器新建服务端口：8388
// 路由SS配置服务器地址:：127.0.0.1
// 路由SS配置服务器端口:：8388
// 正确填写你的 Shadowsocks 密码，加密方式，协议和混淆方式。
// 两边都启动kcptun、启动SS，测试是否正确运行。
// 已经在华硕7620固件测试有效，稍后会集成到固件里面的。
sndwnd/rcvwnd 设定参考
sndwnd * mtu 不能超过上行带宽, rcvwnd * mtu 不能超过下行带宽
对延迟不敏感的情况，比如只用于数据传输，可以用MODE_FAST，20ms的内部时钟，默认值
对延迟敏感的情况，可以用FAST2模式，但必须严格注意第一条规则
更多说明移步：https://github.com/xtaci/kcptun

# 网友提供的更多编译方法：
docker search go-mips32
pull下来改成mips32le就可以用了

https://github.com/xtaci/kcptun/wiki/mip32-cross-compile
已收录至wiki

请问，我改了gen.go加了两个或判断,mip32和mip32le，ipv4和ipv6下2个文件都拷贝了，为什么还报错？
水平有限，请多指教，谢谢！
报错如下：
[mips@localhost gocode]$ vi src/golang.org/x/net/ipv4/gen.go
[mips@localhost gocode]$ env | grep GO
GOARCH=mips32le
GOROOT=/home/mips/go-mips32
GOOS=linux
GOPATH=/home/mips/gocode
[mips@localhost gocode]$ cp src/golang.org/x/net/ipv4/zsys_linux_mips64le.go src/golang.org/x/net/ipv4/zsys_linux_mips32le.go
[mips@localhost gocode]$ go get -v  golang.org/x/net/ipv4
golang.org/x/net/ipv4
golang.org/x/net/ipv4
src/golang.org/x/net/ipv4/icmp.go:34: undefined: sysICMPFilter
[mips@localhost gocode]$

H大，你mt7620运行kcptun，不觉得性能不行吗？
我之前试过，性能比较糟糕。

你那个编译好的bin，在我的路由器上运行报错，我想试试自己编译看看

@bettermanbao 7620满载就20M左右，等其他人7621测试效果

@yjbyf 你第一步的环境编译有报错吧。
第一步无报错编译成功是这样的：这里看图 http://www.right.com.cn/forum/thread-190166-1-1.html

http://conoroneill.net/three-ways-to-build-go-14-binaries-for-mips32-onion-omega-golang/

golang.org/x/net/ipv4 这个库仅用于设置dscp，如果只是客户端用，可以考虑不设定dscp.

小米路由器mini，mt7620a,128m内存，运行kcptun打开网页就会崩溃，显示out of range.请问这是怎么回事？

mip32和mip32le文件里面的64字符也要修改 @yjbyf
// +build linux,mips32
// +build linux,mips32le

@hiboyhiboy 可以了，编译通过
不过路由器运行抛异常了，不过谢谢你了！！！
system type		: Atheros AR9341 rev 3
machine			: TP-LINK TL-WR841N/ND v8
processor		: 0
cpu model		: MIPS 74Kc V4.12

@yjbyf 关掉加密就不会报错

谢谢楼主……我用的也是这种方法，编译出来的代码无法在老内核的MIPS上用。。建立监听端口的地方就挂了。
最近发现如果用gccgo，就不会出问题。。然而gccgo编译不了kcpgo，头大中……

MT7621路由器运行时CPU占用率稳定在25%-30%，看起来很像是卡单线程了。YouTube连接速度也只有3000kbps。（用win客户端时在12000kbps以上）

有编译好这个吗。可以直接抛弃ss了
https://github.com/kcptunsocks/kcptun/tree/router
我自己编译了客户端可以连接。但是一访问就奔溃了。
服务端这里有编译好的https://github.com/clangcn/kcp-server
下面的是不是就是压缩的问题导致的？
2016/12/07 16:23:34 main.go:256: version: SELFBUILD
2016/12/07 16:23:36 main.go:292: listening on: [::]:1090
2016/12/07 16:23:36 main.go:293: encryption: salsa20
2016/12/07 16:23:36 main.go:294: nodelay parameters: 0 20 2 1
2016/12/07 16:23:36 main.go:295: remote address: XXX.XXX.XXX.XXX:XXX
2016/12/07 16:23:36 main.go:296: sndwnd: 128 rcvwnd: 256
2016/12/07 16:23:36 main.go:297: compression: true
2016/12/07 16:23:36 main.go:298: mtu: 1350
2016/12/07 16:23:36 main.go:299: datashard: 10 parityshard: 3
2016/12/07 16:23:36 main.go:300: acknodelay: false
2016/12/07 16:23:36 main.go:301: dscp: 0
2016/12/07 16:23:36 main.go:302: sockbuf: 4194304
2016/12/07 16:23:36 main.go:303: keepalive: 10
2016/12/07 16:23:36 main.go:304: conn: 1
2016/12/07 16:23:36 main.go:305: autoexpire: 0
2016/12/07 16:23:36 main.go:306: redir:
2016/12/07 16:23:52 trans.go:56: new socks5 conn by www.google.com.hk:80
panic: runtime error: slice bounds out of range
goroutine 13 [running]:
github.com/golang/snappy.encodeBlock(0x105c0013, 0x12ac9, 0x12ac9, 0x1058a000, 0x1d, 0x10000, 0x8fa14357)
/root/kcptun/src/github.com/golang/snappy/encode_other.go:175 +0x10c4
github.com/golang/snappy.Encode(0x105c0012, 0x12aca, 0x12aca, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/kcptun/src/github.com/golang/snappy/encode.go:37 +0x370
github.com/golang/snappy.(*Writer).write(0x1053c6f0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/kcptun/src/github.com/golang/snappy/encode.go:229 +0x280
github.com/golang/snappy.(*Writer).Flush(0x1053c6f0, 0x0, 0x0)
/root/kcptun/src/github.com/golang/snappy/encode.go:272 +0xb0
main.(*compStream).Write(0x10538880, 0x1061c000, 0x1d, 0x10008, 0x1d, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:39 +0x88
github.com/xtaci/smux.(*Session).sendLoop(0x1050c1e0)
/root/kcptun/src/github.com/xtaci/smux/session.go:309 +0x5cc
created by github.com/xtaci/smux.newSession
/root/kcptun/src/github.com/xtaci/smux/session.go:78 +0x3d8
goroutine 1 [runnable]:
net.(*pollDesc).Wait(0x10530138, 0x72, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(*pollDesc).WaitRead(0x10530138, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(*netFD).accept(0x10530100, 0x0, 0x775fda88, 0x1053868c)
/root/go-mips32/src/net/fd_unix.go:419 +0x3dc
net.(*TCPListener).AcceptTCP(0x1051c690, 0x1051c2c0, 0x0, 0x0)
/root/go-mips32/src/net/tcpsock_posix.go:234 +0x58
main.func·004(0x10500820, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:361 +0x2638
github.com/urfave/cli.HandleAction(0x234288, 0x2e0b28, 0x10500820, 0x0, 0x0)
/root/kcptun/src/github.com/urfave/cli/app.go:485 +0x100
github.com/urfave/cli.(*App).Run(0x10564000, 0x1050a000, 0x3, 0x3, 0x0, 0x0)
/root/kcptun/src/github.com/urfave/cli/app.go:259 +0xba4
main.main()
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:392 +0x1418
goroutine 5 [syscall]:
os/signal.loop()
/root/go-mips32/src/os/signal/signal_unix.go:21 +0x30
created by os/signal.init·1
/root/go-mips32/src/os/signal/signal_unix.go:27 +0x58
goroutine 6 [chan receive]:
main.sigHandler()
/root/kcptun/src/github.com/xtaci/kcptun/client/signal.go:23 +0x150
created by main.init·1
/root/kcptun/src/github.com/xtaci/kcptun/client/signal.go:15 +0x48
goroutine 7 [select]:
github.com/xtaci/kcp-go.(*UDPSession).updateTask(0x10560080)
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:511 +0x33c
created by github.com/xtaci/kcp-go.newUDPSession
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:120 +0x534
goroutine 8 [select]:
github.com/xtaci/kcp-go.(*UDPSession).outputTask(0x10560080)
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:412 +0x1a60
created by github.com/xtaci/kcp-go.newUDPSession
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:121 +0x564
goroutine 9 [select]:
github.com/xtaci/kcp-go.(*UDPSession).readLoop(0x10560080)
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:630 +0x50c
created by github.com/xtaci/kcp-go.newUDPSession
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:123 +0x5a4
goroutine 11 [IO wait]:
net.(*pollDesc).Wait(0x10530df8, 0x72, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(*pollDesc).WaitRead(0x10530df8, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(*netFD).readFrom(0x10530dc0, 0x10563800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x775fda88, 0x105385a8)
/root/go-mips32/src/net/fd_unix.go:269 +0x418
net.(*UDPConn).ReadFromUDP(0x1051c3d8, 0x10563800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0)
/root/go-mips32/src/net/udpsock_posix.go:67 +0x108
net.(*UDPConn).ReadFrom(0x1051c3d8, 0x10563800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go-mips32/src/net/udpsock_posix.go:82 +0x104
github.com/xtaci/kcp-go.(*UDPSession).receiver(0x10560080, 0x10530340)
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:611 +0x108
created by github.com/xtaci/kcp-go.(*UDPSession).readLoop
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:627 +0x84
goroutine 12 [select]:
github.com/xtaci/kcp-go.(*UDPSession).Read(0x10560080, 0x105ec000, 0x4, 0x12ace, 0x0, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcp-go/sess.go:184 +0x8d0
io.ReadAtLeast(0x775ff2c0, 0x10560080, 0x105ec000, 0x4, 0x12ace, 0x4, 0x0, 0x0, 0x0)
/root/go-mips32/src/io/io.go:298 +0x118
io.ReadFull(0x775ff2c0, 0x10560080, 0x105ec000, 0x4, 0x12ace, 0x0, 0x0, 0x0)
/root/go-mips32/src/io/io.go:316 +0x6c
github.com/golang/snappy.(*Reader).readFull(0x10530380, 0x105ec000, 0x4, 0x12ace, 0x1, 0x0)
/root/kcptun/src/github.com/golang/snappy/decode.go:108 +0x6c
github.com/golang/snappy.(*Reader).Read(0x10530380, 0x10600000, 0x8, 0x10008, 0x10500e60, 0x0, 0x0)
/root/kcptun/src/github.com/golang/snappy/decode.go:128 +0x1bc
main.(*compStream).Read(0x10538880, 0x10600000, 0x8, 0x10008, 0x2, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:34 +0x5c
io.ReadAtLeast(0x775ff318, 0x10538880, 0x10600000, 0x8, 0x10008, 0x8, 0x0, 0x0, 0x0)
/root/go-mips32/src/io/io.go:298 +0x118
io.ReadFull(0x775ff318, 0x10538880, 0x10600000, 0x8, 0x10008, 0x775f0a14, 0x0, 0x0)
/root/go-mips32/src/io/io.go:316 +0x6c
github.com/xtaci/smux.(*Session).readFrame(0x1050c1e0, 0x10600000, 0x10008, 0x10008, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/kcptun/src/github.com/xtaci/smux/session.go:194 +0x104
github.com/xtaci/smux.(*Session).recvLoop(0x1050c1e0)
/root/kcptun/src/github.com/xtaci/smux/session.go:229 +0x1d8
created by github.com/xtaci/smux.newSession
/root/kcptun/src/github.com/xtaci/smux/session.go:77 +0x3ac
goroutine 14 [select]:
github.com/xtaci/smux.(*Session).keepalive(0x1050c1e0)
/root/kcptun/src/github.com/xtaci/smux/session.go:277 +0x360
created by github.com/xtaci/smux.newSession
/root/kcptun/src/github.com/xtaci/smux/session.go:79 +0x404
goroutine 15 [select]:
main.scavenger(0x10530480)
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:409 +0x648
created by main.func·004
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:358 +0x2620
goroutine 16 [select]:
github.com/xtaci/smux.(*Stream).Write(0x1053a090, 0x10536143, 0x15, 0x12d, 0x0, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/smux/stream.go:111 +0x6c0
main.handleSocks5Client(0x775ff390, 0x1051c2b8, 0x775ff3b0, 0x1053a090, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcptun/client/trans.go:70 +0x7a0
created by main.func·004
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:388 +0x3104
goroutine 17 [runnable]:
net.(*pollDesc).Wait(0x10530a38, 0x72, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:84 +0x4c
net.(*pollDesc).WaitRead(0x10530a38, 0x0, 0x0)
/root/go-mips32/src/net/fd_poll_runtime.go:89 +0x48
net.(*netFD).Read(0x10530a00, 0x10536280, 0x107, 0x130, 0x0, 0x775fda88, 0x10538878)
/root/go-mips32/src/net/fd_unix.go:242 +0x3e0
net.(*conn).Read(0x1051c2c0, 0x10536280, 0x107, 0x130, 0x0, 0x0, 0x0)
/root/go-mips32/src/net/net.go:121 +0xf0
io.ReadAtLeast(0x775ff3d0, 0x1051c2c0, 0x10536280, 0x107, 0x130, 0x5, 0x0, 0x0, 0x0)
/root/go-mips32/src/io/io.go:298 +0x118
main.getRequest(0x10536280, 0x130, 0x130, 0x775ff390, 0x1051c2c0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/root/kcptun/src/github.com/xtaci/kcptun/client/trans.go:138 +0xe4
main.handleSocks5Client(0x775ff390, 0x1051c2c0, 0x775ff3b0, 0x1053a1b0, 0x0, 0x0)
/root/kcptun/src/github.com/xtaci/kcptun/client/trans.go:55 +0x2cc
created by main.func·004
/root/kcptun/src/github.com/xtaci/kcptun/client/main.go:388 +0x3104

linksys Kirkwood内核是不是无解了……

@wkingfly 直接下载armv5的release就可以用了

authors: 467815891a TingyiChen bettermanbao dfangboy fnscar hiboyhiboy wkingfly xinghusp xtaci yjbyf

repo: xtaci/kcptun


text:
Support multiple \tag inside of AMS environments

Hi, would it be possible to update the underlying katex to something above 0.15.1? That would allow to put multiple \tag elements (one per line) withing AMS environments https://github.com/KaTeX/KaTeX/issues/2379#issuecomment-955796756
That is extremely useful and common in .tex files.
Thanks in advance!

@xu-cheng thanks for such quick response. Unfortunately it doesn't work, but that is not your fault, it is on the katex side: https://github.com/KaTeX/KaTeX/issues/2379#issuecomment-1011910260 I hope they can re-open and fix.

@xu-cheng are you sure it has 0.15.1? Little test here:
This file is demo3.tex
\documentclass[a4paper,twoside]{scrbook}

\usepackage{amsmath}

\begin{document}

\begin{align*}
  y = \sin(nx) \tag{eq1} \\
  z = \cos(nx) \tag{eq2}
\end{align*}

\end{document}

check version of pandoc-katex to make sure it is 0.1.9 and run it
$ pandoc-katex -V
pandoc-katex 0.1.9
$ pandoc demo3.tex -f latex -t html -s -o test3.html --filter pandoc-katex
Error: failed to execute js (detail: String("ParseError: KaTeX parse error: Multiple \\tag"))
Error running filter pandoc-katex:
Filter returned error status 1

fails. Now with just regular katex, file test.html
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css">
    </head>
    <body>
        $$
        \begin{align*}
        y = \sin(nx) \tag{eq1} \\
        z = \cos(nx) \tag{eq2}
        \end{align*}
        $$
    </body>
    <script src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js"
            onload="renderMathInElement(document.body);"></script>
</html>

produces the following output without any errors

I can reproduce your issue. But I think this is a result of combination issue of pandoc and katex.
If you run pandoc -f latex -t json demo3.tex | jq ., you will get
{
  "pandoc-api-version": [
    1,
    22,
    1
  ],
  "meta": {},
  "blocks": [
    {
      "t": "Para",
      "c": [
        {
          "t": "Math",
          "c": [
            {
              "t": "DisplayMath"
            },
            "\\begin{aligned}\n  y = \\sin(nx) \\tag{eq1} \\\\\n  z = \\cos(nx) \\tag{eq2}\\end{aligned}"
          ]
        }
      ]
    }
  ]
}

You can see pandac replace align* to aligned. At the same time, it doe not seem that katex support multiple \tag for aligned environment. Please consider to submit this issue to pandoc or katex.

Wow! Amazing find!

authors: marekyggdrasil xu-cheng

repo: xu-cheng/pandoc-katex


text:
你好，经过测试该脚本可以正常评论3次，但是无法签到。

脚本提示签到完成，但是进入手机客户端和网页版都是未签到状态。
但是进去我的评论的三条都已经评论了，请有空了看一下原因。

如果签到控制台日志打印了，网页上应该是签到的了，但是客户端会提醒你再次签到，因为客户端签到可以多+3积分。
你看一下积分日志，积分日志地址 ，看看是否有  积分：+33经验值：+33连续签到30天以上每天领33积分，这种信息。
如果有的话，就说明签到成功了。
如果不是此问题，可以把签到控制台的日志贴一下，这样好分析些。

@shen159876

repo: xuess/smzdm-sign


text:
关于图像特征抽取

请问您这边抽图像特征的时候是怎么做的啊，我用您的代码抽取图像特征64g的内存就爆了。。

我也想知道怎么回事，读取数据的时候  图像这一块一跑就爆内存

请问您这边抽图像特征的时候是怎么做的啊，我用您的代码抽取图像特征64g的内存就爆了。。

请问您这个问题解决了吗？小白求带

在服务器上运行的，当时没有考虑内存的问题，建议改小每次读取的数量，祝好！

我也想知道怎么回事，读取数据的时候 图像这一块一跑就爆内存

请问您这边抽图像特征的时候是怎么做的啊，我用您的代码抽取图像特征64g的内存就爆了。。

https://github.com/xunan0812/MIMN/blob/8d6e1fe87713243d43b03b32a49245e00001ee7f/data_utils.py#L308 1、经过测试发现，RAM在每次执行cnn_extractor时就会快速增加，直到内存爆满。 代码使用CPU进行特征提取，如果将cnn_extractor和input都转化到GPU上，output再转回cpu，问题变为Out of CUDA memory。
https://github.com/xunan0812/MIMN/blob/8d6e1fe87713243d43b03b32a49245e00001ee7f/data_utils.py#L385 2、另外论文中提到，对图片resize到224×224，但实际上并没有在transform中找到相关代码，导致图片尺寸过大，对于图片很多的某条评论，显存会OOM。
解决办法：使用with torch.no_grad():对output = self.cnn_extractor(input).squeeze()进行包裹。在self.transform_img中添加transforms.Resize(224)。（使用CPU提取特征的话，不进行resize应该也可以，因为RAM往往都比显存大很多。另：可以使用GPU更快的提取特征，但要进行resize，不知道会不会影响模型效果。）

哇 谢谢老哥。。真的发现一百多g内存都爆掉了。原来是这个问题


text:
Authorship

Dear Hongyu and Yiqing ,
Instead of:
/*
Feb 14 2023
Hongyu Mou, Yiqing Xu
*/

I suggest to include the following as the first two lines in your ado file:
*! Hongyu Mou, Yiqing Xu
*! 1.0.0 Feb 14 2023

because when you type:
which panelview
then that would be reported in the Stata result window instead of:
c:\ado\plus\p\panelview.ado

.
end of do-file

.

which is not really informative.
You should add a new date stamp below *! Hongyu Mou, Yiqing Xu with each new version so users can check if they have the last version installed (which is the purpose of which :).

Thanks ak lot for the advice!
On Wed, Jul 12, 2023 at 8:06 PM Eric Melse @.***> wrote:

Dear Hongyu and Yiqing ,
Instead of:
/*
Feb 14 2023
Hongyu Mou, Yiqing Xu
*/
I suggest to include the following as the first two lines in your ado file:
*! Hongyu Mou, Yiqing Xu
*! 1.0.0 Feb 14 2023
because when you type:
which panelview
then that would be reported in the Stata result window instead of:
c:\ado\plus\p\panelview.ado
.
end of do-file
.
which is not really informative.
You should add a new date stamp below *! Hongyu Mou, Yiqing Xu with each
new version so users can check if they have the last version installed
(which is the purpose of which :).
—
Reply to this email directly, view it on GitHub
https://github.com/xuyiqing/panelview_stata/issues/2, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB2PKGCZKHQZSNNSIZR7G73XP5Q2PANCNFSM6AAAAAA2IJSZUE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Sent from IPhone. Please pardon typos and brevity.

Updated! Thank you so much :)

authors: HongyuMou ericmelse xuyiqing


text:
Disabling & reanabling mod causes graphical artifacts

Did some tests with 0.5.1 (due to #1 & #2) and noticed that things get utterly wonky if you fire up a map with VolumetricShading enabled, then disable the mod, load the map again and even worse if you then reenable the VolumetricShading and load the map a third time:
Reproduction steps:

Start game fresh (*)
Enable VolumetricShading
Load a map
(Maybe 2b?) Force rain to fall /weather setprecip 1
Close map
Disable VolumetricShading
Load map - some artifacts appear:
https://www.youtube.com/watch?v=OuaujTmJVEo
(note the flickering on the hill face ahead and house wall behind you)
Close map
Reenable VolumetricShading
Load map - horrible artifacts everywhere:
https://www.youtube.com/watch?v=A3YGQTljPV8

I'm not entirely convinced this is an issue caused by VolumetricShading - might as well be some wonkyness in shader asset loading by the engine (note the issues cropping up even with vanilla shaders if custom assets were used previously). Leaving it up to you to potentially push this upstream.

(*) Switching the "fullscreen" option from settings will make all those artifacts disappear (presumably since this disposes lots of internal buffers in the graphics pipeline and things get loaded up clean again).

The flickering you see seems to be Z-Fighting in the depth buffer. The artifacts in the second video are probably caused by some shader not compiling correctly, which causes the "stuck" shadow overlay. I'm not quite sure what causes this, but a switch from/to fullscreen recreates the frame buffers so this could be a potential fix. Can you try if resizing the vintage story window also works, or if you need to use the fullscreen option in the settings?

It would also be very nice to know which GPU you are using exactly.

It's an AMD Vega 64 running with drivers from Jan of this year.

Can you please try again with this version? Thank you!
volumetricshading_v0.5.1.zip

authors: DoctorVanGogh xxmicloxx

repo: xxmicloxx/VolumetricShading


text:
Swift Compliance

Hi, Would you guys be able to make this swift compliant?

Maybe you only need to create a Bridging-Header.h file in your project like this:
#ifndef BridgingHeader_h
#define BridgingHeader_h
#import "XXTEA.h"
#endif

authors: andot cybertza

repo: xxtea/xxtea-objc


text:
🛑 Egyla AGJA Site is down

In 7b66538, Egyla AGJA Site ($EGYLA_AGJA_SITE) was down:

HTTP code: 404
Response time: 184 ms

Resolved: Egyla AGJA Site is back up in f27ae3f after 10 minutes.


text:
Launcher does not yet work with HSR 2.7

Describe the bug
Launcher is unable to parse HSR V2.7
System Information (please complete the following information):

macOS: 15.1.1
Device: MacBook Pro (2020(
CPU: Apple M1 Pro
Dedicated GPU (if any): N/A
RAM: 32GB
Wine Distribution: Crossover Wine (Don't know what specific version as it is only prompting to install the game post-update.)

Additional context
Updated the game, said the launcher does not yer support HSR 2.7 and to wait for an update. On subsequent launched of YAAGL, prompts to install HSR and says it failed to parse game version upon being pointed to the game files.
I am solely posting this issue so that it is shown to others looking at the repository, and to notify the developer if they did now know already. This is not a complaint or request to rush in any way.

yes like always will have to wait for the launcher update, which has NO ETA

authors: Sipperz jckirton

repo: yaagl/yet-another-anime-game-launcher


text:
setWebhookInfo does not correctly set the allowed_updates field. CURL works

I have read:

Usage information
Help information

I am using the latest version of the library.
Expected Behavior
allowed_updates should be set when calling the setWebhookInfo function
Actual Behavior
allowed_updates is not set when calling the setWebhookInfo function
Steps to reproduce the Behavior

delete the webhook
execute setWebhookInfo with custom allowed_updates fields
execute getWebhookInfo and see that allowed_updates is not set
execute curl command with setWebhookInfo with allowed_updates field in the body
execute getWebhookInfo and see that allowed_updates is correctly set.

I have the same problem, but I do through:
const allowed = ["chat_member", "message", "my_chat_member"];
export const bot = new TelegramApi(
    process.env.TG_KEY,
    {
      polling: {
        allowed_updates: allowed,
      }
    });

also try:
export const bot = new TelegramApi(
    process.env.TG_KEY,
    {
      polling: {
        params: {
               allowed_updates: allowed,
          }
      }
    });

At the same time, if I call just through the browser:
https://api.telegram.org/botMY_TOKEN/getUpdates?allowed_updates=["chat_member", "message", "my_chat_member"]
and check by accessing /getWebhookInfo, I can see that the parameters were successfully set....

Update!
export const bot = new TelegramApi(
    process.env.TG_KEY,
    {
      polling: {
        params: {
               allowed_updates: JSON.stringify(allowed),
          }
      }
    });

JSON.stringify - fix this problem!

repo: yagop/node-telegram-bot-api


text:
Your dataset iterator ran out of data interrupting testing when adding validation dataset

When I run the script TensorFlowOnSpark/examples/mnist/keras/mnist_pipeline.py out of the boxes, it's working fine.
Adding a validation dataset, always lead to :
WARNING:tensorflow:Your dataset iterator ran out of data interrupting testing. Make sure that your dataset can generate at least steps batches (in this case, 100 batches). You may need to use the repeat() function when building your dataset.
I split the dataset generated by the generator function. I also try to use the dataset itself as the validation set
I tried to add repeat, decrease the number of validation steps to a really small number, change the batch size,.. But none of this work.
Any idea how to fix it ?

For InputMode.SPARK, the TF generator is actually being fed by a Spark RDD, so any attempts to repeat on the TF side will not work.  Instead, you would need to "repeat" on the Spark side.  The TFCluster API has a num_epochs arg which will do this for you.

Closing due to inactivity.

repo: yahoo/TensorFlowOnSpark


text:
add radio-group test case

Closes #1459
Description
Add radio-group test case

@108yen
I reviewed and revised my initial implementation but still feel uncertain. Could you please provide advice and review it again?🙇♂

Thanks!

authors: cidkumagai hirotomoyamada

repo: yamada-ui/yamada-ui


text:
Format the total counts with commas

Would it be possible to format the counts with commas? i.e. 3123888 -> 3,123,888

It's possible, but I'll not do it. Here's my suggestion if you want this:
am-i-used tjholowaychuk | grep ' - ' | awk '{print $3}' | xargs printf "%'d\n"

Which is a good show of awesomeness with UNIX.

authors: Qix- yamadapc

repo: yamadapc/am-i-used


text:
Basic authentication or X-Trino-User must be sent

Yanagishima version:
23.0
Trino version:
357
conf/application.yml:
Datasources
sql.query.engines: presto
check.datasource: false
select.limit: 500
audit.http.header.name: some.auth.header
use.audit.http.header.name: false
to.values.query.limit: 500
cors.enabled: true
trino
presto.datasources: test
presto.query.max-run-time-seconds: 1800
presto.max-result-file-byte-size: 1073741824
auth.test: false
presto.coordinator.server.test: http://vdapp151:8090
presto.redirect.server.test: http://vdapp151:8090/ui
catalog.test: hive
schema.test: default
i want to use yanagishima to query trino,
if sql.query.engines=trino, no query result,
if sql.query.engines: presto, have this log error:
2022/01/26 10:52:51.237 +0800 ERROR [PrestoAsyncController] [Yanagishima] Authentication failed: Basic authentication or X-Trino-User must be sent
io.prestosql.client.ClientException: Authentication failed: Basic authentication or X-Trino-User must be sent
at io.prestosql.client.StatementClientV1.requestFailedException(StatementClientV1.java:469)
at io.prestosql.client.StatementClientV1.(StatementClientV1.java:138)
at io.prestosql.client.StatementClientFactory.newStatementClient(StatementClientFactory.java:24)
at yanagishima.service.PrestoService.getStatementClient(PrestoService.java:392)
at yanagishima.service.PrestoService.doQueryAsync(PrestoService.java:95)
at yanagishima.controller.PrestoAsyncController.executeQuery(PrestoAsyncController.java:78)
at yanagishima.controller.PrestoAsyncController.post(PrestoAsyncController.java:57)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at yanagishima.filter.YanagishimaFilter.doFilter(YanagishimaFilter.java:43)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.base/java.lang.Thread.run(Thread.java:834)

I add a new configuration and the error was resolved
protocol.v1.alternate-header-name=Presto
Refer to the instructions on this site：https://trino.io/blog/2021/01/04/migrating-from-prestosql-to-trino.html

I add a new configuration and the error was resolved protocol.v1.alternate-header-name=Presto Refer to the instructions on this site：https://trino.io/blog/2021/01/04/migrating-from-prestosql-to-trino.html

yes it worked thank you

repo: yanagishima/yanagishima


text:
Обработка статуса платежа expired_on_confirmation

"Пользователь может подтвердить платеж только за определенный срок. Если он не сделает этого, Яндекс.Касса отменит платеж, указав причину expired_on_confirmation"
https://kassa.yandex.ru/developers/payments/payment-process
Этот статус довольно часто встречается при проверке текущего статуса транзакции, поскольку клиенты переходят на форму оплаты и не завершают платеж по разным причинам (например недостаток средств на карте).

Добрый день!
Благодарю за обращение!
expired_on_confirmation - это не статус платежа, а расшифровка причины его отмены для статуса canceled:
https://kassa.yandex.ru/developers/payments/declined-payments#cancellation-details-reason
Обработка expired_on_confirmation уже предусмотрена в SDK.

authors: dlevsha ostulov

repo: yandex-money/yandex-checkout-sdk-php


text:
add roc_auc test

For #15
Realization of Fast DeLong's test taken from https://github.com/yandexdataschool/roc_comparison added
Fixed null hypo
compare_models_different to modelgym/util added
Two tests added

could you please add example of usage to the example.ipynb?

authors: Boialex anaderi

repo: yandexdataschool/modelgym


text:
没有设置播放url时候点击播放按钮报错，如何解决？

因为播放url需要网络获取回来，在还获取回来之前，如果点击播放按钮就会报错，如何解决？

数据获取中，一般有加载布局或者是对话框占位 ，获取成功，才会显示内容布局的。
或者实现判断自己。发现自己对象为null 提示
 exoPlayerManager.setOnPlayClickListener(new View.OnClickListener() {
                          @Override
                          public void onClick(View v) {
                              Toast.makeText(MainCustomActivity.this,"定义点击播放事件",Toast.LENGTH_LONG).show();
                               //处理业务操作 完成后
                              exoPlayerManager.startPlayer();//开始播放
                }
     });

我项目都是 数据获取中有加载布局，成功才会有内容布局

OK,已解决。感谢。

repo: yangchaojiang/yjPlay


text:
img or video miss match

I downloaded the data to test both for planes and tank. For both of them I always get the same error:
(sam2) (base) MacBook-Air samurai-master % python scripts/main_inference.py  Traceback (most recent call last):   File "/SAM2/samurai-master/scripts/main_inference.py", line 57, in <module>     cid_name = video.split('-')[1] IndexError: list index out of range
Note that I set the same directory structure.

Can you ls your folder or screenshot your folder structure? Also you might want to make sure that all the video sequences in data/LaSOT/testing_set.txt are properly downloaded or modify it baed on your subset of sequences.

Can you ls your folder or screenshot your folder structure? Also you might want to make sure that all the video sequences in data/LaSOT/testing_set.txt are properly downloaded or modify it baed on your subset of sequences.

I have fixed and run the code, it works well -  I even tested it with my custom video.

Can you ls your folder or screenshot your folder structure? Also you might want to make sure that all the video sequences in data/LaSOT/testing_set.txt are properly downloaded or modify it baed on your subset of sequences.

I have fixed the issue. It all runs smoothly now.


text:
🛑 Privatebin is down

In 4ee079f, Privatebin (https://privatebin.icloudnative.io) was down:

HTTP code: 503
Response time: 5712 ms

Resolved: Privatebin is back up in 74511d5.

repo: yangchuansheng/upptime


text:
🛑 Privatebin is down

In a4a00c2, Privatebin (https://privatebin.icloudnative.io) was down:

HTTP code: 503
Response time: 5561 ms

Resolved: Privatebin is back up in 7ca8c0d.


text:
🛑 Google is down

In 242133f, Google (https://google.icloudnative.io) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Google is back up in 118ee60.


text:
🛑 Privatebin is down

In 812ac76, Privatebin (https://privatebin.icloudnative.io) was down:

HTTP code: 503
Response time: 740 ms

Resolved: Privatebin is back up in 3c66156 after 6 minutes.


text:
怎么查询到具体成交信息，比如户型，面积，价格。

之前的域名不可用了，换了新的域名，然后看不了成交的具体信息。
http://ris.szpl.gov.cn/credit/showcjgs/ysfcjgs.aspx?cjType=0

最新的域名是 http://zjj.sz.gov.cn/ris/szfdc/showcjgs/ysfcjgs.aspx?cjType=0

哪里可以查到具体到小区的成交信息

authors: Hyvi spiritelf

repo: yangguichun/ShenzhenHouseInfoCrawler


text:
邮箱账号无法创建支付订单

⚠  确认 issue 是否已存在 ⚠

[X] 我已经搜索了现有的问题，没有找到跟我问题相关的问题。

GPT-3 or GPT-4
GPT-3.5
操作系统
Windows
Bug 描述 📝
邮箱账号在充值时，点击支付宝按钮弹出错误消息：生成支付订单失败：error with create order: Error
1406 (22001): Data too long for column 'mobile' at row 1

重现步骤 🕹
No response
你的应用配置信息
把你的配置信息粘贴到这里

你这是数据库没有更新，缺少字段。执行下面的 SQL 语句可以解决。
ALTER TABLE `chatgpt_orders` CHANGE `mobile` `username` VARCHAR(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户明';


text:
OTA update

Thanks for your work. I hate these bulbs, only things that are fiddly af. Could you elaborate on the part about OTA? i saw port 5555 was open and i can build firmware, is there a password?

Port 5555 is the port that you connect to the bulb locally. All communications are unencrypted.
I also once sniffed the traffic it talks to the cloud server. In the json response, I see that they provide the OTA url via http://. So, in principle, MITM works. But I did not dig further on how to trigger OTA upgrade if you could fake a firmware upgrade. I did not have the soldering tools so I guess if OTA fails I would brick the bulbs permanently.
P.S. Their bussiness looks shady. Before my purchase, they promised that OTA is possible before purchase but they refuse to tell you how to OTA after purchase...

Ive been building firmware files for most of my stuff. If you have that url and port i can try deploying what i have. I think 5555 and 80 are open. 80 returns a page that says something stupid, like this site doesn't exist lol.
On Aug 30, 2022 at 5:08 PM -0700, yangqian @.***>, wrote:

Port 5555 is the port that you connect to the bulb locally. All communications are unencrypted.
I also once sniffed the traffic it talks to the cloud server. In the json response, I see that they provide the OTA url via http://. So, in principle, MITM works. But I did not dig further on how to trigger OTA upgrade if you could fake a firmware upgrade. I did not have the soldering tools so I guess if OTA fails I would brick the bulbs permanently.
P.S. Their bussiness looks shady. Before my purchase, they promised that OTA is possible before purchase but they refuse to tell you how to OTA after purchase...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

also, i have the soldering equipment to reflash, thats what im planning on doing anyway.

I received the following flashing tools from the cozylife team. It is a tool under windows.
I have not tested them.
CozyLife_Assist_V1.0.zip
I received a link for a specific developer board. Not sure if corresponds to the actual hardware they used in the bulbs, smart plugs, etc.

They were using http://api-us.doiting.com/api/device_product/model for a catalog of their products and http://api-cn.doiting.com/storage/firmware/20210909/885049b40de93efddcb3319dd782ddfc.ota for the ota upgrade on Nov. 2021. But they seems to nolonger using these urls.
The ota I downloaded is
885049b40de93efddcb3319dd782ddfc.ota.zip

repo: yangqian/hass-cozylife


text:
what does "2x" mean?

2x：227000iter/epoch
1x：127000iter/epoch

thanks.


text:
Merge pull request #1 from yangzongzhuan/master

1

111111

repo: yangzongzhuan/RuoYi-Vue-fast


text:
Issue using on Polymer Web Components

Google's Polymer Web Components use a special nomenclature for binding data to attributes:
https://www.polymer-project.org/1.0/docs/devguide/data-binding.html#attribute-binding
The $ is causing a problem. Its failing the spec-char-escape rule, which makes sense, I think, but it is also failing the tag-pair rule, which should be OK..
Here is a simple example:
<!doctype html>

<title>htmlhint issue with Polymer</title>

{{mainLabel}}

HTMLHint only support for pure HTML code, no support for template.

repo: yaniswang/HTMLHint


text:
移动所有球到每个盒子所需的最小操作数

有 n 个盒子。给你一个长度为 n 的二进制字符串 boxes ，其中 boxes[i] 的值为 '0' 表示第 i 个盒子是 空 的，而 boxes[i] 的值为 '1' 表示盒子里有 一个 小球。
在一步操作中，你可以将 一个 小球从某个盒子移动到一个与之相邻的盒子中。第 i 个盒子和第 j 个盒子相邻需满足 abs(i - j) == 1 。注意，操作执行后，某些盒子中可能会存在不止一个小球。
返回一个长度为 n 的数组 answer ，其中 answer[i] 是将所有小球移动到第 i 个盒子所需的 最小 操作数。
每个 answer[i] 都需要根据盒子的 初始状态 进行计算。
示例 1：
输入：boxes = "110"
输出：[1,1,3]
解释：每个盒子对应的最小操作数如下：
1) 第 1 个盒子：将一个小球从第 2 个盒子移动到第 1 个盒子，需要 1 步操作。
2) 第 2 个盒子：将一个小球从第 1 个盒子移动到第 2 个盒子，需要 1 步操作。
3) 第 3 个盒子：将一个小球从第 1 个盒子移动到第 3 个盒子，需要 2 步操作。将一个小球从第 2 个盒子移动到第 3 个盒子，需要 1 步操作。共计 3 步操作。

示例 2：
输入：boxes = "001011"
输出：[11,8,5,4,3,4]

提示：

n == boxes.length
1 <= n <= 2000
boxes[i] 为 '0' 或 '1'

来源：力扣（LeetCode）
链接：https://leetcode-cn.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box
著作权归领扣网络所有。商业转载请联系官方授权，非商业转载请注明出处。

双循环
这是最简单的了
func minOperations(boxes string) []int {
    ret := make([]int, len(boxes))
    for i := 0; i < len(boxes); i++ {
        sum := 0
	for j := 0; j < len(boxes); j++ {
	    if i == j {
		continue
	    }
	    if boxes[j] == '1' {
		sum += abs(i, j)
	    }
	}
	ret[i] = sum
    }
    return ret
}

func abs(x, y int) int {
    if x > y {
	return x - y
    }
    return y -x
}

repo: yankewei/LeetCode-Go


text:
Add three finger dragging

[x] I made sure this command is not in the commands list

[x] I searched and didn't find this command in the listed issues

[x] I know this defaults command exists

[x] I know this command works on macOS current version

[ ] I know this command is deprecated on macOS current version

Folder: Trackpad

Command:

defaults write com.apple.AppleMultitouchTrackpad DragLock -bool false
defaults write com.apple.AppleMultitouchTrackpad Dragging -bool false
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true

Argument type (if applicable): bool
Examples:

   - folder: Trackpad
    name: Trackpad
    description: |
      Accessibility controls for macOS via Magic Trackpad or Magic Mouse.
    keys:
      - key: three-finger-dragging
        domain: com.apple.AppleMultitouchTrackpad
        title: Rearrange windows using three fingers
        param:
          type: bool
        examples:
          - value: true
            text: The ability to drag items using a three-finger gesture is an option for trackpads that support Force Touch.
          - value: false
            default: true
            text: Do nothing upon three finger gesture
        versions: [Ventura, Monterey, Big Sur, Catalina, Mojave]

      - key: dragging
        domain: com.apple.AppleMultitouchTrackpad
        title: Rearrange windows using Drag Lock
        param:
          type: bool
        examples:
          - value: true
            text: Enable window draging
          - value: false
            default: true
            text: Disable window draging
        versions: [Ventura, Monterey, Big Sur, Catalina, Mojave]

      - key: drag-lock
        domain: com.apple.AppleMultitouchTrackpad
        title: Rearrange windows using Drag Lock
        param:
          type: bool
        examples:
          - value: true
            text: Double-tap an item, then drag it without lifting your finger after the second tap; dragging continues when you lift your finger, and stops when you tap the trackpad once.
          - value: false
            default: true
            text: Double-tap an item, then drag it without lifting your finger after the second tap; when you lift your finger, the item stops moving.
        versions: [Ventura, Monterey, Big Sur, Catalina, Mojave]

Resolved by #251

authors: namtonthat yannbertrand

repo: yannbertrand/macos-defaults


text:
New rule: space-around-prop-equals

I couldn't find a rule like this in the plugin or issues, but do tell me if it already exists.
This is a simple rule that would disallow/enforce spaces around the = in properties in jsx.
Values
"never":
// Error
<Component foo = {bar} />
<Component foo ={bar} />
<Component foo= {bar} />

// Allowed
<Component foo={bar} />

"always":
// Error
<Component foo={bar} />
<Component foo ={bar} />
<Component foo= {bar} />

// Allowed
<Component foo = {bar} />

Optionally, this rule could also have "before" or "after" values, which only allow a space before or after the equals sign (though that does seem very ugly to me).

Found it.

repo: yannickcr/eslint-plugin-react


text:
jsx-wrap-multilines: RangeError: Invalid count value

Hello, jsx-wrap-multilines rule seems to crash in certain cases. This issue was spotted by automated CI run - it is not blocking my development or anything. https://github.com/AriPerkkio/eslint-remote-tester/actions/runs/417578540
Complete list of dependencies and .eslintrc is available at CI runs logs, steps Run yarn list | grep eslint and Run yarn log --config ./plugin-configs/eslint-config-airbnb.config.js.
eslint-config-airbnb@18.2.1
eslint-plugin-react@7.21.5

extends: ['airbnb', 'airbnb/hooks', 'airbnb/whitespace']

Minimal repro:
import React from 'react';

const A =

    B

;

Crash reports from real-world examples
Rule: jsx-wrap-multilines

Message: Invalid count value Occurred while linting <text>:35
Path: sencha/ext-react/packages/ext-react-material-ui-documentation/src/TabPanel.js
Link

          id={`simple-tabpanel-${index}`}
          aria-labelledby={`simple-tab-${index}`}
        >

        {value === index &&

<TableContainer component={Paper}>

  <TableBody>
    {data.map((row, index) => (

RangeError: Invalid count value
Occurred while linting <text>:35
    at String.repeat (<anonymous>)
    at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
    at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
    at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
    at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
    at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
    at LogicalExpression(/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:252:11)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)

Rule: jsx-wrap-multilines

Message: Invalid count value Occurred while linting <text>:55
Path: sencha/ext-react/packages/ext-react-material-ui-documentation/src/zz/zzold/CenterPanelExamples.js
Link

          id={`center-tabpanel-${index}`}
          aria-labelledby={`center-tab-${index}`}
        >

        {centervalue === index &&

<React.Fragment>
{/*

  <Typography variant="h3">

RangeError: Invalid count value
Occurred while linting <text>:55
    at String.repeat (<anonymous>)
    at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
    at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
    at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
    at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
    at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
    at LogicalExpression(/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:252:11)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)

Rule: jsx-wrap-multilines

Message: Invalid count value Occurred while linting <text>:73
Path: zooniverse/front-end-monorepo/packages/lib-react-components/src/Markdownz/helpers/testExamples.js
Link

`

// Note the video and audio are first put into img tags. This is the expect jsx
output before our customization runs.
// They're then switched to audio or video depending on the mimetype of the
source.
export const jsx =
<>
  <Paragraph>
    😄
  </Paragraph>
  <Paragraph>

RangeError: Invalid count value
Occurred while linting <text>:73
    at String.repeat (<anonymous>)
    at Object.fix (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:167:136)
    at normalizeFixes (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:178:28)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/report-translator.js:347:49
    at Object.report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/linter.js:920:41)
    at report (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:130:15)
    at check (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:162:13)
    at VariableDeclarator (/home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint-plugin-react/lib/rules/jsx-wrap-multilines.js:209:9)
    at /home/runner/work/eslint-remote-tester/eslint-remote-tester/ci/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)

I can't reproduce this, even on the v7.21.5 tag - any idea what exact eslint config is being used for this rule, including which parser?

Looks like the airbnb config sets some options to this rule. Option "declaration": "parens-new-line" is causing the crash even with default Espree parser.
https://github.com/airbnb/javascript/blob/63098cbb6c05376dbefc9a91351f5727540c1ce1/packages/eslint-config-airbnb/rules/react.js#L293-L301
{
  "root": true,
  "env": {
    "es6": true,
    "node": true
  },
  "parserOptions": {
    "ecmaVersion": 2020,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "settings": {
    "react": {
      "version": "16.13.1"
    },
  },
  "plugins": ["react"],
  "rules": {
    "react/jsx-wrap-multilines": [
      "error",
      {
        "declaration": "parens-new-line"
      }
    ]
  }
}

authors: AriPerkkio ljharb


text:
The react/require-extension rule is deprecated.

The react/require-extension rule is deprecated. Please use the import/extensions rule from eslint-plugin-import instead.

I'm not sure what you're posting about - we're quite aware that it's deprecated :-)

@ljharb Sorry! I thought that it was warnning by this package!

But the rule is still showing on the README

@Darmody I removed it from the README since we do not	usually list the deprecated rules in it.

authors: Darmody ljharb yannickcr


text:
Interface customization

Interface customization need to be setup in code app, cannot use from Storyboard ? Can u give example how to customized too ? I have no Idea how to customized this QRCodeReaderDisplayable at all.

1

Any help or a more in depth example would be nice of this

waiting for this as well.

Hi guys,
I've just tried this way below to customize the interface. Hope it works for you guys too.

Step 1: make sure you can use (inherit) QRCodeReader classes (I used to "pod" this but it didn't work so I copied all classes to my project. You know how to deal if you got the same prob).

Step 2: Go to QRCodeReaderViewController, add any customization you want in viewWillAppear function. (Unlock the file if asked).

Step 3: (Might be skipped) I got UI prob with presenting readerVC so I changed to pushing it by:

Replace present present(readerVC, animated: true, completion: nil) by self.navigationController?.pushViewController(readerVC, animated: true)
Replace dismiss(animated: true, completion: nil) by readerVC.navigationController?.popViewController(animated: true).

Step 4: (Optional) Go to QRCodeReaderViewControllerBuilder to disable/enable any default UI components by changing true -> false and vice versa. (If you disable a component, you should comment its action function).

Here's how you can customize interface programmatically without modifying the library:
Setup your VC:
lazy var reader: QRCodeReaderViewController = {
    let builder = QRCodeReaderViewControllerBuilder {
        let readerView = QRCodeReaderContainer(displayable: CustomQRCodeReaderView())
        $0.readerView = readerView
        $0.reader = QRCodeReader(metadataObjectTypes: [.qr], captureDevicePosition: .back)
    }

    return QRCodeReaderViewController(builder: builder)
}()

Create CustomQRCodeReaderView.swift:
import UIKit
import AVFoundation
import QRCodeReader

class CustomQRCodeReaderView: UIView, QRCodeReaderDisplayable {
    let cameraView: UIView = UIView()
    let cancelButton: UIButton? = UIButton()
    let switchCameraButton: UIButton? = SwitchCameraButton()
    let toggleTorchButton: UIButton? = ToggleTorchButton()
    var overlayView: UIView? = UIView()
    private weak var reader: QRCodeReader?

    func setupComponents(showCancelButton: Bool, showSwitchCameraButton: Bool, showTorchButton: Bool, showOverlayView: Bool, reader: QRCodeReader?) {
        self.reader = reader

        // Listen for orientation change notifications
        NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: .UIDeviceOrientationDidChange, object: nil)

        // Subviews
        addSubview(cameraView)

        if let reader = reader {
            cameraView.layer.insertSublayer(reader.previewLayer, at: 0)
            orientationDidChange()
        }

        // Constraints
        for attribute in Array<NSLayoutAttribute>([.left, .top, .right, .bottom]) {
            addConstraint(NSLayoutConstraint(item: cameraView, attribute: attribute, relatedBy: .equal, toItem: self, attribute: attribute, multiplier: 1, constant: 0))
        }
    }

    @objc func orientationDidChange() {
        setNeedsDisplay()

        // Set view orientation
        if let connection = reader?.previewLayer.connection, connection.isVideoOrientationSupported {
            connection.videoOrientation = QRCodeReader.videoOrientation(deviceOrientation: UIDevice.current.orientation,
                                                                        withSupportedOrientations: UIApplication.shared.supportedInterfaceOrientations(for: UIApplication.shared.keyWindow),
                                                                        fallbackOrientation: connection.videoOrientation)
        }
    }
}

authors: cvhong hanguyen221 karlisl ledikari reshadf shanmarkus


text:
如何获取cookie？

如何获取cookie？

Cookie是可以获取的。
第一点必须要知道的：首先NoHttp自动维持了Cookie。
第二：获取单个请求的Cookie，在响应的时候response.getHeaders().getCookies()。
第三：如果需要向webView共享Cookie，那么就要获取这个url下所有的cookie：
try {
            URI uri = new URI(url);
            if (uri != null) {
                CookieStore cookieStore = ((MaMaCookieManager) NoHttp.getDefaultCookieHandler()).getCookieStore();
                List<HttpCookie> cookies = cookieStore.get(uri);
                CookieManager webCookieManager = CookieManager.getInstance();
                webCookieManager.setAcceptCookie(true);
                for (HttpCookie cookie : cookies) {
                    webCookieManager.setCookie(cookie.getDomain(), cookie.getName() + "=" + cookie.getValue() + "; path=" + cookie.getPath() + "; domain=" + cookie.getDomain());
                }
                CookieSyncManager.createInstance(NoHttp.getContext()).sync();
            }
        } catch (URISyntaxException e) {
        }

repo: yanzhenjie/NoHttp


text:
🛑 標籤 is down

In 4e6ffe6, 標籤 (https://web.ndhu.edu.tw/academic/syslib/showname.aspx) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 標籤 is back up in dfb0b49 after 29 minutes.


text:
Warning: Calling bottle :unneeded is deprecated! There is no replacement.

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the ycd/tap tap (not Homebrew/brew or Homebrew/core):
  /opt/homebrew/Library/Taps/ycd/homebrew-tap/Formula/dstp.rb:6

brew formula needs update.

Thanks for taking your time and reporting this, fixed this earlier today!

authors: cocoonkid ycd

repo: ycd/dstp