LSTM training with hiddens in training_step()

I am trying an LSTM network where I require in each training step the hidden value to be passed over to the next training step until the end of epoch. At the start of new epoch we reset by initializing the hidden to zeros. Following is how i do this,
def training_step(self, batch, batch_nb, hiddens):
        ...
        if batch_nb == 0: #init only in new epochs
            hiddens = self.model.init_hidden(self.hparams.batch_size)
        out, hiddens = self.forward(posts, hiddens)
        ...
        loss = self.criterion(out, targets)
        return {'loss': loss, 'hiddens': hiddens}

As per the docs suggest, I've added the truncated_bptt_steps argument to Trainer, but it does not work as expected. It gives the following exception,
AssertionError: Batch time dimension length is ambiguous
I've tried setting truncated_bptt_steps=2 to different values but what ever value i set it results in the same exception. How does one train LSTMs like this with PTL? What am i doing wrong here?
PTL version 1.1.2

Hey @bhashithe,
The error is being triggered there: https://github.com/PyTorchLightning/pytorch-lightning/blob/062800aa99cff6eb82838b355374305d9433507e/pytorch_lightning/core/lightning.py#L1260
Somehow, your hiddens don't have the right shape.
You can override this function to study in your LightningModule to understand what is wrong and add a custom behaviour.
If you think the bug is coming from us, please try to reproduce the behaviour with bug_report_model

Hey @bhashithe,
The error is being triggered there: https://github.com/PyTorchLightning/pytorch-lightning/blob/062800aa99cff6eb82838b355374305d9433507e/pytorch_lightning/core/lightning.py#L1260
Somehow, your hiddens don't have the right shape.
You can override this function to study in your LightningModule to understand what is wrong and add a custom behaviour.
If you think the bug is coming from us, please try to reproduce the behaviour with bug_report_model

I am figuring out whether this is because of the _split_batch function or the hiddens shape. Let me get back to you guys.

I am figuring out whether this is because of the _split_batch function or the hiddens shape. Let me get back to you guys.

@tchaton Thank you and you were spot on, I had to implement tbptt_split_batch function so that it behaves according to my data loaders.

@tchaton Thank you and you were spot on, I had to implement tbptt_split_batch function so that it behaves according to my data loaders.


Add license information

If this software is meant to be open source, could you kindly add licensing information? Many thanks.

Agreed, would be great if you could add a license

+1

License file added. Sorry for the delay - didn't get these notifications :(

Thanks!


[JN-543] implement image upload

DESCRIPTION
This adds an "Add image" and "update" buttons on the image manager which allow a user to upload files.

The "update" buttons will upload a new version of the existing image.  To see the update in the website, the user will then have to change the image version in the siteContent
TO TEST:  (simple manual steps for confirming core behavior -- used for pre-release checks)

redeploy ApiAdminApp
go to https://localhost:3000/ourhealth/studies/ourheart/env/sandbox/images
click "add Image"
choose an image file to upload
click upload
confirm the updated image can be found in the image list

Closing to reopen on a less merge-conflicted branch


disposer() doc doesn't show how to use it

http://bluebirdjs.com/docs/api/disposer.html
This is showing examples of how to implement the disposer, but nothing about its usage.
Should it be there? Or at least a link to Promise.using page?

Yes, feel free to make a docs PR :)

Is this update good enough? https://github.com/petkaantonov/bluebird/pull/944


execute db migrate error at flask-sqlalchemy 'dialects\mysql\base.py'

Hi:
I'm creating a flask project and I using the flask-migrate to managing the mysql based on flask-sqlalchey.
but when I execute the command 'python manager.py db migrate -m "inital migration"', I got errors like:
File "D:\ProgramData\Anaconda3\envs\books\lib\site-packages\sqlalchemy\engine\reflection.py", line 54, in cache
ret = fn(self, con, *args, **kw)
File "D:\ProgramData\Anaconda3\envs\books\lib\site-packages\sqlalchemy\dialects\mysql\base.py", line 1990, in get_table_names
self.identifier_preparer.quote_identifier(current_schema))
File "D:\ProgramData\Anaconda3\envs\books\lib\site-packages\sqlalchemy\sql\compiler.py", line 3063, in quote_identifier
self._escape_identifier(value) +
File "D:\ProgramData\Anaconda3\envs\books\lib\site-packages\sqlalchemy\dialects\mysql\mysqlconnector.py", line 97, in _escape_identifier
value = value.replace(self.escape_quote, self.escape_to_quote)
TypeError: <flask_script.commands.Command object at 0x0000017D6B2287B8>: a bytes-like object is required, not 'str'
Tracing the errors I found that maybe the function 'get_table_names' in  'dialects\mysql\base.py' file use an bytes object current_schema when calling the codes 'self.identifier_preparer.quote_identifier(current_schema))' at lines 1990, but this calling only receiving and handle an object which's type is str, that may not be a problem on python2x, but python3x it is a  bug.
Hope to get an official response and solution, thanks very much.

Per your stack trace, I believe you are confusing Flask-SQLAlchemy with SQLAlchemy.  Going to close this issue.  Please visit Stack Overflow for additional support with your issue.


Some suggestions for implementing zilsd extensions in gcc and binutils

Hi @christian-herber-nxp
The support for binutils（https://github.com/nxp-auto-tools/binutils_zilsd/tree/zilsd） is not perfect, lacking recognition of zilsd extension. In addition, compressed Load/Store pair instructions (c.ld, c.sd, c.ldsp, c.sdsp) are not distinguished from zilsd extensions, as zcmlsd extensions.
The support for gcc(https://github.com/nxp-auto-tools/gcc_zilsd/tree/zilsd), whether the zilsd extension is reasonable as part of the zi_subext ?.

thanks for your feedback. You had previously submitted an issue on the binutils project, and i think this is where it belongs. Here should be issues on what is contained in this repository, which is the specification itself. I am closing this issue here, and you can reopen the other one.
Fyi, we are currently working on adding the notion of Zcmlsd. The current version of binutils was based on a previous version of the spec.


Use a centrally configured ca-bundle where one is available.

Using an example of a RHEL 7.4 Server and AWS CLI:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
# uname -a
Linux ip-10-30-1-172.ec2.internal 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
# aws --version
aws-cli/1.14.3 Python/2.7.5 Linux/3.10.0-693.el7.x86_64 botocore/1.8.7

Botocore includes it's own cacert.pem file:
/usr/lib/python2.7/site-packages/botocore/vendored/requests/cacert.pem
However RHEL 7 has a centrally managed ca-bundle located at:
/etc/pki/tls/certs/ca-bundle.crt
The Python 'requests' library included with RHEL (python-requests-2.6.0-1.el7_1.noarch) has over-ridden the default certificate location in certs.py and refers to the central certificate bundle.
Contents of /usr/lib/python2.7/site-packages/requests/certs.py:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
certs.py
~~~~~~~~

This module returns the preferred default CA certificate bundle.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.

We return "/etc/pki/tls/certs/ca-bundle.crt" provided by the ca-certificates
package.
"""

try:
    from certifi import where
except ImportError:
    def where():
        """ Don't use the certs bundled with requests, use ca-certificates. """
        return "/etc/pki/tls/certs/ca-bundle.crt"

if __name__ == '__main__':
    print(where())

Users expect that updates made to their central ca-bundle using the 'ca-certificates' tooling would be respected by botocore.  Can botocore use the requests library that comes with the O/S?  Or can some logic be added if there is an existing requests library to use its certs.py routine to locate the ca-bundle?
A simple workaround at present would be a symlink:
ln -sf /etc/pki/tls/certs/ca-bundle.crt /usr/lib/python2.7/site-packages/botocore/vendored/requests/cacert.pem
Thanks!

Botocore already supports custom CA_BUNDLE either at the environment variable layer or the client construction layer. You can provide a path to the verify kwarg on the botocore client described here.
Or you can use the AWS_CA_BUNDLE environment variable described here.
Is that what you were looking for?

I was aware of the environment variables thanks!
For distributions that are . . .

Unifying their CA bundles into a single location with tooling to manage.
Modifying the Python requests library to point to that single location.

. . . that it would make sense to use / respect those configurations versus having to manage environment variables.  TLS intercepting proxies are becoming more and more common in enterprise environments, and it would make sense to play along as the various distributions start to address the central bundle use-case.

The bundled cert is only used by botocore when connecting to AWS services, and it doesn't affect other python scripts.  We also allow you to override this var if needed (via the AWS_CA_BUNDLE as @stealthycoin mentions).
If this starts to cause issues for customers this is something we can take another look at.  For the time being though, changing the default behavior is challenging without affecting existing customers.


Place grip icon first by setting order to a negative value.

Setting the grip icon's order to -1 (or something ridiculous like -99) would then allow the icon to always appear at the top in that corner regardless of what other icons other modules add.

That's a good idea.


Revert "Add BEP to CI"

Reverts TraceMachina/nativelink#1124
Breaks on main.

This change is

Resolved.


Selenium updated to the latest version & readme updated to reflect th…

Description
Our Selenium test suite was failing due to Chrome driver issues. The issue occurred because of the Chromium team restructuring their drivers for the new Chrome-for-Testing drivers.
Fix:

I upgraded Selenium to its latest version of 4.11.2 from 4.10.0. It fixed the Chrome driver issues. I also updated my local Chrome browser to the latest version of 116.0.5845.96 to ensure there are no errors.
The README has also been updated to reflect the changes.

If you have not checked any of the lists below explain why here.
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Technical Enhancements

Checklist:
If any of these are not completed, please explain why in the notes.
Code comment not necessary in this instance.
Definition of Done
Code and merges

[ ] Code to be commented on where applicable
[x] Documentation updated where required
[x] Have considered non-functional requirements such as Security, Performance, Scalability, and Fault Tolerance
[x] I have linted the code

Testing

[x] All levels of acceptance test are passing (automated, integration, manual, accessibility, etc.)
[x] I have run the behave command to check the selenium behaviour tests pass locally
[x] Acceptance criteria met

Other Checks

[x] I have performed a self-review of my own code
[x] I have checked for spelling errors
[ ] I have commented on my code, particularly in hard-to-understand areas
[x] My changes don't break anything unexpected
[x] I have checked and updated the security.txt file where required
[x] Up to date with the main branch

DEPLOY_URL=https://dup2kzo1n7yqj.cloudfront.net/
cloudfront_id=E10GBS60QQK66X

DEPLOY_URL=https://dup2kzo1n7yqj.cloudfront.net/
cloudfront_id=E10GBS60QQK66X

Hi mate this is similar to you other PR?
Also has this been tests locally?
Good work though :)

Hi mate this is similar to you other PR?
Yes, it's because I also wanted to use Poetry in this branch to make things easier instead of Pipenv as we aren't using that anymore.
Also has this been tests locally?
The tests are all passing locally =) You can pull down this branch and test it for yourself. README is also updated to show how to run the tests per the changes you made last time ;)
Good work though :)

Nice will test it now

DEPLOY_URL=https://dup2kzo1n7yqj.cloudfront.net/
cloudfront_id=E10GBS60QQK66X


feat: sdk pointer event toggle highlight

WHY
Currently scenes have no control over the automatic shader highlighting that happens on interractable objects (pointer event entities).

Minor change on showFeedback usage to also avoid enabling the highlight if it's false, as the highlight is also the feedback
Minor check to avoid enabling the hoverText if the component comes with that property with an empty string. Didn't touch the existent behaviour of not coming with that optional property that ends up using the default "Interact" hover text.

Tackles: https://github.com/decentraland/creator-hub/issues/160
Related PRs:

https://github.com/decentraland/protocol/pull/224
https://github.com/decentraland/js-sdk-toolchain/pull/1024

QA TEST INSTRUCTIONS

Download test scene and uncompress it somewhere
Enter the scene root folder and run npm i and then npm run start -- --explorer-alpha
Close the Explorer that auto-opened. Leave the scene running in the console/terminal.
Download the build from this PR and connect it to the running scene using the console command according to your OS
Once the scene loads, put your cursor on each one of the "pointer event cubes" and confirm that they have either the HIGHLIGHT/GLOW and the HOVER TEXT enabled/disabled according to the text shape on top of each cube. (The actual hover text value of each cube can be ignored, it's only important to see if the text appears or not)

I'll update the protocol package to point to the latest published one after the other related PRs are merged.


Migrate 2.x website to Antora

This PR migrates the asciidoctor-maven-plugin-based current website in 2.x to Antora with several other improvements.
Rationale
Developers love AsciiDoc, but asciidoctor-maven-plugin falls short on addressing our needs to build a website from ~70 AsciiDoc files. In particular, the navigation (creating an overarching menu, breadcrumbs, etc.) is problematic; there is no easy way to tell the user at which level of the hierarchy they are standing at. Antora, the de facto offline site generator for AsciiDoc, address all these shortcomings and more.
Deliverables
This PR implements the following deliverables

Website is migrated to Antora
All Javadoc links are fixed
All inter-page links are fixed
All AsciiDoc and Antora warnings are fixed (that is, since all inter-page links are migrated to xref, they are checked as a part of the site goal!)
All unused src/site files are removed
Added navigation for the in-page sectioning, i.e., Table-of-Contents (this wasn't possible when using maven-site-plugin)
Auto-generated release notes is re-worked to avoid cluttering the Git history. Now it only runs during the pre-site phase and outputs to target/generated-site instead. That is, compiled src/changelog will not be dumped to src/site anymore.
Auto-generated constants.adoc is directed to target/generated-site too (similar to release notes explained above)
log4j-docgen-asciidoctor-extension is ported to JavaScript to work as a Asciidoctor.js extension (since that is what Antora uses)
No web server is needed to view the generated website anymore, you can instead simply open target/site with your browser

Review kit
Don't be put down by the amount of changed files. Many are either removed (_release_notes, src/site/resources/css, etc.) or slightly changed.
How to build and view the website?
# `compile` goal is necessary to generate `log4j-docgen` plugin descriptors to `/target/plugin-descriptors`.
# We use these descriptors to generate
# 1. the plugin reference page of manual
# 2. `/target/log4j-config.xsd` covering all plugins
./mvnw clean install -DskipTests

# Build the website
./mvnw site

# To view the generated website, simply open `/target/site` with your browser – no local web server is needed.

@garydgregory shared some remarks in Slack. I will address them here.

I get a 404 for the API and Implementation Javadocs.

Right. Fixed in 391e4ce2ae57152f144a5a6ed800d30d4713e90f.

The MongoDB page linked from the left-hand menu is missing all the information from the current site. There is no MongoDB 3 either. This makes me wonder what else is missing.

It is not missing any. It has the identical content that we have today: https://web.archive.org/web/20231225134825/https://logging.apache.org/log4j/2.x/log4j-mongodb4.html
If you are looking for the one in Manual > Appenders > NoSQLAppenderMongoDB4, it is still there.

JMS Appender is… where? OMG, all the Appenders are ALL buried on ONE page: plugin-reference. Yikes. I expect to see a left-hand menu item for each Appender, Layout, and so on, just like the current site.

Gary, I think you have a misunderstanding. Let me try to clarify certain things.

Components [left] menu in Antora is identical to the one we have today. You can browse to our current website (see the Components menu section on left?) and compare it yourself. If you find a difference, I would be happy to correct them.
We still have hand-written pages for appenders, layouts, filters, etc. in the manual. They are exactly at their same URL, nothing changed.
Plugin reference, as it is stated at the beginning of that page, is Javadoc-on-steroids. Instead of a fully-blown Javadoc of individual modules, it combines all modules and only exposes plugin-related information and nothing else. Right now, we have a Javadoc in FooAppender.java and a section for Foo appender in appenders.adoc. Plugin reference enables us to consolidate this information in one place: Javadoc of FooAppender. This not only helps with avoiding to duplicate the documentation effort, but also captures the configuration parameters precisely right from the sources. No more "Oh, source code actually has a timeoutMillis field, but it is incorrectly documented as timeout", or "Oh, there is actually a timeoutMillis field the user is asking for, but it is not even documented", etc.

Based on the above, IMO, you don’t need both a separate Manual and a Plugin Reference as siblings in the left-hand menu. A reference should be IN a manual.

Yes, and no. Plugin reference is generated from the source code. It might not contain the most easy-to-understand introduction. OTOH, manual is hand-written. @ppkarwasz and my long-term plan is to link to plugin reference from manual, instead of duplicating the content there. For instance, manual should not explain the configuration options of PatternLayout, instead give a brief explanation, share some use cases, examples, etc., and point to the plugin reference for details.

Regardless, I should still be able to drill down the left-hand menu for all features.

2.x-docgen-antora structure is identical to what we have today. We are not worsening the situation. If you think it can be improved, sure, please go ahead. But I don't find this a blocker for this particular PR.

The red styling for code is bad IMO. For me read == error. No IDEs I know use red code Strings for example.

Right. I will see what I can do about it.

It’s a bummer that the left hand side menu tree is always redrawn as (mostly?) collapsed, I want to leave the nodes I opened open!

Agreed. That is a styling issue, and I prefer to tackle that later on.

It’s a bit odd to have a top-level menu item called “Get”, instead of “Download”.

Yes, because I wanted it to contain the following sub-menus:

Download
Runtime dependencies
Release notes

Since, there is already a Download, I cannot call it Download. If you have a better suggestion, please say so.

Sometimes XML is styled, sometimes it is not (the FAQ page for example)

Right. This is due to the fact that the original source (Markdown, XDoc, etc.) was not indicating the language. I fixed whatever I can find in 234ac805d8c5e426958f6c5e06b9dcfbc9652cb7.

“Internal components” is not good, I would say that one is not supposed to use “Internal components”, a better name might be “Log4j components” or “Self-hosted components” (kinda lame)

Improved the navigation in 205f61725a081dba8ba83978d2c724491b87db00.


Add a template project to work on the library

This is a simple android project, the important part is the build files of the 'constraintlayuout' and 'solver' modules. The sources point to the actual source code for the library, to be able to edit and build the library in an Android project.
Note that the 'app' module build file does not include the external constraintlayout library.


Any way to store sessions not in sql lite db?

I'm planning to make sort of "cloud" client. I need store sessions not in local sql lite db. I could not find such feature in api https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1tdlib_parameters.html
If this is not possible, at least need to know when need I copy local files into cloud.
Did I need to wait till connection closed or have some handlers?
PS: I use .net version

If you want to build a really "cloud" client, you will need to store everything on server and there is no difference, whatever is used for the database. The only thing you will need is to transfer updates from a server to a client and transfer requests from a client to a server. It is very dangerous to copy the database even after the library is closed and the database definitely shouldn't be backed up while TDLib is run.

I need copy session db between cloud servers in case of disaster (server down, network down etc). This means that I need fresh copy at central storage in any case,
SQL Light have ability to backup online db, so this is not a problem.

I need only to know when need I backup db to be sure that I have latest version and does not do useless backups too often.
But better to NOT backup sqllite but store sessions directly in my cloud storage, so if tdlib have some storage interfaces - will be best option.


rename UI developer to Frontend UI Developer

Frontend Developer to Frontend/React Developer

https://css-tricks.com/the-great-divide/

markup - frontend developer
js - frontend/react developer


Reportback caption display

Shows the new caption under the crop preview and keeps the main caption field hidden. Fixes #3911
@DoSomething/front-end

Snazzy! :+1:


Astra Connector needs a truncate operation

Describe the bug
When I use the Astra Connector widget, it would be great if it had an option in a submenu to "truncate" the collections.
Version:
Starting Langflow v1.0.0a33...
When working back and forth with a flow that had an astra connection, the first couple of iterations usually end up with the wrong content stored in the DB. Astra supports a high-performance "delete everythign in a table" operation called TRUNCATE that can be used to clear out unwanted test data with a click.
Obviously this should be in a sub-menu and include a "Are you sure?" confirmation dialog given the stakes of performing this operation.

Hi @zznate
Do you need any assistance with this case? If not, please let us know if this issue can be closed.

Thank you for your contribution! This issue will be closed. If you have any questions or encounter another problem, please open a new issue and we will be ready to assist you.


Recursive process.nextTick crash

No way to build zip archive (app running on expressjs), because process.nextTick crashes:
RangeError: Maximum call stack size exceeded

Here's an error stack:
node.js:375
        throw new Error(msg);
              ^
Error: (node) warning: Recursive process.nextTick detected.
This will break in the next version of node.
Please use setImmediate for recursive deferral.
 at maxTickWarn (node.js:375:15)
 at process._nextDomainTick (node.js:498:9)
 at ZipStream._read (node_modules/express-zip/node_modules/zipstream/zipstream.js:80:11)
 at node_modules/express-zip/node_modules/zipstream/zipstream.js:80:38
 at process._tickDomainCallback (node.js:459:13)

Fixed in 2.0.0 by #5.


pkgdev manifest: add a target to remanifest modified files

Repoman has a neat --if-modified=y option to remanifest the packages that are modified in the current working directory. I would find it useful if pkgdev had something similar.

Notes to myself:
We can use git status --short --porcelain "${@}" to get list of all file changes in the passed args, over which we can extract the package directories to pass to manifest.


PHP 8

Support for PHP 8 is available and has been tested.
However, Travis CI doesn't seem to support PHP 8 just yet so the build is failing. Until all tests has been passed I will not put out a new release.
In the meanwhile – if PHP 8 support i critical, require the hash bfd6e8a on dev-master. I.e:
composer require olssonm/l5-very-basic-auth:dev-master#bfd6e8a

v6.5 is now released with support for PHP 8.


Migrate from master to main branch

Use of the master and slave terms in the computer industry is
widespread, but has been recently discouraged, as it was brought to
attention that the terms may be considered offensive.
GitHub has already moved their default repositories from the master
to main in many places. We're planning to do the same for our
repositories, this however requires some changes in the code.
After the proposed changes get merged to the master branch, the
repository should be ready for the migration from master to main.
To migrate from master to main:

Do a local branch rename with git branch -m master main
Push the renamed branch git push -u origin main
In the Github repo settings, rename the default branch: Settings ->
Branches -> Default branch -> (pencil icon) -> (change master to
main) -> (approve)

After migration other contributors should update their local repositories:
git branch -m master main`
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

I wasn't sure whether to update links in the docs/rfc/rfc-13-continuous-delivery.adoc that reference master branch. I haven't done so, but can change that if needed.


Read Status

Hi, my SecvestIP works almost perfectly with this plugin with these settings:
{
        "accessory": "Http-SecuritySystem",
        "name": "Alarm",
        "auth": {
            "username": "user",
            "password": "pw",
            "immediately": true
        },
        "http_method": "GET",
        "urls": {
            "stay": { "url": "http://LocalIP/setMode.cgi?Mode=Set&Source=Webpage", "body": "Anwesend" },
            "away": { "url": "http://LocalIP/setMode.cgi?Mode=Set&Source=Webpage", "body": "Abwesend" },
            "night": { "url": "http://LocalIP/setMode.cgi?Mode=Set&Source=Webpage", "body": "Nacht" },
            "disarm": { "url": "http://LocalIP/setMode.cgi?Mode=Unset&Source=Webpage", "body": "Aus"},
            "read": { "url": "http://LocalIP/getMode.cgi?Source=Webpage", "body": "" }
                }
}

...but I have problems reading or to be more precise translating the current status. The SecvestIP delivers as result of the URL call above "Mode=Unset". Is there somehow a way to translate the result to the plugin, so that the real status is shown to homekit?

Unfortunately I do not know SecvestIP at all. Do I understand you correctly, is the problem that the device is sending back the string "Mode=" instead of a number when you try to read its current state?

Right. The string Mode= is to much and I'm not sure weather the Secvests "set" and "unset" is a useful phrase for showing the current state. Some kind of translation is needed.

Well, I guess you will have to modify the source a little bit to get those strings translated.
In index.js there is a getState() method. Line 113 is this:
var state = parseInt(responseBody);
This is the line that reads the response and transforms it to a code HomeKit understands. Which is not much of a translation, it just parses it as a number. You will have to change this part of the script. Instead of parsing the body as an integer, you will have to check if it looks anything like 'Mode=something' and based on the 'something' part you will have to set the state to the corresponding number (0 to 5).
If you need help with this code just let me know and I'll write it up for you quick.

Thanks for your offer. Indeed any help would be appreciated, since I'm not very familiar with coding. The messages from the alarmsystem are
Mode=Set or
Mode=Unset
Again, thank you for your help.

So, here is a piece of code you should try:
On line 113 of index.js you currently find this:
var state = parseInt(responseBody);
Replace this line with the following lines:
var mapping = {
    'Mode=Set': 1,
    'Mode=Unset': 3
};

var state = responseBody in mapping ? mapping[responseBody] : parseInt(responseBody);

This will translate Mode=Set to value of 1, Mode=Unset to value of 3. You may want to extend the mapping with more values if you figure out what your security device returns when it has been alarmed, or when it is in different away modes (it has 3 distinct one, see the main page of this project for the values)

Thank you so far. It seems that EVE shows the status correctly, when I start my scene to activate or deactivate the alarm (not sure if that was before the same). Home app does not, I guess because it can only show these on off situations and not your 4 states, right? I'm not able to launch the homebridge with the ReadCurrentState, ReadTargetState properties. Maybe this should do the trick. When launching it I get the same error as in another (solved) issue is documented, on which you recommended to use the read property instead of readCurrent/TargetState.

[7/28/2016, 5:08:20 PM] Loading x accessories...
[7/28/2016, 5:08:20 PM] [Home security] Initializing Http-SecuritySystem accessory...
/usr/local/lib/node_modules/homebridge-http-securitysystem/index.js:32
url: config.urls.read.url,
^

TypeError: Cannot read property 'url' of undefined
at Object.HttpSecuritySystemAccessory (/usr/local/lib/node_modules/homebridge-http-securitysystem/index.js:32:25)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:244:29)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:72:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)

Another weird thing is that when I set the alarm in the SecvestApp, and request the status in EVE, the homebridge shows State is currently NaN

Can you give me the error as you get it? The one you pasted in is from the issue we solved last year. Back then the property was still 'read' but it has been changed to 'readTargetState' and 'readCurrentState' since.
Posting your current config would also help. Don't forget to  remove the pass ;)

This is my error when using the readCurrent/TargetStates.
`[2017-6-11 11:53:53] [Alarmanlage] Initializing Http-SecuritySystem accessory...
/usr/local/lib/node_modules/homebridge-http-securitysystem/index.js:32
url: config.urls.read.url,
^
TypeError: Cannot read property 'url' of undefined
at Object.HttpSecuritySystemAccessory (/usr/local/lib/node_modules/homebridge-http-securitysystem/index.js:32:25)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:265:29)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
`
and this is my config
{             "accessory": "Http-SecuritySystem",             "name": "Alarmanlage",             "auth": {                 "username": "abc",                 "password": "abc",                 "immediately": true             },             "http_method": "GET",             "urls": {                 "stay": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "Anwesend" },                 "away": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "Abwesend" },                 "night": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "Nacht" },                 "disarm": { "url": "http://ip:portsetMode.cgi?Mode=Unset&Source=Webpage", "body": "Aus"},                 "readCurrentState": { "url": "http://ip:port/getMode.cgi?Source=Webpage", "body": "" },                 "readTargetState": { "url": "http://ip:port/getMode.cgi?Source=Webpage", "body": "" }                     }     },

When I use read instead of readCurrent/TargeState homebridge starts correctly but posts
[2017-6-11 12:02:25] [Alarmanlage] Getting target state
[2017-6-11 12:02:25] [Alarmanlage] Getting current state
[2017-6-11 12:02:25] [Alarmanlage] State is currently NaN
[2017-6-11 12:02:25] [Alarmanlage] State is currently NaN
from time to time

Hm to me it looks like you are not running the latest version of homebridge-http-securitysystem. The latest version does not rely on "read" any more. Can you try updating it?

Just tried sudo npm uninstall -g homebridge-http-securitysystem and sudo npm install -g homebridge-http-securitysystem as well as sudo npm update -g homebridge-http-securitysystem...did your "var state" tweek above...nothing changed

Well, I managed the update of the index.js now by hand and the readCurrent/TargetState configurations work as well in my config. It seems that the home app still doesn't show up the correct state and I still got these messages from homebridge
[2017-6-11 13:24:16] [Alarmanlage] Getting target state
[2017-6-11 13:24:16] [Alarmanlage] Getting current state
[2017-6-11 13:24:16] [Alarmanlage] State is currently NaN
[2017-6-11 13:24:16] [Alarmanlage] State is currently NaN
This is my config
{
"accessory": "Http-SecuritySystem",
"name": "Alarmanlage",
"username": "abc",
"password": "abc",
"immediately": true,
"http_method": "GET",
"urls": {
"stay": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "" },
"away": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "" },
"night": { "url": "http://ip:port/setMode.cgi?Mode=Set&Source=Webpage", "body": "" },
"disarm": { "url": "http://ip:port/setMode.cgi?Mode=Unset&Source=Webpage", "body": ""},
"readCurrentState": { "url": "ip:port/getMode.cgi?Source=Webpage", "body": "" },
"readTargetState": { "url": "ip:port/getMode.cgi?Source=Webpage", "body": "" }
}
},
And here is your getState function from the index.js
`getState: function(url, body, callback) {
if (!url) {
callback(null);
}
            this.httpRequest(url, body, function(error, response, responseBody) {
                    if (error) {
                            this.log('GetState function failed: %s', error.message);
                            callback(error);
                    } else {

var mapping = {
'Mode=Set': 2,
'Mode=Unset': 3,
'Mode=Alarm': 4
};
var state = responseBody in mapping ? mapping[responseBody] : parseInt(responseBody);
this.log("State is currently %s", state);
callback(null, state);
}
}.bind(this));
},`
Any idea?

I'll have to check up on why npm didn't update it to latest when you told it so. Anyways, I'll need some more debug output to tell what's wrong. Can you please put the following line into index.js, just before the line with "var mapping..." (so that it's still in the same else clause but before the definition of the mapping):
this.log("getState response was [%s]", responseBody);
Then ask for the state and tell me what your logs say.

This is the result
[2017-6-11 17:46:58] [Alarmanlage] Getting target state
[2017-6-11 17:46:58] [Alarmanlage] Getting current state
[2017-6-11 17:46:58] [Alarmanlage] getState response was [Mode=Unset
]
[2017-6-11 17:46:58] [Alarmanlage] State is currently NaN
[2017-6-11 17:46:58] [Alarmanlage] getState response was [Mode=Unset
]
[2017-6-11 17:46:58] [Alarmanlage] State is currently NaN

Maybe this gives a more detailed view on what's coming from the alarm system

Ah there is a new line char after Mode=Unset! Try trimming the response body when getting the translation from the map:
At the same spot where you previously added that log line, add this:
responseBody = responseBody.trim();
I think this will remove the newline from the response.

For your information, I added a feature that allows you to map responses to the HomeKit states using the config.js. Check out the develop branch for it, it will allow you to do this mapping without you having to change the plugin itself (just use the static mapper).

That is a great update. But how do I handle the trim function of the response body in the config?


Move away from azure-devtools test exceptions

Description
This PR moves test-specific exceptions away from azure-devtools and into devtools_testutils. In the process, a few outdated references to azure-devtools are also removed from some test infrastructure.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.

/check-enforcer override


Plugin stopped connecting to Tuya API (CN)

Describe the bug
Some time ago I found that my installation stopped working since it cannot connect to the Tuya API. I think it may be related to the APi domain used to connect https://github.com/tuya/tuya-homebridge/blob/master/lib/tuyashopenapi.js#L5 which is https://openapi.tuyacn.com. I tried to connect to it and it fails. Whereas I can connect to https://openapi.tuyaus.com. The logs are:
Initializing TuyaPlatform...
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/iot-01/associated-users/actions/authorized-login, params = null, body = {"country_code":1,"username":"***","password":"****","schema":"smartlife"}, headers = {"t":"1629211919936","client_id":"****","nonce":"****","Signature-Headers":"client_id","sign":"***","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.0"}
Error: connect ETIMEDOUT <IP_ADDRESS>:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)

Expected behavior
It should connect to the API. Probably it should use different domains depending on a region.

@Hanh94 It is a blocker

Also running into this. Definitely a blocker.
I had to manually override the DEFAULT_ENDPOINT to use the US server and it's working now, there should be a way to override this value from config.
https://github.com/tuya/tuya-homebridge/blob/master/lib/tuyashopenapi.js#L5


Updates for OneHotEncoder in newer SKL versions

Working on #684
Prototype for ints works, todo strings, then more cases to cover, in progress

Codecov Report

Merging #696 (ed45c21) into main (ea84cc5) will decrease coverage by 0.34%.
The diff coverage is 60.78%.

@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
- Coverage   90.14%   89.80%   -0.34%
==========================================
  Files          80       80
  Lines        4625     4669      +44
  Branches      848      863      +15
==========================================
+ Hits         4169     4193      +24
- Misses        259      275      +16
- Partials      197      201       +4

Flag
Coverage Δ

unittests
89.80% <60.78%> (-0.34%)
:arrow_down:

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

Impacted Files
Coverage Δ

...tor_converters/_one_hot_encoder_implementations.py
76.59% <56.52%> (-19.64%)
:arrow_down:

.../ml/operator_converters/sklearn/one_hot_encoder.py
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Minimize Database Connections for Emissions Bulk Load Import

The emissions bulk load import is bulk loading each table per parent record creating thousands of connections/trips to the database. Refactor to prep data and push all records to an array per table and then bulk load each table once for all records in the file being imported

Addressed in separate tickets in the emissions module backlog


openal: 1.19.0 -> 1.19.1

Motivation for this change
Changes: https://github.com/kcat/openal-soft/blob/master/ChangeLog
Also fetch from kcat's openal-soft official GitHub repository, since
upstream's website http://kcat.strangesoft.net/openal.html is down.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg eval

@GrahamcOfBorg build love

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: love
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: love
Partial log (click to expand)
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2
shrinking /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2/bin/love
shrinking /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2/lib/liblove.so.0.0.0
gzipping man pages under /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2/lib  /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2/bin
patching script interpreter paths in /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2
checking for references to /build in /nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2...
/nix/store/6bbhk27mdbhvinh05j53ys9s12h7sdjm-love-0.10.2

Success on aarch64-linux (full log)
Attempted: love
Partial log (click to expand)
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2
shrinking /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2/bin/love
shrinking /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2/lib/liblove.so.0.0.0
gzipping man pages under /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2/lib  /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2/bin
patching script interpreter paths in /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2
checking for references to /build in /nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2...
/nix/store/wa9xdzr9c28dxq3jxi63k33c71q73jps-love-0.10.2


Add analytics tests

Depends on #274

Pull Request Test Coverage Report for Build 1197

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.7%) to 72.081%

Totals

Change from base Build 1192:
1.7%

Covered Lines:
3377

Relevant Lines:
4685

💛  - Coveralls


Improved object instantiation

Needed:

IsList instance for Attrs (not currently possible as far as I see)
Sorted list for Attrs

Once we have these, it will be possible to implement a much simpler smart
constructor for objects that guarantees ordering. The sorted list for Attrs
would guarantee that there is a single constructed form for the objects.
Much easier to guarantee Pattern-Object compatability then since Patterns
implement rearrange.
  let
    obj0 def =
        new [manager,exiter,getter,setter,store def]

    obj1 def =
        new [store def,setter,getter,exiter,manager]

    defaultState =
        0 :: Int

  in
    typeOf (obj0 defaultState) == typeOf (obj1 defaultState) === True

I attempted to lift Fingerprints to the type level, but failed. I feel
a type Nat representation of a Fingerprint is an important extension of
the typeable interface. I assume Fingerprints are hash-based and could
thus be witnessed by Template Haskell; this is a possible approach.

The current mechanisms are sufficient for constructing complex objects. Further modifications to construction should be in a layer higher than that of Ef itself in which this level of management of complex instantiation should be controlled.


Multiple issues with TOC, Content and formatting for Blazor components

I  was trying to find information on doing Radio buttons in server-side Blazor, and hit this page and finding many problems.
In the TOC, when I click on anything between InputCheckBox and InputText area, it does not go to anything with the corresponding heading, and the highlighted item in the TOC appears to be a random one in that group. In particular, clicking InputRadioGroup takes you to a table listing a number of components, and that table doesn't include anything related to radio buttons. In fact, If I use browser Find "InputRadioGroup", it exists nowhere on the page, so I'm left in the dark about these components.
What I do find about radio buttons appears to be basic cshtml razor information, and nothing about the Blazor components.
misc issues:

Some of the examples of razor source are tagged csharp (example under Business logic validation), and some tagged as razor
Syntax highlighting in razor samples appears to be random - very broken (I don't see how to include a screen snip).

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: eef47457-c8cf-74a4-b884-c1fe5c2ef52d
Version Independent ID: 09a02d10-2834-467d-d8c2-3fd19ceb3863
Content: ASP.NET Core Blazor forms and validation
Content Source: aspnetcore/blazor/forms-validation.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

In the TOC, when I click on anything between InputCheckBox and InputText area, it does not go to anything with the corresponding heading

The section it links is the coverage at this time, then the links off to the API docs take over. There aren't individual sections for each one because they're implemented and behave similarly.

highlighted item in the TOC appears to be a random one in that group

It's due to the way in which the ToC attempts to automatically highlight when there aren't sections.
To deal with this ... and further clarify based on your last remark ... I'll create sections. It will clear up both situations.

InputRadioGroup takes you to a table listing a number of components, and that table doesn't include anything related to radio buttons

Set the forms topic version to 5.0 ...

It's a point-in-time problem during preview. This one will resolve on its own when we reach 5.0 GA.
What I might do is add a "(5.0 Preview)" in the ToC sidebar. At least that will provide a hint until we get there.

basic cshtml razor information

That's correct for the current release.

Some of the examples of razor source are tagged csharp

Yes ... those two are 🐞 ... I'll fix them up. The reason that happened is because they WERE just C#, then there was an update (by me 🙈) to make them components without updating the code language. Thanks for the heads-up. They're 😈 sneaky 😈.

Syntax highlighting in razor samples appears to be random - very broken

I'll take a look and fix up anything that I find.
Thanks for writing in on these! I'll get them squared away quickly ... either this evening for first thing Tuesday morning.

Thanks, Luke!
I’m in ASP.NET Core 3.1, not 5 Preview:
<EMAIL_ADDRESS>So the TOC is pretty messed up if 5 Preview stuff is showing up in 3.1 content.
Colorization issues look to be Support colorization of the @code directive for Razor components · Issue #17296 · dotnet/AspNetCore.Docs (github.com)https://github.com/dotnet/AspNetCore.Docs/issues/17296
Open since March. Although this issue talks only about @code, the issue duped to it is more comprehensive and would be better as the master, because razor syntax highlighting is seriously broken throughout the docs, and not something an author can address because the issue is in the .razor highlight.js highlighter.
This kind of rendering is pervasive:
<EMAIL_ADDRESS>From: Luke Latham<EMAIL_ADDRESS>Sent: Monday, September 14, 2020 10:08 AM
To: dotnet/AspNetCore.Docs<EMAIL_ADDRESS>Cc: Paul Dempsey<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [dotnet/AspNetCore.Docs] Multiple issues with TOC, Content and formatting for Blazor components (#19850)
In the TOC, when I click on anything between InputCheckBox and InputText area, it does not go to anything with the corresponding heading
The section it links is the coverage at this time, then the links off to the API docs take over. There aren't individual sections for each one because they're implemented and behave similarly.
highlighted item in the TOC appears to be a random one in that group
It's due to the way in which the ToC attempts to automatically highlight when there aren't sections.
To deal with this ... and further clarify based on your last remark ... I'll create sections. It will clear up both situations.
InputRadioGroup takes you to a table listing a number of components, and that table doesn't include anything related to radio buttons
Set the forms topic version to 5.0 ...
[Capture]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F1622880%2F93115798-01869500-f682-11ea-8cd4-e66f192ba9a3.PNG&data=02|01|Paul.Dempsey%40microsoft.com|8e9e300376e64fdcb37808d858d0c486|72f988bf86f141af91ab2d7cd011db47|1|0|637357000971388254&sdata=n0ulXCwS2Ni7N6zlPbHz6AfcifYursMs8cpRH1wcuHE%3D&reserved=0
It's a point-in-time problem during preview. This one will resolve on its own when we reach 5.0 GA.
What I might do is add a "(5.0 Preview)" in the ToC sidebar. At least that will provide a hint until we get there.
basic cshtml razor information
That's correct for the current release.
Some of the examples of razor source are tagged csharp
Yes ... those two are 🐞 ... I'll fix them up. The reason that happened is because they WERE just C#, then there was an update (by me 🙈) to make them components without updating the code language. Thanks for the heads-up. They're 😈 sneaky 😈.
Syntax highlighting in razor samples appears to be random - very broken
I'll take a look and fix up anything that I find.
Thanks for writing in on these! I'll get them squared away quickly ... either this evening for first thing Tuesday morning.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2FAspNetCore.Docs%2Fissues%2F19850%23issuecomment-692190477&data=02|01|Paul.Dempsey%40microsoft.com|8e9e300376e64fdcb37808d858d0c486|72f988bf86f141af91ab2d7cd011db47|1|0|637357000971398248&sdata=ZhdZr8tvLkLMLiUeAIaRYnNiGeNU8KwVmW3TPpFvfP4%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF7S4CQM6P5GSF6M75D6DF3SFZEX5ANCNFSM4RL2KSJQ&data=02|01|Paul.Dempsey%40microsoft.com|8e9e300376e64fdcb37808d858d0c486|72f988bf86f141af91ab2d7cd011db47|1|0|637357000971398248&sdata=9D6%2FirrJm8iY5Qmp1G0NpKc7mecRMya3uO%2Bgcoz0bac%3D&reserved=0.

So the TOC is pretty messed up if 5 Preview stuff is showing up in 3.1 content.

It's a rock and a hard place scenario at the moment. I don't have a lot of options. We can't version content within a topic to show up in the ToC or not. We can only version whole topics to show up or not. I think adding a little 5.0 mention is the best we can do at the moment. The alternative would be to drop those entries until 5.0 GA, but that comes with its own pain ... it hides the new features.

Open since March. Although this issue talks only about @code, the issue duped to it is more comprehensive and would be better as the master, because razor syntax highlighting is seriously broken throughout the docs, and not something an author can address because the issue is in the .razor highlight.js highlighter.

I recommend pinging Scott on that issue. He works directly with them on a variety of doc build system issues. It's probably tracked by an internal engineering issue, and he might be able to let you know where it all stands.


Report multiple unrelated errors at once?

I see a couple of ways of doing this. The most naive is to use try_with in the driver to resume elaboration after a definition fails, but the UX seems like it could be suboptimal, as you could end up in a situation with a bunch of cascading errors.
Maybe there is some solution that uses a sort of error dependency graph, but I think it's a good idea to try and work out what behaviour we want here.

I'm closing this now because the use case seems to be collecting multiple unrelated errors from multiple threads (which we don't have right now), and it would complicate the current design a lot.


Wrapped history doesn't get updated

if you wrap the history with syncHistoryWithStore it doesn't get updated anymore because you copy it here
This prevents a router that doesn't use history.listen from being able to get the correct value

What router doesn't use history.listen? That's kind of critical to how React Router works.

preact-router

Also i.e. history.location should still get updated

You need to pass in the history instance you get back from the syncHistoryWithStore function into your router.

history.location doesn't even get updated in the wrapped history

maybe something like this instead of the current return statement
https://hastebin.com/hevivahaxi.js

https://hastebin.com/ucisiyidus.js something like this fixes it

can you please reopen this at least?

https://github.com/reactjs/react-router-redux/pull/504


Dash App Peer Review

I like how you did some data wrangling and made the plot interactive in that users can choose which drivers to compare this information with using the checkboxes. I think it might be worth mentioning somewhere why there aren't any data points for Max Verstappen, since if you only click his name then you get an empty plot. Another thing is that it might be worth putting this part (the checklist and "laptime distributions" plot) onto a separate tab/window, since it is pretty separate from the driver-specific information on this dashboard, which is controlled by a separate drop-down.
Another point of feedback would be to mind the margins of the page and try not to have the text and such so close to the edges of the page. The horizontal table also doesn't fit completely on the screen so maybe make it scrollable horizontally, or possibly allow text-wrapping in the table headers so that the table can fit comfortably on the page.
Overall, nice work!

Very handy dashboard! Possible improvements and fixes:

Every time you add another driver to the laptime distribution plot, the colour related to each driver jumps around, and each driver gets assigned a new colour. This adds some confusion when adding a driver to the plot. Also maybe add a max number of drivers to plot, since the plot size can't really handle all 20!
Some rearranging of your plots to make it look a bit neater would tidy things up a lot, maybe divide the screen in to proper different sections for instance.
All in all good stuff!

I'm really impressed with the level of detail and clarity in this dashboard. Improvements and fixes recommended are:

The check boxes can be replaced by a multi select dropdown which would make it slightly clear.
If you can rearrange the widgets on the left and the plots on the right, that would make the dashboard even better to understand. However, functionality wise it is really good.


jquery needed?

Issue description

components: reactstrap
reactstrap version #5.0.0
import method no idea (if umd, are you using the "full" version (only for v5+)?)
react version #16.3.2
bootstrap version #4.1.0

What is happening?
Sorry, I've just started with react + reactstrap. What should I do if we install bootstrap (npm i -S bootstrap) and get the message:
<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>- 3 but none is installed
Should we go ahead and install jquery? or it will conflict with reactstrap/react ?
Thanks in advance

You can safely ignore that peer dependency, or you can install it and just not use or reference jquery anywhere.
jquery is only a dependency for bootstrap when using bootstrap.js, but since you are using reactstrap, you don't need bootstrap.js nor jquery.
I believe I have read somewhere that in the future bootstrap may split up the styles from the functionality (javascript) so that you can import just the styles and use a third-party, library specific implementation (such as reactstrap)

I believe ajv and ajv-keywords are required by webpack. Are you using webpack?

Yes, I'm using webpack. I used create-react-app for the initial template, so webpack is there.
Thanks for the reply.

seems like ajv is already there with create-react-app, no need to add separately

depending on your packages and how npm structures your node_modules, you may need to explicitly add it.


proxies...

please help me :(
I don't get how I'm supposed to use proxies I have tried it like this var device = new Client.Device('dkwkapskpdkpws'); var storage = new Client.CookieFileStorage(__dirname + '/cookies/user1.json'); var proxy = "182.16.187.***:23500" Client.Session.create(device, storage, '****', '****', 'https://'+proxy+'/') but then I get an error
I don't know if I just use bad proxies or if I'm just dumb but please help
error: "Unhandled rejection RequestError: Error: tunneling socket could not be established, cause=write EPROTO 19656:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:openssl\ssl\record\ssl3_record.c:252:" or "Unhandled rejection RequestError: Error: tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established"

i got it working...

how can you solve it?? :(...

I really want to know how you solve this problem... i'm having same issue... plz  :(...

First try to change “https://“ to “http://“ and if that doesnt work then i Think the problem is a bad proxy. Have you tried different proxies?

i tried two proxies... but same issue.. change proxie?

Error: tunneling socket could not be established, statusCode=403

when i try "http://", above error trigger...

hmmm then i Think your proxy is dead but i’m NOT sure

now, "http://" work ??


Update eslint-plugin-vue to 9.23.0, eslint-config-wikimedia to 0.26.0

This is needed to avoid weird vue-dot-location errors caused by pulling in an older version of eslint-plugin-vue, see e.g. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/972933/8/resources/src/mediawiki.special.editrecovery/SpecialEditRecovery.vue and https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1008547

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

Project coverage is 100.00%. Comparing base (4fe1462) to head (c2c0054).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #95   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            9         9
  Lines          128       128
=========================================
  Hits           128       128

Files
Coverage Δ

src/rules/valid-package-file-require.js
100.00% <100.00%> (ø)

I think the tests fail because we haven't dropped Node 14 in this repo yet, we may need to do that first

CI change done in https://github.com/wikimedia/eslint-plugin-mediawiki/pull/96.


Add color selector within CartoCSS panel

+1!!

Done! 💃  https://github.com/CartoDB/cartodb/pull/9795


Move consul out to a docker container

https://github.com/progrium/docker-consul

FFIW we had no-so-great luck with Consul in Docker and moved it out.

Thanks for the feedback Keith! Any particular issues you were facing with the Docker setup?

ARP caching, restarting Docker takes it down, and just way too much code around making it all work. In the end it was far simpler and more reliable to run Consul outside a container.

Keith our main motivation for moving this out to a container is like other components, so we have very minimal on our base image. Eventually we aim to have nothing on the base image, so we can use public shared images like on the nat server.

There are new images for consul agent and master provided by gliderlabs https://registry.hub.docker.com/repos/gliderlabs/

this is now supported in coreos devel branch


Design improvements

Just a few design improvements. We still need some styles for mobile screen sizes.

Hmm, why did you remove the glitches?
Also do you mind putting the text inside the cards back in roboto or sans serif? We find it a lot of people have issues reading things are not code in monospace, does that make sense?
Like in here only the export part would be monospace and the rest would be roboto

Hey @SaraVieira!
The code font issue was originated because I replaced all the SimpleCard with Card and the font inherited there was the Inconsolata, monospace;. If you notice in master the first Card use this font:

But I'll change that. I agree that the text should not be a monospace font.
The reason I commented ou the Glitches is that they were originated an overflow issue on mobile. This can be actually solved with a body {overflow-x: hidden;}. But the idea of the Glitches was to create a parallax effect. So I might create another PR to solve this.

Ohh that makes sense, but you can put them back as we won't announce it this weekend and we can make a parallax using framer motion :)

This looks awesome! Waiting for an approve from rachel 👍


pango: make x11 optional, disabled on darwin

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Not completely sure if not having X11 support is a good macOS default — and in any case this changes dependency order, which implies a rebuild even on Linux, so it should be retargeted to staging

We are updating pango in https://github.com/NixOS/nixpkgs/pull/57027, is this change compatible?

Substantially yes, but automatic merge will produce a conflict (both add some conditional build inputs, both change the argument list).

please rebase

Sorry for the mess, I rebased accidentally on top of master.
Had to change cairo as well to avoid an indirect dependency on xorg.

Hm, I wonder if the hash problem on aarch64 is transient or a real hash mismatch

https://github.com/NixOS/nixpkgs/pull/58560#issuecomment-483973509

tested locally

This breaks building Cairo for me on MacOS with the following message:
In file included from cairo-xlib-display.c:40:
In file included from ./cairo-xlib-private.h:40:
./cairo-xlib-xrender-private.h:39:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.
make[3]: *** [Makefile:2358: cairo-xlib-display.lo] Error 1
make[3]: Leaving directory '/private/var/folders/tp/9fpldz0s6j93ln6_dd6pwhsm0000gn/T/nix-build-cairo-1.16.0.drv-0/cairo-1.16.0/src'
make[2]: *** [Makefile:1955: all] Error 2
make[2]: Leaving directory '/private/var/folders/tp/9fpldz0s6j93ln6_dd6pwhsm0000gn/T/nix-build-cairo-1.16.0.drv-0/cairo-1.16.0/src'
make[1]: *** [Makefile:910: all-recursive] Error 1
make[1]: Leaving directory '/private/var/folders/tp/9fpldz0s6j93ln6_dd6pwhsm0000gn/T/nix-build-cairo-1.16.0.drv-0/cairo-1.16.0'
make: *** [Makefile:761: all] Error 2


Create Dockerfile, docker-compose and base folder structure

We should create the Dockerfile (considering an Alpine Linux with Python 3 and Tornado), the corresponding docker-compose.yaml file and the base folder structure (perhaps we should have a base root folder to point when mounting the container). Any extra info is welcomed.

We must define the database engine as well.


Initializing Bookshelf Registry Plugin, doesnt cache models in the registry

Initializing Bookshelf Registry Plugin, doesnt cache models in the registry
Introduction
I quite went through existing issues to see if this had been reported before, but I didnt find any reference. TLDR; after initializing bookshelf to use the registry plugin as specified in the wiki, calls to fetch relationship data returns the error message The model Instructor could not be resolved from the registry plugin..
Steps to reproduce issue
Here is how my models are setup
//courses.js
module.exports = (bookshelf) => {
  const Course = bookshelf.Model.extend({
    tableName: 'courses',
    instructors() { return this.belongsToMany('Instructor'); },
  });

  //console.log('model constructor for course:: ', Course);
 //logs this :::  function () { return Parent.apply(this, arguments);  }
  return bookshelf.model('Course', Course);
};

//instructors.js
module.exports = (bookshelf) => {
  const Instructor = bookshelf.Model.extend({
    tableName: 'instructors',
    allCourses() { return this.belongsToMany('Course'); },
  });

  return bookshelf.model('Instructor', Instructor);
};

Actual behaviour
I would expect that bookshelf.registry would contain a map of the models registered but logging it returns the default empty object, further debugging I was able to ascertain from
//..plugins/registry.js
 bookshelf.model = function (name, ModelCtor, staticProps) {
    this._models = this._models || Object.create(null);

    if (ModelCtor) {
      preventOverwrite(this._models, name);
      if ((0, _lodash.isPlainObject)(ModelCtor)) {
        //this never gets executed
        ModelCtor = this.Model.extend(ModelCtor, staticProps);
      }
      this._models[name] = ModelCtor;
    }

  return this._models[name] = this._models[name] || bookshelf.resolve(name);
 //this._models is an empty object here

};

Expected behaviour
Explain what is the actual behaviour of a program and what are the actual errors while running the affected code.
Registered Models should be in the registry

Probably just a circular dependency issue, but can't tell for sure since you're not showing how you're trying to access the Course model. See here for further info: #598, #691.

@ricardograca So I am using a serviceLocator for DI, I register the model in a dependency file like so
serviceLocator.register('courseModel', () => {
    const bookshelf = serviceLocator.get('bookshelf')(); //this has been registered previously obviously
    return CourseModel(bookshelf);
  });

its then injected and used like so
const courseModel = serviceLocator.get('courseModel')();

courseModel.where({ id: courseId }).fetch({ withRelated: extraFields });

I dont see how there could still be an issue of circular dependency

@ricardograca Never mind I resolved with the idea from #792 thanks for your help
Defined this in bookshelf.js itself
fs.readdirSync(pathToModels).forEach((file) => {
    let model = require(path.join(pathToModels, file));
    //Hydrate model with bookshelf
    model(bookshelf)
  });

then calls to models were simply
const someModel = bookshelf.model('SomeModel');

Just to clarify, it's not exactly a circular dependency issue. The problem was that the Instructor model wasn't available (loaded) when it was being required in the Course model.


[No QA] perf: Resolve issues with long Android builds

Details

This PR aims to fix the issue with executing node script multiple times during build process on Android, which was drastically slowing down the Configuration phase.
Fixed Issues

$ https://github.com/Expensify/App/issues/49567
PROPOSAL: https://github.com/Expensify/App/issues/49567#issuecomment-2393709944
Tests

Run npm run android on main
Check the build time
Remove android/app/build folder
Checkout branch
Run npm run android again
Verify the build is faster than on main
Run the build again
Verify it is built faster than in the 5.

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

update: looks like it's safe to entirely remove this piece of code

Generating AdHoc build. I'll try to find time to test a local build this afternoon 👍

@aimane-chnaif is a 35 minute build an improvement at all for you?

It's improvement for me 😄 Before, it was more than 1 hr

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.


[SPARK-15195][PySpark][DOCS] Update ml.tuning PyDocs

What changes were proposed in this pull request?
Tag classes in ml.tuning as experimental, add docs for kfolds avg metric, and copy TrainValidationSplit scaladoc for more detailed explanation.
How was this patch tested?
built docs locally

Test build #58036 has started for PR 12967 at commit 3e9fded.

Test build #58036 has finished for PR 12967 at commit 3e9fded.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/58036/
Test PASSed.

Merged build finished. Test PASSed.

minor comment otherwise this LGTM

merged to master and branch-2.0


Two bugs when creating barcharts

Hi,
Currently I am working on a Mendix project and am using the ChartJS plugin to create barcharts within my application. While using the plugin I have encountered two bugs which are now holding up my project.
The first bug is triggerd when ChartJS receives the datapoints objects when they are empty. This seems to trigger an enless loop in which I cannot enter the desired page and thus cannot view the graphs.
The second bug is that the barchart seems to ignore the option to start at zero. Whether the box is checked or not in the properties, the barchart never starts at zero.
Any help how to resolve these issues would be much appreciated!

I cannot reproduce either of those issues. If you can send a testproject to community [at] mendix.com I would be glad to help. I did do another fix ("Fix rendering for empty datasets") which makes sure that empty datasets are ignored

Correction.... I have reproduced the start at zero issue. Fix is coming

Both issues are fixed according to the feedback. Closing the issue


Label name with undefined when the workspace is not named

Does this issue occur when all extensions are disabled?: Yes

VS Code Version:  code-oss-dev  1.75.0  05e1981145bea8
OS Version: Mac os 12.2.1 (21D62) intel

Steps to Reproduce:

git clone the vscode latest source code.
Use cmd + shift + b keybinding to start the development process. (Core - Build and Ext - Build).
Prepare a simple file system extensions such as vscode-web-playground and use ./scripts/code-web.sh --extensionDevelopmentPath=LocalFileSystemPath . Execute ./scripts/code-web.sh . to start VS Code Web. It should be noted that the second parameter is ., Maybe this should be the reason why the workspace is an empty file name.
When the web is started, if no accident occurs, the workspace will open an empty name but the actual data of the file tree is the current code warehouse, just like in the screenshot.
Open a few files casually, either in the root directory or in a folder at any level, and you will find that the undefined is carried in the label.

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.3. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Does this issue occur when all extensions are disabled?: Yes

VS Code Version:  code-oss-dev  1.75.0  05e1981
OS Version: Mac os 12.2.1 (21D62) intel

Steps to Reproduce:

git clone the vscode latest source code.
Use cmd + shift + b keybinding to start the development process. (Core - Build and Ext - Build).
Prepare a simple file system extensions such as vscode-web-playground and use ./scripts/code-web.sh --extensionDevelopmentPath=LocalFileSystemPath .. It should be noted that the second parameter is ., Maybe this should be the reason why the workspace is an empty file name.
When the web is started, if no accident occurs, the workspace will open an empty name but the actual data of the file tree is the current code warehouse, just like in the screenshot.
Open a few files casually, either in the root directory or in a folder at any level, and you will find that the undefined is carried in the label.

When the workspace is not named, it is automatically set to Test Files, After debugging, I found that there is no separator at this time, which leads to the error of label name.

@yiliang114 can you give more details around how to reproduce, specifically:

Prepare a simple file system extensions such as vscode-web-playground

Where is that code?

@bpasero Thank you for your prompt reply.  I thought I had to debug the file system plug-in to reproduce this problem. Originally, vscode-web-playground referred to https://github.com/microsoft/vscode-web-playground.
But I just tried it again and found it didn't need to be so complicated.  The third step is to execute ./scripts/code-web.sh . directly, there is no need to carry extensionDevelopmentPath.

This bug has been fixed in the latest release of VS Code Insiders!
@yiliang114, you can help us out by commenting /verified if things are now working as expected.
If things still don't seem right, please ensure you're on version 07d6f5b35fac559504dec65e3073d796b2d25a55 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.
Happy Coding!


Update: added README templates

@gastaldi @ALRubinger @quintesse  @edewit mind taking a look?

thanks @gastaldi, merging.

merged: https://github.com/openshiftio/appdev-documentation/commit/c0f3702ef752dfd9eed5739ef7b5b2905da63b3e

Sorry for reviewing so late, hope that my comments make sense :-)


Refactor the Features to include more portability flags

We've reached the limit of u64 bitflags for the Features. We should leave the Vulkan proper flags there, but move all the extra stuff into a separate bitflags/struct. Here are the new flags we need:
    //TODO: add a feature for non-normalized samplers
    //TODO: add a feature for mutable comparison samplers

More or less something like ExtraFeatures. An example of those "extra" features from what I've read on the spec would be:
        /// Support triangle fan primitive topology.
        const TRIANGLE_FAN = 0x1000_0000_0000_0000;
        /// Support separate stencil reference values for front and back sides.
        const SEPARATE_STENCIL_REF_VALUES = 0x2000_0000_0000_0000;
        /// Support manually specified vertex attribute rates (divisors).
        const INSTANCE_RATE = 0x4000_0000_0000_0000;
        /// Support non-zero mipmap bias on samplers.
        const SAMPLER_MIP_LOD_BIAS = 0x8000_0000_0000_0000;


Switch to patched version of tree-sitter-clojure

The tree-sitter-clojure package uses exact dependencies for nan and tree-sitter-cli, and erroneously—I think—introduces an exact dependency for web-tree-sitter.
We should fork tree-sitter-clojure, loosen these dependencies, test if the resulting parser still works, and if so start using the less restricted version in vscode-parse-tree.

All looks good, tho I'd add that we should probably also file a PR against the tree-sitter-clojure repo, no?

It’s already fixed!


Edits to final chapters

Some edits to Burgers_approximate, Shallow_water_approximate, Euler_approximate, and Euler_compare.
Question: Should we merge Euler_approximate, and Euler_compare into a single notebook?
Or split Shallow_water_approximate into two?
At the moment the two are handled differently, since Shallow_water_approximate has both discussion of the single Riemann solution and PyClaw examples using approximate solvers, whereas for Euler we spit them up.

Looks good!  When we wrote Euler_compare, we didn't have the PyClaw example at the end of the SW chapter.  I don't like splitting the SW example into its own chapter, since it's just the one example without a lot of discussion.  Merging the two Euler chapters makes a rather long notebook (due mostly to the long code blocks for the PyClaw simulations) but I think it's not longer than some of the other chapters, so that seems fine.

I also think it would be fine to join them . However, an alternative idea would be to change the name of Euler_compare to something like Comparison of approximate solvers and move the last example of Shallow_water_approximate into the comparison notebook. This way, we keep a chapter just aimed in the comparison between different solvers, and avoid having a very large Euler_approximate chapter.

I like the idea of moving the SWE example to the last chapter so all the PyClaw code is together. I'll try that and see how it looks.

I combined the examples and also rearranged the order of the Euler examples and code.  I renamed the last notebook to FV_compare
If this looks ok, there are other places this name change needs to be made, in particular in Index.ipynb, make_html.py, and make_pdf.py.

Looks good to me.  I would say go ahead and make the name change.

Randy, I updated the plotting style in the FV_compare notebook of the SW example to match how it looks in the other examples. I also added the momentum in the same plot. If you like how it looks, I made a pull request to your branch.


Update codec builder to support rate limiting while running

As of now, VideoEncoderBuilder and AudioEncoderBuilder only return io.ReadCloser and `error:
BuildAudioEncoder(r audio.Reader, p prop.Media) (io.ReadCloser, error)
BuildVideoEncoder(r video.Reader, p prop.Media) (io.ReadCloser, error)

While returning io.ReadCloser is very idiomatic, io.ReadCloser is not enough for our need. The main limitation is rate-limiting, we can't adjust the codec parameters on the fly or decreasing/increasing the bitrate as needed depending on the current network speed and quality.
So, instead of returning io.ReadCloser, it's better to instead return a new interface that embeds io.ReadCloser and has another method that updates the BaseParam:
package codec

import "io"

type ReadCloser interface {
	io.ReadCloser
	Update(params BaseParams) error
}

@at-wat what do you think about the interface?

I think updating BaseParams.KeyFrameInterval is less meaningful on WebRTC (and also pure RTP) in which RTCP PictureLossIndication packet triggers a key frame.
I'm not very sure it's better to update whole BaseParams.

From my understanding, setting BaseParams.KeyFrameInterval to 0 means the same thing with force keyframe. Did I misunderstand this?

I think BaseParams.KeyFrameInterval=0 means that all frames are key frame.
PictureLossIndication makes next single frame into key frame.

Ah, that makes total sense. I guess nvm then, I think we can use what you've suggested already,
package codec

import "io"

type ReadCloser interface {
	io.ReadCloser
	SetBitRate(int) error
	ForceKeyFrame() error
}

What do you think about the naming? I changed it from StreamReader to ReadCloser because I think it's more common and it's clear that's different from io.ReadCloser, because it'll be called with the namespace codec.ReadCloser. This pattern also exists in the standard library, there are image.Image and draw.Image. The main difference is that draw.Image has an extra method that allows setting a single pixel to a color.

codec.ReadCloser sounds good to me!

seems related: https://github.com/pion/webrtc/wiki/MediaAPI#rtpsender-will-have-callbacks-for-rtcp-feedback-results

This is stale and no longer applicable since #338 has been merged.


Http Connector authenticating to 401 and Login Module expiring state

2 new features:

The login modules will have an entry in their Login Map with the key "ExpiringState". The value of this entry will be the new public API of ExpiringState class. (Note: Java Doc needs to be public). This ExpiringState class is shared across all Login Modules and GW members in a cluster and can be used to share information across the login modules. (Like one time nonces, or multifactor credentials)

The http connector in the gateway can now respond to http challenges on 401 status codes. It will attempt to provide the credentials via a call to the Java Authenticator. The Authenticator is set on the JVM so we don't provide a GW specific way to configuring it and pointing it to related oracle docs on this should be sufficient. (For example Authenticator.setDefault). The http connector will only attempt to authenticate on the HTTP if a new connect-options property is set, Specifically this is "http.max.authentication.attempts" with an integer value. This specifies how many times an http connector will attempt to authenticate when it is challenged. By default this value is 0.

Thank you @jitsni, I've applied all the feedback except https://github.com/kaazing/gateway/pull/696#discussion_r77426354.  This is ready for another round.


Could not find a version that satisfies the requirement pyrealsense2

i encounter a fatal  error
it is  "Could not find a version that satisfies the requirement pyrealsense2"
canot install pyrealsense2 !!!!
solve method : install python version that author recommend.

try with python 3.9.1   realsense dont work with 3.10


Enchancement optimize bitmap deserialize and remove some unused code

Proposed changes
pick from #35789

run buildall

run buildall


refactor (testing): preserve raw path in scope creation

Summary of Changes
Added a 'raw_path' key to the asgi scope in create_scope to preserve the path and keep consistency as per https://github.com/falconry/falcon/pull/2159
Related Issues
#2262
Pull Request Checklist

[x] Added tests for changed code.
[x] Prefixed code comments with GitHub nick and an appropriate prefix.
[x] Coding style is consistent with the rest of the framework.

I have an issue with mypy, dunno if it's only me. It complains about line 680 in testing/helpers.py.

Hi @vytas7, I made the requested changes.
Also, what is meant by newsfragment? Should I document the changes somewhere?


Where is the code design flow

Steps to reproduce the problem:

Checkout the code

Any other comments? What have you tried so far?
I don't know where to study the code, also check the Doc about how mitmproxy works, but where is the code design flow? Seem that many codes are duplication.
System information

latest

@mansonami Hello! Sorry, but I didn't quite understand what you wanted to say(ask).

you can study the source code from https://github.com/mitmproxy/mitmproxy/tree/master/mitmproxy
docs don't describe the code design, docs describe how to use the tool.
Feel free to reopen if you still have questions :)


Repo structure when adding more sources

I'm currently working on creating a VMware Horizon source adapter (using the tested code base from the VEBA project).
The current repository structure is set up assuming there's only one source (vSphere). How do we want to handle new/multiple VMware sources in this repo?

My concern is that additional repos adds additional overhead whenever considering automation and processes, even including manual processes like "check to see if there are any open issues from users".
I'd be inclined to package things as follows:

One "combined source" manifest which installs all the different types and a single controller that manages all of them.
Standalone "only X" manifests for each source type for users that only want a single source and don't want the extra resources on the cluster.

Sharing a repo also makes it easier to share things like libraries; if we split them into many repos, we end up needing N+1 repos (one for each source, plus one for "pkg". I'm not sure that model worked great for Knative; it certainly has ended up producing a need for a lot more movement and machinery. The initial goal was that each component could stand alone, but the real flexibility comes in versioning -- it's possible to release a patch fix for one eventing component without needing to CI the rest of the system.
I'm not sure that this repo will end up being big enough to have that problem, and I'm willing to face it when the time comes.
In terms of creating an "all in one" plus individual releases, I'd probably end up creating one directory for each source (and a separate directory for each binding), and then have a collected directory alongside them that symlinks in the correct files.

I agree with @evankanderson (especially around the overhead around repo management - also from user's/contributor's pov).
Regarding the manifests, all-in-one as well as individual components make sense (as done in other kn repos). My question was more around the source, e.g. everything under /cmd and /pkg.

I think having the container entrypoints under cmd makes sense. I don't have a strong feeling about pkg either way. https://github.com/golang-standards/project-layout#pkg suggests that this is a directory for "Library code that's ok to use by external applications". I might prefer to put things in /internal or just at the top level. This blog post seems to have more details: https://travisjeffery.com/b/2019/11/i-ll-take-pkg-over-internal/
Note that Kubernetes and a number of other projects use pkg, so the big argument in favor of putting things in that directory is making things more familiar for contributors from those projects. I'm not sure it's a big win either way, but I can see the arguments for keeping pkg so that other content like docs, testing, configs and so forth sit "next to" the code, rather than "interspersed with" it.

Sorry, I do not want to change pkg or any of the other folders. The question I had was how to structure multiple sources under these folders then. E.g. /pkg/<source>/[api|injection|...]?

If it helps, in Knative RabbitMQ Eventing we have exactly that, maybe it could be prettier like having each thing in its own separate kind of module, but there in this link I can take a look

I think what RabbitMQ is doing makes sense. The key is that the go compiler will "pull" from the cmd/$containername through the rest of pkg. In some cases, like pkg/reconciler/$typename, it's clear how to separate out the different sources. In other cases, like (hypothetical) pkg/cloudevents/normalize, we may end up having a common library that doesn't fit into a per-source model.

Update:
Based on the above conversation I'm proposing the following structure (based on the existing directory layout) using vsphere and horizon Source as example:
cmd
 |- vsphere-adapter
 |- vsphere-controller
 |- horizon-adapter
 |- horizon-controller
 |- horizon-webhook
config [will include all source definitions in flat folder]
plugins
 |- vsphere
 |- horizon
pkg
 |- apis [will include all definitions in existing structure]
 |- client [auto-generated]
 |- reconciler
     |- vspheresource
     |- vspherebinding
     |- horizonsource
 |- vsphere [vsphere shared libs]
 |- horizon [horizon shared libs]

Thoughts?


Method names inconsistent with function

The Problem
Method names such as ElementInterface#withAttribute() return the same instance. This makes them nothing more than a setter. However, a setter would be named e.g. setAttribute(). Names such as withAttribute() may mislead the consumer to think that it would return a new instance. Alas, they are simply mutable, and mutability is a bad thing most of the time.
The problem is further enhanced by the fact that these methods do not declare what they return.
Suggested Solution
Have the methods return a new instance every time, and declare the return type everywhere, including the interface. Example:
class Element implements
    ElementInterface,
    LabelAwareInterface,
    ErrorAwareInterface,
    DescriptionAwareInterface
{
  	// ...

	/**
	 * Creates a new element with the specified attribute value.
	 *
     * @param string $key The attribute key.
     * @param bool|int|string $value The attribute value/
     *
     * @return Element The new element which has the given value of the specified attribute.
     */
    public function withAttribute(string $key, $value): ElementInterface
    {
		$element = clone $this;
        $element->attributes[$key] = $value;

        return $element;
    }

  	// ...
}

Thanks for your feedback.
Actually it is absolutly wanted, that an Element is mutable, since they are more or less configuration objects. So i would say: This time it's not a bad thing. ;-)
An Element should be used like this:
<?php
use ChriCo\Fields\Element\Element;

$textInput = (new Element( 'my-text' ))
	->withAttributes( [ 'type' => 'text'] )
	->withValue('foo')
	->withDescription('This is foo')
	->withLabel('my text input label')
	->withLabelAttributes(['class' => 'foo-label'])
	->withError(['some-id' => 'something went wrong']);

There is no need to clone and return a copy of the current Element, since it's actually wanted that the current object is mutated.
About the setValue vs withValue - this can be a long discussion i guess, but i decided to use withValue() as setter and returning the current object to allow chaining for configuration of an Element. By using setValue(), i would probably not allow to chain.
Also, as getter i'm just using e.G. value() instead of getValue().
This is a design decision i made for the 1.x version. And i cannot simply change it without a major release.

Thanks for the quick reply!
Why would you actually want the object to be mutable? It's perfectly possible and normal to chain calls to with*() configuration methods if you return a new instance every time: FIG is doing that no problem. Same thing with setValue():
$textInput = (new Element('my-text'))
	->setAttributes(['type' => 'text'])
	->setValue('foo')
	->setDescription('This is foo');

Of course, I would much prefer that the methods are called withAttributes() etc, but it would be great and much more intuitive if they returned a new instance every time.

Hi! Any news on this? :)

yes, i'll not change the whole API in version 1.x :)

Well, I'm not saying you should change it in any specific version, just that it could be a good idea to do it eventually. What do you think?