Remove category from resource URL

When we request a Resource, the URL contains the category. We then pulled the Resource from the database, joined it with all Challenges in the category from the URL, and took the first result of that join. We then ignored the Challenge from this result, and just used resource.challenge to check prereqs. So as long as the category existed at all, the request succeeded.
I've removed category from resource routes, and keep the behavior of using resource.challenge to check prereqs.
Since our old logic assumed uniqueness of Resource names, I also added that as a constraint on the column.
@atti1a does this reflect your original intention with this code?

So my intention when I wrote this was to have it so that the UK would be (Category, Resource), but I can't think of a compelling use case for that right now. Thus, if this seems more logical, we can go for this scheme.
On Sep 2, 2017, at 6:15 PM, Nick Frost <notifications<EMAIL_ADDRESS>wrote:
When we request a Resource, the URL contains the category. We then pulled the Resource from the database, joined it with all Challenges in the category from the URL, and took the first result of that join. We then ignored the Challenge from this result, and just used resource.challenge to check prereqs. So as long as the category existed at all, the request succeeded.
I've removed category from resource routes, and keep the behavior of using resource.challenge to check prereqs.
Since our old logic assumed uniqueness of Resource names, I also added that as a constraint on the column.
@atti1ahttps://github.com/atti1a does this reflect your original intention with this code?

You can view, comment on, or merge this pull request online at:
https://github.com/WhiteHatCP/wrath-ctf-framework/pull/54
Commit Summary

Remove category from resource URL

File Changes

M ctf/api.pyhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54/files#diff-0 (9)
M ctf/core.pyhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54/files#diff-1 (6)
M ctf/frontend.pyhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54/files#diff-2 (14)
M ctf/models.pyhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54/files#diff-3 (2)
M tests/test_api.pyhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54/files#diff-4 (8)

Patch Links:

https://github.com/WhiteHatCP/wrath-ctf-framework/pull/54.patch
https://github.com/WhiteHatCP/wrath-ctf-framework/pull/54.diff

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/WhiteHatCP/wrath-ctf-framework/pull/54, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIgp7n0hFPpVHtUccicbiOCcVybbl22Eks5sef26gaJpZM4PLDlj.

I won't be doing code review today, so I'll take a full look tomorrow.
P.S. GitHub Email API apologizes for sending the entire text of an email.


Create tests

There are none. I should make some, probably using unittest.

As a (very biased) baseline, tests could check known, obvious homographs of the string "flowcrypt" (eg, "f1owcrypt"), since that's this repo's original purpose.


Update opentoonz to 1.1.2

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Thank you for the contribution. It was merged directly as 6fda050a7918e2deaed0c5e8fdccdbd80d700b0b. Your contribution is still credited to you.


fix: build correctly for new React and update docs

Modern React should consume React-Core in order to build correctly (especially with static linking). If you don't make this change, this component won't build, and instead will generate errors about missing _RCTRegisterModule.
Also updated the docs to include iOS step required to use the library.
Tested by building locally and running.

Hey @fivecar, thank you for this. Apologies for the delayed response - I haven't used my personal github account in a couple of years, and haven't used this project in at least that long, so this escaped my attention. I'll test your PR this week and get this merged ASAP.

Great - thanks, @mchandleraz !


Add coordinate system logic to plate component

This pull request should be squashed, and the new commit message should detail the breaking changes using the proper format to ensure it results in a major version bump.

This pull request should be squashed, and the new commit message should detail the breaking changes using the proper format to ensure it results in a major version bump.

Good hint!
With the exception of the Plate component, I've kept the API compatible with the current version.
I wonder if it's better to add more cleanups and delete previously used code and make a one breaking change in the next release, or if it's worth staying downward compatible, not making any breaking changes for now and just adding deprecation docs and warnings like the following.
export function Plate(props: PlateProps) {
  ....

  if (!props.coordinateSystem) {
    console.warn('Deprecated usage of Plate-component. Provide coordinateSystem!')
  }

  const coordinateSystem: CoordinateSystem = props.coordinateSystem ?? new CoordinateSystem96Well()
.....

Move fast and break things 😉 (and upgrade our applications proactively while you still know exactly what to do)

@simbig This pull request should be superseded by https://github.com/mll-lab/react-components/pull/281.


Hardcoded ids in the data generator

refs https://github.com/TryGhost/Toolbox/issues/116

Allows to have deterministic routing on each start of the instance - can use cache when starting tests

Codecov Report

Merging #13753 (a9509ae) into main (458f5b8) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #13753   +/-   ##
=======================================
  Coverage   43.69%   43.70%
=======================================
  Files         836      836
  Lines       65534    65560   +26
  Branches     4776     4719   -57
=======================================
+ Hits        28636    28653   +17
- Misses      36855    36863    +8
- Partials       43       44    +1

Impacted Files
Coverage Δ

core/server/data/db/connection.js
62.26% <0.00%> (-32.08%)
:arrow_down:

core/shared/config/loader.js
93.42% <0.00%> (-3.95%)
:arrow_down:

core/shared/config/utils.js
84.09% <0.00%> (-2.28%)
:arrow_down:

core/shared/settings-cache/cache.js
69.44% <0.00%> (ø)

...ore/frontend/services/routing/helpers/templates.js
68.06% <0.00%> (ø)

core/server/data/schema/fixtures/utils.js

...ore/server/data/schema/fixtures/fixture-manager.js
77.64% <0.00%> (ø)

core/boot.js
23.78% <0.00%> (+0.18%)
:arrow_up:

core/server/data/schema/fixtures/index.js
100.00% <0.00%> (+100.00%)
:arrow_up:

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 458f5b8...a9509ae. Read the comment docs.


Add display columns to appcatalog, app, and chart CRD to show more info

Add display columns to appcatalog, app, and chart crd, to show more info such as which namespace, version, etc.
User Story

As a ROLE, I would like FEATURE so that REASON

Acceptance Criteria

[ ] Given PRECONDITION when I do ACTION then I should get RESULT

Dependencies

[ ] URL - TITLE

Tasks

[ ] URL - TITLE

I would take this issue for the next week.

The extra columns for app and chart CRDs are deployed to all CPs.
Only CRD missing is appcatalog but it's not that useful IMO.


import {observer} from 'mobx-react' not work

when I use
//not work
import {observer} from 'mobx-react'

but use
// work
import {observer} from 'mobx-react/custom'

Why?
My code like this,
'use strict';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {observable, computed, autorun} from 'mobx';
import {observer} from 'mobx-react';  // not work
// import {observer} from 'mobx-react/custom'; // work

class Todo {
    id = Math.random();
    @observable title;

    @observable finished = false;

    constructor(title) {

        this.title = title;

    }
}

class TodoList {
    @observable todos = [];
    @computed get unfinishedTodoCount() {

        return this.todos.filter(todo => !todo.finished).length;

    }
}

@observer
class TodoListView extends Component {
    addTodo = () => {

        this.props.todoList.todos.push(new Todo(new Date().getTime()));

    }
    deleTodo = () => {

    }
    render() {

        console.log('render');
        return (

                    {this.props.todoList.todos.map(todo =>
                        <TodoView todo={todo} key={todo.id} />
                    )}

Tasks left: {this.props.todoList.unfinishedTodoCount}

                <button onClick={this.addTodo}> ADD TODO </button>
                <button onClick={this.deleTodo}> DELETE TODO </button>

        );

    }
}

const TodoView = observer(({todo}) =>

        <input
            type='checkbox'
            checked={todo.finished}
            readOnly
            onClick={() => todo.finished = !todo.finished} />

        {todo.title}

);

const store = new TodoList();

const todo1 = new Todo('Get Coffee');
const todo2 = new Todo('Write simpler code');

store.todos.push(
    todo1,
    todo2
);

ReactDOM.render(<TodoListView todoList={store} />, document.querySelector('.todo'));

store.todos[0].finished = true;

That is pretty strange, as all those modules are generated the same way. But please provide some more information when filing an issue.
Could you set up a small repo to demonstrate that this no longer works? Do you have a specific webpack alias or something like that in place? Can you elaborate on 'not work'? Build errors, or exceptions? Which versions are you using, etc.

@mweststrate      This my  package.json
"dependencies": {
   "mobx": "3.1.14",
   "mobx-react": "4.2.1",
   "react": "15.5.4",
   "react-dom": "15.5.4"
 },
 "devDependencies": {
   "babel-cli": "^6.24.1",
   "babel-core": "^6.25.0",
   "babel-loader": "^7.0.0",
   "babel-plugin-transform-decorators-legacy": "^1.3.4",
   "babel-plugin-transform-runtime": "^6.23.0",
   "babel-preset-es2015": "^6.24.1",
   "babel-preset-react": "^6.24.1",
   "babel-preset-stage-0": "^6.24.1",
   "extract-text-webpack-plugin": "^2.1.2",
   "webpack": "^2.2.1",
   "webpack-dev-server": "^2.4.5"
 }

@mweststrate  update store.todos  through the code like this
store.todos[0].finished = true;

but component TodoListView  not trigger render again, when I use     import {observer} from 'mobx-react'  .

I  resolved this problem through  disabled resolve.mainFields  in DllPlugin  webpack.lib.js .
my webpack.config.js  like this,
 plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new ExtractTextPlugin('style.css'),
        new webpack.DllReferencePlugin({
            context: __dirname,
            manifest: require('./manifest.json')
        }),
        new webpack.LoaderOptionsPlugin({
            debug: true
        })
    ]

and my  webpack.lib.js  like this
const libConfig = {
    output: {
        path: path.join(__dirname, 'dist'),
        filename: '[name].js',
        library: '[name]'
    },
    entry: {
        libs
    },
    plugins: [
        new webpack.DllPlugin({
            path: 'manifest.json',
            name: '[name]',
            context: __dirname
        })
    ],
    // resolve: {
    //     mainFields: ['browser', 'main']
    // }
};

Hi. Even I am facing the same problem. It gives me a build error. Decorators not yet supported.
ERROR in ./src/components/List.js
Module build failed: SyntaxError: E:/React Space/apollo-app/src/components/List.js: Decorators are not officially supported yet in 6.x pending a proposal update.
However, if you need to use them you can install the legacy decorators transform with:
npm install babel-plugin-transform-decorators-legacy --save-dev
and add the following line to your .babelrc file:
{
"plugins": ["transform-decorators-legacy"]
}
The repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.
But i have already done the above steps.

it's crazy,no!


Feat add regional options

What kind of change does this PR introduce?
Improve DX for regional Edge Function invocation.
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

22 of 24 (91.67%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.4%) to 91.339%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/FunctionsClient.ts
3
5
60.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.4%

Covered Lines:
206

Relevant Lines:
220

💛  - Coveralls

@mansueli Can we add a test so the test coverage hits the target? Let me know if you need help with it.

👍


Add sections to the website

Add three sections to the website.

[ ] About me
[ ] Contact information
[ ] Blog


Confusion about input arguments

Hi Hoohm,
I am new to sc RNA seq and have a question about the inputs(R1, R2, Antibody tag) of CITE-seq-Count. If I was given GEX, HTO and ADT fastq files, could you point me to the specific files that CITE-seq requires for input? Also, the purpose of CITE-seq for me is to get the 10X-like matrix to complement Seurat.

Hello @YingzhengXu,
The simple answer is, you need the HTO raw fastq files and the HTO tag list. You also need to know where those barcodes are and how long they are.
The complex answer is, there are a lot of different chemistries and combinations of designs that might be involved in your experiment. You should ask Your colleagues about the design of the experiment and about the design of the chemistries and understand more specifically what is expected from you.
I'm sorry, but I'd rather not advise you on something that high level. I will gladly help you out with more specific questions later on in the process.
Best of luck to you.

Thank you @Hoohm!
I had a closer look of fastQC report for HTO R2 and noticed a section called "Overrepresented sequences" where the sequences looked like antibody barcodes. Could you confirm if this is true?

When I removed the polyA tails, I saw some duplicates. Should I include only the unique Ab tags in the csv?

It seems like you have HTO tags in there, yes. You should have gotten a reference of those.
Cell number should be in line with what you found in the RNA data. I would suggest maybe 20% more to be sure to catch everything you need.

Thank you so much. It really helped me a lot!


Chart-builder page code copy related

Hello,Very good component library, I encountered a problem，within the Component code, I only want to copy the config data or dateset data generated by the chart-builder, but no matter what I copy, I copy the entire code.may I ask if you designed it this way?

Hi @llds66 :)
Yes it was designed to copy the whole component into your vue file.
I will add buttons to copy only config or dataset.

@graphieros Thank you so much

@llds66 buttons are now available to copy only config or dataset.


Socket.setOption fails for sockets with addresses of type InternetAddressType.unix

If you attempt to set a a socket option when using a Unix socket the following is printed on the console:
Value outside expected range

This is due to the following code, which was written when Unix sockets didn't exist.
  int64_t protocol = DartUtils::GetInt64ValueCheckRange(
      Dart_GetNativeArgument(args, 2), SocketAddress::TYPE_IPV4,
      SocketAddress::TYPE_IPV6);

https://dart-review.googlesource.com/c/sdk/+/199640


spack installation in travis build

install spack and a mini spack stack in travis  build to test spack module detection buildtest module --spack

This issue is not relevant anymore.


fix prune not required window expressions on window operator

if window expression is not required by its parent, we should prune this column. If all window expressions of window operator are pruned, we remove this window operator directly.

run buildall

run buildall

run buildall

run buildall

run buildall

does this rule apply before the rule to choose column for count()?
example
select count()
from (
select 1.1 as A,
ROW_NUMBER() OVER() as B
from T ) V
in current version, count(*) will be replaced by count(B) because B is int and A is double.


namespace added to build.gradle to allow the package to work with projects that follows the new Android Gradle migration

Thank you for this contribution, but I don't have any time to maintain this package, so it is now marked as discontinued and app_links recommended replacement.


adjust values of presets

search HARDCODED PRESETS in the code to find where the values are hardcoded

maybe move the preset values to an easier to find location in the program?

some adjustments made


Make focusable optional on video view for android

Closes #2819

👍 great ! Only the line in changelog is missing ;)

👍 great ! Only the line in changelog is missing ;)

No it's not lol


Annotation in dependency causes startup failure

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[x] I already checked if it is not related to FastAPI but to Pydantic.
[x] I already checked if it is not related to FastAPI but to Swagger UI.
[x] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Here's a self-contained, minimal, reproducible, example with my use case:

import pytest
from fastapi import FastAPI, Depends
from starlette.testclient import TestClient

class Dep_2:
    ...

class Dep_1:
    def __init__(self, dep2):
        self._dep2 = dep2

def get_dep_1(dep2: Dep_2 = None):
    """With a type annotation, startup fails"""
    return Dep_1(dep2)

def get_dep_1_ok(dep2=None):
    """Without a type annotation, startup is ok"""
    return Dep_1(dep2)

class TestInvalidArgs:

    @pytest.fixture
    def app(self):
        app = FastAPI()

        @app.get("/")
        async def get_(dep_1=Depends(get_dep_1)):
            return {}

        return app

    @pytest.fixture
    def client(self, app):
        return TestClient(app)

    def test_not_ok(self, client):
        res = client.get("/")
        assert res.status_code == 200, res.content

class TestOK:
    @pytest.fixture
    def app(self):
        app = FastAPI()

        @app.get("/")
        async def get_(dep_1=Depends(get_dep_1_ok)):
            return {}

        return app

    @pytest.fixture
    def client(self, app):
        return TestClient(app)

    def test_ok(self, client):
        res = client.get("/")
        assert res.status_code == 200, res.content

Error message
name = 'dep2', type_ = <class 'app.test_annotation.Dep_2'>
class_validators = {}, default = None, required = False
model_config = <class 'pydantic.main.BaseConfig'>, field_info = Query(None)
alias = 'dep2'

    def create_response_field(
        name: str,
        type_: Type[Any],
        class_validators: Optional[Dict[str, Validator]] = None,
        default: Optional[Any] = None,
        required: Union[bool, UndefinedType] = False,
        model_config: Type[BaseConfig] = BaseConfig,
        field_info: Optional[FieldInfo] = None,
        alias: Optional[str] = None,
    ) -> ModelField:
        """
        Create a new response field. Raises if type_ is invalid.
        """
        class_validators = class_validators or {}
        field_info = field_info or FieldInfo(None)

        response_field = functools.partial(
            ModelField,
            name=name,
            type_=type_,
            class_validators=class_validators,
            default=default,
            required=required,
            model_config=model_config,
            alias=alias,
        )

        try:
            return response_field(field_info=field_info)
        except RuntimeError:
>           raise fastapi.exceptions.FastAPIError(
                f"Invalid args for response field! Hint: check that {type_} is a valid pydantic field type"
            )
E           fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'app.test_annotation.Dep_2'> is a valid pydantic field type

../../../../Library/Caches/pypoetry/virtualenvs/fastapi-8keROxFj-py3.8/lib/python3.8/site-packages/fastapi/utils.py:67: FastAPIError

Description
FastAPI does not start if a dependency method contains a type annotation which is a normal Python class. If the type annotation is removed, startup is ok.
Environment

OS: [e.g. Linux / Windows / macOS]: macOS

FastAPI Version [e.g. 0.3.0]: 0.63.0

Python version: 3.8.6

Additional context
n/a

Hi, I think I have the same issue, however it only triggers with pytest, not when I run the web server manually with uvicorn.
Here is a commit where pytest fails to discover tests because of type annotations: https://gitlab.com/c2ba/c2ba-toolbox/-/commit/dbfe7d06268a6e8f18c76da1f689c3baa4e9da77
Here is my temporary fix by removing all type annotations from route handling functions and dependency injected functions: https://gitlab.com/c2ba/c2ba-toolbox/-/commit/8e0e20d4a0f9c72df7125cfd57f7db41716b8bb2
And here is a log of the kind of errors I get, with stacktrace: https://gitlab.com/c2ba/c2ba-toolbox/-/jobs/1208894980
Hope it can help, thanks for your work on FastAPI

It's actually worse than I mentionned above because some FastAPI mechanisms require to specify the type, such as "response" or "request" arguments, otherwise they are considered as inputs for the route.
So for now I will deactive tests that fail because of type annotations waiting for fix.

It seems you're missing some Depends() in the function parameters. Maybe worth giving the docs about dependencies another quick read: https://fastapi.tiangolo.com/tutorial/dependencies/

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


0.19.0 FreeBSD dap probe uncaught exception

I found that when running pyocd gdb.. maybe fixed in following releases?
(venv36bsd) pyocd gdb
0000969:INFO:board:Target type is nrf52
0001008:ERROR:__main__:uncaught exception:
Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 260, in read_dp_result_callback
    return result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 791, in read_reg_cb
    res = transfer.get_result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 137, in get_result
    self.daplink.flush()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 650, in flush
    self._read_packet()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 877, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 435, in decode_data
    data = self._decode_transfer_block_data(data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 402, in _decode_transfer_block_data
    raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 101, in init
    self.read_id_code()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 111, in read_id_code
    self.dpidr = self.read_reg(DP_IDCODE)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 125, in read_reg
    return self.read_dp(addr, now)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 243, in read_dp
    return read_dp_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 234, in read_dp_cb
    result = result_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 263, in read_dp_result_callback
    six.raise_from(self._convert_exception(error), error)
  File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 260, in read_dp_result_callback
    return result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 791, in read_reg_cb
    res = transfer.get_result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 137, in get_result
    self.daplink.flush()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 650, in flush
    self._read_packet()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 877, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 435, in decode_data
    data = self._decode_transfer_block_data(data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 402, in _decode_transfer_block_data
    raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/__main__.py", line 300, in run
    self._commands[self._args.cmd]()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/__main__.py", line 460, in do_gdbserver
    **sessionOptions)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/helpers.py", line 199, in session_with_chosen_probe
    session.open()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/session.py", line 281, in open
    self._board.init()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/board/board.py", line 66, in init
    self.target.init()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/coresight_target.py", line 152, in init
    seq.invoke()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/utility/sequencer.py", line 189, in invoke
    resultSequence = call()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 106, in init
    self.read_id_code()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 111, in read_id_code
    self.dpidr = self.read_reg(DP_IDCODE)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 125, in read_reg
    return self.read_dp(addr, now)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 243, in read_dp
    return read_dp_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 234, in read_dp_cb
    result = result_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 263, in read_dp_result_callback
    six.raise_from(self._convert_exception(error), error)
  File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError
(venv36bsd)
(venv36bsd) pyocd gdb
0000486:INFO:board:Target type is nrf52
0000523:ERROR:__main__:uncaught exception:
Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 260, in read_dp_result_callback
    return result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 791, in read_reg_cb
    res = transfer.get_result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 137, in get_result
    self.daplink.flush()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 650, in flush
    self._read_packet()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 877, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 435, in decode_data
    data = self._decode_transfer_block_data(data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 402, in _decode_transfer_block_data
    raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 101, in init
    self.read_id_code()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 111, in read_id_code
    self.dpidr = self.read_reg(DP_IDCODE)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 125, in read_reg
    return self.read_dp(addr, now)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 243, in read_dp
    return read_dp_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 234, in read_dp_cb
    result = result_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 263, in read_dp_result_callback
    six.raise_from(self._convert_exception(error), error)
  File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 260, in read_dp_result_callback
    return result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 791, in read_reg_cb
    res = transfer.get_result()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 137, in get_result
    self.daplink.flush()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 650, in flush
    self._read_packet()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 877, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 435, in decode_data
    data = self._decode_transfer_block_data(data)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 402, in _decode_transfer_block_data
    raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/__main__.py", line 300, in run
    self._commands[self._args.cmd]()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/__main__.py", line 460, in do_gdbserver
    **sessionOptions)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/helpers.py", line 199, in session_with_chosen_probe
    session.open()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/session.py", line 281, in open
    self._board.init()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/board/board.py", line 66, in init
    self.target.init()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/core/coresight_target.py", line 152, in init
    seq.invoke()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/utility/sequencer.py", line 189, in invoke
    resultSequence = call()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 106, in init
    self.read_id_code()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 111, in read_id_code
    self.dpidr = self.read_reg(DP_IDCODE)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 125, in read_reg
    return self.read_dp(addr, now)
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 243, in read_dp
    return read_dp_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/coresight/dap.py", line 234, in read_dp_cb
    result = result_cb()
  File "/home/cd/cederom/usr/local/venv36bsd/lib/python3.6/site-packages/pyocd/probe/cmsis_dap_probe.py", line 263, in read_dp_result_callback
    six.raise_from(self._convert_exception(error), error)
  File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError

(venv36bsd) pyocd list
## => Board Name | Unique ID
-- -- ----------------------
 0 => nRF52-DK [nrf52] |<PHONE_NUMBER>2031204a353043323031323031303897969903

(venv36bsd) pyocd -V
u0.19.0

(venv36bsd) whoami
root

(venv36bsd) uname -a
FreeBSD 0xCFC2 12.0-RELEASE-p4 FreeBSD 12.0-RELEASE-p4 GENERIC  amd64

With experimental build of CPM on FreeBSD [https://github.com/ARMmbed/cmsis-pack-manager/issues/97] I have managed to build pyOCD version 0.21.0 that seems to have this issue fixed. Thank you @flit and @theotherjimmy YOU ROX! =)


Visualizer?

Hello @fracgawd,
Thank you for the nice work and I am working on a related project as my hobby project.
I am developing a simple tool for visualizing image(s), point cloud, and Lidar-cam calibration results together. (https://github.com/QtSignalProcessing/cam_lidar_visualizer)
If you think it's nice to have a visualizer I can try to integrate what I've developed into your project.
Looking forward to hearing from you.

Hellow @QtSignalProcessing, thanks a lot for reaching out. I recently added an example where the raw and motion compensated pointclouds get project onto the image (https://github.com/fracgawd/kitti_motion_compensation#run-examples), making it easy for people to visualize the effect.
I think this one of the easiest ways to visualize the algorithm. If you have suggestions/PRs that can help make this even better I would be happy to look at them.
Thanks!


[ESP32] Added config option chip-enable-schema-check

Problem
What is being fixed?  Examples:

Added config option chip-enable-schema-check

Change overview
config option chip-enable-schema-check
Testing
Tested all clusters app by setting default log level to Verbose

@jadhavrohit924 Also, please test what happens when incoming message does not follow the expected schema, may be through chip-tool? I don't know if it possible :-)


config-client get error ipv6 config-server uri

config-client get invalid config server uri
when I test ipv6  get the config-server uri is http://fd15:4ba5:5a2b:1008:20c:29ff:fe7e:c316:8080 but the correct uri is http://[fd15:4ba5:5a2b:1008:20c:29ff:fe7e:c316]:8080
I fellow the code find this
/**
* Creates a URI from the given ServiceInstance's host:port.
* @param instance the ServiceInstance.
* @return URI of the form (secure)?https:http + "host:port".
*/
public static URI getUri(ServiceInstance instance) {
String scheme = (instance.isSecure()) ? "https" : "http";
String uri = String.format("%s://%s:%s", scheme, instance.getHost(),
instance.getPort());
return URI.create(uri);
}
so how can get right uri

i also meet this  problem

Interesting. Not sure we've had someone try ipv6 before.
Reference https://tools.ietf.org/html/rfc2732

Though you encountered it with config server the likely cause it's in commons or the specific service discovery implementation.


docs: update form's format of client.md doc

What type of PR is this?

docs
Check the PR title.

[ ] This PR title match the format: <type>(optional scope): <description>
[ ] The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.
更新了client.md文档中的表格格式
(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: update form's format of client.md. This makes it look more beautiful and convenient for future changes.
zh(optional): 更新了client.md文档中的表格格式。 这使得它看起来更加美观并且方便之后的更改。
(Optional) Which issue(s) this PR fixes:

LGTM


Can't enable redirect HTTPS and possible typo on settings.js

What are the steps to reproduce?

enable requireHttps: true in the settings.js
enable https: { } and add private key/certificate
start node-red

What happens?
HTTPS works fine, but when using HTTP I'm not being redirected to HTTPS. Also the commented requireHttps: true in the base settings.js is missing a comma.
What do you expect to happen?
Accessing http://example.com:1880 to redirect me to https://example.com:1880
Please tell us about your environment:

[ ] Node-RED version: v0.19.4
[ ] node.js version: v10.11.0
[ ] npm version: v6.4.1
[ ] Platform/OS: Ubuntu 18.0.4
[ ] Browser: Google Chrome

This is working as intended, you can't have a redirect on the same port (both your examples are running on port 1880)

Closing as per the comments from @hardillb


Change the CSS of the Simple Interest Calculator

What's the style idea?
We need to improve the overall look of the Simple Interest Calculator as the current design is too big for laptop and phone screens
https://github.com/Rakesh9100/CalcDiverse/assets/114401238/724c3963-bcfe-4925-8cfe-786c001f412f
Checklist

[X] I have checked the existing issues
[X] I follow Contributing Guidelines of this project.
[X] I am willing to work on this issue (optional)
[X] I am a SWOC'24 contributor

Code of Conduct

[X] I agree to follow this project's Code of Conduct"

This issue is solved in PR #194


Bot responding to the word help

On our general channel anytime someone uses the word help in a message (any message) the PCO bot responds.

Hey @ecclesiatech are you on the latest master build? That was fixed in #81 .
If you forked the repo, and did the install the old way you may want to start fresh using the "Deploy to Heroku button" This will keep your but updated with the latest changes. I test stuff on dev branch and try to only push to master once everything is working well.

Got it, will give it a try. How can we tell if we are on the latest build?

haha, I'm pretty sure I broke it at this point. Just started fresh with "Deploy to Heroku Button" and now can't seem to get it working. — Asher

Woops lol. Make sure you put the right stuff in the heroku fields and it should work.

Also make sure you setup the whitelist. If you don't whitelist channels it won't respond.

Closing this up since it's fixed.


allows running v1 cmdb tests without .env file

The .env file will only be loaded when WORKFLOW_TEST_MOCKING is not enabled.
Also fixes the incorred error message which referred to INFOCMDB_WORKFLOW_TEST_MOCKING.

I have updated the pull request, please re-review.

Also merged master into the pull request branch now.
Let me know if you want a rebase/squash.


add more check for verifyDaemonSettings

Signed-off-by: Qiang Huang<EMAIL_ADDRESS>

I was thinking about combine this with daemon.verifyHostConfig(), seems daemon.verifyHostConfig() does a lot of thing which verifyDaemonSettings doesn't need to do. Let's keep them separate for now.

seems sane to warn users again what they dont support, idk if its overkill, but i dont really see any harm LGTM

verifyDaemonSettings seems not necessary for now. close it.


Allow visualization of colormap legend in layer control

This was discussed today in GTIF meeting. In order to help understand which colormap is used by which layer it would be great to have also the colormap information inside the layer.
Maybe in the future the colormap could also be a slider that allows setting min/max range? or be interactive to show the value of a color?
Thinking further it might be a more extended tool that allows band combinations somehow, not sure how that would mix.
Here a concept screenshot

As of version 0.7.0 we have the "tools" concept, where we could use either the "info" or the "config" tool for this purpose. In the "info" tool (supports displaying the layer description including HTML) it could be just an image in the correct size, in the "config" tool we could dynamically calculate the scale and offer a real range slider.

Could we maybe use something like this? If we assume we have d3 available? Would not want to integrate d3 just for this, but i think this would be very helpful:
https://observablehq.com/@d3/color-legend


GPSShield Example + A7670E will not recognize GPS Module

Hello there,
I got the A7670E Module with the optional GPS Shield (backside shows etecl25t6a-n3-v1). I tried to use the GPSShield example. The module is plugged into the GNSS antenna slot on the board.
I tried the baud rates 115200 and 9600 as specified in GPSShield.ino:
 SerialGPS.begin(9600, SERIAL_8N1, BOARD_GPS_RX_PIN, BOARD_GPS_TX_PIN);
Unfortunatley, if (SerialGPS.available()) {         Serial.println("Serial GPS available");     }
does not show up when monitoring the serial output(baud 115200 as well as 9600). Therefore displayInfo() will not be executed.
Might there be a problem with the example, or should I get some specific GPS antenna? Right now, its not possible for me to test it with an other antenna.

The GPSShield example is only available with A7670G + GPDShield, as noted above the sketch.
Please check the example descriptions in the README to see which examples are available

Thank you for the answer. Than this is no issue and the error lies on my behalf for not reading thoroughly.
One last question, before it gets closed:
Since the 7670E is bundled (and sold) with a GPS Antenna, is there an example which utilizes the Expansion?

Thank you for the answer. Than this is no issue and the error lies on my behalf for not reading thoroughly.
One last question, before it gets closed: Since the 7670E is bundled (and sold) with a GPS Antenna, is there an example which utilizes the Expansion?

Am also interested in this follow up question. I have been trying to get the examples to work with the A7670E with GPS antenna but have had no luck so far.

Thank you for the answer. Than this is no issue and the error lies on my behalf for not reading thoroughly.
One last question, before it gets closed: Since the 7670E is bundled (and sold) with a GPS Antenna, is there an example which utilizes the Expansion?

GPSShield in the example

Thank you for the answer. Than this is no issue and the error lies on my behalf for not reading thoroughly.
One last question, before it gets closed: Since the 7670E is bundled (and sold) with a GPS Antenna, is there an example which utilizes the Expansion?

Am also interested in this follow up question. I have been trying to get the examples to work with the A7670E with GPS antenna but have had no luck so far.

You need to make sure whether the GPS function is included in your purchase

GPSShield in the example

You need to make sure whether the GPS function is included in your purchase

Then why is the A7670E bundled with a GPS Antenna (and sold) in the first place if it is not possible to get the GPS Running with the E-Version?

All versions of A7670* have GPS and non-GPS functions, for example, A7670E has GPS and non-GPS functions, but A7670G definitely does not have GPS function
I don't understand what you mean by bundled sales


Add mapart protections/copyright features

make the cartography table give a lore + Persistent data container when copying a map
make sure that it preserves them when locking
disable further copying if it has that tag
Disable copying of maps in normal crafting menu by use of craftenhance

Would a command based locking system be acceptable? It would be akin to brewery's unlabel command, and avoid the hassle of dealing with preserving a still copyable original in the cartography table.

It would,
As long as it's unable to be copied by the cartography table when it's locked.

https://github.com/CivMC/SimpleAdminHacks/pull/80

Closed with https://github.com/CivMC/Civ/pull/237


fetch_stream "fetch" in mobile Safari not work

Attach (recommended) or Link to PDF file here:
Configuration:

Web browser and its version: Mobile  Safari
Operating system and its version: iPhone OS 15_2
PDF.js version: 2.12.313
Is a browser extension:

Steps to reproduce the problem:
1.
PDFFetchStreamReader.getDocument('xxx').promise.then(res => {

})

throw error

What is the expected behavior? (add screenshot)
What went wrong? (add screenshot)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

PDF.js version: 2.12.313

That version is no longer supported, please find the latest releases at https://mozilla.github.io/pdf.js/getting_started/#download

Steps to reproduce the problem:

Unfortunately there's nowhere near enough information provided here to make this an actionable/valid issue, please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.


Suggestion: make the object wrappers optional and expose original pinvoke signatures to avoid allocations

Since the issue has been solved and closed, the closest option I could find is to open a new issue and reference the old one. Feel free to make the necessary changes if needed.
For raw signatures I means exposing the closest C# equivalent of the native versions without wrapping arguments and returned data into classes or structs. In the specific case of SendMessage would mean keeping IntPtr instead of HWND which for each call create several members basically for nothing because the function only expects the IntPtr handle we got from another API call. In this case there's no risk to mis-use because there's no memory management to take care of from the managed side. You're signature still accept IntPtr, but under the hood creates an HWND.
I am not sure on the exact usage of "new PinnedObject(lParam);", but to me this seems to be another object allocation which does not happens when I call "SendMessageOriginal(IntPtr hWnd, int Msg, int wParam, StringBuilder lParam);"
It's good to know that your tests showed a very small performance it, but my main concern is the memory usage more than speed. What did found on this matter?
Right now I am working on a custom function which search for a specific window and add a custom control to it. I don't need to store anything in memory. I call your api with something like this:
public class TargetWindow
{
        public string ClassName
        {
            get
            {
                var sb = new StringBuilder(256);
                GetClassName(hWnd, sb, sb.Capacity);
                return sb.ToString();
            }
        }
        public string Title
        {
            get
            {
                var length = (int) SendMessage(hWnd, (uint) WindowMessage.WM_GETTEXTLENGTH);
                if (length is 0) return null;
                var sb = new StringBuilder(length + 1);
                SendMessage(hWnd, WindowMessage.WM_GETTEXT, sb.Capacity, sb);
                return sb.ToString();
            }
        }
        public IntPtr hWnd
        {
            get
            {
               return MyFunctionThatOriginatesTheHandle();
            }
        }
}

With the standard pinvoke signatures an instance like this will have very little impact on memory usage because it is an empty class which don't store any data (except the StringBuilder and other unavoidable temporary variables). But with you API, both GetClassName() and SendMessage() creates and store several members for nothing, just to pass an IntPtr.
I am talking about HWND because User32 is the first one Win32 API I started to deal with, but I am wondering if I will encounter the same in all the rest of Vanara API.
I think that the main approach for who decide to use Vanara (or at least for me) is the convenience of having all the pinvoke signatures available from a Nuget package. The custom handlers and wrappers are a bonus (and a great bonus) which should be left to the developer if to use or not. In this way it will be possible to avoid exceptions like the one I reported and have full control on resources.
Do you think would be possible to expose the closest native signatures and make the object wrappers optional?
I initially thought to create my own overloads thinking that it would have been required only for rare cases, but seems to be that Vanara is all implemented in this way and I am afraid I'll end up to rewrite everything just to have the original signature I would expect.
Originally posted by @netcorefan1 in https://github.com/dahall/Vanara/issues/191#issuecomment-753019074

For raw signatures I means exposing the closest C# equivalent of the native versions without wrapping arguments and returned data into classes or structs.

One of the key design principles in the library is type enforcement. In any case where PVOID or void* actually should represent a type, especially with handles, this library enforces the type. Casting from IntPtr to any of the handle wrappers (HWND, HGLOBAL, HPEN, etc.) does not create a new instance. Once optimized by the compiler, these two value types are the same size and have implicit operators that effectively inline that stack operation. Since I have almost a million lines of code following that principle, I'm disinclined to change it. Especially since it has almost no impact to speed or memory.

In the specific case of SendMessage would mean keeping IntPtr instead of HWND which for each call create several members basically for nothing because the function only expects the IntPtr handle we got from another API call.

IntPtr automatically casts to HWND using the process above, so there is no penalty.

my main concern is the memory usage

These are all value variables that get pushed on the stack during the marshal process. In optimized code, there is no memory hit.

I am not sure on the exact usage of "new PinnedObject(lParam);", but to me this seems to be another object allocation which does not happens when I call "SendMessageOriginal(IntPtr hWnd, int Msg, int wParam, StringBuilder lParam);"

PinnedObject is a wrapper around GC methods to pin memory used by blittable structures to prepare for marshaling. In your use case, it will not get called if you target the method calls to use the method overload best suited for your task. In cases where it is necessary, it the most optimized way, other than using unsafe code, to marshal blittable structures.

With the standard pinvoke signatures an instance like this will have very little impact on memory usage because it is an empty class which don't store any data (except the StringBuilder and other unavoidable temporary variables). But with you API, both GetClassName() and SendMessage() creates and store several members for nothing, just to pass an IntPtr.

Hopefully you see now that this is not the case. There is nothing stored when you use the right signature.
In your code, to call the best overload you need to change the signature of your second SendMessage call to:
SendMessage(hWnd, (uint)WindowMessage.WM_GETTEXT, (IntPtr)sb.Capacity, sb);
// (uint) casts WindowMessage so it doesn't pull one of generic methods
// (IntPtr) is needed since WPARAM is an IntPtr and not an Int32.

In many cases, casts like the above are critical, just like in native C, to ensure memory alignment, type enforcement, function selection, etc.
If you have further questions, feel free to respond to this thread.

Many thanks for your detailed explanation. I am glad to see that my assumptions were totally wrong and that basically there are no differences. This is exactly what I was hoping to hear from you.
If I have understood well, this is what you recommend:

When Vanara offers generic methods, it is always better to do the casting and use the non generic ones
If a function expect a particular type, do the appropriate casting to ensure it get the expected type. Do not pass a different type just because it works and make code more readable

These rules are easy to follow when types are the built-in ones. But in case of Vanara custom ones how can I know when it is needed casting? For example, in the case of HWND, I know that I can safely pass IntPtr without doing "new HWND(IntPtrHandle)" because Vanara take care of the casting. I know this only because I have investigated and checked the source code. How can I know it is safe for other Vanara special types without checking every time the source code?
Many thanks for your tips about my sample code. Without your help I would have taken the wrong track due to the temptation of making the code shorter and more readable (and I wrongly believed this was the best practice!).
Do you recommend to change my "TargetWindow" class into a struct? Until I come to the result, I may need to temporarely implement some sort of tracking mechanism if GetClassName() does not returns a unique result on each instance (probably a string representing GetClassName()+CounterID.) I hope to avoid this by calling GetDlgCtrlID(), but if the ControlID will change dynamically, then I will be forced to do. I wanted to let you know to see if a struct could be still a good candidate even in this evenience.
Thanks

Many thanks for your detailed explanation. I am glad to see that my assumptions were totally wrong and that basically there are no differences. This is exactly what I was hoping to hear from you.
If I have understood well, this is what you recommend:

When Vanara offers generic methods, it is always better to do the casting and use the non generic ones
If a function expect a particular type, do the appropriate casting to ensure it get the expected type. Do not pass a different type just because it works and make code more readable

These rules are easy to follow when types are the built-in ones. But in case of Vanara custom ones how can I know when it is needed casting? For example, in the case of HWND, I know that I can safely pass IntPtr without doing "new HWND(IntPtrHandle)" because Vanara take care of the casting. I know this only because I have investigated and checked the source code. How can I know it is safe for other Vanara special types without checking every time the source code?
Many thanks for your tips about my sample code. Without your help I would have taken the wrong track due to the temptation of making the code shorter and more readable (and I wrongly believed this was the best practice!).
Do you recommend to change my "TargetWindow" class into a struct? Until I come to the result, I may need to temporarely implement some sort of tracking mechanism if GetClassName() does not returns a unique result on each instance (probably a string representing GetClassName()+CounterID.) I hope to avoid this by calling GetDlgCtrlID(), but if the ControlID will change dynamically, then I will be forced to do. I wanted to let you know to see if a struct could be still a good candidate even in this evenience.
Thanks

When Vanara offers generic methods, it is always better to do the casting and use the non generic ones

I don't know that I agree with this. I implement generic methods when conversions or complexities are common when using the rawest function definition. There is usually some overhead, but it is the same overhead the developer would have to manually use to get the function to work.
I would instead say: Check all overloads for the one that most closely matches the pattern you desire and then ensure the parameters match that definition exactly. If the call is generic, make sure your parameter values match the generic conditions ("where ...") of the method.

But in case of Vanara custom ones how can I know when it is needed casting?

Check the object for implicit and explicit operators. All handles do exactly the same conversions to/from IntPtr.

Do you recommend to change my "TargetWindow" class into a struct?

Personally, I'd make extension methods for HWND.
public static string GetClassName(this HWND hWnd)
{
   var sb = new StringBuilder(256);
   var len = GetClassName(hWnd, sb, sb.Capacity);
   return len > 0 ? sb.ToString() : throw Win32Error.GetLastError().GetException();
}

If you need a unique id for a window, then class name plus the hex value of the HWND would be sufficient. That's not 100% guaranteed, but would be close.
public static string GetUID(this HWND hWnd)
{
   var sb = new StringBuilder(256);
   var len = GetClassName(hWnd, sb, sb.Capacity);
   return len > 0 ? $"{sb}+{(IntPtr)hWnd}" : throw Win32Error.GetLastError().GetException();
}

When Vanara offers generic methods, it is always better to do the casting and use the non generic ones

I don't know that I agree with this. I implement generic methods when conversions or complexities are common when using the rawest function definition. There is usually some overhead, but it is the same overhead the developer would have to manually use to get the function to work.
I would instead say: Check all overloads for the one that most closely matches the pattern you desire and then ensure the parameters match that definition exactly. If the call is generic, make sure your parameter values match the generic conditions ("where ...") of the method.

But in case of Vanara custom ones how can I know when it is needed casting?

Check the object for implicit and explicit operators. All handles do exactly the same conversions to/from IntPtr.

Do you recommend to change my "TargetWindow" class into a struct?

Personally, I'd make extension methods for HWND.
public static string GetClassName(this HWND hWnd)
{
   var sb = new StringBuilder(256);
   var len = GetClassName(hWnd, sb, sb.Capacity);
   return len > 0 ? sb.ToString() : throw Win32Error.GetLastError().GetException();
}

If you need a unique id for a window, then class name plus the hex value of the HWND would be sufficient. That's not 100% guaranteed, but would be close.
public static string GetUID(this HWND hWnd)
{
   var sb = new StringBuilder(256);
   var len = GetClassName(hWnd, sb, sb.Capacity);
   return len > 0 ? $"{sb}+{(IntPtr)hWnd}" : throw Win32Error.GetLastError().GetException();
}

Would you mind if I extract portions of this thread and the last to put in the documentation for the project? Also, if I've answered all your questions, will you close this issue?

Would you mind if I extract portions of this thread and the last to put in the documentation for the project? Also, if I've answered all your questions, will you close this issue?

Many thanks for your detailed explanations. Now it's everything clear! Feel free to reuse this or other threads to make the documentation better. The more the people are aware of such things the better is for all of us. Thanks

Many thanks for your detailed explanations. Now it's everything clear! Feel free to reuse this or other threads to make the documentation better. The more the people are aware of such things the better is for all of us. Thanks


Logging issue

I've followed the discussion in https://github.com/aws/aws-xray-sdk-node/issues/2 and tried to set my own logger at a level of error to stop receiving the following logs without any success.
AWS_XRAY_DAEMON_ADDRESS is set. Configured daemon address to <IP_ADDRESS>:2000. AWS_XRAY_CONTEXT_MISSING is set. Configured context missing strategy to LOG_ERROR. Subsegment streaming threshold set to: 0
We setup the X-Ray as below
const AWSSDK = require('aws-sdk'); const AWSXRay = require('aws-xray-sdk-core'); AWSXRay.setLogger(loggerForXRAY); AWSXRay.captureAWS(AWSSDK)
Is this something I've approached in the wrong way or is there some other issue?

Hi grahamhar,
So the issue here is that the SDK initializes before loading the custom logger defined, thus the initialization INFO level logs are not routed to the custom logger (and thus are not filtered by log level). We'll need to configure some suppression mechanism (like a suppress logs env variable) or option to configure the logger when initializing.

Hi @awssandra,
I’m happy to do a PR for this so you have any thoughts on the name for the variable?

Also would it be viable to start the built in logger at ERROR rather using the default of INFO?
https://github.com/aws/aws-xray-sdk-node/blob/master/packages/core/lib/logger.js#L17

@awssandra I've raised #172 in an attempt to provide a work around to these log messages without changing current functionality.


dcos cluster setup error with BasicAuth: Error: invalid character '<' looking for beginning of value

What version of DC/OS + DC/OS CLI are you using (dcos --version)?
Mesosphere DC/OS Version : 1.12.4
$ dcos --version
dcoscli.version=58daff32b1ce45fc72159a59df12e1437a233a00

What operating system and version are you using?
DCOS-CLI for Windows
What did you do?
dcos -vv cluster setup --insecure https://$username:$password@my.domain:55443

What did you expect to see?
Some kind of successful message.
What did you see instead?
Setting up the cluster...
mime: no media type
HEAD / HTTP/1.1
Host: my.domain:55443
User-Agent: dcos-cli/58daff32b1ce45fc72159a59df12e1437a233a00 windows

HTTP/1.1 200 OK
Content-Length: 11411
Accept-Ranges: bytes
Content-Type: text/html
Date: Wed, 14 Aug 2019 16:09:34 GMT
Etag: "5ce802fe-2c93"
Last-Modified: Fri, 24 May 2019 14:43:10 GMT
Server: openresty
X-Frame-Options: SAMEORIGIN

mime: no media type
HEAD /pkgpanda/active.buildinfo.full.json HTTP/1.1
Host: my.domain:55443
User-Agent: dcos-cli/58daff32b1ce45fc72159a59df12e1437a233a00 windows

HTTP/1.1 200 OK
Content-Length: 104289
Accept-Ranges: bytes
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Date: Wed, 14 Aug 2019 16:09:35 GMT
Etag: "5d235b0b-19761"
Expires: 0
Last-Modified: Mon, 08 Jul 2019 15:02:35 GMT
Pragma: no-cache
Server: openresty

This cluster does not require authenticated requests. Skipping login.
mime: no media type
GET /metadata HTTP/1.1
Host: my.domain:55443
User-Agent: dcos-cli/58daff32b1ce45fc72159a59df12e1437a233a00 windows
Authorization: token=
Accept-Encoding: gzip

HTTP/1.0 401 Unauthorized
Cache-Control: no-cache
Connection: close
Content-Type: text/html
Www-Authenticate: Basic realm="<redacted string identifying our HAProxy frontend>"

401 Unauthorized

You need a valid user and password to access this content.

Error: invalid character '<' looking for beginning of value

FYI, as I was stuck with this I made a Python script instead:
https://github.com/Lucas-C/dotfiles_and_notes/blob/master/languages/python/dcos_logs.py

FYI, same issue with the latest release :
$ dcos --version
dcoscli.version=0.7.13
$ dcos cluster setup --insecure https://$username:$password@my.domain:55443
This cluster does not require authenticated requests. Skipping login.
Error: invalid character '<' looking for beginning of value

Hi @Lucas-C ,
The problem seems to be that you're passing credentials in the URL, while we do not support HTTP basic auth.
You can run dcos auth list-providers http://my.domain:55443 to see which providers are available for your cluster.

Closing as explained above, please look into the uid/password login provider starting from DC/OS Open 1.13 and beyond.


[REQUEST] Play in reverse

I have this animated low poly background video that i used in my app using this library unfortunately when video reaches the end, it just loops to the first duration of the video. It looks jerky. I wanted it to be seemless loop when/if the video reaches the end, it will just play in reverse and vice versa if the reversed video reaches the start

The native libraries used in this library does not support reverse playback, thus implementing it in this library is not (or very hardly) possible.


Update to pytket-pecos 0.1.22.

Fixes #400 .

feel free to merge without the QA tests working, the timeout is a known issue


Include Realm Swift binaries built with Swift 3.0.1

I have installed Xcode 8.1 GM seed (as 8.0 couldn't install an app on iOS 10.1). Then build fails with the error: Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1
The realm-swift version is 2.0.2. Hope the issue is fixed soon.

We LOVE to help with any issues or bugs you have!
Questions: If you have questions about how to use Realm, ask on
StackOverflow.
We monitor the realm tag.
Feature Request: Just fill in the first two sections below.
Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as many details as possible.
Thanks for helping us help you! :-)
Please remove this line and all above before submitting.

Goals
What do you want to achieve?
Expected Results
What did you expected to happen?
Actual Results
What did happened instead?
e.g. the stack trace of a crash
Steps to Reproduce
What are steps we can follow to reproduce this issue?
Code Sample
Provide a code sample or test case that highlights the issue.
If relevant, include your model definitions.
For larger code samples, links to external gists/repositories are preferred.
Alternatively share confidentially via mail to<EMAIL_ADDRESS>Full Xcode projects that we can compile ourselves are ideal!
Version of Realm and Tooling
In the CONTRIBUTING guidelines, you will find a script,
which will help determining these versions.
Realm version: ?
Xcode version: ?
iOS/OSX version: ?
Dependency manager + version: ?

Yes, we need a new release.

Hi,
I'm using Carthage and I also had this error. But I make a carthage update and it's works fine.
Maybe it can help.

Any ETA on a new release to support Xcode 8.1 GM seed and Swift 3.0.1?

@ThomasGoujon I tried Carthage update and now this issue pops up:
:0: error: opening import file for module 'Realm': Permission denied
Do you use Xcode 10.1 GM seed?

Hi all, as you may know, Swift's binary compatibility constraints require that all Swift dependencies be compiled with the same version of the Swift compiler, which means that you can't take a binary release we built with Xcode 7.3.1 and Xcode 8.0 from a few weeks ago with a newer version of Xcode (e.g. '8.0 GM').
To avoid needing to wait for us to update our infrastructure to build with fresh releases of Xcode (usually takes a few days), I encourage you to build from source using CocoaPods, Carthage or Xcode subprojects.
That being said, we're in the process of upgrading our infrastructure to build with Xcode 8.1 GM as we speak and should have a release out in the next few days with binaries built with Swift 2.2, 2.3, 3.0 and 3.0.1.

Thanks for the update. Meanwhile, I could build realm-cocoa after cloning it and doing these:
git submodule update --init
sh build.sh build
The framework files now work fine.

Thanks @jpsim @sangmin. I was able to fetch project and run "./build.sh ios-swift". Compiled frameworks Realm.framework and RealmSwift.framework under build/ios/swift-3.0.1 fat binaries. Copied these into my project as embedded frameworks. All good.

@sangmin I use Xcode 8.1 GM (Version 8.1 (8T61a))

following

1+ following

It's out now. 2.0.3.

Correct

I've tried doing carthage update --platform iOS --no-use-binaries and have confirmed that my Carthage folder has version 2.0.3 but I still get the error in Xcode. I have also tried replacing it with the pre-built Carthage Realm package. I've tried cleaning the project and restarting Xcode without any luck.
Is there anything else I can try?

If you're building Realm with Carthage, make sure you're using the same version of Xcode that's xcode-selected as the GUI version of Xcode you're building your project with.
If you're using Carthage with binaries (carthage update), those binaries were built with Xcode 8.1 GM, so they're only compatible with that version of Xcode.

@cliftonlabrum Just cloning and building realm worked for me.
git submodule update --init
sh build.sh build

@jpsim Thanks. I wonder if the App Store version of Xcode 8.1 (which I have) is different from the 8.1 GM that Realm was built with.

I have the GM which is also 8B62. What worked for me, per the Realm docs was deleting derived data. From terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData


Add the possibility to exclude directories from the build

Depends on #40
What does this PR do?
As the title says. It'll prove handy when we'll start working on Kuzzle v2 documentation, as this will allow us to not create a dedicated branch, preventing merge nightmares.
The excluded directories are still visible in development mode, but their displayed title is changed to show that these sections are excluded (see demo below)
To use this new feature:

The file metalsmithOptions.js at the root of the project has been moved&renamed config/metalsmith.json
The metalsmith.json file features a new exclude option, an array of strings, allowing to add directory paths to exclude

Example: to exclude the Javascript SDK version 6 from the built version of the documentation, simply add sdk-reference/js/6 to the exclude array.
The README file has been updated to reflect these changes.
Demo
Original page (Go SDK documentation, v1):

Added path to the exclude array:  "sdk-reference/go/1/index"
=> in production:

=> in development:

Other changes

The versions.config.json file has also been moved to the new config directory, and it has also been renamed into versions.json

Boyscout

Fix a few typos in the README documentation

Snippets tests reports

@Aschen > I changed the way titles are modified: instead of doing this directly during Metalsmith's build, which caused a few problems if HTML code is used in the "development-mode" titles, I now properly use templates to do so.
This is way cleaner, as instead of altering the title itself, I change only how it is displayed.
So you may want to review this commit: https://github.com/kuzzleio/documentation-V2/pull/41/commits/0486ec912cb7e9e3cc7f49563e83a7ac3a8dfc14


Added bash script to build and install everything.

Hello,
One night project so this is rough work, but I did get everything installing in a Docker container.  Updated a few dependencies.  The script here will be useful for putting this repo into Nix Flake form.

Thanks for the contribution! I am sure this script will be handy for some users :)

Be sure to update references from my forked repos back to yours!

:+1:  done!


Provide a way to run cleanup at the end of stream generation

I don't know how to write "cleanup" code that runs at the end of stream generation. For example (pseudocode):
return TypeCheck<Generator<int>>(Iterate({1, 2})
    >> Map([](int value) { return value; })
    >> Then([]() { LOG(INFO) << "All done!; })
);

The final Then statement changes the type of the resulting eventual chain such that it's no longer able to create a generator from the result.
This came up when writing a gRPC server handler for a bidirectional streaming RPC, where the server handler wanted to run some extra logic after sending a final request to a client.

return TypeCheck<Generator<int>>(Iterate({1, 2})
    >> Map([](int value) { return value; })
    >> Then([](int value) { LOG(INFO) << "All done!; return value; })
);

?

return TypeCheck<Generator<int>>(Iterate({1, 2})
    >> Map([](int value) { return value; })
    >> Then([](int value) { LOG(INFO) << "All done!; return value; })
);

?

If I understand your snippet correctly, that Then() eventual runs after every element. This issue is instead about running when the stream is done / after the final element has been generated, and only running once.
So with that sample code that iterates over 2 elements, the goal is to only print "All done!" once, rather that once for each of the N elements.

@CodingCanuck, the following snippet runs .ended() just once (tested it locally):
auto s = [&]() {
    return TypeCheck<void>(
        Iterate({1, 2})
        >> Map([](int value) { return value; })
        >> Loop<void>()
               .ended([](auto& k) {
                 std::cout << "Finished" << std::endl;
                 k.Start();
               }));
  };

  *s();

I don't have time right now, have you tried it with smth like Finally?


Multi-gpu Mxnet training in sagemaker gives cuda error when dataloader is using multiprocessing

I am trying to train a transformer seq-to-seq model on Sagemaker ( The script I am using works fine when I run it on an EC2 multi gpu instance ).
When I start a training job on sagemaker, the training progresses fine, but it logs a cuda error:
[03:28:04] src/engine/threaded_engine_perdevice.cc:101: Ignore CUDA Error [03:28:04] /root/pip_build/mxnet-build/3rdparty/mshadow/mshadow/./tensor_gpu-inl.h:35: Check failed: e == cudaSuccess: CUDA: initialization error Stack trace: [bt] (0) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x6dfb0b) [0x7f9f2591cb0b] [bt] (1) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x3898dd2) [0x7f9f28ad5dd2] [bt] (2) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38bc49e) [0x7f9f28af949e] [bt] (3) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38aee71) [0x7f9f28aebe71] [bt] (4) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38a4a21) [0x7f9f28ae1a21] [bt] (5) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38a5974) [0x7f9f28ae2974] [bt] (6) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Chunk::~Chunk()+0x48a) [0x7f9f28d1ce1a] [bt] (7) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x6e32ba) [0x7f9f259202ba] [bt] (8) /usr/local/lib/python3.6/site-packages/mxnet/libmxnet.so(std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >::~vector()+0xc8) [0x7f9f25951818]
I found out that when I initialize dataloader with multiprocessing, I get this error. When I switch thread_pool on, I don't see this error.

Try not using cuda before enabling the multiprocessor as a workaround. There are various bugs in the multiprocessing implementation in MXNet

@leezu @szha @eric-haibin-lin @zhreshold - Multi processing in MXNet is causing multiple issues like this and non-deterministic hangs. Given, 1.x is heavily used in production and will have customers for quite some time - What do you recommend in getting away from multi processing in 1.x?
cc @karan6181

The problem is a general one that cuda doesn't support fork after initialization. Multiprocessing is one way in which this problem is exposed. @ptrendx does CUDA plan on addressing this limitation?

I don't believe enabling forks after initialization of CUDA is planned. Generally this is handled (as @leezu mentioned) by spawning the processes before launching operations on the GPU.

@sandeep-krishnamurthy so I think the root cause of this won't be fixed and we can document better to help users avoid issue like this. Maybe we can have a flag that exposed whether CUDA has been initialized yet and use it to disable forking in data loader?
By the way, what are the nondeterministic hanging issues?

Thank you @szha and @ptrendx .
@szha I will start a new thread. I was referring to python multi processing in data loader leading to deadlocks in distributed training.

@szha Can you link the document with workaround? We are also seeing similar issues with python multiprocessing

@ndeepesh the workaround would be to avoid using GPU context before initializing for the multiprocess.

Thanks @szha . Also is this issue intermittent? We dont see this issue for all our training jobs.

@ndeepesh probably. @ptrendx may know more on the details of this issue.

Thanks @szha . @ptrendx Can you help answer some questions below?

We dont see any training failures due to cudaInitialization error in multiprocesssing environment. Is this expected? Are there any side effects to this?
We see this issue intermittently and not all training jobs are affected.

Here is the exact warning/error message we get in logs
[23:24:18] src/engine/threaded_engine_perdevice.cc:101: Ignore CUDA Error [23:24:18] /root/pip_build/mxnet-build/3rdparty/mshadow/mshadow/./tensor_gpu-inl.h:35: Check failed: e == cudaSuccess: CUDA: initialization error
Stack trace:
[bt] (0) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x6e305b) [0x7f0d92f4b05b]
[bt] (1) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38a6622) [0x7f0d9610e622]
[bt] (2) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38c9d1e) [0x7f0d96131d1e]
[bt] (3) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38bc6e1) [0x7f0d961246e1]
[bt] (4) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38b2291) [0x7f0d9611a291]
[bt] (5) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x38b31e4) [0x7f0d9611b1e4]
[bt] (6) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Chunk::~Chunk()+0x48a) [0x7f0d96356e3a]
[bt] (7) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x6e680a) [0x7f0d92f4e80a]
[bt] (8) /home/ubuntu/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/mxnet/libmxnet.so(MXNDArrayFree+0x54) [0x7f0d96082f44]

It's hard to answer exactly why you see this without knowing your training script (or at least the part before you start other processes). That said, the fact that you get the error during NDArrayFree suggests that before you fork you created some NDArrays on the GPU. Maybe the issue is intermittent because it only tries to get rid of those particular NDArrays during garbage collection in Python?
The error itself happens in the child process and I don't believe it should happen in the parent process so as long as you do not need to do anything cuda related in the child processes you should be ok I think.

Thanks @ptrendx
We do load one tensor on GPU before we start other processes. We use those processes to prepare and preprocess batches in parallel which in turn gets picked up by parent process (to fed into GPU) via  multiprocessing.Queue. Child processes are only responsible for loading and preparing batches and they have nothing to do with cuda

We do load one tensor on GPU before we start other processes

This is not safe to do in MXNet. For example, if you call random.seed in the child process after the parent process used cuda, it will cause segfault.
You can also refer to https://github.com/apache/incubator-mxnet/issues/4659 https://github.com/apache/incubator-mxnet/issues/19291 (ie the current issue is a duplicate of the #4659)


Kndp cli tool exiting with Status 1 on 'kndp environment create' Command

What happened?
When executing the command kndp environment create, the Go program exits with status 1.
How can we reproduce it?

Execute the command kndp environment create.
Observe that the program exits with status 1.

@ca7alindev Can't reproduce, please reopen if is still actual.


WIP: data_loader return image files instead of in-memory images

Motivations
make data loading pipeline more memory efficient
Remarks: mark as WIP because its not tested yet

To deal the memory issue, we need to load only partial of image which is indexed from the get_example. Did you consider this? Other looks good.

I choose pre-loader to speed up, and the occupied memory by data is not a dominant issue. I think the real problem is the number of sampling points. Btw, If you think we have tight memory even in TPU, I will accept this proposal.

It seems a choice problem. memory vs speedup. what do you think about it @riven314.

@codestella
its already considered here:
img = self.image_loader(self.imgfiles[split][img_idx])

@robot0321
if we are not sure how much benefit we can get by this change, how about I leave this PR here (dont merge at the moment).
If OOM is really a issue in TPU setting, then we can merge it in.

Because we have TPU (big memory), we are pending this issue later


Added parsing for component attributes to handle constant strings

For backward compatibility reasons, i left the "static attribute" feature.
See issue #478

Can you add some tests?

Yep tests would be good before I merge this, thanks

Yep i'll do that. I made this update some time ago and kept it on my github because i thought Rivets was dead. I'm happy to see it come to life again.
And we need tests on components, i don't see any in the specs.

You can use https://github.com/stalniy/rivets/blob/extended-template/spec/rivets/component_binding.js as a base
You can remove 'allows not to pass "template" method' and skip 'renders returned DOM fragment as component template'

Great @blikblum thanks

@Leeds-eBooks I just added some tests. It includes tests from @blikblum and a test for primitive attributes.

@Leeds-eBooks, @jccazeaux, @blikblum guys I believe this needs a bit more work.

Attributes parsing should be moved to separate method (i.e. parseAttributes)
I'd like to see attributes parsing being configurable. By default it does as it implemented currently but can be overridden to something what I proposed (i.e. .bind suffix). I want to have this as it will help me to migrate to more reach frameworks as Aurelia or Angular in the future

What do you think? If you are agree I will make pull request

Happy with point 1 but I don't fully understand what you mean with point 2. How would this be configured by the dev? What does it have to do with Angular and Aurelia?

@Leeds-eBooks Ok, lets say it another way. In "my world" readability plays very important role and I don't like to see something like attr="'my string here'" and instead I like solution introduced by Angular2 and Aurelia. For static attributes you do it as usually, so everybody knows that attr="my string here" is a an attribute with static value and attr.bind="myVar" (or bind-attr="myVar") emphasises that here I want to bind a var as attribute value.
That's why I'd like to see this feature being configurable.
Regarding implementation: we need only one method isAttributeStatic(attribute). So that, anybody can override it and use whatever syntax he believes is the best for the project.
Does it make sense?

@Leeds-eBooks,  added bit more context:
So, the implementation is something like this:
class Rivets.ComponentBinding extends Rivets.Binding
  constructor: (@view, @el, @type) ->
    @component = @view.components[@type]
    @static = {}
    @observers = {}
    @upstreamObservers = {}
    parseAttributes(el.attributes)

  parseAttributes: ->
    bindingRegExp = view.bindingRegExp()

    for attribute in @el.attributes or []
      parseAttribute(attribute) unless bindingRegExp.test attribute.name

  parseAttribute: (attribute) ->
    propertyName = @camelCase attribute.name

    if @isAttributeStatic(attribute)
      @static[propertyName] = attribute.value
    else
      token = Rivets.TypeParser.parse(attribute.value)
      if token.type is 0
       @static[propertyName] = token.value
      else
       @observers[propertyName] = attribute.value

  isAttributeStatic: (attribute) ->
    # can be override by configuration
    attribute.name in (@component.static or [])

So for my case isAttributeStatic looks like:
isAttributeStatic: (attribute) ->
  position = attribute.name.indexOf('.bind')
  position != -1 and position != attribute.name.length - '.bind'.length;

@stalniy if we change the syntax to pass primitive strings, we should change it for binders too. Having two syntaxes would be disturbing

@jccazeaux you are right that means we need more complex solution.
We need to create smth like binderProvider object and ability to override it

I'm in favor of removing attr="'my string here'" syntax at all both at binder and component.
Although instead attr.bind i would use rv-bind-attr="model.prop" to keep things consistent


Improved agent searching

Changes to remote search (> 100 agents):

Sends the query to the server on every keyup
Only shows a spinner if the search is taking > 1 second
The spinner now lives next to the search field
Fixes a bug where local search could be triggered by accident

Changes to local search (< 100 agents):

Filters immediately on keyup
Fixes the matching logic to match the backend/remote matching logic

@keithpitt nice, thanks for the hints! I've been able to get it working:

It'd be nice to only show the spinner if the remote search has been happening for more than 750ms+, but I couldn't quite figure out how to wrangle that.

I feel like debounce would still be the better fit here; it’s much less likely the user wants the results after their first input. The 500ms might just be too long. Totally with you on changing the loading spinner behaviour!

Yeah, the first keyup is probably unnecessary, but the rest of the interaction (backspacing, correcting typos, seeing what osx vs osx=true does, etc) feels snappier w/ throttle.
Unless you're imagining debounce is short enough that it happens between a normal human's keystrokes, like the Safari autocomplete seems to be.

This is ready, and I've updated the description with what it changes.
For the lack of debounce/throttling, as long as relay cancels the previous forceFetch request then it shouldn't make a different to the UX by sending more frequent remote calls (except that there's less delay to wait for the list to filter).
I'd be keen to give this a test on prod with a large number of agents and a realistic latency though.

Cool, let's get it on pod!

*prod even


More than one link with HyperLink cell format

I would like to be able to have more than one link in a text cell with HyperLink format. I could work on a PR myself if you think it is a nice feature.
Ideally, I would use the newline character to split the text in several link texts, each of them would follow the current specification:

In general, the value until the last space is used as the link text, while the last word is used as the link destination.

As a use case, I'm interested in having an easy to navigate Software Requirements spreadsheet. Table NEEDS has a many to many relation with table REQUIREMENTS. Reference lists and widgets are nice, but I have too much information to fit in a single page and reference lists don't help me navigate between pages easily. So I have some formula columns that create links that help me navigate between pages:

But I can't use the HyperLink format because I might have more than one link.

Supporting Markdown sounds great. Although I don't know how hard would it be to implement it. Rendering an image inside a cell could be problematic. That's why I raised the idea of multiple links. It shouldn't be a big deviation of the current HyperLink format implementation. Supporting a subset of markdown (maybe just the hyperlink syntaxis) is an option too.
Thanks for the collapsing widgets info. It does help! Although it doesn't solve my particular problem entirely and I still like the option of using links that redirect to other pages.


Use jackc/pgx instead of lib/pq

The pq library is in maintainance mode according ot the repository's
README.

This package is effectively in maintenance mode and is not actively
developed. Small patches and features are only rarely reviewed and merged. We
recommend using pgx which is actively maintained.

Component PRs:

cloudfoundry/bbs#41
cloudfoundry/locket#10
cloudfoundry/benchmarkbbs#4
cloudfoundry/inigo#22

We still had to keep the submodule because routing-api depends on the deprecated library. Opened cloudfoundry/routing-release#164 issue for future reference.


improve robots txt

Miscellaneous improvements to robots.txt:

ensure that list of disallowed urls is prepended by a User-agent directive.
block Google adbot
refactor ROBOTS_HEADER
try to block urls that include q=...
revert PR #756

Delivers https://www.pivotaltracker.com/story/show/177802264
Manual test
I will have to test this after deployment.
In Google Search Console see if crawled urls that had resulted in 403's are now blocked.

Coverage remained the same at 93.014% when pulling 58b1f22dac4a25d5f4df13f13b832e01b385cfc4 on 177802264-improve-robots_txt into f1532d5ca77b84f83b86ac5a0234c2bbe7d66223 on master.


:art: Adds colorscheme screenshots to new file

Currently, there are some screenshots of available colorschemes at the beginning of the README.
These changes add a new .md file linked to from the README with a comprehensive set of screenshots for all available colorschemes, with the image files linked from the project Wiki using relative paths.
I have all of the screenshots in the Wiki of my fork, so feel free to pull that down with git clone https://github.com/favorable-mutation/lightline.vim.wiki.git in order to move them over to the actual project's Wiki.

Okay, I think it's useful for users when they choose the colorscheme. One thing to point out, I prefer colorscheme.md rather than Colors.md for filename. Also I'm thinking of generating the screenshot automatically by script but that's my own homework :)

Sounds good to me! Rebased off of master, renamed the file, and updated to include simpleblack. Lmk if there's anything else you'd like to see changes to, and thanks for reviewing!


persistant fuseki storage

by default storage is in memory, so no data is stored after restart

A little issue about this pr.
When I first create the localData dataset With persistent TDB, then Ctrl+c to stop the fuseki container (docker-compose up command) .
When I try to relaunch docker-compose up, I've got a fuseki java error message that tell me that the TDB storage can not be used as it is already running, so perhaps the good option is 'petsistant' bit not with TDB.
Not tested yet because I don't know how to reinitialize the fuseki container

I usually set TBD2 and never encountered problems.
To reinitialize the container, you may need to delete the /data/fuseki directory (depends on how your docker-compose.yml file is setup)


[ISSUE #3177] match once and only once

see #3177 , match metaData once and only once.

It should be discussed first

Codecov Report

Merging #3245 (064ce9d) into master (3d13efe) will decrease coverage by 0.19%.
The diff coverage is 61.70%.

:exclamation: Current head 064ce9d differs from pull request most recent head c87f3e3. Consider uploading reports for the commit c87f3e3 to get more accurate results

@@             Coverage Diff              @@
##             master    #3245      +/-   ##
============================================
- Coverage     57.69%   57.49%   -0.20%
+ Complexity     4545     4543       -2
============================================
  Files           729      730       +1
  Lines         20800    20849      +49
  Branches       1913     1917       +4
============================================
- Hits          12001    11988      -13
- Misses         7745     7799      +54
- Partials       1054     1062       +8

Impacted Files
Coverage Δ

...g/apache/shenyu/common/cache/MemorySafeLRUMap.java
18.75% <18.75%> (ø)

...ache/shenyu/plugin/global/cache/MetaDataCache.java
86.84% <83.87%> (-13.16%)
:arrow_down:

...admin/controller/ShenyuHttpRegistryController.java
77.77% <0.00%> (-22.23%)
:arrow_down:

...che/shenyu/sync/data/http/HttpSyncDataService.java
69.10% <0.00%> (-14.64%)
:arrow_down:

...yu/sync/data/http/refresh/AbstractDataRefresh.java
70.00% <0.00%> (-13.34%)
:arrow_down:

...ache/shenyu/plugin/grpc/cache/GrpcClientCache.java
87.50% <0.00%> (-12.50%)
:arrow_down:

...in/disruptor/RegisterServerDisruptorPublisher.java
52.94% <0.00%> (-11.77%)
:arrow_down:

...a/org/apache/shenyu/common/utils/VersionUtils.java
67.85% <0.00%> (-10.72%)
:arrow_down:

...henyu/plugin/grpc/resolver/ShenyuNameResolver.java
54.25% <0.00%> (-9.58%)
:arrow_down:

...rg/apache/shenyu/plugin/rewrite/RewritePlugin.java
50.00% <0.00%> (-5.56%)
:arrow_down:

... and 5 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 3d13efe...c87f3e3. Read the comment docs.


doc: Use Hubble version specified in stable.txt

Ref: https://github.com/cilium/hubble/issues/298
Signed-off-by: Michi Mutsuzaki<EMAIL_ADDRESS>

@Rolinh i'm not sure how to do this on windows...

Looks like the kubectl docs also didn't solve this. I don't have access to a Windows machine, but on wine, I can do the following in cmd.exe:
set /p HUBBLE_VERSION=<stable.txt
curl -LO "https://github.com/cilium/hubble/releases/download/%HUBBLE_VERSION%/hubble-linux-amd64.tar.gz"

@michi-covalent I'm not a Windows guy :)
However, I did get access to a Windows machine and can confirm that the instructions provided by @gandro do work just fine.
Let's add them!

thanks @Rolinh i also created a windows vm. testing it now

Coverage increased (+0.009%) to 37.112% when pulling 81c623b4a1ba468dfbd1f616552ab78a23c7eca4 on pr/michi/stable into 16907c4ba18e558d6118f0b4407ad5e2a67d0fe1 on master.


Master

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: JeffAMoore sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@MikeRayMSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@MikeRayMSFT Hi Mike, these file changes look good and desirable. But the Source branch being master seems odd to me. The Source branch should be either  a "patch" branch, or be FromPrivateRepo, I think (but I am unsure).

@jborsecnik Hi Jeff, Is this public PR appropriate in the BRANCHES is uses? This PR #3448 says the Source branch is master, but I do not think we do such things in the public repo (I am unsure, hopefully either MikeRayMSFT or craigg-msft or Huaping Yu = @huypub would know).
The file changes seem good, but the source branch seems odd to me, and might be reason to Close and never Merge this PR? Then its file changes should be reimplemented, because its intended file changes look correct.
Thanks. (GeneMi)

I've pulled the changes into a PR in the private repository and will review and merge from there. #please-close


Automatically reload when SSL certs change

Describe the feature
We have a system that automatically rotates SSL certs that are used in our RTMPS endpoint, however when the certs get updated they are not updated in mediamtx without restarting the service.  It would be a big QoL feature for the service to automatically reload these when they change.

support let's encrypt pls!

I don't think we should bundle an ACME solver into the project; there is other software that does that better.  But we should definitely support the outcome of auto generate Lets Encrypt certs.


Support for packets captured by Microsoft-Windows-Ras-NdisWanPacketCapture

Situation: Capturing packets traversing F5 VPN tunnel using DTLS Over PPP connection. Captured using Microsoft-Windows-Ra-NdisWanPacketCapture provider
Command line used to generate traces:
netsh  trace start tracefile=c:\working\netsh_tracev1.etl capture=yes report=disabled overwrite=yes provider=Microsoft-Windows-Ras-NdisWanPacketCapture
Output from ETL2PCAPNG:
PS C:\working> etl2pcapng netsh_tracev1.etl netsh_F5_trace_etl2pcapng.pcap
IF: medium=eth  ID=0    IfIndex=17
IF: medium=eth  ID=1    IfIndex=74
Converted 5113 frames
Only DTLS encrypted packets going over ppp tunnel are in PCAP file - PCAP file 4068KB
Output from Windows Message Analyzer Save-As->Export-All Messages>save
~10,078 frames+some none-network entries
Both DTLS encrypted packets as well as cleartext packets are in PCAP file

@nspitzer FYI, support has finally been added for the VPN events in v1.9.0. Thanks for your patience.


Open an issue with a link to the online version of my app

https://ghausalikhan.github.io/My-Portfolio/

Hi @GhausAliKhan 👋👋👋,

Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
Highlights✅✅

[x] Project is deployed using GitHub pages👍.
[x] Read has been updated with the live demo section👍.

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.