Add Airrecord::Base to the ad-hoc API

Airtable's node client lets you quickly instantiate a base and interact with its tables. We can do likewise.
Node reference:
var Airtable = require('airtable');
var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('appYOUR_APP_ID');

base('pages').find('recRECID', function(err, record) {
    if (err) { console.error(err); return; }
    console.log(record);
});

Proposed ruby style:
@base = Airrecord::Base.new("YOUR_API_KEY", "appYOUR_APP_ID")
@base.table("pages") #=> <Anonymous Airrecord::Table>
@base.table("pages").records(view: "Grid view") #=> [<Page>, <Page>]

The ad-hoc API already lets you do this:
Tea = Airrecord.table("api_key", "app_key", "Teas")

Should we change it, you think?

No, you're right. It should follow the existing format, which more closely mimics the node syntax anyway.
@base = Airrecord.base("api_key", "app_key") #=> <Airrecord::Base>
@base.table("Tea") #=> <Anonymous Airrecord::Table @api_key="api_key" @app_key="app_key">
Coffee = Airrecord.table("api_key", "some_other_app_key", "Coffee")

Airrecord.base would make it a bit more convenient to instantiate many tables from the same base with the same credentials. And Airrecord.table should remain available as a convenient way of accessing tables from different bases, etc.

Sounds good to me. This wouldn't be a breaking change, so we can do this in 1.1.


Fix /index route replacement

Fixes the issue with /index handling when generating routes.
Behavior description
There's an existing behavior to handle index.blade.php files, that replaces index in the url with empty string, to create a proper route.
Let's say I have /pages/foo/index.blade.php page with a name('foo').
route('foo') would then generate /foo/index and replace the /index part to an empty string.
The bug
Let's say I have /pages/foo/[slug].blade.php page with a name('foo').
And my slug accidentally start with word "index".
route('foo', ['slug' => 'index-shows-growth']) should then generate /foo/index-shows-growth
But, because of the rule above, it'll generate /foo-shows-growth with /index replaced out.
The solution
Change replacing function to regex and add an end of line to the end of the pattern.
That way we still replace /index to empty string, but won't replace slugs that start with /index.

Heya thanks. Best that you add a thorough explanation to your PR description and not just link to an issue (see the PR template when you open a new PR).

Sorry @driesvints, I've updated the PR description.


How to get the final Anomaly Prediction image which you present in your paper?

How could I get the image like this which presented in your paper

When I test demo.py, I get the anomaly prediction picture like this .But how to get the picture like what you presented in your paper?

I haven't try it myself. But if you go to the Google Colab Demo Notebook  ( https://colab.research.google.com/drive/1HQheunEWYHvOJhQQiWbQ9oHXCNi9Frfl?usp=sharing#scrollTo=gC-ViJmm23eM ) in section "Get and Display Perceptual Difference" they used this code:
`heatmap_prediction = cv2.applyColorMap((255-diss_pred), cv2.COLORMAP_JET)
heatmap_pred_im = Image.fromarray(heatmap_prediction).resize((2048, 1024))
combined_image = Image.blend(img_og, heatmap_pred_im, alpha=.5)
display(combined_image)`


View-only quoter

Related Issue
Current quoter simulates a swap and reverts, using a lot of gas.
Description of changes
This view-only quoter aims to quote a v4 pool cheaper by removing the revert and the unused state updates. Currently, this can only quote swaps without hook executions that change the output of a swap.
This code is adapted from view-quoter-v3.

Closing this for now, and will follow up depending on needs for a view only quoter. Thanks for the contribution :)


Add python-icat & suds-community to requirements.in

Description:
I just tried deploying master on scigateway-preprod, and had some problems with not having python-icat (and it's sub-dependency suds-community) installed. These should be added to the requirements files.
Acceptance criteria:

[ ] Requirements files up to date

Now this repo has been moved over to use Poetry to track its dependencies, the pyproject.toml file contains these dependencies, pinned to specific versions. See:
https://github.com/ral-facilities/datagateway-api/blob/feature/remove-sql-dependency-from-backends-%23154/pyproject.toml#L20
Once the remaining PRs are merged into master, this should get fixed.

Now this repo has been moved over to use Poetry to track its dependencies, the pyproject.toml file contains these dependencies, pinned to specific versions. See:
https://github.com/ral-facilities/datagateway-api/blob/feature/remove-sql-dependency-from-backends-%23154/pyproject.toml#L20
Once the remaining PRs are merged into master, this should get fixed.

Ah yeah, forgot we had a new dependency management system - no worries then!

Ah yeah, forgot we had a new dependency management system - no worries then!


Fetch A Paragraph

From the contributed file "paragraphs.json" located in "Assets/paragraphs.json", fetch a random element from an array (a paragraph) to the textarea of the class-name "fetchText" as a "placeholder".
Also implement the functionality of the reload button (which re-fetches a random paragraph from the .json file).
#HINT: By the help of react hooks like useEffects(), one could design a function that calls itself in a certain condition/time period.

I can work on this issue but the first part to randomly fetch the paragraph is already there in the code base I think


Dev

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (92a44de) 61.94% compared to head (6eb166c) 97.50%.
Report is 9 commits behind head on Main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             Main      #52       +/-   ##
===========================================
+ Coverage   61.94%   97.50%   +35.55%
===========================================
  Files          14        4       -10
  Lines         896      320      -576
===========================================
- Hits          555      312      -243
+ Misses        341        8      -333

Flag
Coverage Δ

unittests
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Allow nopython code to raise warnings

NumPy uses warnings to communicate errors in computation (e.g. divide-by-zero).
Numba needs to do the same when executing jitted numpy ufuncs.

Suggestions
Option 1: Use a new return status code to indicate a warning has occurred.  This may allow us to have just one warning
Option 2: Let each target decide how warnings are reported by invoking an external function that is resolved by the target at load time.  1) When used in python, just delegate to libpython API. 2) When used in pycc, NRT may provide an implementation (e.g. print to stderr).  3) In CUDA-Python, just print?

I like option 2 better. I suppose we'd have to take the GIL and call the CPython warnings API.

Bounce - this capability is dearly missed.


Feature: Show removable drives in a separate group

What's the Problem?

我的可移动SD卡混杂在本地磁盘中显示，这令我很不舒服。
Solution/Idea
就像Windows7一样，那样可能看起来更方便。
Alternatives
参考Windows7等单独显示可移动设备
Priorities
must
Files Version
<IP_ADDRESS>
Windows Version
Windows11 22621.382
Comments
No response

Thank you for your feedback.

@Tochees thank you for your feedback, we wanted to let you know that we don't currently have plans to implement this change.


KindleFire HD Drop-Down Issue with FlexNav

On the KindleFire HD, when the menu is the full horizontal menu, if you expand a drop down menu it will display then disappear on first click. But when you click it a second time then it will stay visible. When in responsive mode, the menu works perfect.

Hi @jasonalls ,
i had the same problem on devices of Apple. My solution for your problem in jquery.flexnav.js on line 124:
Comment or delete the following line:
// $(this).parent('.item-with-ul').siblings().find('ul.flexnav-show').removeClass('flexnav-show').hide();
and paste the following code:
$(this).siblings('ul.flexnav-show').removeClass('flexnav-show').hide();
Greeting
cr-dynamic

Hi cr-dynamic,
Thank you for your reply. I will use your solution to fix my issue. Thanks for taking the time to reply.
Kind Regards,
Jason.
Date: Sun, 23 Aug 2015 12:23:44 -0700
From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>CC<EMAIL_ADDRESS>Subject: Re: [flexnav] KindleFire HD Drop-Down Issue with FlexNav (#196)
Hi @jasonalls ,
i had the same problem on devices of Apple. My solution for your problem in jquery.flexnav.js on line 124:
Comment or delete the following line:
// $(this).parent('.item-with-ul').siblings().find('ul.flexnav-show').removeClass('flexnav-show').hide();
and paste the following code:
$(this).siblings('ul.flexnav-show').removeClass('flexnav-show').hide();
Greeting
cr-dynamic
—
Reply to this email directly or view it on GitHub.


LANTERN-799: Updated the source endpoint URL for Genius Solutions Inc.

Pull requests into this repository require the following checks to be completed by the submitter and reviewers.
Submitter:

[x] Administrative tasks are complete.

This pull request describes why these changes were made.
The JIRA ticket links to this PR.
The JIRA ticket for this PR is: LANTERN-799

[x] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

[x] Code review has been performed.

Code diff has been done and checked to ensure only expected code is being committed.
A linter for the language has been run.

Primary Reviewer:

[ ] Code works.

Code has been run locally and the basic functionality affected by the PR has been checked.
Edge cases have been checked to ensure behavior is as expected.

[ ] Code review has been performed.

Code is maintainable, reusable, efficient, and correct.
Code accomplishes the tasks purpose.
Code follows style guidance appropriate for the language, including passing linter checks.
Code is well commented (which does not mean verbosely commented).

[ ] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

Merger:
Prior to merging, ensure that all checks have been completed. Delete the branch after the merge
is complete.

@rishi-salunkhe-mettle Reviewed and Approved, please assign within Mettles for Github PR Reviewer approval.


Get up to date with 'master' 🍉

☝🏻

:tada: This PR is included in version 4.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add util functions for HeadersRequest

Describe the feature
https://github.com/paradigmxyz/reth/blob/cef7ec80c13acac11ac4c2b93bf6bd19f4298d8c/crates/net/p2p/src/headers/client.rs#L15-L15
for example we have:
https://github.com/paradigmxyz/reth/blob/cef7ec80c13acac11ac4c2b93bf6bd19f4298d8c/crates/node/core/src/utils.rs#L47-L47
which we can convert into multiple functions for single requests:

fn one(start) // direction does not matter here
rising(start, limit)
falling(start,limit)

Additional context
No response

hey @mattsse, I'd like to work on this one

@AlbionaHoti looks like someone already sniped this -.-
I just opened a few more issues, if you don't find anything interesting feel free to reach out on tg @mattsse


Callback when user clicks to choose file(s)

I know this may seem like a silly request; however, I could use an event callback when a person actually clicks the "choose files".    The reason for this is because I want to be able to keep an accurate log of everything a user does (in case there are problems), and I would like to make sure that the user has set their name on the form before allowing them to do anything else.    So, in the callback, I would check if the "name" fields are set on the form, and then allow it to continue if so, or provide an error message (and reset the "choose files") if so.
Hopefully this makes sense.  I know it would seem odd to have an "OnClickSelect", when there is already an "OnSelect" callback, but I can't think of any other way to keep a user from choosing a file before they enter other information on the form.
Or, if anyone has suggestions or thoughts that I might be missing, please feel free to suggest!

Not a usefull method for all.


RecursionError: maximum recursion depth exceeded in comparison

Hello, what should I pay attention to if I use create_lmdb_dataset.py to construct the dataset? When I run eval_rec_all_ch.py after generating the mdb file, I get an error

When I create lmdb data, do I need to modify the config file as follows:
Eval:
dataset:
name: LMDBDataSet
ds_width: True
...
sampler:
name: MultiScaleSampler

This is caused by unsuccessful data preprocessing, please check where in ratio_dataset.py: outs = transform(data, self.ops[:-1]) the preprocessing is wrong.

I think my main problem is that I don't know how to construct my own dataset, should I use "create_lmdb_dataset.py" ? My data is a Chinese address, what specific adjustments need to be made.

Because I had a problem creating the dataset, "transform" always returns none. How to solve this?

if __name__ == '__main__':
    data_dir = './Union14M-L/'
    label_file_list = [
        './Union14M-L/train_annos/filter_jsonl_mmocr0.x/filter_train_challenging.jsonl.txt',
        './Union14M-L/train_annos/filter_jsonl_mmocr0.x/filter_train_easy.jsonl.txt',
        './Union14M-L/train_annos/filter_jsonl_mmocr0.x/filter_train_hard.jsonl.txt',
        './Union14M-L/train_annos/filter_jsonl_mmocr0.x/filter_train_medium.jsonl.txt',
        './Union14M-L/train_annos/filter_jsonl_mmocr0.x/filter_train_normal.jsonl.txt'
    ]
    save_path_root = './Union14M-L-LMDB-Filtered/'

    for data_list in label_file_list:
        save_path = save_path_root + data_list.split('/')[-1].split(
            '.')[0] + '/'
        os.makedirs(save_path, exist_ok=True)
        print(save_path)
        train_data_list = get_datalist(data_dir, data_list, 800)

        createDataset(train_data_list, save_path)

你需要修改tools/create_lmdb_dataset.py中的data_dir、label_file_list和save_path_root。其中label_file.txt中的内容应该是 img_dir_name+\t+label的形式，例如：
full_images/COCOTextV2_append/imgs/img_107271_0.jpg	LAYI SILK
full_images/COCOTextV2_append/imgs/img_107339_2.jpg	PumUoo
full_images/COCOTextV2_append/imgs/img_107339_7.jpg	GA
其中data_dir+img_dir_name是图片可读取的路径。

Because I had a problem creating the dataset, "transform" always returns none. How to solve this? ![image]

这是因为数据预处理有问题，你可以，在data返回为None时打印当前op：
def transform(data, ops=None):
    """transform."""
    if ops is None:
        ops = []
    for op in ops:
        data = op(data)
        if data is None:
            print(op)
            return None
    return data

然后找到op的具体代码，尝试定位导致返回None的具体原因，一般是label处理不通过（比如长度超过max_text_length等）或者图片读取不成功导致。

感谢解答，确实是超过最大长度导致的问题，但是输出精度全为0，数据集或者参数还要做哪些调整吗？

上述测试代码是正常的，只是识别精度很低，我想使用自己构造地址数据集一边生成数据一边训练，请问训练前是否一定要将图片和标签转换为lmdb格式？

RatioDateset only supports loading data in LMDB format, you can also modify it to load data in customized formats.

@Topdu @hp0716
I am experiencing the same issue. I have already set max_text_len = 200, and none of the labels in my dataset exceed 200 characters. However, I am still encountering this error.
[2024/12/09 09:21:17] openrec INFO: data_idx_order_list shape: (12631, 2)
[2024/12/09 09:21:17] openrec INFO: Loaded WH ratios from cache.
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 0: 0
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 1: 691
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 2: 4302
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 3: 2550
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 4: 1079
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 5: 489
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 6: 2139
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 7: 193
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 8: 185
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 9: 176
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 10: 178
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 11: 162
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 12: 138
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 13: 99
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 14: 86
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 15: 50
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 16: 52
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 17: 16
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 18: 16
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 19: 13
[2024/12/09 09:21:17] openrec INFO: Number of samples with ratio 20: 17
0 691 48.0 21 32
0 4302 96.0 134 32
0 2550 144.0 79 32
0 1079 192.0 33 32
0 489 240.0 19 25
0 2139 288.0 101 21
0 193 336.0 10 18
0 185 384.0 11 16
0 176 432.0 12 14
0 178 480.0 14 12
0 162 528.0 14 11
0 138 576.0 13 10
0 99 624.0 11 9
0 86 672.0 9 9
0 50 720.0 6 8
0 52 768.0 6 8
0 16 816.0 2 7
0 16 864.0 2 7
0 13 912.0 2 6
0 17 960.0 2 6
[2024/12/09 09:21:17] openrec INFO: valid dataloader has 509 iters
[2024/12/09 09:21:18] openrec INFO: {'Total': 28810809, 'Trainable': 28810809}
[2024/12/09 09:21:18] openrec INFO: remove decoder.gtc_decoder.char_embed.embedding.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.gtc_decoder.ques1_head.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.gtc_decoder.ques1_head.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.char_token
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.fc.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.fc.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.fc_kv.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.fc_kv.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.norm1.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.norm1.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.attn.qkv.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.attn.proj.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.attn.proj.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.norm2.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.norm2.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.mlp.fc1.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.mlp.fc1.bias
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.mlp.fc2.weight
[2024/12/09 09:21:18] openrec INFO: remove decoder.ctc_decoder.w_atten_block.mlp.fc2.bias
[2024/12/09 09:21:18] openrec INFO: load pretrained model from ./pretrained/best.pth
[2024/12/09 09:21:18] openrec INFO: decoder.gtc_decoder.char_embed.embedding.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.gtc_decoder.ques1_head.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.gtc_decoder.ques1_head.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.char_token is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.fc.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.fc.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.fc_kv.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.fc_kv.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.norm1.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.norm1.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.attn.qkv.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.attn.proj.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.attn.proj.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.norm2.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.norm2.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.mlp.fc1.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.mlp.fc1.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.mlp.fc2.weight is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: decoder.ctc_decoder.w_atten_block.mlp.fc2.bias is not in pretrained model
[2024/12/09 09:21:18] openrec INFO: finetune from checkpoint ./pretrained/best.pth
[2024/12/09 09:21:18] openrec INFO: run with torch 2.3.1 and device cuda:0
[2024/12/09 09:21:18] openrec INFO: During the training process, after the 0th epoch, an evaluation is run every 1 epoch
[2024/12/09 09:21:18] openrec INFO: During the training process, after the 0th iteration, an evaluation is run every 10 iterations
0 23921 48.0 747 32
0 20632 96.0 644 32
0 10328 144.0 322 32
0 3671 192.0 114 32
0 1488 240.0 59 25
0 3733 288.0 177 21
0 7139 336.0 396 18
0 3329 384.0 208 16
0 1270 432.0 90 14
0 814 480.0 67 12
0 616 528.0 56 11
0 448 576.0 44 10
0 308 624.0 34 9
0 188 672.0 20 9
0 82 720.0 10 8
0 22 768.0 2 8
0 7 816.0 7
0 3 864.0 7
0 1 912.0 6
/opt/conda/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Applied workaround for CuDNN issue, install nvrtc.so (Triggered internally at /opt/conda/conda-bld/pytorch_1716905971132/work/aten/src/ATen/native/cudnn/Conv_v8.cpp:84.)
  return F.conv2d(input, weight, bias, self.stride,
/opt/conda/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:143: UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`.  Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
  warnings.warn("Detected call of `lr_scheduler.step()` before `optimizer.step()`. "
eval model::  98%|██████████████████████████████████████████████████████████████████████████████████▌ | 500/509 [05:51<00:06,  1.48it/s]Traceback (most recent call last):
  File "/workspace/TorchOCR_duyle/tools/train_rec.py", line 37, in <module>
    main()
  File "/workspace/TorchOCR_duyle/tools/train_rec.py", line 33, in main
    trainer.train()
  File "/workspace/TorchOCR_duyle/tools/engine/trainer.py", line 384, in train
    cur_metric = self.eval()
  File "/workspace/TorchOCR_duyle/tools/engine/trainer.py", line 542, in eval
    for idx, batch in enumerate(self.valid_dataloader):
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
    data = self._next_data()
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
    data.reraise()
  File "/opt/conda/lib/python3.10/site-packages/torch/_utils.py", line 705, in reraise
    raise exception
RecursionError: Caught RecursionError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)  # type: ignore[possibly-undefined]
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/workspace/TorchOCR_duyle/tools/data/ratio_dataset_tvresize.py", line 269, in __getitem__
    return self.__getitem__([img_width, img_height, ids[0], ratio])
  File "/workspace/TorchOCR_duyle/tools/data/ratio_dataset_tvresize.py", line 269, in __getitem__
    return self.__getitem__([img_width, img_height, ids[0], ratio])
  File "/workspace/TorchOCR_duyle/tools/data/ratio_dataset_tvresize.py", line 269, in __getitem__
    return self.__getitem__([img_width, img_height, ids[0], ratio])
  [Previous line repeated 961 more times]
  File "/workspace/TorchOCR_duyle/tools/data/ratio_dataset_tvresize.py", line 263, in __getitem__
    outs = transform(data, self.ops[:-1])
  File "/workspace/TorchOCR_duyle/openrec/preprocess/__init__.py", line 47, in transform
    data = op(data)
  File "/workspace/TorchOCR_duyle/openrec/preprocess/__init__.py", line 119, in __call__
    img = data['image']
  File "/opt/conda/lib/python3.10/site-packages/PIL/Image.py", line 3318, in open
    im = _open_core(fp, filename, prefix, formats)
  File "/opt/conda/lib/python3.10/site-packages/PIL/Image.py", line 3304, in _open_core
    im = factory(fp, filename)
  File "/opt/conda/lib/python3.10/site-packages/PIL/JpegImagePlugin.py", line 840, in jpeg_factory
    im = JpegImageFile(fp, filename)
  File "/opt/conda/lib/python3.10/site-packages/PIL/ImageFile.py", line 123, in __init__
    if is_path(fp):
  File "/opt/conda/lib/python3.10/site-packages/PIL/_util.py", line 10, in is_path
    return isinstance(f, (bytes, str, os.PathLike))
  File "/opt/conda/lib/python3.10/abc.py", line 119, in __instancecheck__
    return _abc_instancecheck(cls, instance)
RecursionError: maximum recursion depth exceeded in comparison

eval model::  98%|██████████████████████████████████████████████████████████████████████████████████▌ | 500/509 [05:51<00:06,  1.42it/s]

I suspect it's because the last iter has only one image (0 1 912.0 6, indicating gpu 0, with 1 image of width 912 and a preset bs of 6). When get_item reports an error, it randomly selects equal-sized images, but the image width of 912 is only 1 image, so it exceeds the recursion count and causes an error.


Browser tests / Laravel Dusk (using PHP7.1)

Also contains a bunch of the commits from me messing around with Travis-CI, which now builds and runs our tests using Docker containers and shares the reports.

@tristan-orourke  Issue building the database since I merged dev into this branch, with the insert script and foreign key constraints. Anyone else?

This has been supersceded by an update to PHP 7.2


Fix remaining undefined behavior from ambiguous function returns

Fixes [hopefully] all remaining undefined behavior from return type disambiguation.
Adds color closures, structs, and void to the defined precedence order of resolving via return type.
Errors when disambiguating via return type and more than one user struct is a match.

Opted for the order:
float, int, color, vector, point, normal, matrix, string, color closure, struct, void
Should be no behavioral change against prior PR except in cases where behavior was undefined.
(i.e. color closure, struct, void were all previously sorted last as well)

LGTM. I will merge this on Tuesday (I'm not at the office Monday, so don't want to merge and then not be there to fix if anything goes wrong).


TP ds forms pull field titles/descriptions from traffic_portal_proper…

…ties.json now (configurable)

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1137/
Test PASSed.


KAFKA-14617; Add ReplicaState to FetchRequest.

As the first part of the KIP-903, it updates the FetchRequest:

Deprecate the ReplicaId field
Create a new tagged field ReplicaState with ReplicaId and ReplicaEpoch
Bump the FetchRequest version to 15
Bump metadata version to 3.5-IV1

https://issues.apache.org/jira/browse/KAFKA-14617

@dajac I think the major question is how can the KafkaRaftClient can correctly consume the FetchRequest.
The current PR makes quite some efforts to get the FetchRequest apiVersion and then parse the FetchRequest.
If this way is too much trouble, I can think of another one:

Change the FetchRequest old ReplicaId default value to -1.
Then when the KafkaRaftClient receives the request, it can tell the ReplicaId by comparing the value of the old ReplicaId field and the new one(it has default value -1).

@CalvinConfluent Thanks for the explanation. I agree that we have two options on the table: 1) pass the api version or even the header object; or 2) rely on the default sentinel value to read the correct field. Personally, I lean towards 2) here because it is simpler. It would be great to run this by @hachikuji as the authored this part.

Changing the old ReplicaId field default value to -1. In this way, we can easily extract the replicaId from the FetchRequest without knowing the API version. Simple and minimal work.

@CalvinConfluent Could you rebase the PR? There are a few conflicts.

@dajac Done.

@CalvinConfluent Could you rebase as well?


Limit speed connection

Any feature to limit speed in port forward,? so every user trying connect through port forward with certain speed. I want limit the port around 5Mbps

Hello
I don't know how to do it...

i'm using trickle to do that. now I'm confusing about what quota is? in Byte, MB, or GB in your format?

Quota is the max bytes which user can use to transmit data.

Quota is the max bytes which user can use to transmit data.

yes, it's can be set for max bandwidth/quota server. btw trickle didn't work for limiting speed.

@HirbodBehnam traffic quota doesn't seem to work? I set 3TB in configuration, then this 2 weeks checking vnstat 1.5TB total, do cat /etc/PortForwarder/config.json the quota remaining 2.5TB?

I think it should work fine. It's using the std io.Copy to copy the buffers and return the transferred amount of traffic. This happens at these two lines:
https://github.com/HirbodBehnam/PortForwarder/blob/aa8618711522ac9583d4d510822bcafefa9a396e/main.go#L271-L275
https://github.com/HirbodBehnam/PortForwarder/blob/aa8618711522ac9583d4d510822bcafefa9a396e/main.go#L291-L293

current config, original quota set 3TB
{
  "SaveDuration":600,
  "Timeout":300,
  "Rules":[
    {
      "Name":"443",
      "Listen":443,
      "Forward":"a.b.c.d:443",
      "Quota":2436127916565,
      "ExpireDate":0,
      "Simultaneous":0
    }
  ]
}

running command
/usr/local/bin/PortForwarder --config config.json --verbose 0
is there any issues with this configuration? @HirbodBehnam.

No I think it's fine

I'm closing this due to inactivity. I still think It's fine.


bash ecomp_piano_downloader.sh midi/ecomp_piano

When I run the script in the title, I get the following error
No URLs found in -.
rm: missing operand
Try 'rm --help' for more information.
rm: cannot remove '*': No such file or directory
Does anybody know how?

Hello,
I fixed this in my fork https://github.com/adamoudad/MusicTransformer-tensorflow2.0
and have submitted a PR some times ago #29
Best,
Adam.


fix: operation api value set to default now

Description
Fixed dafault value in the rule operations to make it mandatory to protect the APIs which the target service supports.
Release required?

[ ] No release
[x] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

Merge actions for mergers

When merging, use a relevant conventional commit message that is based on the PR contents and any release notes provided by the PR author. The commit message determines whether a new version of the module is needed, and if so, which semver increment to use (major, minor, or patch).
Merge by using "Squash and merge".

/run pipeline

/run pipeline

/run pipeline

/run pipeline

:tada: This PR is included in version 1.12.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Upgrader: add command install action

When running install actions, we previously only supported starting an
application or document contained in the installer package. You might
want to run instead a command that is provided by the host operating
system / environment. For example, on macOS you might want to run bash
or the "installer" binary directly.

When running install actions, we previously only supported starting an
application or document contained in the installer package. You might
want to run instead a command that is provided by the host operating
system / environment. For example, on macOS you might want to run bash
or the "installer" binary directly.

Could you please update the description with a few additional details.

Can regular mac end user provide a command for gvfs upgrade to run? Or is this command included in the installer payload?
Similar to the downloaded upgrade package validation, is there any sort of validation that we can do on the command?
How does end user specify an environment setting? Is this the bash environment variables or gvfs config?

@alameenshah Thanks for the review! I updated the description to address the (good) questions you brought up.


Update init.py

fix log message:
Detected code that calls async_forward_entry_setup for integration dwd with title: {{title}} and entry_id: {{entry_id}}, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done.
this should fix #25

unfortunately, the first test seems not to have worked.


Converges duplicate before_install in travis

Duplicate before_install stanzas ended up ignoring the first, which
started Cassandra.

awesome.. this breaks the build :P Thanks for noticing, @yurishkuro
cc @abesto looks like the main thing here is we should be careful to not duplicate yaml keys as travis silently chooses the last

Huh. Nice find.


IO Firmware build: Incorrect CMake dependencies

@dagar @jgoppert Something with the dependency generation is odd:
make px4fmu-v2_default upload
[147/165] Building CXX object src/modules/px4iofirmware/CMakeFiles/px4io-v2.dir/__/systemlib/mixer/mixer.cpp.obj
FAILED: src/modules/px4iofirmware/CMakeFiles/px4io-v2.dir/__/systemlib/mixer/mixer.cpp.obj
/usr/local/bin/arm-none-eabi-g++   -DCONFIG_ARCH_BOARD_PX4IO_V2 -D__DF_NUTTX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I. -Isrc -Isrc/modules -Isrc/modules/px4_messages -I../mavlink/include/mavlink -I../src -I../src/drivers/boards/px4io-v2 -I../src/include -I../src/lib -I../src/lib/DriverFramework/framework/include -I../src/modules -I../src/platforms -I../src/modules/px4iofirmware/src/lib/matrix -Ipx4io-v2/NuttX/nuttx/nuttx-export/include -Ipx4io-v2/NuttX/nuttx/nuttx-export/include/cxx -Ipx4io-v2/NuttX/nuttx/nuttx-export/arch/chip -Ipx4io-v2/NuttX/nuttx/nuttx-export/arch/common -Ipx4io-v2/NuttX/nuttx/nuttx-export/arch/armv7-m -Ipx4io-v2/NuttX/apps/include -Isrc/modules/systemlib/mixer -I../src/modules/px4iofirmware/. -g -fno-exceptions -fno-rtti -std=gnu++0x -fno-threadsafe-statics -DCONFIG_WCHAR_BUILTIN -D__CUSTOM_FILE_IO__ -fcheck-new -Wall -Werror -Wextra -Wno-sign-compare -Wshadow -Wfloat-equal -Wpointer-arith -Wmissing-declarations -Wno-unused-parameter -Werror=format-security -Werror=array-bounds -Wfatal-errors -Werror=unused-variable -Werror=reorder -Werror=uninitialized -Werror=init-self -Werror=unused-but-set-variable -Wformat=1 -Wdouble-promotion -Werror=double-promotion -Wno-missing-field-initializers -fvisibility=hidden -include visibility.h -mcpu=cortex-m3 -mthumb -march=armv7-m -nodefaultlibs -nostdlib -Os -fno-strict-aliasing -fomit-frame-pointer -funsafe-math-optimizations -ffunction-sections -fdata-sections -fno-strength-reduce -fno-builtin-printf -MD -MT src/modules/px4iofirmware/CMakeFiles/px4io-v2.dir/__/systemlib/mixer/mixer.cpp.obj -MF src/modules/px4iofirmware/CMakeFiles/px4io-v2.dir/__/systemlib/mixer/mixer.cpp.obj.d -o src/modules/px4iofirmware/CMakeFiles/px4io-v2.dir/__/systemlib/mixer/mixer.cpp.obj -c /Users/user/src/Firmware/src/modules/systemlib/mixer/mixer.cpp
In file included from /Users/user/src/Firmware/src/modules/systemlib/mixer/mixer.cpp:40:0:
../src/platforms/px4_config.h:44:26: fatal error: nuttx/config.h: No such file or directory
compilation terminated.

IO is rebuilt on ROMFS changes. That makes no sense at all.

Something is definitely not right with the NuttX build dependencies. It must be touching something one build which then causes a larger rebuild the next.
 % ninja -j1
[48/48] Generating px4fmu-v2_default.px4, firmware_nuttx.bin

 % ninja -j1
[2/2] Copying NuttX for px4io-v2 with nsh

 % ninja -j1
[48/48] Generating px4fmu-v2_default.px4, firmware_nuttx.bin

% ninja -j1
[2/2] Copying NuttX for px4io-v2 with nsh

% ninja -j1
[48/48] Generating px4fmu-v2_default.px4, firmware_nuttx.bin

This might be a good excuse to move the cmake nuttx build wrapper to ExternalProject_Add. https://cmake.org/cmake/help/v3.2/module/ExternalProject.html
That's effectively what we've ended up recreating from scratch. https://github.com/PX4/Firmware/blob/master/cmake/nuttx/px4_impl_nuttx.cmake#L259
@davids5 FYI

I originally implemented it with external project, there was some reason at the time it was annoying or wouldn't work.

I think I found a simple fix. Happy to leave it alone for now. #6475


Demos should do some basic data exploration to hint at what a user needs to load

Describe the bug
Along the lines of #1330, it's helpful if demos have some indication of what the hidden loading code is doing. One form of this is showing/telling what the result of the loading is, e.g. that's it's a StellarGraph or list of StellarGraphs (for graph classification) and what's in the graph(s) (via info()), and similarly for any other pieces of information that are loaded.
(StellarGraph 1.0.0rc1 dogfooding)

We could potentially automate this, eg:

User doesn't have a sense of what data is used in the demo
eg.

here is the info of the graph
here are the number of graphs
Applies to lots of demos, and has to be done manually, so is potentially quite a lot of work.

Could do Graph Classification ones (different to others) - list rather than a graph.
Users coming in may not necessarily know about graph classification.
Not as critical as #1330

Calling this done enough for now, with #1628.


Change youtube-dl extractor

Hello very useful your project. But I want to change the url for a video from other domains, cnn, cnbc, foxnews. The youtube-dl git project has the https://github.com/ytdl-org/youtube-dl/tree/master/youtube_dl/extractor. How can I take advantage of your the code and do this? Thank you.

You want to use this youtube-downloader to be able to download videos from sites other than youtube.com? That's not really the purpose of this project and it would involve massive work

recommend https://github.com/rudloff/alltube


Add support for IRC topic change notification messages

Great, thanks! Would you like to add a test for this too? Similar to these: https://github.com/ekmartin/slack-irc/blob/master/test%2Fbot-events.test.js#L90-L115

Closing, needs tests. If anyone wants to give it a shot that'd be awesome, else I'll take a look at it when I get time.


Amend the documentation for the /isolate endpoint response

Change-Id: If17e086dc2cddba0533ddf2d1f843e3978cc15ea
Ticket: #44

What about the id-key? it seems to exist only in the api docs.

@MicheleK17 Well spotted.  I'm not sure yet if that's an error in the documentation or an error in the response.  I'll move the Ticket back to In Progress while I think about that.


Including kiwi/stoat classification activity

Hi Dale,
I have included the sb3 template and worksheets (pdf and word) for an activity where students recognise images of kiwi birds and stoats.
The worksheet is in this google doc, please request access to it if you want to change/edit something.
Cheers,
Victor

This is fantastic - thank you!


Fix HSEARCH-655

An attempt to fix https://hibernate.atlassian.net/browse/HSEARCH-655.
Unit test is OK for me : index is not corrupted (can be open with luke). My use case describe in https://forum.hibernate.org/viewtopic.php?f=9&t=1038268 seems to be also OK.

Can one of the admins add this person to the trusted builders? (reply with: "add to whitelist" or "ok to test")

ok to test

Thanks a lot @yge45 , the patch look excellent!
I'm merging it, I've only made two small changes in the unit test:

removed the '@RunWith(BMUnitRunner.class)' annotation and the 'hibernate.search.default.indexwriter.infostream' properties as they don't seem to be used
I've removed the 'Thread.sleep' methods by checking instead on the thread progress.. just to keep our testsuite execution as short as we can.

Did you already sign the contributor's agreement for Hibernate at cla.jboss.org ?

Contributor's agreement for Hibernate signed

thanks!
Now you're free to send as many pull requests as you want ;)


feat: Support gRPC and HTTP protocols

What this PR does / why we need it:
Add your description
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #

Special notes for your reviewer:
/cc @your-reviewer

Release note:

NONE

Please fix the unit test case. https://github.com/kleveross/klever-model-registry/pull/95/checks?check_run_id=1071788614

Please link this PR to the issue https://github.com/kleveross/klever-model-registry/issues/86 in the description.

@gaocegege PTAL


Sentry Reports Invalid Regular Expression When String Is Entered into Angular Input

When writing a string like / foo ( bar into an input inside an Angular 2 app, Sentry reports an invalid regular expression. Angular 2 forms should be escaped and the console does also not log this error. The app itself keeps working without any problems.
Can somebody reproduce this problem? A code example can be viewed at http://plnkr.co/edit/yCRYDDn7bcvn5z7yGJSO?p=preview
I am using raven-js v3.9.1 reporting on Angular v2.4.0.

Turns out that this was caused by additional wiring in of ng-bootstrap's typeahead module. I solved the problem by manually escape user input using lodash's escapeRegExp()


hide previous and next month days

Hi @mdehoog thanks for putting a separated repo for this great calendar.
I just modified my own copy of calendar it's minimal change and it's great, I could help with PR if needed just need to know what kind of approach you want to take?

I thought it was possible to do with CSS, but had to modify and add .current-month for days because current month disabed css days will also be gone, I think we could probably offer an option to just don't really add those values and avoid the CSS or just PR my current implementation of adding .current-month class to days?
.ui.calendar .ui.table tr .disabled {
  color: transparent !important;
}
.ui.calendar .ui.table tr .disabled.current-month {
  color: rgba(40, 40, 40, 0.3) !important;
}

Thanks for the suggestion, I've added a .adjacent class, which is applied to day cells from adjacent months. For example:
.ui.calendar .ui.table tr .adjacent {
  color: transparent;
}

@mdehoog thank you, I got one off-topic question if I want to update the calendar days to show additional information such as price, what will be the best way to do that (or any way in matter of fact having hard time figuring this one) do you think adding this via jQuery should be good? (how do I match the days?). That will helpful thanks!

Hi friends,
i am trying to last one week to customize Semantic UI Calendar Disable past dates it is posibal. i want like this i pasted example url below. and my condition is if i select end date then if i open start date so whatever end date i have selected  in start calendar after that day all days will disabled
Example :--
http://jsfiddle.net/nicolapeluchetti/dAyzq/1/

Jsfiddle Link
https://jsfiddle.net/rkrameshkumar71/2Lu8hjrb/


Add instruction to increase the watched files on Linux

@darragh-hayes please review

Great! I think maybe we should have our own doc for this too or at least to have it in the Ubuntu setup guide. I will get that sorted and then I'll merge! +1


Native HANA consumption

Purpose

Added possibility to consume HANA native without CF Environment

Does the PR solve an issue
[ ] Yes - Please add issue number
[x] No

Does this introduce a breaking change?
[ ] Yes
[x] No

Pull Request Type
What kind of change does this Pull Request introduce?
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

What to Check
Verify that the following are valid

...

Other Information

Available in dev branch; will be in stable with next release


Render the correct words according to isLoading

When loading, the text of the button should show "Logging in...".

Thanks for pointing this out! We decided to move away from doing the "Logging In..." text change. I'll update the screenshot to reflect this.
I'll close this for now.

Thanks for pointing this out! We decided to move away from doing the "Logging In..." text change. I'll update the screenshot to reflect this.
I'll close this for now.

OK I understand. Then you'll probably have to change the screenshot of Create the Signup Form as well.
Thank you for maintaining this awesome project!

Thanks for pointing it out! I just fixed it. If you find any other ones, let me know!


crypto/x509: insufficient validation in x509.DecryptPEMBlock leads to decryption false positives

The validation of  x509.DecryptPEMBloc seems to be insufficient and any password that matches the padding validations in (https://golang.org/src/crypto/x509/pem_decrypt.go) provides a non-error return.
The following code shows two different passwords decoding the same encrypted PEM file successfully. The correct password for the encrypted PEM file in privateKeyString is "omgomgponies".
package main

import (
	"crypto/x509"
	"encoding/pem"
	"fmt"
)

var privateKeyString = `
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,68CA28419ADC598B

0ro1rMiglCY/LVpL4nC3/+JvfcmE84nx317uz1+uXzu5Y+OXxekejTWZrk7hWBeA
chl8anQM8zPEZ+sJ13qMWH+1lUbbd/5ZsCpOlERkgDrut8yHEKkRFRj5MQtrg1Vn
eEpd0B7P2UD1ctJb0T8uBo1hhzFyxDI8sG47fSYU/oTnBqqofTom8S+lXPBvKZEm
LcU9ZuJg6M9Q1HO1D3uIbjEGlYP9VH8AZpEdMpcJDnbCZxJ+FBufuq5pIBiHwQW8
SuDoc47iliArbymlbq8ple7rsXxUrzvjjqYKFUz/0DsLeaJLt1CL1dcke3w1sMNS
Gy+//b+/Q255lZ94MgYj7ag7zLoCnoEr4AXItKD7mgqDQ7BuCa/UCiW/M9+r+V5Z
MKoE2SEN2BDZSEc53RD2eXKDn1OtwLnNd36dpbHaSqtVPQ6QJDIQKo/GXo/sTVst
AEFCJYBHmrwFw3YNKtCywBmUieeQeHPhooCzoGaXQf8kb5bVoJT5YxlK0lQNV9TQ
lDoim27w11aJMwQg9RCdl3/rHpmnkpiFFFKx3IYGhQko5QrBRmZ67IJUGbgj31/w
q448ZR3s5sIoREaHfGW5XpQA8s2wj88TFm5K4vxoGrMwJeZBQG61/1InAGRC8dX4
jwZS7qB/eWLWr6HalY2yi4G/12TJB84yRCnIlFFnbUU9oLJ3xPhhehdqlS9YsARX
awvJTb58ZTo68wN7UKBEw/yz/pKrtCBTMtnIJ9khfhTHnUI18wf7a1KBYv2iZZzp
4jhVaCDOFPv70ydRkoURJTRXyMpTAtAyflLPRNNkvtFMzzLst7Ex367xcAg2af9+
7UYdrIp0q8JOClCdzNkb6+Iy00G2HBAyCfhnf8TupU8SCADNjRReGUzioWOIRu24
TnX8o6fv2G8wGHANJfrS2BGmtBOWW3wdo08WScyCxKQ/lrHMhKW+xeZ+UqCgKfiT
AHKagheEH1+nm0RDZzII0hDDVGLUzZzT6DGrYp5xW5WgOJHDTZCU4dEyZ30N2wkJ
FI2dEGx3lY/YmE7X4knE7UXccjHNJq7NmCbhLzeFfT38FNCwraWIxbRVpdeHClAx
dSYENqn04wER4bSXRsfF9fcDrjAGtb1CGk0PPoEs0D0OoYpyyLVgWw+qnxBMKuvz
5z+mSBDJ8QMybC3x7SOF/kdXsIyXUqknInaUBzJ5qOigRVD+/g4VjZoRtD/eeM4X
mpKtZ4THx9WYz0ZeJijYwUeYBrGt0kglwf/VrMZFSTeYTvxm5BmDkf8+jRB09mV0
YcPPuqGeJvcgrAJqUJ0iny1SyagpSJp4wPFwTYd9xOxjBJzYWgafCfaEdrLpAUSk
YvAVmfVhj591LWzg7r2pATK4Zi75E4nBRORcOlAqyea2zibfKYI0kmtZw8JRj9IL
u3N5piXDAqgQlGqoY2y+GgvMk4vFhF/SO/ZeQaUplYG0XMQlViArE5n/2bIY4Jh4
h4vl6GSXvOWYEhi4NmF0kY34ABmfxbcS8Sngym+tYGPWUb4t+o74DzYvGl+rJ/9Z
lOb1XwXRJvKsaHMI7ujCRu3nhqVgsRlTjCIkWExc5/MnK5leiUVWLHmsfLqC3Kht
-----END RSA PRIVATE KEY-----
`

func checkPassword(pem *pem.Block, password string) {
	_, err := x509.DecryptPEMBlock(pem, []byte(password))

	if err == nil {
		fmt.Println("Valid password found: " + password)
	}
}

func main() {
	decodedPEM, _ := pem.Decode([]byte(privateKeyString))

	checkPassword(decodedPEM, "ruvf")
	checkPassword(decodedPEM, "omgomgponies")
}

The correct password can be verified using openssl (omgomgponies):
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
Enter pass phrase for private.pem:
writing RSA key

And we can also demonstrate openssl returning an error for the invalid password (ruvf):
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
Enter pass phrase for private.pem:
unable to load Private Key
140735220982608:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1180:
140735220982608:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:365:Type=RSA
140735220982608:error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib:rsa_ameth.c:119:
140735220982608:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1180:
140735220982608:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:365:Type=PKCS8_PRIV_KEY_INFO
140735220982608:error:0907B00D:PEM routines:PEM_READ_BIO_PRIVATEKEY:ASN1 lib:pem_pkey.c:141:

Found while trying to create a PEM cracker: https://github.com/diogomonica/go-pemcrack

To really verify the password, the function needs to verify
the encoding of decrypted DER block, but that can't be
done without knowing what the block represents.
As the function only returns the decrypted pem block,
without any interpretation, I don't think we can fix this issue.
I think it's possible to construct a PEM that can be decrypted
into two different but valid private keys with two different
passwords, although I don't have a proof.
IMHO, this is working as intended.

Looking at the openssl output more carefully it does seem that they are just going through all the RSA private key parsers and trying to see if it matches any of them, before bailing.
It seems that to achieve what I want to do in Go I will have to do the PEM decoding and then try to parse it using the available formats:
func checkPassword(pem *pem.Block, password string) {
	key, err := x509.DecryptPEMBlock(pem, []byte(password))
	if err == nil {
		validKey := false
		_, err = x509.ParsePKCS8PrivateKey(key)
		if err == nil {
			validKey = true
		}

		_, err = x509.ParsePKCS1PrivateKey(key)
		if err == nil {
			validKey = true
		}

		if validKey == true {
			fmt.Println("Valid password found: " + password)
		}
	}
}

I'm ok with closing this as a "works as intended" with the caveat that this might be confusing for other people too. Maybe a source-code comment indicating this potential caveat would be appropriate? Not sure if it is a contrived example someone decoding an encrypted PEM but not actually trying to parse the private key.

The problem is that there might be private key encodings that Go
doesn't support (say, you invented a new public key scheme and
want to use PEM to store its private key), so even if DecryptPEMBlock
do what openssl does, it still can't be certain the password is wrong
even none of the parser routine succeeded.
The docs is also correct, technically:
If an incorrect password is detected an IncorrectPasswordError is
returned.
The condition for returning IncorrectPasswordError is not "if password
is incorrect", instead it's "if incorrect password is detected".
that means there might be cases where an incorrect password can't
be detected.
I will propose a CL to add one sentence after that:
note that DecryptPEMBlock cannot detect all cases of incorrect password.

Sent https://golang.org/cl/7603

Perfet. Thank you @minux.

The change 7603 is not submitted yet, re-open.
PS: Gerrit+gopherbot will close this issue automatically when the change is submitted.

Note that this problem arises because of deficiencies in PEM encryption. Although PEM encryption may be needed to support reading existing keys, it shouldn't be used in anything new. Putting together scrypt[1] and secretbox[2] will be far stronger and won't have this problem.
[1]  https://godoc.org/golang.org/x/crypto/scrypt
[2] https://godoc.org/golang.org/x/crypto/nacl/secretbox


chore: remove witness flag from nargo compile

Related issue(s)
Resolves #877
Description
Summary of changes
This PR removes the ability to save a witness to file from the nargo compile command. This should instead be done through the nargo execute command for reasons stated in the issue.
Dependency additions / changes

Test additions / changes

Checklist

[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt with default settings.
[x] I have linked this PR to the issue(s) that it resolves.
[x] I have reviewed the changes on GitHub, line by line.
[x] I have ensured all changes are covered in the description.
[x] This PR requires documentation updates when merged.

Additional context

+1 for the analogy in the issue


Fix options conversion

Options is currently mapped to _options to convert "raw" options to objects with label/value for objects it uses this check
if (!op.value)      op.value = op.label;
to check for ops without values however this is incorrectly flagged on a value of 0 I'd suggest the check is changed to if(op.value == undefined)

@GodPingu Thanks for reporting! Will be fixed in the next release.


Get rid of the dependency on the nix version

VsockStream::connect(nix::sys::socket::VsockAddr) should be VsockStream::connect(cid, port)
VsockListener::bind(nix::sys::socket::VsockAddr) should be VsockListener::bind(cid, port)
After this change, our users can use different nix version with vsock-rs.
@jeromegn @elmarco @qwandor What do you guys think？

That's fine by me, though the other option is to re-export the VsockAddr type from nix as part of the vsock-rs API.

I think accepting cid, port directly makes sense. Especially since there's nothing more you can do with a VsockAddr before using it with connect or bind.

Works for me.

But I am still not sure what to do with the return value like pub fn peer_addr(&self) -> Result<SockAddr> and pub fn local_addr(&self) -> Result<SockAddr> . does re-export work for them? @qwandor
I think there are only two ways:

return a struct defined in vsock-rs
just ignore return values, keep it as it is.

Do you have any good ideas？

What about simply Result<(u32,u32)> ?

I think re-exporting is a better solution than defining a new struct for the same thing. Then it is compatible with the nix type if a user of the library does choose to use the same version of nix, and otherwise they can still access the fields they need.


Add all-your-base exercise

@joshgoebel looks like there's an issue building wren in the "Build wren-console" step:
https://github.com/exercism/wren/actions/runs/6704346196/job/18216580197?pr=147#step:5:70

Rebased.

Thanks!

@glennj I've fixed CI in https://github.com/exercism/wren/pull/146

looks like there's an issue building wren in the "Build wren-console" step:

Yeah newer libc added a function that conflicts with naming... I think it's been fixed upstream so we could probably just pull the fix from wren-cli (if it's clean merge), but I don't have time to look into this right now.  Going back to an older release of Ubuntu without older libc was a good temp fix.


Add support for CMSIS-DAP v2 probes

This PR adds support for CMSIS-DAP v2 compliant probes, using bulk transfers instead of HID interrupts. It's also called "WinUSB" but that mostly refers to the device descriptors telling Windows what driver to use and doesn't affect probe-rs.
I've modified the existing DAPlink code so the underlying device can now be an enum which is either a hidapi device or an rusb device, and implemented read and write methods on that enum. Consequently very little runtime code changes at all (the packet format is identical).
The main difference is in detecting and opening probes, which now uses rusb if possible. I've made sure if rusb doesn't work, it will always fall back to using hidapi to both enumerate and open the device. This is helpful because rusb might fail due to driver or permission errors, but hidapi should pretty much always work (and is what we used to do). Without rusb working there's no way to know if the device could have supported v2 or is v1 only, so there doesn't seem to be much point giving the user an error message in that case. On most platforms, v2 devices should work immediately without any drivers required anyway.
The speedup on supported probes is pretty intense. Using the ram_download example:
CMSIS-DAP v1:
Wrote 8192 bytes in 319.937082ms (25605.04 bytes/s)
Read  8192 bytes in 319.975224ms (25601.98 bytes/s)

CMSIS-DAP v2 (my own probe, USB FS):
Wrote 8192 bytes in 35.615237ms (230013.92 bytes/s)
Read  8192 bytes in 43.637393ms (187728.91 bytes/s)

That's a speedup of 9x in the RAM writing case. Flash writing is about 3x faster than previously, too. I expect that this PR should also allow USB HS devices (including with 512-byte packets) which should help even more.
I've tested this:

On my own CMSIS-DAP probe
On an official micro:bit running latest daplink firmware
On Linux but not Windows
On a probe that only has HID, no v2
With cargo-flash and ram_download

Which firmware did you use for the test with the microbit? I've tried the last one from https://microbit.org/get-started/user-guide/firmware/ on Windows, but it seems to use CMSIS-DAP v1 only.

You need to use the latest from DAPlink itself, as microbit haven't yet published the file:
https://github.com/ARMmbed/DAPLink/releases/tag/v0254
The zip contains 0254_kl26z_microbit_0x8000.hex which can be DFU'd onto a microbit.

Unfortunately didn't help. I can see a CMSIS-DAP v2 device in the Windows device manager, which uses the WinUSB driver, but rusb seems unable to see it when listing devices.

Aw, boo! I've got a Windows 7 VM set up I can try and debug on. Which Windows version are you using? Can you try PyOCD with it? Something like pyocd cmd -t nrf51 -c "rw 0x00000000 32768" to read a bunch of RAM, I don't think it gives you a time itself but if you time the whole thing it should give you an idea if it's doing ~25kB/s or ~100kB/s.

I've had a closer look, seems I misread the log. Rusb seems to find it, but fails to open it with an error indicating missing permissions. Even running probe-rs with Admin permissions does not help.
I'm still struggling getting pyOCD to work, it always complains about not finding libusb...

Thanks for the Windows fix, I've tested it locally and it still works here too.


trying another approach for custom grid

#384

@lindsaycarr there is redundant code in here, but this was kind of what I had in mind

all the :+1: this is so much cleaner than what I was implementing (and I branched, so easy to delete!)

Want to take this and streamline it (get rid of the redundancy and other stuff) and add your tests? Curious if it passes your new tests - I didn't try them.

Yes, I can do that. Should I make a branch of yours and do a pull request to your fork when ready?

@lindsaycarr feel free to pull down this PR (e.g., git pull https://github.com/jread-usgs/gsplot.git view_filter) and do a new PR against that branch on my repo
https://github.com/jread-usgs/gsplot/tree/view_filter

@lindsaycarr got your's in here. I'll leave the merge up to you if you are 👍

Coverage decreased (-0.6%) to 77.338% when pulling c1ca5de5467b4050acba31ea64035b0a719f4725 on jread-usgs:view_filter into fd18d5ee08f7fa31e3afbeef77caf3cfd31deeff on USGS-R:master.


add linting of docstrings, using ruff

This came out of this separate docstring PR: https://github.com/nsidc/earthaccess/pull/448#issuecomment-1934742889#448
Purpose: Enable linting of docstrings via ruff this way.
@mfisher87

Thanks :)
FWIW I no longer log in to @MattF-NSIDC :) Having two accounts was too much of a pain so I consolidated to this one.

cc @Sherwin-14

@mfisher87  Hey, what convention do we choose here? the documentation gives some conventions like numpy or google should we proceed with these or choose some other convention?


Provide configuration file example or list of config keys

I didn't find an example configuration file in the documentation. It would be helpful to have one.
Alternatively, a list of available configuration options would be handy.

Thanks for pointing that out. I've added a link on the FAQ.


feat: improve support for BigInt

Due to improvements in graphql-go-tools we can now enable BigInt
when introspecting OAS

Motivation and Context

Marketing Changelog

Checklist

[ ] run make test
[ ] PR title must follow conventional-commit-standard
[ ] tests and/or benchmarks are included
[ ] documentation is changed or added
[ ] commit message and code follows the Code of conduct

Pending upgrade of graphql-go-tools in go.mod


Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to copy framework (exit 23:

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
same as this issue : https://github.com/flutter/flutter/issues/119674
When I try 'flutter run' with ios emulator in xcode,
I got the error like below,
pcxxx@xx flutter_app % flutter run
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running Xcode build...
Xcode build done.                                            8.3s
Failed to build iOS app
Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to copy framework (exit 23:

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.

emulator is iPhone 14 Pro
Expected results
started just normally
Actual results
Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to copy framework (exit 23:
Code sample
Code sample
no related

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
pcxxx@xx flutter_app % flutter doctor -v
[✓] Flutter (Channel stable, 3.10.2, on macOS 12.5 21G72 darwin-arm64, locale ko-KR)
    • Flutter version 3.10.2 on channel stable at /Users/mpc125-at148-dev/peertec/no-ryang-jin/flutterTest/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9cd3d0d9ff (7 days ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/mpc125-at148-dev/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_SDK_ROOT = /Users/mpc125-at148-dev/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.0)
    • VS Code at /Users/mpc125-at148-dev/Downloads/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 14 Pro (mobile) • 5703C901-8FCD-43EB-ABA9-0C0AF4AB4C75 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.5 21G72 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 113.0.5672.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Hi @jsw4215. Thanks for filing this issue. Did you try with a new Flutter Project? and also, switching to Flutter master channel, then switching back to stable channel?


Adds CHANGELOG

See:#1233
Whats covered

All the releases according to keepchangelog.com
All the compare links
All the date accordingly

Whats not covered

Unreleased is not included[needs help]

Thanks! Could You please extend this change log adding links OR just pasting the upgrade notes? I'm not sure if it's a good practice but for sure it would be useful

@pkarw Could you please specify which links need to add here and also its good practice if we separate UPGRADE notes in its own file. We can add a hyperlink to UPGRADE notes in CHANGELOG.

Ok, we can do that. I meant links to upgrade notes.
@igloczek could you do a CR of this please?

@pkarw I have added 0.3.0 based on releases page, should we follow the release page or @piotrkarwatka?

Version list seems like complete - I was just concern about the dates; as far as I remember we did release a version in Jan/Feb ... The dates are mismatched in version history because some mess with the tags at some point (we renamed the version tags to be semantic at one day and it messed up the dates :))

There is another pull request(#1267) for the same with the messed up Dates. Is there any way we can fix this?

@gopalindians should we close this PR and merge in #1267 ?

@pkarw  Sure


Mark and serialize manual editing of EQ status

Thanks to @calliem's work, a curator will have the ability to pre-fill EQ annotations in Phenex from a named entity recognition service. Many times, these will need subsequent manual adjustment by the curator, such as deleting redundant or incorrect E and Q combinations, or further tweaking of Es and Qs. A curator may not be able to go through all characters in a single session, and when resuming from file later, it may not be entirely obvious where they left off. As a workaround, comments could be left for the character. However, a visible hint (such as by font color) to which characters have been manually adjusted and which ones have not would be very useful, and would need to be persisted between sessions.
The question is how should such a marker best be added as metadata to the in-memory model so it gets properly written out to the NeXML file and read back in upon reloading the file? @balhoff could you advise?

I would look at something like the comment field of states, to see how it is attached to the state as an annotation in NeXML and then read back in.
https://github.com/phenoscape/Phenex/blob/master/src/org/phenoscape/model/State.java
https://github.com/phenoscape/Phenex/blob/master/src/org/phenoscape/io/NeXMLWriter.java#L328
https://github.com/phenoscape/Phenex/blob/master/src/org/phenoscape/io/NeXMLReader.java#L173

A character could show an indicator that is computed from the progress data attached to its states.

@balhoff I was also wondering whether you have ideas re: the metadata attribute that would be best suited for attaching such a marker state. Or should we just make up our own?
Do these statements mean that you are essentially hard-coding some metadata attributes? And if so, which vocabulary will these be put in upon writing?
    public static final String COMMENT = "comment";
    public static final String SYMBOL = "symbol";
    public static final String LABEL = "label";
    public static final String FIGURE = "figure";

The vocabulary for those is just specified in the NeXML input/output code. The constants there are just used within State.java, because there is some reflection used to set properties in the model objects.
I don't know of any good metadata attributes offhand. I did a little looking around but didn't find anything obvious.

So would the pattern to follow be to add another statement to the aforementioned, such as
public static final String CURATOR_EDITED = "curator_edited";

Alternatively, perhaps it's worth adding an ECO term to the state (or the character?), such as perhaps ECO:0000203 versus ECO:0000218, or ECO:0000363 versus [ECO:0000306])http://purl.obolibrary.org/obo/ECO_0000306).
Thoughts, @balhoff?

I think you can just do a regular getter and setter for a boolean property. The other properties send out property change notifications that are used in undo/redo. If this value is being set indirectly by some other action (like changing a phenotype), then that action would be the thing expected to be undone.
I like ECO:0000203 versus ECO:0000218, good idea. So that would be a URI value, like denotes for Character. That is written out in NeXML a little differently than a string.

I like ECO:0000203 versus ECO:0000218, good idea. So that would be a URI value, like denotes for Character. That is written out in NeXML a little differently than a string.

But it could come back in the same way? I think that's what matters most for @calliem, i.e., does she need to be concerned with how this is written out and read back in.

I think you can just do a regular getter and setter for a boolean property.

And that would automatically get serialized?

You need to write code to serialize and deserialize. I would look at how this works in the NeXML writer and reader for other properties of State (for when to do it), and for the denotes URI for Character (for how to do it for URI). Does that help?


.JS or .JSON

An error in the config each times

Both variations are valid:
.JS:
module.exports = {
    token: 'YOUR_BOT_TOKEN',
    GOOGLE_SEARCH: 'YOUR_YOUTUBE_API_SEARCH_TOKEN'
};

.JSON:
{
    "token": "YOUR_BOT_TOKEN",
    "GOOGLE_SEARCH": "YOUR_YOUTUBE_API_SEARCH_TOKEN"
}```

Going to close the issue due to the lack of a response. Feel free to re-open if the issue persists 😄


Adjust cloud resources quotas via cloud_admin without quickrestart

Need to be able to change slot allocations without having to restart CS.
increase fine, decrease will need to trigger retire behavior to remove VMs.

Can re-use the retired_resources from reloading persistence and shuffling the extra VMs in there. That way those resources will simply get removed/deducted as though the quota had been lowered.


(PDB-3374) Collapse integration tests

This fully obsoletes the silly old file layout form the acceptance tests, in the first commit. Various code changes are made below it, which should reduce the overall number of setup/teardown cycles.

Test PASSed

CLA signed by all contributors.

Test PASSed

Test PASSed

Test PASSed

Test PASSed

Test PASSed

Test PASSed

@senior rebased on stable, and removed the response-chan stuff in favor of the other fix, from this morning.

Test PASSed

Test PASSed

Test FAILed

Test PASSed


Fixing off by one error in error reporting: #1883.

There was an ugly hack,  where domains.k was loaded by prepending the definition text with a require.
Doing this directly in the code now.
Also, added a few requests for comments where I found things which I don't understand or which seem wrong.

Jenkins: test this please.

Please review. @dwightguth @cos @bmmoore or @grosu. Whoever sees this first.

Jenkins: test this please


Eloquent\Collection::merge skipping some items

Imagine we have something like GitHub issues with just comments and status changes.
Let's say I want to display a combined list of them ordered by date of creation:
$comments = $issue->comments;
$statusChanges = $issue->statusChanges;

$actions = $comments->merge($statusChanges)->sortBy('created_at');

When some comments and statusChanges have the same primary keys, particular comments will not be included in the final collection because they have been overwritten by statusChanges.
I suppose this isn't expected behaviour, when merged collections contain instances of different classes.
I propose a change to Eloquent\Collection::merge looking something like this:
public function merge($items)
{
    $dictionary = $this->getDictionary();

    $result = [];

    foreach($dictionary as $item) {
        $result[$item->getKey() . get_class($item)] = $item;
    }

    foreach ($items as $item) {
        $result[$item->getKey() . get_class($item)] = $item;
    }

    return new static(array_values($result));
}

That way we will not overwrite any items which have the same primary key unless they are instances of the same class.
Other option to solve this(to be absolutely certain we preserve backward compatibility) would be to introduce a concatentate method which will simply put those two collections together and wouldn't care about any possible duplicates.

This is an intended behaviour, the Eloquent collection merge is mainly there to allow merging two collection of models of the same type, in such case have a unique key for every item makes sense.
If you want to be able to merge two collections of different types you can convert it to base collection:
$comments->toBase()->merge($statusChanges);

I didn't know about the toBase method. Thank you.

Welcome :)


Topic : Add E-mail functionality in website

Describe the types of topics you'd add in our Website
From this feature user can mail you directly from website, rather than get mail id from website and go to the gmail and send mail..
Could you share some screenshots or a video of your previous work?
This is previous work on mail functionality..

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC-24-extd contributor
[X] Soon, I'll complete it and create a Pull Request.

Hi @PriyanshuValiya! Thanks for opening this issue on Ratna Supermarket. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible.


Cant Call Service/Function Angular Way in onClosing/OnClosed Question

Hi plauzul, thank for your awesome plugin, that helps me. but I have some problem. when I try to make this question toast.
I'm trying in OnClosing event and call my service/my function, but it does not work!  the error say Cannot read property 'roleService' of undefined.  and I think it's happen in any event. cause the TypeScript/Angular have different habits.
This is my code, sorry for my bad English,

Use Arrow Function Expression in buttons
Alter order of paramters of hide method
Explicitly declare that so you have a reference for that.roleService

deleteRole(objModel: RoleModel)
{
    var message = `Apakah abda yakin akan manghapus ${objModel.name} ?`;
    var that = this;

    this.iziToast.question({
    ...
        buttons: [
            ['<button><b>YA</b></button>', (instance, toast) => {
                instance.hide(toast, { transitionOut: 'fadeOut' }, 'button');
                this.roleService.getRoles();
            }, true],
            ['<button>NO</button>', (instance, toast) => {
                instance.hide(toast, { transitionOut: 'fadeOut' }, 'button');
            }]
        ],
        onClosing: () => {
            that.roleService.getRoles();
        }
    });

@Albejr  Ahhhh, Thank bro, it's solved,  you really - really help me.
I'm sorry for ask this stupid question, I just started being a programmer.
but, can I ask some question?  as far as i know,  change the code 'function () ' to ' () =>' it's just change es5 to es6.  and actually, it is the same.
what actually makes it different?


Cdn latest

Migrate CDN to use latest tag, and not a fixed one:
Today, latest tag is package-2017-04

Codecov Report

Merging #1574 into master will increase coverage by <.01%.
The diff coverage is 50.26%.

@@            Coverage Diff             @@
##           master    #1574      +/-   ##
==========================================
+ Coverage   53.86%   53.87%   +<.01%
==========================================
  Files        3628     3633       +5
  Lines       90031    90143     +112
==========================================
+ Hits        48493    48562      +69
- Misses      41538    41581      +43

Impacted Files
Coverage Δ

azure-mgmt-cdn/azure/mgmt/cdn/models/profile.py
55.55% <ø> (ø)
:arrow_up:

azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py
80% <ø> (ø)
:arrow_up:

azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py
45.45% <ø> (ø)
:arrow_up:

azure-mgmt-cdn/azure/mgmt/cdn/models/resource.py
50% <ø> (ø)
:arrow_up:

...e-mgmt-cdn/azure/mgmt/cdn/models/endpoint_paged.py
80% <ø> (ø)
:arrow_up:

...re-mgmt-cdn/azure/mgmt/cdn/models/profile_paged.py
80% <ø> (ø)
:arrow_up:

...t-cdn/azure/mgmt/cdn/models/custom_domain_paged.py
80% <ø> (ø)
:arrow_up:

...-mgmt-cdn/azure/mgmt/cdn/models/edge_node_paged.py
80% <ø> (ø)
:arrow_up:

...t-cdn/azure/mgmt/cdn/models/deep_created_origin.py
55.55% <ø> (ø)
:arrow_up:

...mgmt-cdn/azure/mgmt/cdn/models/purge_parameters.py
83.33% <ø> (ø)
:arrow_up:

... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67e570d...f716e30. Read the comment docs.


[5.5] Problem with composer script and a package

Laravel Version: 5.5.1
PHP Version: 7.0.22
Database Driver & Version: unrelated

Description:
This seem unrelated to laravel but please read.
When you try to install a package that also executes some scripts on install, like phpro/grumphp, you could run in errors because the autoload seems to be confused.
This ocurred to me when updating an app wich uses phpro/grumphp to laravel 5.5. I removed all the dependencies and executed composer install (without a lock file), this produced an error
[Symfony\Component\Debug\Exception\FatalThrowableError]
  Type error: Argument 6 passed to Symfony\Component\Process\Process::__construct() must be of the type array, null given, called in /workspace/php/test/vendor/symfony/process/ProcessBuilder.php on line 274
Exception trace:
() at phar:///usr/bin/composer/vendor/symfony/process/Process.php:141
Symfony\Component\Process\Process->__construct() at /workspace/php/test/vendor/symfony/process/ProcessBuilder.php:274
Symfony\Component\Process\ProcessBuilder->getProcess() at /workspace/php/test/vendor/phpro/grumphp/src/Composer/GrumPHPPlugin.php:182
GrumPHP\Composer\GrumPHPPlugin->runGrumPhpCommand() at /workspace/php/test/vendor/phpro/grumphp/src/Composer/GrumPHPPlugin.php:137
...

You wont find any laravel related class, but if you look you will see that Process and ProcessBuilder are readed one from the phar (the composer phar) and another from the local vendor folder. So the version used of symfony/process differ (2.8 in the phar,  3.3 for laravel) and breaks the phpro/grumphp script that should run on installation.
After trying to debug this I realized that Illuminate\Foundation\ComposerScripts::postAutoloadDump loads the autoload of composer, removing this script off composer.json makes composer install work fine again. It looks like any script executed by composer after  executing ComposerScripts::postAutoloadDump will have a "messed up" autoloader (I'm not shure of this), clashing the composer phar autoloader and the local autoloader.
A workaround could be change the composer.json like this:
{
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate"
        ],
        "post-autoload-dump": [
            "@php artisan package:discover"
        ]
    },
}

Seems like the order of execution of the scripts resolve the problem, the scripts of the package are executed first so there is no problem, at least for this case.
Steps To Reproduce:
$ laravel new test
$ cd test
$ composer require --dev phpro/grumphp -vvv

This is a edge case, maybe phpro/grumphp it's the only package producing errors, but I think that the problem is in the composer script defined by laravel. Maybe another package that uses symfony/process and runs on composer events would fall in the same problem.

This repo is for bug reporting. What you are noting is an error with the package itself. Its not an issue with Laravel

Ya i agree with @srmklive. You should raise an issue on the package you are using instead of here.

First I blamed the package too, but couldn't find anything wrong with it. I tested it in various scenarios and everything was ok.
But you're right I need to eliminate the package from the issue. So you can reproduce this bug without the package.
Create a new app, next define something callable, like:
<?php
# app/Test.php
namespace App;
use Symfony\Component\Process\ProcessBuilder;
class Test
{
    public static function test()
    {
        $builder = new ProcessBuilder(['ls']);
        $builder->getProcess();
    }
}

Then put it in the post autoload dump event of composer, like this:
{
...
"scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "App\\Test::test",
            "@php artisan package:discover"
        ]
    }
}
...

Now run composer dumpautoload, you will get the same error. Notice the order of the scripts, if you put first App\Test::test composer wont fail.
Also it will fail only if you fall in a conflict of dependencies, in this case composer has it's own version of ProcessBuilder which is incompatible with the version used in laravel.
Like I said, I already found a workaround but I think that maybe this will produce some errors to others. And in the end I'm  confused too of  where to put this bug, but i think that the cause of the problem is this line of code.

@nerones kindly close the issue

I have the same problem here https://github.com/phpro/grumphp/issues/414#issuecomment-339922372

It seems this was closed without a real solution.

Yeah I think this should be reopened. It was never solved.

same here

Seems a gruphp problem, it use deprecated methods to exec process using Symfony\Component\Process\Process
I made the fix forking the repo: https://github.com/bitbull-team/grumphp/commit/47693ba9b0b0e84b244db0cbf42d97d64d04f700
I'll open a PR to grumphp to fix this issue.

I managed to replace GrumPHP easily with the plain composer.json file:
"extra": {
    "hooks": {
        "pre-commit": "composer my-script"
    }
},
"scripts": {
    "my-script": [
        "vendor/bin/php-cs-fixer fix --diff --ansi",
        "vendor/bin/phpunit --color=always"
    ]
}

Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
In ResourceRegistrar.php line 360:
Object of class Closure could not be converted to string
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
I'm using laravel 5.6

@mohannad1995
    "require-dev": {
        "phpro/grumphp": "dev-master",
    },

will fix your problem.
Is not a Laravel issue


Build fails on macos Catalina due to resgen segfault

Describe the bug
After an update on MacOS to Catalina the build process fails. It seems most of the executables are segfaulting as well
To Reproduce
Steps to reproduce the behavior:
Prereq: Macbook pro 2019

clone git repository master
call ./build.sh
wait until crash

Expected behavior
resgen should not be segfaulting
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: MacOS Catalina 10.15
GPU:Radeon Pro Vega 20 4 GB - Intel UHD Graphics 630 1536 MB
Backend: [OpenGL/Vulkan]

Additional context
Add any other context about the problem here.

Time for me to install Catalina.  Meanwhile, a call stack would be helpful -- you could trying building in debug config (./build.sh debug).

Thanks for the quick reply and awesome renderer!
It seems the debug build is proceeding correctly while release does not. Just to make sure I cleanup the build repo and done it twice to confirm the issue.
During the debug build I don't see the Aggregating shaders being called, so I tried to launch the resgen command for aggregating shaders from the debug build manually and it succeeded.

The same problem for me. My call stack is attached here, when running ninja

Output
[649/1167] Generating matdbg_resources.bin, matdbg...es.S, matdbg_resources.apple.S, matdbg_resources.h
FAILED: libs/matdbg/matdbg_resources.bin libs/matdbg/matdbg_resources.S libs/matdbg/matdbg_resources.apple.S libs/matdbg/matdbg_resources.h
cd /Users/elvischen/filament/out/cmake-release/libs/matdbg && /Users/elvischen/filament/out/cmake-release/tools/resgen/resgen -t -x /Users/elvischen/filament/out/cmake-release/libs/matdbg -p matdbg_resources /Users/elvischen/filament/libs/matdbg/web/style.css /Users/elvischen/filament/libs/matdbg/web/script.js /Users/elvischen/filament/libs/matdbg/web/index.html
/bin/sh: line 1: 88510 Segmentation fault: 11  /Users/elvischen/filament/out/cmake-release/tools/resgen/resgen -t -x /Users/elvischen/filament/out/cmake-release/libs/matdbg -p matdbg_resources /Users/elvischen/filament/libs/matdbg/web/style.css /Users/elvischen/filament/libs/matdbg/web/script.js /Users/elvischen/filament/libs/matdbg/web/index.html
[662/1167] Building CXX object third_party/libassi...p.dir/__/code/Importer/StepFile/StepFileGen1.cpp.o
ninja: build stopped: subcommand failed.

Thanks!  I'm installing Catalina on my personal machine and will take a look soon.

I can repro.


Fix writing state of trajectories with unfinished submaps.

@wally-the-cartographer merge

Merge requested by authorized user cschuet. Merge queue now has a length of 1.

Refusing to merge, since the combined checks state is failure


Device shows 'connected' but MPS API calls fail after MPS container restarts

Describe the bug 🪲
Device shows 'connected' but API calls fail after MPS container restarts. This happens because we don't clean up the 'connectionstatus' property in database. See line https://github.com/open-amt-cloud-toolkit/mps/blob/main/src/index.ts#L126, this doesn't get executed.
To Reproduce 🪜
Steps to reproduce the behavior:

Connect a device to the Toolkit
Restart MPS container
The device shows connected but in reality NO API calls work

Screenshots 🖼

AMT Device (please complete the following information): 🖥

OS: Win 10
AMT Version: All supported AMT version
AMT Configuration Mode: ACM
Network Configuration: DHCP

Service Deployment (please complete the following information): ⛈

Deployment Type: Docker
Component & Version: Latest

Additional context
Add any other context about the problem here.

When stopping or restarting docker container, be sure to use docker stop [containerId] or docker restart [containerId] and this will properly signal MPS to shut down and update the connection status. Using -f for force, or docker kill without stop , or removing without first stopping triggers  a SIGKILL which signals the process to be killed immediately thus not allowing MPS to properly update the connection status. This is by design at the OS level.


Release v1.3.0

cc @DirectXMan12

cc @kubernetes/heapster-reviewers @kubernetes/heapster-maintainers

This change is

/lgtm


fix bug when user calls to the same contact

Coverage remained the same at 40.487% when pulling 6439f520de145caceffb3d1d386901cd333d73ee on caffffe:second_activity_calls into 119e78608320234eae8b023cd7319baf4f331578 on ringcentral:master.

Coverage decreased (-0.2%) to 40.25% when pulling df80a7433c43e29e14eef4ff9c638b4211b3c3ea on caffffe:second_activity_calls into 119e78608320234eae8b023cd7319baf4f331578 on ringcentral:master.

Coverage decreased (-0.2%) to 40.25% when pulling df80a7433c43e29e14eef4ff9c638b4211b3c3ea on caffffe:second_activity_calls into 119e78608320234eae8b023cd7319baf4f331578 on ringcentral:master.


Add third ajax call (build history for job home page)

Screenshot of the network tab
After System.setProperty("jenkins.ui.ajaxRefreshInterval", "10")

For the job home page, especially the left widget "Build History".

oooh thanks I couldn't find it and make the assumption that it was in a plugin :). I will look at it.


initial checkin of all case studies for SC-100

initial checkin of all case studies for SC-100

#sign-off


VSCode touches file twice when saving file

VSCode Version: 1.3.1
OS Version: Windows 7 Enterprise 64-Bit

Steps to Reproduce:

NodeJS watcher on file (e.g. watchify with browserify)
Update function gets called twice.

When editing the file with notepad, the watcher only fires one update.
Thanks for the great tool!! :+1:

@bpasero @weinand any udpates?

@joaomoreno since you are looking into this area: do you have any insights into this issue?

Yeah something is definitely off here. Here's a process log of a simple save in Windows:

There are a total of 13 CreateFile events, when only one is actually a Write operation. The second watch fire might be due to the Generic Read operation... but I'm just speculating here. All other operations are Read Attributes, which seem to relate to stat calls.
One interesting optimisation to be done here is to call fs.open and use the file descriptors to call operations such as fs.write, instead of relying in the higher level functions such as fs.writeFile, which create many CreateFile lower level operations.

Hey, I just found out that the issue could be related to the way how windows handles read and write implementations and the nodeJS implementation of fs.watch.
http://stackoverflow.com/questions/12978924/fs-watch-fired-twice-when-i-change-the-watched-file
http://stackoverflow.com/questions/12978924/fs-watch-fired-twice-when-i-change-the-watched-file

I think this is nothing we can prevent because the file gets truncated before the write and then written to. We use fs.writeFile() (same as other editors using node.js) and if this results in too many file events, I suggest to file an issue against node.js.

This is expected as outlined in https://github.com/nodejs/node/issues/6112 and I do not think changing to other fs primitives would change this.

This could be prevented by creating temporary and then moving it over original (gedit does it this way).
There obviously are cases where this does not work but it would be great if that was a configuration option or if it tried to use renaming approach first and if it fails use current approach.


Add link to provider's digital resource.

This addresses https://issues.dp.la/issues/8098, adding a link to the provider's digital resource on the source page.
I didn't add any tests, because the real work is handled by DPLibrary, which has -- or should have -- its own tests. Let me know if you think the logger.error call in ApiQueryer should be tested.
Is it best to have the API functionality in a concern?  I think it probably is, but want to make sure that sits well with you.
I have ApiQueryer#dpla_items taking variable arguments, because originally I thought it would be like a model's find method, which does just that.  I'm not so sure now, though. Let me know if you think it would be best simply taking an array. I don't really know the circumstances under which we'll be querying multiple item IDs some day.

@markbreedlove I think this is great!  I like that API functionality is in a controller concern, that seems like a natural fit.  I also think it's quite nice that ApiQueryer#dpla_items takes variable arguments.  I don't anticipate any reason why that would be a problem, and it's nice that it mirrors the behavior of find.
I don't think you need to write a test for the logger.error call.  If you wanted, you could write a test to check that DPLibrary is called.  The syntax here isn't exact, but something like:
expect(DPLibrary::DocumentCollection).to receive(:new).with(apis)

But if that feels too fussy, you can leave it out.
Thanks for all you work on this.  I'm so excited to get the API functionality integrated into the application!

Thanks for your quick feedback, @AudreyAltman!  After submitting this, I've realized that maybe I should set the API key in an initializer.  I'm going to see how that works out.

@AudreyAltman, I've added some tests to verify that the controller is calling the concern method, the concern method is querying the API, and bad queries will be logged.
I should squash this before it's merged.

@markbreedlove looks good!  Let me know when it's squashed and rebased, and I'll merge it. Thanks!

Actually ... yet another thing. I meant to add a view test, but forgot ... coming up ...

@AudreyAltman: there's just one more commit -- I think my last one -- to add some tests for the view, and for the return value of ApiQueryer#dpla_items when there's a failure.  I'll squash this again if it's OK.

:+1: definitely worthwhile to add those view tests :)

@AudreyAltman: It's squashed now, and ready to merge when CI passes again.

:fireworks:


Compile linked stylesheets of shadowDOM custom elements

When I have a <link rel='stylesheet' href='...' /> inside a template of a custom element using shadowDOM I expect it to be fetched and in-lined inside the shadow root just like polymer does.

That is a good idea.

Can you show me the markup you want to write and then also show me what you want the output to be? I think I understand, but want to be sure.

Something like this:
<template>
    <link rel='stylesheet' href='...' />

Hello World

</template>

And produces:
#shadow-root

Hello World

Gotcha. I think we can make that happen ;)

:+1:

Wonder if this could be automatically included, at least in Behaviors? Something like Behavior.useStyle(optionalPath), and that loads and attaches the stylesheet, same as the template.

The require element now supports this. You can import css files with require. if you want them to be scoped to the shadow dom, then you do it like this:
<require from="./my.css" as="scoped"></require>


Update http.py

This pull request allows the use of fetch_message just like a normal bot.

Sorry I missed this. I've added the equivalent to this in the new release.


Enhance schema files to prevent schema validation issues

@tomlyn @matthoward366 @vlad-bunescu
This is a request to alter some of the pipeline-schema files to prevent schema validation errors from icorrectly occurring:
1, pipeline-flow-v3-schema.json needs to rewrite the app_data
app_data for overall pipeline, pipeline_def, execution_node_def, supernode_def, binding_entry_node_def, binding_exit_node_def, model_node_def, port_def, bound_port_def, link_def, and runtime_def uses

And here is the definition of app_data

And each of the definition in the pipeline-flow-ui-v3-schema.json allows additional properties.
This app_data specification makes it impossible for a validation tool to find what is the corresponding schema to check in the pipeline-flow-ui-v3-schema.json for a certain entity. It ends with nothing is validated for the schema defined in the pipeline-flow-ui-v3-schema.json.
2, pipeline-flow-ui-v3-schema.json
a, "required": [] in the definitions.runtime_info_def is not acceptable by Java Json Tool.
The validate requires there must be one element in the array.
As it is empty array, it is no needed to specified.
b, definitions.node_info_def.properties.messages.descriptions should be
definitions.node_info_def.properties.messages.description
3, pipeline-connection-v3-schema.json
app_data points back to pipeline-flow-v3-schema.json app_data. However, none of app_data definition in the pipeline-flow-v3-schema.json is for connection app_data.
4, datarecord-metadata-v3-schema.json
"required": [] in the definitions.runtime_info_def is not acceptable.
The validate requires there must be one element in the array.
As it is empty array, it is no needed to specified.

@cindyzh-ibm I know is a separate thread for this issue you said you had used  “JSON schema validation tools.” that had caused errors with the current schema files. What are they?
In common canvas  we use  jsonschema to validate incoming and outgoing pipelineFlow and palette documents and that doesn’t have any problems with the current pipleine-flow-v3-schema.json and pipeline-flow-ui-v3-schema.json files.
If we make changes to the schema files we'll have to make sure it doesn't break anything in common-canvas.

Java Json Tool library and networknt library

Changes from PR merged.

@tomlyn Thanks a lot for reviewing and approved the PR.


Explain columns meaning in Docker top

File: engine/reference/commandline/top.md

@thaJeztah How can we improve this page?


fix(packageserver): set packageserver to IfNotPresent

This is a requirement for operators managed by CVO. I think it's iffy whether that applies to packageserver, but it shouldn't hurt.

/retest

/retest

/retest


[Event Parameter Request] codeunit 90 "Purch.-Post" - OnPostItemChargePerSalesShptOnBeforeTestJobNo

We would like Base event OnPostItemChargePerSalesShptOnBeforeTestJobNo to be enhanced with parameter PurchLine
local procedure PostItemChargePerSalesShpt(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line")
    ...
    IsHandled := false;
    //OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShptLine, IsHandled); A108F0086.Event19.05.o
    OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShptLine, PurchLine, IsHandled); //A108F0086.Event19.05.n
    if not IsHandled then
        SalesShptLine.TestField("Job No.", '');

[IntegrationEvent(false, false)]
local procedure OnPostItemChargePerSalesShptOnBeforeTestJobNo(SalesShipmentLine: Record "Sales Shipment Line"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
    //A108F0086.Event19.05 Parameter PurchaseLine
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


{N} 3.0 support

Is this plugin compatible with NativeScript 3.0?

Hey @davecoffin , the plugin should be compatible with 3.0 as it does not use any specific UI things.

No further response so closing this one. If you experience any problems please submit those as separate issues. Thanks!