Feature/streamlink and live

Implements #658
See annotated code changes. I expect what I've done can be improved.

Beware that I've messed a few things a bit of a mess. Wasn't sure how you'd want things organized / implemented so I left them as is.

Config for what player to use and stream quality would be good

Beware that I've left a few things a bit of a mess. Wasn't sure how you'd want things organized / implemented so I left them as is.

Understandable.
I've had a quick look over the PR, and it conflicts about my intuition for how this could be implemented. The following widget takes from the twitch API, so based on a config/state value the API call could probably just be switched out and the UI could be changed a little to show a tab/header based on if you're currently searching by who you're following and who's live.

Config for what player to use and stream quality would be good

I like that idea. If you want to make a tracking issue for that, go ahead.

I'll take a longer stare in the near future, thank you for the initial changes!


add RPC to ask for folder handle given TLF id

This RPC is between bserver and mdserver

New RPCs between bserver clients and bserver

:+1:

Actually, heads up, there were merge conflicts in some of the autogenerated protocol files.

Actually it was fixed in a previous commit.

Can one of the admins verify this patch?


Pull export in standalone zotero broken?

Pull export seems broken in the latest standalone zotero versions (0.7.9 and 0.7.10). When running
wget http://localhost:23119/better-bibtex/library?library.bibtex
I now get the response
--2015-02-03 10:08:41--  http://localhost:23119/better-bibtex/library?library.bibtex Resolving localhost (localhost)... <IP_ADDRESS> Connecting to localhost (localhost)|<IP_ADDRESS>|:23119... connected. HTTP request sent, awaiting response... 404 Not Found 2015-02-03 10:08:41 ERROR 404: Not Found.
Pull export still works (sort of), using the wget command above, in Zotero for Firefox where I still have Better Bibtex version 0.7.7 (not restarted for a while): After running Zotero standalone (and closing it) I need to uncheck/check the "Enable http export" button in Zotero for Firefox to get the pull export working again.
Thanks for a great piece of software!
Henrik

My pleasure. So there are two problems if I understand you correctly:

BBT for Firefox only works sort of.
BBT for standalone (ZS) keeps resetting the http export to off.

Right? Let's tackle these.

In what way does it work sort of? Is there anything specifically that fails, or does it work but with random failures? Can you open a separate issue for this?

The rest will concern diagnosing 2 (pull export fails for ZS).
Steps:

Please set http export to ON, then uninstall BBT, restart ZS, open about:config from Preferences -> Advanced, and look up the value for extensions.zotero.httpServer.enabled. It should say true
Install BBT and restart ZS. Go into about:config, check for extensions.zotero.httpServer.enabled again. It should still say true
Go to the BBT preferences. There ought to be no option Enable export by HTTP

If any of these steps fail, please go into Preferences-> Advanced, check enable after restart, restart, go into Preferences -> Better BibTeX, verify that Enable export by HTTP is visible, then to the Advanced tab, click View output, select-all, paste into a text file, and drop that into https://dbinbox.com/allthatisthecase

I can't reproduce the problem locally, so I'll need your help to debug this. It looks like the http preference gets reset, but I really can't yet think of a reason why.

I followed the steps you suggested regarding ZS, with the result that pull export works again. It seems that uninstalling / reinstalling BBT has fixed this. I have done the same in Zotero Firefox and the issue has gone away there as well.
Just to confim, before uninstalling BBT, extensions.zotero.httpServer.enabled was true in ZS, but export didn't work.
After reinstalling the config entry remained unchanged, but export worked again.
I'll keep an eye on this and will report back if this happens again (and try to capture a debug output). In the meantime, I think this issue may be closed (unless it can be reproduced somehow...).
Thanks again!

The only cause I think that could behind this is plugin load order. What other ZS extension do you have installed?

I've also got Zotfile (4.1.2) and Zutilo (1.2.10) installed.

Alright, I've added those to the test suite in a randomized load order; if they cause interference, it'll crop up at some point.

I ran into this issue again today. Here is the debug output:
[JavaScript Error: "NS_ERROR_STORAGE_BUSY: Component returned failure code: 0x80630001 (NS_ERROR_STORAGE_BUSY) [mozIStorageService.openDatabase]" {file: "chrome://zotero/content/xpcom/db.js" line: 1119}]
version => <IP_ADDRESS>, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-US, appName => Zotero, appVersion => <IP_ADDRESS>
=========================================================
(5)(+0055888): GET /better-bibtex/library?library.bibtex HTTP/1.1
User-Agent: Wget/1.15 (linux-gnu)
Accept: /
Host: localhost:23119
Connection: Keep-Alive
(5)(+0000000): HTTP/1.0 404 Not Found
X-Zotero-Version: <IP_ADDRESS>
X-Zotero-Connector-API-Version: 2
Content-Type: text/plain
No endpoint found

Something is locking one of your zotero databases. Could you try a full restart of your computer?

Restarting firefox fixed this (for the time being), so it seems that the locking process was ZF.
Before this happened, I had used Zotero firefox to import some citations, then started ZS.
I have tried to reproduce this, but don't get the same error again just now.

You can't run both ZF and ZS simultaneously. You will either get a lockout
like this, or you'll corrupt your references.

The behaviour I see is that ZF is automatically closing the database when ZS is started (or prevents ZS from starting if it cannot do this) - I understand that this is the expected behaviour of Zotero to prevent any database corruption.

Ah, you're using ZF in connector mode. Hmm. That is not currently supported
by BBT, and I think it might have some dangerous edge cases with Zotfile
too. This is not an easy fix. I'll think about it, but there's no
short-term solution.

OK, that makes sense. Thanks for the explanation.
As far as I can see, connector mode is the default behaviour for ZF if ZS is used at the same time.
I'll stick to using ZS only, for the time being.

That seems to be the case. I'm trying to figure out connector mode, but none of this is part of the published API, so I need to decode the use of the IPC mechanism from the sources.

I'm making slow progress on this, but no ETA yet.


Low-level Error:  does not have a union type

Describe the bug
Steps to reproduce are going to be kind of annoying to fill out (and I'm not sure just how reproducible they are), so initially going with a rough description of what happened:

Reverse engineering a kernel - I lack all type info, so am reconstructing it.
In the course of this work, I manually added a union type with some struct members.
In at least one function I used Force Union Field to get things to line up.
realized that adding the types (there are a bunch) in the UI was going to be a lot worse than just writing out C struct/union definitions and parsing them.
Exported the current set of structs, and made some additions.
Deleted the old container in the data type manager in preparation for parsing that C header to get the definitions back.

From that point on, none of the affected functions show up in the decompiler.  All I see is:
Low-level Error: <unionfacetsymbol> does not have a union type

I expect there's probably some user-error here (maybe I should have removed references to those types before deleting the container?) but I'd love to figure out a way to remove the rake handle embedded in my forehead :)
More than willing to package up whatever is needed to track this down (or do the work here if there are places you can point me.)  Can also see if I can reproduce with a smaller test case if that would be of use.
Environment:

OS: macOS 13.4.1
Java Version: 19.0.1
Ghidra Version: 10.4 DEV (git hash 26d4bd9104809747c21f2528cab8aba9aef9acd5, so as of Aug 2)
Ghidra Origin: locally built

I'm reproducing this behavior, thank you for pointing it out.
To import a new definition for an existing data-type with lots of references in your program, you probably want to

Rename the existing data-type (to make room for the new definition)
Import or otherwise construct a data-type with the new definition
Replace the old data-type with the new data-type using the "Replace..." action

The "Replace..." action is reached by right-clicking on the old data-type in the Data Type Manager window to get the pop-up menu. This will, to the extent possible, preserve existing references to the data-type, like ones produced by the "Force Field" action.
I'll attempt a patch so the decompiler still produces output in this situation and doesn't throw the exception.
In the current Ghidra, if you can't go back and try the steps listed above, you can delete the local symbols whose
name starts with "unionfacet" for any function that exhibits the exception. These should be visible as part of the function header in the Listing window.


Editing file in one pane causes same file in other pane to scroll

I think ideally this shouldn't be the case? I frequently have the same file open in two panes to view different sections. Editing one and having the other move around defeats the purpose.

I can't reproduce this in Atom 1.6.0-dev-8677ca3.

What version of Atom are you using?
Can you reproduce this after quitting Atom completely and reopening it in safe mode?

If you can, can you provide specific step-by-step instructions for reproducing this?

Please take a look at this guide for submitting bug reports.

1.4.0. Maybe that's why.

I can't reproduce this in Atom 1.4.0 either.

Can you reproduce this after quitting Atom completely and reopening it in safe mode? (atom --safe)

If you can, can you provide specific step-by-step instructions for reproducing this?

Please take a look at this guide for submitting bug reports.

Sorry, maybe scrolling wasn't the correct word? I can reproduce this in safe mode.

Open a file, split a pane to the right (two identical files side by side now).
Scroll down the one on the right a bit.
Go to the beginning of the file on the left, insert a line.
See that the one on the right jumped a line. Expected behaviour is that it'd stay still.

I'm not sure I would call this a bug exactly. But, it's more like a missing feature.
I tested the expected behavior on Atom 1.7.4 and other editors like VS Code 1.1.1 and Vim 7.4. And found that the splits only behave as you @chenglou expected them to behave in Vim and not the other editors.
TL;DR: Not a bug. But, a lacking feature.
@mnquintana I think, this issue can be closed now and perhaps reopened later as a feature request.

fwiw Sublime Text has the same behavior (not jumping)


why mapObject function use closure

const mapObject = (arr, fn) => arr.reduce((acc, val) => ((acc[val] = fn(val)), acc), {});

This way is more simple and easy to understand

Yes it's archaic(and I even noted so when I suggested it), however it shows interior deceleration of a closure in design principle for dynamic variable deceleration without declaring a scope block, and without using keywords, instead relying on the comma operator and the implicit declaration.
Granted mapObject is also the same as the following currently, which without composition is a pretty nifty achievement
const mapObject = (arr,fn) => zipObject([arr, arr.map(fn)])

IIRC we did also offer up the reduce version as well...

@OPY-bbt Good question. Although it might seem simple there is def more going on that meets the eye. As @skatcat31 stated with regards to IIFE, closures, hoisting, and much more other JavaScript specific "side effect" or what have you. Which def provides an amazing learning opportunities for all kinds of dev. Seasoned or not. Especially since JavaScript has it's own quirks
For example as you can see your proposed snippet breaks with other simple operations.
Our Current Snippet
mapObject([1, 2, 3, 4], (a, b) => a - b) // { 1: 1, 2: 1, 3: 1, 4: 1 }
mapObject([1, 2, 3, 4], (a, b) => b - a) // { 1: -1, 2: -1, 3: -1, 4: -1 }

Your Proposed Snippet
mapObject([1, 2, 3, 4], (a, b) => a - b) // { 1: NaN, 2: NaN, 3: NaN, 4: NaN }
mapObject([1, 2, 3, 4], (a, b) => b - a) // { 1: NaN, 2: NaN, 3: NaN, 4: NaN }

That being said I def believe it is possible to refactor said snippet in a way that wouldn't hinder functionality and also improve readability.
If you want @OPY-bbt You can try refactor said snippet and submit a PR. However beware of all the potential edge cases and uses cases.
@Chalarangelo I also think it wouldn't hurt to add the advance tag.

HA! We forgot the advanced tag! Shows where I concentrate my efforts( code quality and stability ). Good catch @kingdavidmartins we should add that tag

I think the original question has been answered and #595 has addressed the tagging issue, so I'm closing this.

Thank you for explaining so much to me. I know there must be a reason for this, but I didn't think of it. Thanks to this project, I learned a lot.However, i think a function does one thing only. like the introduce says 'Maps the values of an array to an object using a function'.

@OPY-bbt your version was missing something:
const mapObject = (arr, fn) => arr.reduce((acc, val, i, a) => ((acc[val] = fn(val, i, a)), acc), {});

mapObject([1, 2, 3, 4], (a, b) => a - b) // { 1: 1, 2: 1, 3: 1, 4: 1 }
mapObject([1, 2, 3, 4], (a, b) => b - a) // { 1: -1, 2: -1, 3: -1, 4: -1 }

They are now consistent as it provides the same footprint as map( (value, index, array)). While we could switch to that version(less looping), we don't have any examples that show an inline anonymous closure. If I could find a more "useful" example of that I might be more inclined to switch the closure to that snippet, but it's a task that doesn't make much sense due to the fact it makes most code unreadable, while in this snippet it at leas tells us that there is a division of steps.

ok, I agree with the fn need provides the same footprint  as map. Thank you.


Add some documentation for nodes that have unintuitive behavior on first sight

Just adds a little documentation for nodes that we know have confused users of SwiftSyntax.
While at it: Don’t generate doc comments for extensions in BuildableCollectionNodesFile.swift. These doc comments served absolutely no purpose.

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test Windows


Core Developer: Base style guide routing

Style Guide Routing
Feature: Style Guide Data
  As a core developer
  I want to have data from the style guide rendered
  So that I can apply Punchcard styling

  Scenario: Data for Color Swatches
    Given that, I need data to render the color section of the style guide
     When I navigate to that section
      Then I will see a short description describing the color palette we are using
      And I will see swatches that are the core colors making up the color palette for Punchcard
      And I will see all the available shades of blue
      And I will see all the available shades of purple
      And I will see all the available shades of grey and black and white
      And I will see the name of each color
      And I will see the hex value of each color
      And I will see all the RGB value of each color

  Scenario: Data for Typography
    Given that, I need data to render the typography section of the style guide
     When I navigate to that section
     Then I should include the text "Heading 1" for h1
      And I should include the text "Heading 2" for h2
      And I should include the text "Heading 3" for h3
      And I should include the text "Heading 4" for h4
      And I should include the text "Heading 5" for h5
      And I should include the text "Heading 6" for h6
      And I should include a paragraph of text of 3 sentences
      And I should include two paragraphs of text for the blockquote
      And I should include an author's name for the author text
      And the link should link to anywhere
      And I should include a short title for the first title of the definition list title
      And I should include a paragraph of text for the first definition list definition
      And I should include a longer title for the second definition list title
      And I should include an unordered list of 3 short items for the second definition list definition
      And I should include 3 short list items for the unordered list
      And I should include 3 short list items for the ordered list

Scenario: Data for Table
    Given that, I need data to render the table section of the style guide
     When I navigate to that section
      Then I should include a table
      And that table will have 5 columns
      And that table will have a row of table headers
      And those table headers all 5 with varying size content
      And that table will have 4 rows
      And each cell within those rows will have varying sizes of content

Scenario: Data for Code
    Given that, I need data to render the code section of the style guide
     When I navigate to that section
      Then I should include a few words in the keyboard input
      And I should include a few words for inline code
      And I should include a short sentence for sample input
      And I should include a grid of characters for pre-formatted text

Scenario: Data for Inline Elements
    Given that, I need data to render the inline elements section of the style guide
     When I navigate to that section
      Then I should include a few words for a rendered text link
      And I should include a short sentence for strong text
      And I should include a short sentence for emphasized text
      And I should include a short sentence for bolded but only a few words are bolded
      And I should include a short sentence for italicized but only a few words are italicized
      And I should include a short sentence for underline but only a few words are underlined
      And I should include a short sentence for deleted but only a few words are deleted
      And I should include a short sentence for strikethrough
      And I should include a few words for superscript that include a superscripted R at the end
      And I should include the text "H20" with the "2" being subscripted
      And I should include a short sentence for small text
      And I should include a short sentence for abbreviation with one word being abbreviated
      And I should include a short sentence for a quotation
      And I should include a short sentence for a citation
      And I should include a short sentence for definition with a few words being defined
      And I should include a short sentence for mark with a few words being marked
      And I should include a short sentence for variable with a few words in the variable
      And I should include a short sentence for time with a few words in the time element

Scenario: Data for Form Elements - Input Fields
    Given that, I need data to render the input fields section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled "Input fields"
      And I should include a text input field
      And it will have the placeholder text "Text input"
      And it should include a text label "Input field"
      And it should include a short sentence of text as a description below it
      And I should include a disabled input field
      And it will have the placeholder text "Text input"
      And it should include a text label "Disabled input"
      And it should include a short sentence of text as a description below it
      And I should include a password input field
      And it will have the placeholder text "Type your password"
      And it should include a text label "Password"
      And I should include a URL input field
      And it will have the placeholder text "http://yoursite.com"
      And it should include a text label "Web address"
      And I should include an email input field
      And it will have the placeholder text<EMAIL_ADDRESS>      And it should include a text label "Email address"
      And I should include a phone input field
      And it will have the placeholder text "(999) 999-9999"
      And it should include a text label `Phone number`
      And I should include a search input field
      And it will have the placeholder text "Enter search term"
      And it should include a text label `Search`
      And I should include a number input field
      And it will have the placeholder text "Enter a number"
      And it should include a text label `Number input`

Scenario: Data for Form Elements - Select Dropdown
    Given that, I need data to render the select fields section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled `Select dropdown`
      And I should include a selection dropdown with 5 options
      And each option will be 2-3 words
      And that select should include a text label "Select"

Scenario: Data for Form Elements - Checkboxes
    Given that, I need data to render the checkboxes section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled "Checkboxes"
      And I should include a checkbox group with 3 options
      And each option will be 2-3 words

Scenario: Data for Form Elements - Radio buttons
    Given that, I need data to render the radio buttons section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled "Radio buttons"
      And I should include a radio button group with 3 options
      And each option will be 2-3 words

Scenario: Data for Form Elements - Textarea
    Given that, I need data to render the textarea section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled "Textarea"
      And I should include a textarea
      And it will have 8 rows and 48 columns
      And it will have the placeholder text "Enter your message here"

Scenario: Data for Form Elements - HTML5 Inputs
    Given that, I need data to render the HTML5 inputs section of the style guide
     When I navigate to that group of form elements
      Then I should include a text legend labeled "HTML5 inputs"
      And I should include a color input
      And it should include a text label "Color input"
      And I should include a number input
      And it will have the value of "5"
      And it should include a text label "Number input"
      And I should include a range input
      And it should include a text label "Range input"
      And I should include a date input
      And it will have the value of "01/01/1970"
      And it should include a text label "Date input"
      And I should include a month input
      And it will have the value of "January 1970"
      And it should include a text label "Month input"
      And I should include a week input
      And it will have the value of "Week 01, 1970"
      And it should include a text label "Week input"
      And I should include a date/time input
      And it will have the value of "1970-01-01T00:00:00Z"
      And it should include a text label "Datetime input"
      And I should include a datetime-local input
      And it will have the value of "01/01/1970, 12:00AM"
      And it should include a text label "Datetime-local input"

Scenario: Data for Form Elements - Buttons
    Given that, I need data to render the buttons section of the style guide
     When I navigate to that group of form elements
      Then I should include a submit button
      And it should include the text "Button type = submit"
      And I should include a button button
      And it should include the text "Button type = button"
      And I should include a reset button
      And it should include the text "Button type = reset"
      And I should include a text link
      And it should include the text "Link type = cancel"

Scenario: Data for Styled Components
    Given I am on the style guide page
     When I am looking at the components section
      Then I will see a section containing the currently styled components
      And all these components will already have data associated with each of them

Scenario: Embedded SVG
    Given that I need data to render the embedded SVG section of the style guide
     When I navigate to that section of the style guide
     Then I will see a code block of the SVG code from the Conversation SVG pictogram
      And I will also see a visually rendered version of the conversation pictogram
      And the pictogram will be filled with purple 50
      And the background will be transparent

Style Guide Routing

[ ] Color data
[ ] Typography data
[ ] Table data
[ ] Code data
[ ] Inline Elements data
[ ] Form elements data
[ ] Components data
[ ] Embedded SVG data

@poofichu - copied this over from what you already did on WOX-UI. I did remove the table data section since we already have a separate component for that already here.

@ineedsubstance 👌


Sorry….We ran into an issue! "PartsUnlimited"

Error while creating release definition: Index was outside the bounds of the array.

Hi @jrhalasz, thank you for reaching us.
This could be an intermittent issue. Could you please retry and update the status back?
Thanks.


If no works found - remove "Less" button on Profile page

PS: Also make the contact now button functional.

Same issue on "Works" page of Dashboard.


Questions concerning the CDTS

Moved from GCCode: https://gccode.ssc-spc.gc.ca/iitb-dgiit/nw-ws/sgdc-cdts/issues/146
@StdGit
<EMAIL_ADDRESS>Tél.:<PHONE_NUMBER>
Hello,
I am currently tasked to modernise a web based project to a .NET MVC C# application.
A part of this initiative is to work with the most modern version of the CDTS. There are a couple of questions that I have concerning the template in general:
1-	After updating the  GoC.WebTemplate-Components from 1.30.1 to 1.31.2, it appears that the GCTools link as been replaced with four links. It also seems that the text ESDC/SC IntraWeb has been replaced with “GC intranet”. The web.config has been verified for changes but none were reported. What we are wondering here is whether or not this is the intended behavior, and if so, is there a possible way to hide the GCTools (Gcconnex, etc.) links and keep the text “ESDC/SC IntraWeb” as it would be more relevant for our application. Below, you will find relevant configurations and images
(Under GoC.WebTemplate)
version="v4_0_31"
environment="ESDC_PROD"
useHTTPS="true"
Image 1 : Before the update (using template version 4_0_30, package version 1.30.1)
Image 2 : After the update (using template version 4_0_31, package version 1.31.2)
2-	This may be a feature request rather than a question. The web based application uses custom javascript to submit (POST) the form when pressing select buttons and links that are part of the template. These links (such as links in the left menu) are generated HTML by some Javascript that is part of the CDTS. The problem is that if this javascript were to generate the HTML differently (in the very unlikely event that someone decides to update the file on the CDTS directly without changing the version number), this might break the way the custom javascript references the elements through the selectors.  Also if the server goes offline or the client fails to download the scripts, the custom javascript will also break. The questions is whether it is possible to have an option in the WebTemplateCore  that will give the choice between calling the css and javascript locally rather than relying on the CDTS.
Thank you very much for your help,
Rami El-Hayek
Programmeur, GI-TI
Innovation des Solutions d’affaire (ISA)
Direction générale de l’innovation, de l’information et de la technologie (DGIIT)
Emploi et développement social Canada (EDSC), Gouvernement du Canada
<EMAIL_ADDRESS>Tél.:<PHONE_NUMBER>
IT/IM Programmer
Business Solutions Innovation (BSI)
Innovation, Information and Technology Branch (IITB)
Employment and Social Development Canada (ESDC), Government of Canada
<EMAIL_ADDRESS>/ Tel:<PHONE_NUMBER>

@shawnthompson wrote:
@rami.elhayek This is not something I see us doing in the near future but it might be something the DotNetTemplates can do.
Thoughts @s.laugh

@s-laugh wrote:
As for (1) the GCTools links, there is an open issue to implement the feature iitb-dgiit/sds/GOCWebTemplates/DotNetTemplates#316
As for (2) the local CSS & JS, the DotNetTemplates already supports a feature called the Static Fallbacks that are actually render first (then overridden by the live CDTS calls), for a situation where CDTS is down, ensuring your site stays up.
There is also a feature to add your own custom CSS and JS where you could attempt to re-add the WET styles and scripts. (CDTS from my understanding doesn't release their scripts, other than grabbing them from source) I wouldn't recommend this approach; it's not what it was designed for and will likely cause you more problems.

@MaximMartel Could you confirm this issue is still valid for version 4.0.39 ? Thanks.

This was fixed as part of https://gccode.ssc-spc.gc.ca/iitb-dgiit/sds/GOCWebTemplates/DotNetTemplates/-/issues/316. Closing issue.

This was fixed as part of https://gccode.ssc-spc.gc.ca/iitb-dgiit/sds/GOCWebTemplates/DotNetTemplates/-/issues/316. Closing issue.


Added saucelab to circle CI script

JIRA
MOB-3335
DESCRIPTION
Added saucelab to circle CI script
Types of changes
What types of changes does your code introduce to the project?
Put an x in the boxes that apply

[ ] Bugfix
[ ] New feature
[ ] Tech Debt
[ ] Breaking change
[ ] Documentation Update
[ ] Other: define what type of change it is

CHECKLIST
Put an x in the boxes that apply. You can also fill these out after creating the PR. This is simply a reminder of what we are going to look for before merging code.
Please review the guidelines for contributing to this repository.

[ ] All work relating to the ticket is complete (Code complete/Acceptance Criteria met)
[ ] Lint and unit tests pass locally (if appropriate)
[ ] Added tests that prove the fix is effective or that feature works (if appropriate)
[ ] Documentation (if appropriate)

SCREENSHOTS
[Add screenshots if any for changes you have made to the App/UI]

@dianakarh yeah i dont think is relevant no more


Polish LocalStrings_zh_CN.properties

Remove unexpected (.

Thanks for the PR. The Tomcat project manages i18n files via poeditor.com I've made these changes there (as well as several others I found) and I'll import them shortly.


[5.5] Add SeedDatabase to enable seeding the test database once or with each test

The SeedDatabase trait along with the SeedDatabaseState class adds the ability to seed the test database once at the beginning of the test suite or seed the database at the beginning of each test, also it adds the ability to run specific seeders instead of running the seeders defined in the root seeder "DatabaseSeeder" class.
SeedDatabase trait can be used along with RefreshDatabase or DatabaseTransactions trait or without them.
Simple usage:
abstract class TestCase extends BaseTestCase
{
    use CreatesApplication, RefreshDatabase, SeedDatabase;
}

By default the SeedDatabase trait seeds the test database once at the beginning of the test suite, but it can be switched to always seed at each test separately as follows

abstract class TestCase extends BaseTestCase
{
    use CreatesApplication, RefreshDatabase, SeedDatabase;

    public function setUp()
    {
        SeedDatabaseState::$seedOnce = false;

        parent::setUp();
    }
}

We can run specific seeders as follows:
abstract class TestCase extends BaseTestCase
{
    use CreatesApplication, RefreshDatabase, SeedDatabase;

    public function setUp()
    {
        SeedDatabaseState::$seeders = [
            \RolesPermissionsSeeder::class,
            \UsersCompanySeeder::class
        ];

        parent::setUp();
    }
}

No plans to add to core.

I would like to point out that seeding the test database once when running full-suite tests is faster than seeding the database in the setup() method of the base/each test class by almost 30% for a simple seed operation.
Without SeedDatabase trait:

...............................................................  63 / 510 ( 12%)
............................................................... 126 / 510 ( 24%)
............................................................... 189 / 510 ( 37%)
............................................................... 252 / 510 ( 49%)
............................................................... 315 / 510 ( 61%)
............................................................... 378 / 510 ( 74%)
............................................................... 441 / 510 ( 86%)
............................................................... 504 / 510 ( 98%)
......                                                          510 / 510 (100%)

Time: 1.61 minutes

With SeedDatabase trait:
...............................................................  63 / 510 ( 12%)
............................................................... 126 / 510 ( 24%)
............................................................... 189 / 510 ( 37%)
............................................................... 252 / 510 ( 49%)
............................................................... 315 / 510 ( 61%)
............................................................... 378 / 510 ( 74%)
............................................................... 441 / 510 ( 86%)
............................................................... 504 / 510 ( 98%)
......                                                          510 / 510 (100%)

Time: 1.14 minutes

In many cases building/deploying your application may require seeding the database with initial data, therefore its reasonable to seed the test database with the same initial data before running your test suite. @taylorotwell may be you can give it a second thought?


fix open data viewer from debug variables window

Fixes #15058
Fixes #15060

[ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[ ] Title summarizes what is changing.
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for feature-requests.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).

@rebornix not sure if you want to go this way or just revert that other change so that we use the same type as the debug variables view context key

Hey @amunger  I am moving this PR to the February milestone since today is last development day before branching off.

This is a regression that I believe we need to fix


[Decompiler] Function result unused decision is made too early and not updated

For example, in deactivate process, the decompiler decides that the result of process-disconnect is used because the register containing the result is live after. This is what the code would look like if dead-set elimination is disabled for the v0-2 variable.
               (let ((v0-2 (process-disconnect obj))
                     (v1-11 (-> obj child))
                     )
                (while v1-11
                 (let ((s5-1 (-> v1-11 0 brother)))
                  (deactivate (-> v1-11 0))
                  (let ((v1-13 v0-2))
                   )
                  (set! v1-11 s5-1)
                  )
                 )
                )

However, (let ((v1-13 v0-2)) ... is identified as a dead set and gets stripped out. But this decision happens after it decides the function result is used. So the resulting code puts the result into a completely unused variable:
               (let ((v0-2 (process-disconnect obj)))
                )
               (let ((v1-11 (-> obj child)))
                (while v1-11
                 (let ((s5-1 (-> v1-11 0 brother)))
                  (deactivate (-> v1-11 0))
                  (set! v1-11 s5-1)
                  )
                 )
                )

I think this won't be too hard to fix. I believe we correctly update the "not used" data when stripping out the dead sets and we just need to look at this again when actually adding the function to the expression stack.  Honestly I don't remember why we need to make that decision so early.  It seems like you only need to make the "is this result possibly used?" decision early on during type analysis.  Then assume it is used until you get to the expression building, at which point you have dead-set elimination info and can get it exactly right.
I'm going to wait on fixing this until a later PR because the current one (https://github.com/water111/jak-project/pull/344) is large and has a decent amount of scary changes to variable use stuff. This issue does not give us incorrect code, just messy code in somewhat rare cases.

This is fixed now.
            (process-disconnect obj)
            (let ((v1-11 (-> obj child)))
             (while v1-11
              (let ((s5-1 (-> v1-11 0 brother)))
               (deactivate (-> v1-11 0))
               (set! v1-11 s5-1)
               )
              )
             )


commerical use

the chat example seems base on Facebook models，I mean,if I worked on those default steps to build own models is that allowed commercial use? What if I want to train own model

Hi @janglichao, our DeepSpeed Chat pipeline is licensed under Apache, please see the license for more details but my understanding is that it does allow commercial use.
Our current example training recipes use OPT models which I believe would inherit the OPT license for any trained models:  https://huggingface.co/facebook/opt-1.3b/blob/main/LICENSE.md
If you use our DeepSpeed Chat pipeline with a model like GPT-J that combination would produce an artifact that is (as far as I understand) commercial compatible.
This all being said, I am not a lawyer and you should review the individual licenses carefully :)

thanks。


[GHSA-rg3q-jxmp-pvjj] Materialize-css vulnerable to Improper Neutralization of Input During Web Page Generation

Updates

Affected products
Description

Comments
LINKS :
https://nvd.nist.gov/vuln/detail/CVE-2019-11002
https://nvd.nist.gov/vuln/detail/CVE-2019-11003
REFERENCES :
CVE-2019-11002, CVE-2019-11003   - https://github.com/Dogfalo/materialize/issues/6286

Hey there again @Prz1vaL would you mind providing a reference to support the change for this advisory? You've linked two related but independent references.

REFERENCES :
CVE-2019-11002, CVE-2019-11003 - Dogfalo/materialize#6286

@Prz1vaL so those two CVEs you linked are independent from this advisory.

👋 This pull request has been marked as stale because it has been open with no activity.  If you do nothing this pull request will be closed eventually by the stale bot. Please see CONTRIBUTING.md for more policy details.


Plotting time series

geemap version: 0.6.8
Python version: 3.8.2
Operating System: Ubuntu 19.10

Description
I was trying to display the precipitationCal band of the NASA/GPM_L3/IMERG_V06 dataset. I'd like to plot the time series of the precipitation for a location, but it shows the (mean?) precipitation as a function of the band.
What I Did
import ee
import geemap

Map = geemap.Map()
Map

gpm = ee.ImageCollection('NASA/GPM_L3/IMERG_V06') \
    .filter(ee.Filter.date('2016-01-01', '2016-02-01'));
    #.select('precipitationCal');
options = {
    'bands': ['precipitationCal'],
    'opacity': 0.5,
    'min': 0,
    'max': 15,
    'palette': ['000096','0064ff', '00b4ff', '33db80', '9beb4a', 'ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000']
}
Map.addLayer(gpm, options, 'GPM');

You just need to convert the ImageCollection to Image before using the .toBands() function before adding it to the map. By default, if an ImageCollection is added to the map, it will be converted to an image using .mosaic() function, as an ImageCollection could not generate a tile layer to display on the map. This might not be what you want. So you just need to explicitly convert to an Image using .toBands(). Hope it makes sense.
gpm = ee.ImageCollection('NASA/GPM_L3/IMERG_V06') \
    .filter(ee.Filter.date('2016-01-01', '2016-02-01')) \
    .select('precipitationCal') \
    .toBands()
options = {
#     'bands': ['precipitationCal'],
    'opacity': 0.5,
    'min': 0,
    'max': 15,
#     'palette': ['000096','0064ff', '00b4ff', '33db80', '9beb4a', 'ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000']
}
Map.addLayer(gpm, options, 'GPM');

You can customize the plot parameters to make the plot look nicer.

Thanks. However I don't really know what it displayed on the map, is it the mean precipitation over the time range? I cannot provide a palette, it says there are more than one band, does it mean there are as many bands as dates?
Also if I try to set the range to ('2001-01-01', '2019-01-01') I get a EEException: User memory limit exceeded.

It is 30-min data. Your ImageCollection has 1488 bands, which is too much to display. Try the following:
import ee
import geemap

Map = geemap.Map()
ee.Initialize()

# GPM V6 30 minute data around hurricane Dorian for a single day.
range = ee.Date('2019-09-03').getRange('day')
dataset = ee.ImageCollection('NASA/GPM_L3/IMERG_V06') \
    .filter(ee.Filter.date(range))

# Select the max preciptation and mask out low precipitation values.
precipitation = dataset.select('precipitationCal').max()
mask = precipitation.gt(0.5)
precipitation = precipitation.updateMask(mask)

palette = [
  '000096','0064ff', '00b4ff', '33db80', '9beb4a',
  'ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000'
]
precipitationVis = {'min': 0.0, 'max': 15.0, 'palette': palette}
Map.addLayer(precipitation, precipitationVis, 'Precipitation')
Map

Hope you have resolved the issue. I am closing this issue for now. Feel free to reopen the issue if the problem persists.


Add streaming feature with chat history

This PR adds the ability to stream output while using the chat-history feature.
Fixes #41

Thanks, I was not sure it was even possible to implement that haha

@pepperoni21 I believe you have it in mind for the near future, but would you be able to release a new version of ollama-rs with this feature, please?


Merging renovatebot PRs are stopped by the required status check

https://github.com/mobu-of-the-world/mobu/pull/1042
https://github.com/mobu-of-the-world/mobu/pull/1043
https://github.com/mobu-of-the-world/mobu/pull/1044
The status checking often blocks dependabot PRs, but I don't know why happened in the renovatebot PRs
In my understanding, specifying required status makes these problems.
Skipping some CI makes faster cycle, so I recommend to drop the opt-in style of status check...

https://github.com/mobu-of-the-world/mobu/pull/1041/files#diff-5f78acaaea220d70af3427a7b9fbba83dbf6dbd38f8bf166fa2a0e8cd791ec91L14 is the reason, I forgot to update repository setting 🙇♂


Reorder Page Elements for Asset Page

While it's nice to see who has accessed your information, it's probably more important to actually see the information. As such, many users have suggested that we change the order on the asset page. We should try to move the box containing the "download" and "asset access" tabs to the top of the page. Additionally, reordering so that the description and metadata box is above the graphics might be nice as well.
TLDR. We should move some of the bottom elements of the asset page to the top. The graphs should be at the bottom.

@CarolineRinks this might be a good task for you to take since you have pretty good experience working with CSS and the asset page. I discussed this with @hanson-lam, but one idea for the new layout could be...
TITLE

|  ASSET ACCESS  | DOWNLOAD   |
| __||

|               DESCRIPTION                  |
|_____________________________|
                    VIZ 1
                    VIZ 2

I think the main thing would be putting the asset access part at the top or as one of the first things the user sees on the asset page. The description box, viz 1, and viz 2 can be interchanged based on what you think. If anyone else has a different suggestion add it here!

Yeah, I can work on this one! @IanMacDougall


how should key be specified

What if the key is not a string but 4 bytes of data, like 0x12345678
How can I specify the key in client side.
PSKS = {'server1' : '1234',
'server2' : '0x1a2b3c4d'}

Just use standard Python binary strings:
PSKS = {'server1': 'mystring',
        'server2': b'\x1a\x2b\3cx\4d'}

perfect, it works fine with my embedded server side now.
Thanks, great testing tool!


Fix typo in common components example docs

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

sha=9a890137c104d202e6d8f0546fa1b5fc40b252c4

Thanks for the fix, this has been merged in our internal repo and and will be available on github with the next code sync!


Split github actions building for windows(x86/x64) separately

Also the tests now can running on Windows and OSX fine

This may also close https://github.com/WebAssembly/wasi-sdk/pull/103

Is there much value in supporting both 32 and 64-bit windows?  Could we just build and ship one of them because either (a) there are not enough 32-bit windows users out there, or (b) the 64-bit windows users can just run the 32-bit binaries?   I guess that latter might not work since IIRC LTO link steps can exceed 4Gb memory limits...

Is there much value in supporting both 32 and 64-bit windows? Could we just build and ship one of them because either (a) there are not enough 32-bit windows users out there, or (b) the 64-bit windows users can just run the 32-bit binaries? I guess that latter might not work since IIRC LTO link steps can exceed 4Gb memory limits...

As LLVM still release x86 version, and on Windows, x86 are still broadly used


clf json

clf: 0.5.5
python: 2.7.9
OS: Linux (Ubuntu 12.04.5)
$ clf json

Traceback (most recent call last):
  File "~/bin/clf", line 9, in <module>
    load_entry_point('clf==0.5.5', 'console_scripts', 'clf')()
  File "~/opt/python/lib/python2.7/site-packages/clf/__init__.py", line 54, in run
    commands = f.command(arguments['<command>'])
  File "~/opt/python/lib/python2.7/site-packages/clf/api.py", line 107, in command
    commands = self._get(self._prepare_command_url(cmd))
  File "~/opt/python/lib/python2.7/site-packages/clf/api.py", line 90, in _get
    return r.json()
  File "~/opt/python/lib/python2.7/site-packages/requests/models.py", line 819, in json
    return json.loads(self.text, **kwargs)
  File "~/opt/python/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "~/opt/python/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "~/opt/python/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

It is the error due to url parse of commandlinefu, since it uses json as part of key word in url scheme.


Missing unit test for url.js

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Move metadata for docker images and containers into a single, separate file.

Might be best to refactor this rather than face the potential error when switching to different versions.

For the Dockerfile, it appears that the best solution might be based on this comment from the Docker project itself.

ARG reference
Build-time variables.

For docker run, just use the --label-file option, as documented here.

There are only two variables that make sense to be moved out, although, sure, you can use other meta-data as well:

net.bebudak.project_name = df/lnp/docker
net.bebudak.version = (whatever the current version is)

Optionally, of course, I can put in the net.bebudak.release_date, but that's not used by the start-df-lnp-docker script right now.

Potential issue is that the label-file will need to be parsed and the values fed separately into docker build, since it can't really read the key=value format of the file referenced by --label-file.
Potential solution.


can't find .csv file

Hello
so my problem is that i need to load a .csv file from my program
this is how look my folders :

when i run the program i see this in the terminal :
Trouble reading labyrinthe1.csv file
java.io.FileNotFoundException: labyrinthe1.csv (The specified file can not be found)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.util.Scanner.(Scanner.java:611)
at Labyrinthe.chargeLabyrinthe(Labyrinthe.java:11)
at Labyrinthe.main(Labyrinthe.java:143)
D:\Bureau\Cours\Licence_Informatique_Diderot\Semestre-1\IP1-Java\labyrinthe1.csv
i translated it a bit, because it was in french
But when i put the labyrinthe1.csv file in the IP1-Java folder
it work fine, but this will create a mess in my files
so i have to put everything related with this program in TP10 folder
i tried this :

i added at the top of my program "package aaa;"
but even so he can't find it
so i ask here for help :(
(I have to specify that there is no problem in my program, it was coded by my teacher, and everything worked when i tried it on school's computer )

/question this is unlikely to be VSCode-specific.


4d or 5d example?

Can you provide 4d or 5d example? It looks like the only provided example is specific to 3d interpolation (some weird manipulation on x).

See http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RegularGridInterpolator.html

ok I do not see any example, let me try to produce 5d example to be included here or in scipy


Add upper bounds to older RData releases

The only comment is that TimeZones has a higher restriction in 0.6 than in 0.7 (but I think we can ignore this fact).

Does it? I thought I took 0.10 for both.

The lower bound, not the upper bound, it is 0.7.3 and 0.7 respectively (it makes little sense, but this is what currently the registry seems to say if I understand correctly how to read it)


Updated f-string method

Used Flynt python tool to update the f-string method on all possible files of the benchmarks folder.

@cyai Would you please sign the CLA? thx

I have already signed the CLA. Even though there is an error regarding this!

Send the author email address associated with the commit has not signed the CLA. Maybe the email is not associated with your account.

Okay, but now how can I sign a new CLA using the email ID associated with the commit? If I open the link to sign the CLA, then I am logged in with my other email ID, I couldn't find where is log out and login with the other email ID!

@gbaned Any idea on how to do this?
@cyai You may just add this signed email to your GitHub account, or change the commits to use the email associated with your GitHub account. I guess these solutions should work.
Sorry for the inconvenience.

@gbaned Any idea on how to do this? @cyai You may just add this signed email to your GitHub account, or change the commits to use the email associated with your GitHub account. I guess these solutions should work. Sorry for the inconvenience.

Hi @haifeng-jin I agree with you on this. Thank you!

@cyai
So now the one you signed the CLA wiht is the same as the one on the commit?
The one you signed CLA with have to be the same one on this commit.
https://github.com/keras-team/keras/commit/afd86e95fc91b98dfb30eac27933b1e10b201b97.patch
You can check the one you used to signed CLA here:
https://cla.developers.google.com/clas

I have updated the email associated with the commits.

All checks have passed!


Add timeout to wait_for_tag method

Based on @tlongeri 's suggestion in https://github.com/ondryaso/pi-rc522/issues/44
I addded the timeout functionality to the wait_for_tag method so that it will return after a given number of seconds.
The timeout param is optional with default value of 0 (=no timeout) so that existing users of the library will not have any change in functionality unless they provide the new param.
This functionality is useful for detecting that the reader could not find a RFID tag, e.g. the card was removed.

You're right. I updated the code to handle that case.

Hi how do I use this in my code?


Login fails with security.enableWrappers = false

Describe the bug
With security.enableWrappers = false, login fails because the unix_chkpwd binary is not found in the expected location:
pam_unix(login:account): helper binary execve failed: No such file or directory

PAM expects to find the helper in the wrapper directory, which does not exist:
$ grep -z /unix_chkpwd /nix/store/bxk2n72mwfb6jz9ppywqz2d0f4s3lxha-linux-pam-1.6.1/lib/security/pam_unix.so
/run/wrappers/bin/unix_chkpwd

Steps To Reproduce
Steps to reproduce the behavior:

Build NixOS with security.enableWrappers = false.
Attempt to log in (e.g. set services.getty.autologinUser = root).
Login fails with the above error message printed in the journal.

Expected behavior
When security.enableWrappers = false, the linux-pam patch pointing to the wrapper directory should be excluded.
Additional context
I am building a minimal system that does not need any form of privilege escalation, so it is fine if unix_chkpwd is not setuid. But it seems that several packages assume security.enableWrappers = true.
Metadata
The affected system is an appliance that does not include the nix package manager. Here is the metadata from the build system (same architecture, and built from the same flake, so the same nixpkgs version):

system: "aarch64-linux"
host os: Linux 6.6.64, NixOS, 24.11 (Vicuna), 24.11.20241213.314e12b
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.24.10
nixpkgs: /nix/store/0xbni69flk8380w0apw4h640n37wn1i9-source

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

It seems like it's expected because these wrappers are SUID wrappers. SUID stuff in other distros would be stored in /sbin but as NixOS is not a FHS distro this wrapping scheme is required.
That's why running sudo from /run/current-system/sw/bin for example doesn't work.

In my case, the lack of SUID is not a problem, because login(1) is running as root. So the system works correctly if the patch is not applied and PAM tries to execute the unwrapped path (/nix/store/bxk2n72mwfb6jz9ppywqz2d0f4s3lxha-linux-pam-1.6.1/bin/unix_chkpwd) instead.
My system does not have sudo or equivalent installed, so it is fine that those wouldn't work.

libpam is a popular dependency. You would need to rebuild all reverse dependencies that lead up to login (at least shadow itself) if the patch to be made conditional.
I see a few options here:

you can build shadow without pam support: untested shadow = prev.shadow.override { pam = null; } overlay could do the trick
nixpkgs could expose a knob for libpam to make the patch application optional. That way an overlay with libpam = prev.libpam.override { withNixosWrapper = false; }. could do the trick.
something else

It feels like none of those would be reasonable for security.enableWrappers = false; knob. It could be easier to provide /run/wrappers/bin/unix_chkpwd as a symlinks to the binary directly.

Is there a reason we don't just take unix_chkpwd from $PATH? That way it'd work both ways without modifications necessary.


Documentation misleading for net5.0 - Importing Component Library

This is now misleading for net5.0.
You no longer need to add the css manually to your Index.html or _Host.cshtml for imported razor class libraries.
The referenced libraries are added as @import statements to the {BlazorDeployableProjectName}.styles.css.
Many thanks,
Steve
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d2b709f5-e04e-fee3-7eea-1364893ab997
Version Independent ID: a92c88d3-6ee8-1e69-f4c3-49eb82909746
Content: ASP.NET Core Razor components class libraries
Content Source: aspnetcore/blazor/components/class-libraries.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

To confirm: ASP.NET Core 5.0 is selected in docs

Thanks @srpeirce ... Javier said something about this IIRC. I thought I asked him what changed about static assets from RCLs, and IIRC he said that nothing changed. I'm trying to find his remarks now.

The blog post isn't quite what I was looking for; but for reference, I quoted it here ...
https://github.com/dotnet/AspNetCore.Docs/issues/17191#issuecomment-597369447

Thanks for the link @guardrex 👍.
I think the dedicated page on CSS Isolation adds some clarity.
The CSS Isolation page tells you the generated path for the css, e.g. _content/Experiment/Experiment.bundle.scp.css.
It doesn't (unless I've overlooked it) tell you that you do not necesarily need to import each libraries css, through my observations they are automatically added to {BlazorDeployableProjectName}.styles.css.
I hope this helps.

I think the dedicated page on CSS Isolation adds some clarity.

Yes ... and that might be what @captainsafia was referring to in the presentation with Dan where this subject caught my :ear:.
Actually, it wasn't Javier ... it was Pranav whom I was chatting with about this. It wasn't RCLs, per se, it was packages created from RCLs.
My question ...

We might be missing something pertaining to how NuGet packages supply static content ✨ auto-magically ✨ to the consumer in 5.0

His response ...

The mechanisms haven't changed here since 3.1, there's nothing new to report here.

https://github.com/dotnet/AspNetCore.Docs/issues/20480#issuecomment-725592178
@captainsafia, @pranavkm ... I think I'll need help on this one because there are perhaps overlapping or narrowly distinct scenarios for any of the following ...

RCLs vs. RCLs supplied by packages
3.1 vs. 5.0 scenarios
standalone WASM vs. hosted WASM vs. Server scenarios
CSS isolation interactions

Short of running a bunch of tests, I don't know how to change the doc (if it requires changes). Idk under what conditions @import statements take care of static asset references [and thus manual <link> statement(s) aren't required].
If you want me to work thru this on my own, that's cool ... I can do that ... but it will need to wait until early 2021 short of a bug 🐞 scenario with the doc because I've got a lot of work ahead over the next few weeks, then I'm taking an extended vacation over the ⛄ holidays 🎁.

UPDATE ... I'm going to work through the scenarios on my own for this. I'll mark this high priority; but given that we need UE passes on https://github.com/dotnet/AspNetCore.Docs/issues/19286 performed asap, work on this issue will occur mixed into continuing UE passes. I'll try 🏃😅 to get to this within the next couple of weeks ... 🙏 I hope! 🏃🏃🏃🏃 ... and given time constraints, I'm going to focus the updates on 5.0 scenarios and assume that the 3.x content is satisfactory.

UPDATE ... I'm going to work through the scenarios on my own for this. I'll mark this high priority; but given that we need UE passes on https://github.com/dotnet/AspNetCore.Docs/issues/19286 performed asap, work on this issue will occur mixed into continuing UE passes. I'll try 🏃😅 to get to this within the next couple of weeks ... 🙏 I hope! 🏃🏃🏃🏃 ... and given time constraints, I'm going to focus the updates on 5.0 scenarios and assume that the 3.x content is satisfactory.

Hello @srpeirce ... I finally made it to the RCL topic on the UE passes.
Yes ... at the time, you were correct about this. At some point on a PR somewhere, it was updated. It now reads ...

For library components that use CSS isolation, there's no need to explicitly link the library's individual component stylesheets in the app that consumes the library. The component styles are automatically made available to the consuming app.
To provide additional library component styles from stylesheets in the library's wwwroot folder, link the stylesheets in the consuming app's wwwroot/index.html file (Blazor WebAssembly) or Pages/_Host.cshtml file (Blazor Server):

... the key word there is "additional," and I'll probably work on that bit for the updates.
What I'm about to describe isn't what you were calling out for a fix, but I'll just place it here for possible further discussion ...
When a separate stylesheet is used, then it must be linked. Here's the setup ...

Add a new background to the RCL's wwwroot folder that will be used for a style that will be used for a
 later (extra-background.png) ...

Add an extra stylesheet to the wwwroot folder (extra-stylesheet.css) with an extra-style for the upcoming
 ...
.extra-style {
    border: 2px dashed blue;
    padding: 1em;
    margin: 1em 0;
    background-image: url('extra-background.png');
}

Add the
 with the style to the OOB Component1 component (Component1.razor) ...

    This Blazor component is defined in the TestRCL package.

    This <div> is styled by the extra-style style

    in a different stylesheet, extra-stylesheet.css.

Of course, we'll consume that from the app (Index.razor) ...
@page "/"
@using TestRCL

Hello, world!

Placing the Component1 component from the RCL here ...

<Component1></Component1>

Run it ....... Yikes! 💥 ...........

Add a <link> for the stylesheet to the app's wwwroot/index.html ...
<link href="_content/TestRCL/extra-stylesheet.css" rel="stylesheet" />

Lick'ed IT! 🐄👅 .....

......... soooo .............
I'll double-check the earlier fix for what you were calling out, and I'll work on the rest of the text and examples. If you have any further feedback, I'm :ear: here. However, I'll leave this issue closed given that I think this issue is fixed. Otherwise, thanks again for calling it out.
 I actually think that most of those are non-concerns. I'll check a few things ... run a few tests and whatnot ... confer with @daveabrock on CSS Isolation if I hit a snag with those aspects ... but at the end of the day, I don't think that most/all of those things are going to require special coverage. We'll see tho ... I'm just getting into this now. I'll try to remember to ping u on the PR in case you want to take a look at it later.

OH! lol ... it was the PR for THIS ISSUE 🤦♂ ...
https://github.com/dotnet/AspNetCore.Docs/pull/21197/files
Ok. I guess I cross-linked for my laundry list of probably non-concerns to address. :smile:

Awesome thanks, just out at the moment but I'll read your comments properly in a bit. Many thanks for looking at this 👍

Very well ... I think what you were asking about is ok. I'll ping u on the PR in a day or next week.
I'm finding other things to fix. For example, there's coverage in the Host and deploy area that should be moved to this topic and fleshed out further.


Error configuring systemd service when using custom video custom

I used the following command to try to configure the service: sudo linux-enable-ir-emitter -v -d /dev/video0 configure
I get the following message when I am done configuring:
INFO: The driver has been successfully generated.
ERROR: Error with the systemd boot service.

When I check the logs in journalctl, I saw the following:
linux-enable-ir-emitter[10416]: CRITICAL: The device /dev/video2 does not exists.
linux-enable-ir-emitter[10416]: INFO: Please choose among this list: /dev/video1 /dev/video0

It seems like it's not using the video0 device specified with the configure command.

Do you see other files than video0 in /etc/linux-enable-ir-emitter/ ?
If a file video2 is in the dir, execute sudo linux-enable-ir-emitter -d /dev/video2 delete and then sudo linux-enable-ir-emitter boot enable. I think this should solve the issue.
Otherwise, can you provide the output of linux-enable-ir-emitter boot status and  cat /usr/lib/systemd/system/linux-enable-ir-emitter.service

There is no other file than video0 in /etc/linux-enable-ir-emitter/
Output of linux-enable-ir-emitter boot status
CRITICAL: The device /dev/video2 does not exists.
INFO: Please choose among this list: /dev/video1 /dev/video0

Output of cat /usr/lib/systemd/system/linux-enable-ir-emitter.service
[Unit]
Description = enable the infrared emitter
Requires =  dev-video0.device
After = multi-user.target suspend.target hybrid-sleep.target hibernate.target suspend-then-hibernate.target dev-video0.device

[Service]
Type = oneshot
ExecStartPre = /sbin/modprobe uvcvideo
ExecStart = /usr/bin/linux-enable-ir-emitter run

[Install]
WantedBy = multi-user.target suspend.target hybrid-sleep.target hibernate.target suspend-then-hibernate.target

Please execute linux-enable-ir-emitter -d /dev/video0 boot enable, it should work

Hi sorry for the late reply,
I get the same error message:
ERROR: Error with the systemd boot service.
The output of journalctl -u linux-enable-ir-emitter.service is the following:
systemd[1]: Starting linux-enable-ir-emitter.service - enable the infrared emitter...
linux-enable-ir-emitter[28624]: CRITICAL: The device /dev/video2 does not exists.
linux-enable-ir-emitter[28624]: INFO: Please choose among this list: /dev/video1 /dev/video0
systemd[1]: linux-enable-ir-emitter.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: linux-enable-ir-emitter.service: Failed with result 'exit-code'.
systemd[1]: Failed to start linux-enable-ir-emitter.service - enable the infrared emitter.

I've committed a fix. But I don't know when all the distro repo's will be updated.
So either you use the bash script to reinstall the software.
Or you can change the contents of /usr/bin/linux-enable-ir-emitter with https://raw.githubusercontent.com/EmixamPP/linux-enable-ir-emitter/master/sources/linux-enable-ir-emitter.py

Hello,
I just tried the new version and it works correctly!
Thank you for the quick fix.

The 4.1.5 is published on every distro repo


Automated testing: Large demo applications

Currently, it is very difficult to determine when a change to doppio has broken a large demo application. We usually discover these issues when trying to make a release: we boot up a juggernaut in doppio manually, only to discover that it chokes and dies (or infinite loops).
It would be excellent if we had an extended unit test suite that included running some of the standard large demo applications we support. Then, we could have Travis-CI run those tests.
The build script would download JAR files for the applications into vendor, and then the test runner would invoke them with particular command line options.
Things to test:

Rhino (not present in JDK8; replaced w/ Nashorn)
Nashorn (already in JDK at vendor/java_home/lib/ext/nashorn.jar)
Clojure
Kawa-Scheme
Jython
JRuby
Armed Bear Common Lisp
javac
javap

Note that travis-ci has a timeout of 50 minutes for each run, and will kill a script that hasn't printed any text to terminal in the past 10 minutes.
Implementation Proposal

A new grunt target, grunt test-all, which:

Runs unit tests and special tests.
Downloads any needed JAR files for the special tests.

We can host these on the doppio_jcl repository.

Each test is just a set of command line options needed to run the program on some input. The test runner will compare Doppio's output to HotSpot.

Example: -jar ./vendor/java_home/lib/ext/nashorn.jar testFile.js

Each test will be specified in a JSON file with the following structure:

{
  // Array of JAR files required. These will be fetched from `doppio_jcl`.
  "dependencies": ["rhino.jar"],
  "command": ["-jar", "vendor/jars/rhino.jar", "classes/special/rhinoFile.js"]
}

Open Questions
What directory structure should we use? With this setup, we now have four types of files related to testing:

Test resources, e.g. testFile.js.
External JAR dependencies, e.g. rhino.jar.
Output files, e.g. rhinoTest.out
Test configurations, e.g. rhinoTest.json.
Unit test files, e.g. classes/test/FileOps.java

It might make sense to have a top-level test directory with the following structure:

resources: Input files for the tests. I can put classes/test/data files in here, as well as input files to the special tests.
classes: Actual class files.

tests: Takes the same form as the current classes/tests.

specialTests: Contains JSON config files for the special tests.

JAR files will go into vendor/jars.

@perimosocordiae Do you have any thoughts? I'm not going to embark upon this until sometime after new-objects is merged, so we have time for discussion.

I'd rather leave the existing unit tests untouched, and just add a new top-level directory called large_demo_tests with the various configurations and output files.
I like the idea of fetching the necessary JARs on-demand, and of having some automation for these things in general.
Also remember that we have some "special test" files, which don't get run in the normal unit testing, but are good to run before a release. Perhaps we can merge those with the new system.


[BUG] Tooltip Design Makes Words Hard to Read

Environment
Self-Hosted (Docker)
Version
1.7.2
Describe the problem
Hovering over the settings menu: the tooltips used to have a style applied so that you could see the text, but now the words kind of mingle with the text they overlay.
(I am using Play With Docker)
Additional info

Please tick the boxes

[X] You are using a supported version of Dashy (check the first two digits of the version number)
[X] You've checked that this issue hasn't already been raised
[X] You've checked the docs and troubleshooting guide
[X] You agree to the code of conduct

Ah yeah, that is definitely a bug. I made some recent changes to the tooltip, and didn't notice that it had broken the stylings for it elsewhere. Thanks for raising, I'll try and get this fixed this evening

Fixed and merged in #207 :)


Formalize titles and descriptions in AA and KFP schema

Replace Github with GitHub (to use formal representation)
Slight tweaking of titles and descriptions (only impact is on the UI)

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Could you please compare and use the same pattern with the kfp schema file?

Done. I forgot to push the change yesterday.


Suggestions from Discord

Keeping these in one place:
nitrofenix: i'd base it on banks but maybe with half the amount of slots per tier
trunksbomb: 8 buckets/16/64/256/1024/1000000

Tiers/capacities from the old mod (for reference/discussion only):
1: 3 tanks of 4000 mB each
2: 6 tanks of 16000 mB each
3: 9 tanks of 64000 mB each
4: 12 tanks of 256000 mB each
5: 15 tanks of 1024000 mB each
6: 18 tanks of 4096000 mB each
7: 27 tanks of 247483647 mB each

Huh, would you look at that - I was pretty spot on for capacity :)
Additional suggestions:

Lockable slots
Automatic pickup of fluids when standing in them? Probably not a good idea
use the tank itself as the bucket (no dedicated bucket item like entangled buckets)
shift + click air to change modes, shift + scroll while in "build" mode to change which liquid you're selecting
definitely a "void" mode to void excess fluids
maybe a sponge mode, or a mode that functions like a hose pulley from Create so you can target one block of fluid and have it suck up other blocks in the same body of water
shift+click bucket of fluid in inventory while Tank GUI is open automatically inserts the fluid from that bucket, like Modern Industrialization machines

Done so far:

tank 1-7 and dock
can interact with buckets/similar in gui including shift click
can interact with pipes in world using dock
can lock slots


🚀 Release 7.3.0

Types of changes

[X] Refactoring/add tests (refactoring or adding test which isn't a fix or add a feature)
[X] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[X] I have updated the documentation accordingly
[X] I have updated the CHANGELOG with a summary of my changes
[X] My changes have tests around them

Fixes #1372 (I think -- doesn't change paths, just the hanging)
@nddery I don't think the paths generated by extractTemplates are necessary correct -- but alas.

I'm just going to test the templates with this and then I'll release it.

@SleeplessByte awaiting new release !

I don't think the paths generated by extractTemplates are necessary correct -- but alas.

@SleeplessByte is the path.posix change here fixing or attempting to fix them ? What is wrong with them ?

Inside react static we have Linux paths (that's what the slash function is doing). I change here to POSIX because otherwise the test generates a windows path and the internal creates a POSIX path.
The value itself is what worries me. It's something like:
__react_static_root__/../../../../../../src/path/to/whatever

The value itself is what worries me. It's something like:
react_static_root/../../../../../../src/path/to/whatever

Yeah.. that is unexpected. __react_static_root__ should have replaced all those ../../../.
Pulling this branch locally and building the "basic" template, paths toward the templates look like: __react_static_root__/src/path/to/....  With what configuration (mainly paths.*) are you getting these results ?

With what configuration (mainly paths.*) are you getting these results ?

I'm seeing it in the tests that I changed (which were failing on windows, but not on linux). I'm not seeing it anywhere else so far :)
I'm wondering if this is related to #1360? in that case it puts two absolute paths together haha

I wonder if it would make sense to also run the test suite on Windows - Travis seems to support "Windows Server, version 1809".  I'm not sure what would cause this and unfortunately don't have a Windows machine to debug further.

I probably will move the testing away from Travis this month. It's been failing intermittently and GH Actions work just fine. That said, I have more than one windows runner and so do my co-workers so we'll be alright.
On 11 Feb 2020, 02:22 +0100, Nicolas<EMAIL_ADDRESS>wrote:

I wonder if it would make sense to also run the test suite on Windows - Travis seems to support "Windows Server, version 1809". I'm not sure what would cause this and unfortunately don't have a Windows machine to debug further.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hey just wondering how is this moving along ? It'd be great if it were to solve windows machines getting stuck on bundling (although there is the workaround of using --debug).
Thanks for your work !

Finally got to install a Windows VM and here's what I've noticed so far.
The result of path.posix.relative(config.paths.ROOT, templatePath) is wrong. Given that config.paths.ROOT is something like C:\Users\nddery on Windows, the above translate to something like path.posix.relative('C:\Users\nddery', './src/templates/NotFound').
Running it in Node on Window, I do get strange results:
> process.cwd()
'C:\\Users\\nddery\\react-static'

> path.posix.relative('C:\Users\nddery\react-static', './packages/react-static')
'../packages/react-static'

Note the extra ../ there. Wondering if mixing path style in path.posix.relative is tripping it up or something ? I've found https://github.com/nodejs/node/issues/17413 which mentions that " windows has a separate cwd for each drive", but not sure how this all applies here and how to address it.

@SleeplessByte I've debugged a bit further and from what I can see, not using path.posix fixes the issue.
Seems like when using path.posix.relative the output is wrong, but while using path.relative, it is correct:
> path.posix.relative('C:\\Users\\nddery\\react-static', './packages/react-static')
'../packages/react-static'

> path.relative('C:\\Users\\nddery\\react-static', './packages/react-static')
'code\\react-static'

Since we're using slash in extractTemplates, Windows backslash will be converted to slashes already.
This will result in links like __react_static_root__/src/path/to/whatever when config.paths.dist points inside the project root while it will end up with links like __react_static_root__/../../tmp when config.path.dist points outside of the project root. The __react_static_root__ part ensures we don't add absolute paths to the generated bundles.
Can't seem to create a pull request that points to this pull request (as the branch for it is on your account), so here's the commit where I fixed the tests for Windows.
Let me know what you think!

I think that could be it. The paths have always been shady. I've tried to increase cross-env compatibility by using posix, but the fact that we're not using it everywhere is probably, like you see emperically, what caused the bugs.
I'll merge in your commit and we'll try it out.

Just a quick note to say thanks for your time and effort on this, it is much appreciated!


[Epic] Implement hot reload for changes in markdown files

In Flowershow V1 hot reload upon changes in markdown files was handled by Contentlayer, which we've replaced with our MarkdownDB package.
Tasks

[x] #502
[ ] ...

FIXED. https://github.com/datopian/flowershow/pull/620


Conditional marker rendering

When we try to use conditional rendering like:
<GoogleMap ...>
  {showMyMarker && <MyMarker lat={lat} lng={lng} />}
</GoogleMap>

the following exception will be thrown:
TypeError: Cannot read property 'props' of null
I suppose the problem is that the GoogleMap component assumes that all the children are valid react components, so when one of the child is null (as in the example) the error is shown.

Duplicate of https://github.com/istarkov/google-map-react/issues/164

For interested, the following approach works:
<GoogleMap ...>
  {showMyMarker ? <MyMarker lat={lat} lng={lng} /> : []}
</GoogleMap>

null, undefined also will work

My current solution:
const marker = (result) => result || []

<GoogleMap ...>
  {marker(showMyMarker && <MyMarker lat={lat} lng={lng} />)}
</GoogleMap>

IMO it looks more clean now.
BTW null doesn't work for me. It shows the same error. I saw your example, but in my code it doesn't work. I will stay with empty array :)


Update attack-simulations.md

Updated the page as the attack simulator is not available on P1
fixes#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/10509

@JohanFreelancer9 Please copy review

Learn Build status updates of commit 682368f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

microsoft-365/security/defender-endpoint/attack-simulations.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@Dansimp Please merge this PR. Thanks

@Dansimp Gentle reminder.


Feature: Add support for hub_routing_preference property on azurerm_virtual_hub resource

Latest version 0.3.0 of avm-ptn-virtualwan module doesn't appear to expose an input variable to specify the hub_routing_preference argument to set the routing preference to ASPath or VpnGateway on azurerm_virtual_hub resource.
This is similar to the issue reported in the  caf-enterprise-scale module: https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/issues/861.
I have considered working around this by using azapi_update_resource but I can't set ignore_changes on modules.
Any plans to add support for this in the next release?
Thank you!

Thanks @jinkang23 for the feedback. We will look at your request.

Isn't this a duplicate of https://github.com/Azure/terraform-azurerm-avm-ptn-virtualwan/issues/7?

Fix pushed in 0.v.4.2


fix issue with npm pacakges using json files

https://github.com/webpack/webpack/issues/965

It might make sense to add this as a default, but you could also add the loader through the task-config.js options (exposed in the blendid branch. We can re-evaluate after blendid is merged and 4.0.0 is released.


[ Feature Request ] Site Information

Issue type: Feature Request

Python version:
NetBox version:

This feature request is related to site and tenant information. In tracking our sites and providing data related to a site, it would be nice to have the ability to add custom sections or critical contact information related to power, HVAC, building management, etc. Most of this information is incredibly important from an outage/disaster perspective and would information that would apply to an entire building (not necessarily tenant specific, but maybe).
It would be nice to have the same ability within the tenant information for pertinent internal contact information, vendor support information, etc related to a location.

You may want to add custom fields for some of this, but please keep in mind that NetBox is primarily an IPAM/DCIM application and does not address facilities management. #1344 has been opened to explore the possibility of more flexible contact assignment.

Well add me to the list for the DC contact/support info request. That's pretty important for a site.


aten.adaptive_avg_pool2d

For adaptive_avg_pool2d and adaptive_avg_pool3d, I can get correct stride and kernel size calculated from input and output size, but the values after doing pooling are incorrect. It seems that the implementation details are missing on pytorch doc, so these two converters are blocked. More details see: https://stackoverflow.com/questions/53841509/how-does-adaptive-pooling-in-pytorch-work


Support IsDisabled

The User Resource currently does not support IsDisabled.
Add support for IsDisabled.

@marcoquerque Thanks for your contribution! Looks good but the doc check is failed. Please run make docs and commit generated markdown files.

@marcoquerque Thanks for your contribution! LGTM!


Display of "blank" regions

It appears that all regions are always assigned an owner, will investigate with a use case and see what can happen. Alpha should drop to low value if not zero.

Took a look at the data. It looks like we only know when a city is settled. We can generate a Factless_Fact table for all the turns by settlement :

between recorded owners
before minTurn owner
after maxTurn owner


Language expansion compatability

Create a JSON file that contains mappings of [where it goes in UI, the actual text] for all visible text in the UI. Categorize it by language. For example:
{
    "english":{
        "file_dropdown":"File",
        "edit_dropdown":"Edit",
        "cell_dropdown":"Cell"
    },
    "latin":{
        "file_dropdown":"Genus",
        "edit_dropdown":"Mutatio",
        "cell_dropdown":"Cella"
    }
}

And so on. Then create a dropdown option for "Help" that allows you to switch between supported languages.

Also the CLI help menu needs to be updated along with the UI text


Remove CIL_VERSION environment variable from conda build action

(Hopefully) closes #923

Action is failing, but not due to the CIL_VERSION change, due to some issue with apt-get update

Testing with the fixed action branch showed that the changes of deleting the CIL_VERSION setting do work.


Segment Fault in AudioSpectrogram

Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
tf 2.9 and 2.11.0-dev20221013
Custom Code
No
OS Platform and Distribution
Linux Ubuntu 20.04
Mobile device
No response
Python version
3.8
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
CUDA 11.5
GPU model and memory
No response
Current Behaviour?
A **Segment Fault** can be triggered in `AudioSpectrogram`, whether executed with CPU or GPU.
Maybe more checks are needed.

Standalone code to reproduce the issue
import os
os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
import tensorflow as tf
import numpy as np
print(tf.__version__)
for _ in range(20):
    try:
        with tf.device("GPU:0"):
            window_size = -94
            stride = 83
            magnitude_squared = False
            input = tf.random.uniform([12, 4], dtype=tf.float32)
            res = tf.raw_ops.AudioSpectrogram(
                window_size=window_size,
                stride=stride,
                magnitude_squared=magnitude_squared,
                input=input,
            )
    except:
        pass

Relevant log output
Segmentation fault (core dumped)

@shijy16 ,
I was able to execute the code without any issues with the alternative approach. Kindly find the gist of it here.

@tilakrayal
It is similar to #58181 that the absolute path of devices must be specified. And once the line with tf.device(xxx) is removed to let TF automatically choose device, the bug shows up again.
It is very strange....

tf.raw_ops are basically designed to be consumed by downstream library users, not end users.
Usually, these APIs are less strict in terms of validation etc., which is fine since mainly library writers are supposed to use these symbols.
If available, please prefer high level API for general use case scenarios.
Refer this RFC for more details. Thanks!


Vote Revealer Suggestion

Show votes in a imgui component (just like spectator list), so we can move, resize, etc. And even make it stream proof

Nice suggestion, in this way shoud be radarhack too

I would really love to see reason of the vote with players calling/affected displayed.


Custom Payload Fields

It'd be nice to have a setting to set which fields are returned in the token. For instance, I like to use non-sequential user_ids.

Ah, I see you already do this with JWT_PAYLOAD_GET_USER_ID_HANDLER and JWT_RESPONSE_PAYLOAD_HANDLER. Great!
Closing.

The source says JWT_PAYLOAD_GET_USER_ID_HANDLER is going to be deprecated in favor of JWT_PAYLOAD_GET_USERNAME_HANDLER. Is there a timeline for that?
So I imagine the payload will change from:
{
'user_id': n,
'token': 'xxx'
}
to:
{
'username': 'jimbo',
'token': 'xxx'
}
The problem with this is that I use non-username auth, ex:
{
'email'<EMAIL_ADDRESS>'token': 'xxx'
}
So, we either need to use a custom field and simply call it 'username', or we need a setting the gives us control over the name of the value over the default 'username' field.

This is important for us, I'd love to get an answer on this issue.
Thanks!

I'd also appreciate some options to customize payload. In my case, I need to add more fields to the payload such as full_name, is_owner, language_code.
Is this already available for customizing?

@JakubManaPribe Were you able to do it? Second this

@sanfilippopablo sadly not yet but this weekend im going to work more around jwt. Ill let you know later. (Please let me when you will find it out)

Custom payload fields would be really valuable for implementing something a little bit like OAuth scopes, which I would like to do: https://api.slack.com/docs/oauth-scopes
e.g. if the user logs in through a public kiosk (and custom kiosk route), the payload has a 'kiosk' value set, which limits actions to read-only using Django Rest's permissions functions. If they log in using the normal route, the same user has more access to their account.

I had this problem as well and there is already a way to customise both the token payload and the API Response payload.
Basically, set the following settings in your settings.py
JWT_AUTH = {
    'JWT_RESPONSE_PAYLOAD_HANDLER': 'custom_jwt.jwt_response_payload_handler',
    'JWT_PAYLOAD_HANDLER': 'custom_jwt.jwt_payload_handler',
}

You can define the payload in custom_jwt.py
from datetime datetime datetime
from calendar import timegm
from rest_framework_jwt.settings import api_settings

def jwt_payload_handler(user):
    """ Custom payload handler
    Token encrypts the dictionary returned by this function, and can be decoded by jwt_
    """
    return {
        'user_id': user.pk,
        'email': user.email,
        'language': user.userprofile.prefered_language.url_param,
        'name': user.userprofile.name,
        'exp': datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA,
        'orig_iat': timegm(
            datetime.utcnow().utctimetuple()
        )
    }

def jwt_response_payload_handler(token, user=None, request=None):
    """ Custom response payload handler.

    This function controlls the custom payload after login or token refresh. This data is returned through the web API.
    """
    return {
        'token': token,
        'user': {
             'email': user.email,
        }
    }

@educalleja Thanks for that. I'm having difficulty in decoding and using the additional data. How does one get back the payload from the token? I've added a custom userRole field inside the encoded token which i'd like to decode and check within my custom permissions file

@paw1 I think you can use rest_framework_jwt.utils.jwt_decode_handler to decode the token, and you should obtain the dictionary defined in your custom jwt_payload_handler

@educalleja is there anyway to set the expiration date of the token based on a condition? Like if the user checks a "remember me" checkbox on the sign-in form.

@dakoto747 The library jwt checks for the value of the attribute exp to determine whether a token is expired or not.
Have a look at the source code of the function jwt_payload_handler in utils.py. The returned payload contains a key named 'exp' which default value is:
'exp': datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA

You can define your custom function jwt_payload_handler as I detailed before and set that value according to a condition.
def jwt_payload_handler(user):
    """ Custom payload handler
    Token encrypts the dictionary returned by this function, and can be decoded by rest_framework_jwt.utils.jwt_decode_handler
    """
    if user.is_remembered:
        expiry_date = datetime.datetime(2018,1,1)   # User's tokens will expiry on new year's day
    else:    # Tokens will expiry after the default expiration time has passed.
        expiry_date = datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA
    return {
        'user_id': user.pk,
        'email': user.email,
        'is_superuser': user.is_superuser,
        'exp': expiry_date,
        'orig_iat': timegm(
            datetime.utcnow().utctimetuple()
        )
    }

However, be aware of this approach. A generated token will be valid for a long time and that can be a security thread if a token is stolen. But you can probably get the idea and fit the code for your use case

@educalleja Thanks a lot! What I was missing was adding the 'is_remembered' property to my User model(I just wanted to use a post variable from the JS frontend).
Also thanks for the security advice! I would be taking that into account.

@educalleja  I implemented what you had suggested and it worked pretty well for me, I am generating tokens manually as is specified in the docs however I am getting an error when i try to refresh the token or verify it on the endpoint.
 curl -X POST -H "Content-Type: application/json" -d '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmlnX2lhdCI6MTUwMDI5OTUyNCwidXNlcl9pZCI6IlMxNjQxNzMiLCJleHAiOjE1MDAzODU5MjR9.mTNn44Xm9lBp1v8WkUrkp3kdYSCsOrqHACa7fVq2qi8"}' http://localhost:8000/api-token-verify/
 {"non_field_errors":["Invalid payload."]}%

I did a print of my payload and here is what I get
{'orig_iat':<PHONE_NUMBER>, 'user_id': u'S164173', 'exp':<PHONE_NUMBER>}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmlnX2lhdCI6MTUwMDI5OTUyNCwidXNlcl9pZCI6IlMxNjQxNzMiLCJleHAiOjE1MDAzODU5MjR9.mTNn44Xm9lBp1v8WkUrkp3kdYSCsOrqHACa7fVq2qi8

I am not using django's default auth mechanism, my auth works like this,  i pass in a user id to my api endpoint, it verifies it against an external db, and then sends an otp to the client after the verification of the otp i will return the jwt token to authenticate with other api endpoints.
 payload = jwt_payload_handler(client_id)
 token = jwt_encode_handler(payload)
if (result[0] == otp):
                self.deleteOTPQuery(client_id)
                payload = jwt_payload_handler(client_id)
                access_token = jwt_encode_handler(payload)
                print(payload)
                print(access_token)
                return Response({'message': 'Partner Verified',
                                'access_token': access_token},
                                status=status.HTTP_200_OK)

Here is the custom function i implemented based on what you had suggested here.
from datetime import datetime
from calendar import timegm
from rest_framework_jwt.settings import api_settings

def jwt_payload_handler(client_id):
    """ Custom payload handler
    Token encrypts the dictionary returned by this function, and can be decoded by rest_framework_jwt.utils.jwt_decode_handler
    """
    return {
        'user_id': client_id,
        'exp': datetime.utcnow() + api_settings.JWT_EXPIRATION_DELTA,
        'orig_iat': timegm(
            datetime.utcnow().utctimetuple()
        )
    }

def jwt_response_payload_handler(token, user=None, request=None):
    """ Custom response payload handler.

    This function controlls the custom payload after login or token refresh. This data is returned through the web API.
    """
    return {
        'token': token
    }

Can you or someone please point out what is happening here and what can i do to make it work ?

@uber1geek The only reason I see in the source code why you might receive an Invalid Token error message is when your payload does not contain a username field.
Django-rest-framework-jwt by default checks that a username field is included in the payload. You can see this in the method in class BaseJSONWebTokenAuthentication.authenticate_credentials and the method in class VerificationBaseSerializer._check_user.
This is to ensure that the payload contains expected user information and identify a user.
You probably will need to create your own VerifyJSONWebTokenSerializer and RefreshJSONWebTokenSerializer and overwrite the method validate, and use these two serializers on your API to validate the token send in the http request. Because you don't have a username field in your payload, this method raises the ValidationError you can see as "Invalid payload".

Hey guys, especially @educalleja any comments on https://github.com/GetBlimp/django-rest-framework-jwt/issues/22#issuecomment-470118614 ?


Fix a typo and update one url

Fix a typo and update one url

NOTE: Please check the “Allow edits from maintainers” box below to allow
reviewers fix problems on your patch and speed up the review process.
Please delete this note before submitting the pull request.

This change is

@chenopis why did you merge this when I had an outstanding comment?

@mikedanese Sorry. http://issue.k8s.io/1755 redirects to https://github.com/kubernetes/kubernetes/issues/1755 so I thought using the final URL was fine. Is it better to use the issue.k8s.io format?

Since the compact form, http://issue.k8s.io/1755, makes things simpler, I'm reverting to that in PR #3047 and turning it into a clickable link.


Task Space Mapping for Franka Kitchen environments

Hello,
I am trying to set up a task-space training pipeline for the Franka Kitchen environments.
My understanding is that the input to RoboHive environments is in joint-space. In the teleop script the input to the rpFrankaRobotiqData-v0 environment is simply the normalized qpos.
This does not work for the Franka Kitchen tasks. I have a trained torchRL agent which predicts the actions, qpos and qvel. I found that the env.robot._act_mode is "vel" for the Franka Kitchen environments, so I expected that the action is the normalized qvel i.e. action =  env.robot.normalize_actions(qvel).
This does not work and the robot does not move as expected. What am I doing wrong?
.
PS - This seems like a bug in the normalize_actions function. Shouldn't it be:
                        act_rng = (actuator['vel_range'][1]-actuator['vel_range'][0])/2.0

instead of
                        act_rng = (actuator['vel_range'][1]-actuator['pos_range'][0])/2.0

Using the qvel directly without normalizing gives close to expected results. Even then, it doesn't exactly follow the same trajectory as the predicted actions, but it comes quite close.
Related: #142

I haven't tested in cases you are using it now. This might be a good chance for me to test those. I'm traveling this week. I'll be able to take a look next week.


_posts/0000-01-02-Lilli221intro.md

I am now creating a pull request.

i have successfully created a pull request