release_full_compile_millis flutter_gallery_win__compile regression

https://flutter-flutter-perf.skia.org/e/?begin=1601950322&end=1602017523&keys=X7ebbd68d9692047b75b46186abf9b94a&num_commits=50&request_type=1&xbaroffset=21815
First seen at https://github.com/flutter/flutter/pull/67029, although I don't see why that would be the case.
/cc @stuartmorgan

flutter_gallery_win__compile is compiling for Android; my PR only changes code used in compiling for Windows and Linux.
Given how noisy that graph is, it could have started earlier (e.g., the spike at the last engine roll) or later.

Thanks, Stuart, that makes sense and matches what I thought.
@liyuqian any thoughts here? Dropping tool, adding engine in case it's the engine roll.

Yes, it could also be caused by the NNBD commit https://github.com/flutter/flutter/commit/e826442ef4215d6d32ec668ce798c6b3f1d72936 (one commit after #67209). CC @jonahwilliams
Considering the noise, we need someone to run this test multiple times locally to bisect and identify exactly which framework commit caused this regression.

This looks bimodal and noisy. A run after the "regression" shows a value that is back to the original value. I am reducing the priority of this issue.

@jonahwilliams reverted his change here https://github.com/flutter/flutter/pull/67433 and the previous perf behavior was not restored.

I think we can close this issue now as the metric has dropped significantly to the normal level after these 3 commits:

https://github.com/flutter/flutter/commit/f1c1d944e3173cf2bcd43f27904b8dd137957249
https://github.com/flutter/flutter/commit/ab9373bf48e7eddaa1701b2bb56b259a1cc25a43
https://github.com/flutter/flutter/commit/13bf341584aa191ca940259a817cbddfa5a44e4d


Is there a way to upload any file like txt or PDF? (Vue)

I want to add a possilibity to add any file. Something like git has. It may be done as icon or as additional button. Even with drag&drop would be perfect.
Even writing an issue in the github you can add any other file:

And check it how it looks in the preview:

Is there  a way to achive something like that in an Editor and a Viewer in Vue?

@tomaszmac
This is not just a matter for editors. I think you need to develop a custom toolbar button or plugin.

When the Custom toolbar button is clicked, upload the file to the server
Get a link.
Then add a link to the body of the editor or outside of the editor.

FYI, I think D&D can use handleDrop, but I can't help you right away because I'm working on something else.

I hook this function addImageBlobHook :
hooks: {
            addImageBlobHook: function (blob, callback, source) {

                fileName = blob.name;
                var reader = new FileReader();

                reader.onload = function (_a) {s

                    var data = {};
                    var content = reader.result;

                    data.fileName   = fileName;
                    data.content    = content;
                    data.extension  = fileName.split('.').pop();

                    $.ajax({
                        type: 'POST',
                        data: data,
                        url: '/uploadFile,
                        success: function (data) {
                            var res = JSON.parse(data);
                            $('.toastui-editor-close-button').trigger('click');
                            var isImage   = new RegExp("(\\.(webp|jpg|jpeg|gif|bmp|png))$", "i"); // /(\.(webp|jpg|jpeg|gif|bmp|png))$/
                            if (isImage.test(res.title)) {
                                editor.insertText('!['+altText+']('+res.url+')')
                            } else {
                                editor.insertText('['+altText+']('+res.url+')')
                            }
                        },
                        error: function () {
                            alert('error to insert file');
                        }
                    });
                };
                reader.readAsDataURL(blob);
            }
        }

In PHP you can do this to write this file :
// Decode base64 data
    $fileName               = $_POST['fileName'];
    $extension              = $_POST['extension'];
    list($typeFile, $data)  = explode(';', $_POST['content']);
    list(, $data)           = explode(',', $data);
    $file_data              = base64_decode($data);
    file_put_contents('my path', $file_data);
   // todo return url path of file

I hook this function addImageBlobHook :
hooks: {
            addImageBlobHook: function (blob, callback, source) {

                fileName = blob.name;
                var reader = new FileReader();

                reader.onload = function (_a) {s

                    var data = {};
                    var content = reader.result;

                    data.fileName   = fileName;
                    data.content    = content;
                    data.extension  = fileName.split('.').pop();

                    $.ajax({
                        type: 'POST',
                        data: data,
                        url: '/uploadFile,
                        success: function (data) {
                            var res = JSON.parse(data);
                            $('.toastui-editor-close-button').trigger('click');
                            var isImage   = new RegExp("(\\.(webp|jpg|jpeg|gif|bmp|png))$", "i"); // /(\.(webp|jpg|jpeg|gif|bmp|png))$/
                            if (isImage.test(res.title)) {
                                editor.insertText('!['+altText+']('+res.url+')')
                            } else {
                                editor.insertText('['+altText+']('+res.url+')')
                            }
                        },
                        error: function () {
                            alert('error to insert file');
                        }
                    });
                };
                reader.readAsDataURL(blob);
            }
        }

editor.insertText(''+altText+''). This kinda works but when I'm using WYSIWYG it's escaping all of the signs like dots and so on :(

@tomaszmac
This is not just a matter for editors. I think you need to develop a custom toolbar button or plugin.

When the Custom toolbar button is clicked, upload the file to the server
Get a link.
Then add a link to the body of the editor or outside of the editor.

FYI, I think D&D can use handleDrop, but I can't help you right away because I'm working on something else.

It all works until step 3. When I use the example above with editor.insertText it's not always inserting it or is escaping special sings.

Hi, I updated code, try to send Ajax return with this echo json_encode($myArray); and it's should be good.
editor is the name of variable which contain Editor class, like this :
editor = new Editor({
        el: document.querySelector('#div'),
        previewStyle: 'vertical',
        height: '400px',
        },

Problems I have right now are:

When I use WYSIWYG and I add a link (for tests it's static) it gives me wierd output:

Code:
editor.insertText('[testPDF](https://www.howtogeek.com/downloads/4/file/2020/05/PC_Building_Demystified.pdf)');

Output:

Problems I have right now are:

When I use WYSIWYG and I add a link (for tests it's static) it gives me wierd output:

Code:
editor.insertText('[doggo](https://www.howtogeek.com/downloads/4/file/2020/05/PC_Building_Demystified.pdf)');

Output WYSIWYG:

Output markdown:

When I click on a link it opens in the same tab. How to add target="_blank"?

Yes I don't now how to fix it ! you can share solution if you find it.
try this : https://github.com/nhn/tui.editor/issues/527

You can use this
editor.exec('addLink', { linkUrl: 'mytext', linkText: 'https://picsum.photos/200' });
a search in repo like this, could help you : https://github.com/nhn/tui.editor/search?q=insertText&type=issues
try this : linkAttribute in Viewer #527

Thanks a lot.
The first one I did like that  editor.wwEditor.commands.addLink(payload); but i think your solution is better.
The second one doesn't seem to work in the Preview tab.


onChange Method does not trigger

Hi there!
Thanks for your awesome work!
Unfortunately we're experiencing problems with the onChange method. We would like to send an AJAX request if the value of our selectBox changes to load new data. Can you help us?
Some snippets from the code:
(HTML from our Django project)
<select id="inputDisz" class="form-control">
                    {% for disz in disziplinen %}
                        <option value="{{ disz.disziplin_id }}">{{ disz.disziplin_name }}</option>
                    {% endfor %}
                </select>

JS
$("#inputDisz").dropdown({
        closeReset: false,
    });
    $("#inputDisz").change(function(){
        alert("change");
    });

unfortunately this does not trigger the alert.
Any ideas?
Thanks for the work you put in!

The dropdown triggers "dropdown.close" on the select element when the picker menu is closed.
$("inputDisz").on('dropdown.close', function(){ alert('change');}


JavaScript: Add model of JSON parsers

Adds JsonParserCall which models a call to a JSON parser.

I've deprecated the AST-based JsonParseCall to avoid confusion.
The default taint step through JSON.parse has been updated to include JsonParserCall.
The NosqlInjection query used two-pass taint tracking to identify user-controlled JSON.parse calls, and then use those as sources. This was redundant with the taint step through JSON.parse, however. This has been removed, instead relying on the standard taint step. I've added a test to make sure it still works. In theory, some results may disappear since the two-step solution technically allowed for mismatched call/returns.

The evaluation indicates no changes; maybe a slight speed-up even due to NosqlInjection. The speed-up could be covering up a slow-down elsewhere, but looking over the per-query results there doesn't seem to be any glaring slow-downs. No new results were flagged.

 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.

@xiemaisi to answer your question from before, I've run a full evaluation. I've included the links this time.


Background python parser crashes importing sklearn.cluster in VS2017

@jaybo commented on Mon Mar 04 2019
Environment data

PTVSD version: 4.2.0 and 4.2.4
OS and version: Windows 10, 1607, 14393.2670
Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.6.8
Using VS Code or Visual Studio: VS2017, 15.9.7

Actual behavior
Background code parser crashes importing sklearn.cluster.
Expected  behavior
The background code parser should never crash.  On PTVSD 4.2.0 If I dismiss the crash dialog, it will reappear after about one minute, presumably when the background parser is auto-restarted.
Steps to reproduce:

pip install scikit-learn

Load a python script which can be as simple as:

from sklearn.cluster import KMeans

Wait a moment, then:

The program will run successfully.

@int19h commented on Wed Mar 06 2019
Could you clarify the steps to reproduce - is there another step there to launch it somehow, e.g. F5? Or by "load", do you mean just opening it in the editor and then waiting?

@jaybo commented on Wed Mar 06 2019
Just opening it in the editor and then waiting a moment will trigger the problem.

Should this have gone to PTVS?

It looks like it's the language server itself that's crashing, so probably not VS-specific.

But the screenshot shows 'python'? LS process name is not python I believe. @huguesv - have you seen OOP analyzer crashes popping crash box?

I think I've seen this happen in macOS (a different popup of course), which I believe is stemming from the OS detecting a crash in the scraper, which we are able to handle, but the OS trying to be helpful and showing that something broke/wasn't responding.

This was fixed in #740.


Clang tidy parameters are different between CI pipelines

Bug description
We're using default options of different versions of clang-tidy between CI pipelines (noetic, humble, etc).
This sometimes results in conflicting errors.
Expected behavior
All the pipelines run with the same clang-tidy parameters.
Actual behavior
All the pipelines run with the default clang-tidy parameters for their clang-tidy version.

Hmm, I think this is a consequence of using glob patterns to select .clang-tidy checks. In that sense, I would expect later versions to be much more pedantic than earlier ones. I've never seen an earlier version disagreeing with a latter one. @serraramiro1 do you have an example?


Market data getters

Description of changes proposed in this pull request:
closes #72
Checks:

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submission:

[x] Have you successfully ran tests with your changes locally?
[x] Have you lint your code locally prior to submission?

@SnakePoison @ethedev can we merge this pr to avoid more conflicts?

@ElmoArmy @ethedev can we merge this pr to avoid more conflicts?

@ElmoArmy @ethedev can we merge this pr to avoid more conflicts?

merging shortly

Tests need to be updated in a separate pr. This was just for logging - which I removed for now.
The interface will be changed and then I will create more detailed tests.

Tests need to be updated in a separate pr. This was just for logging - which I removed for now. The interface will be changed and then I will create more detailed tests.

everything related should be in this pr as well as tests without any console logs unless specified, then for the interface changes it can still be changed later and once that happen you can update tests accordingly

@ethedev I updated tests as requested.


Mistake in documentation on JS in csv

Docs on loading csv mentions how to add JS assertions:
text,__expected
...
"Goodbye, everyone!","fn:return output.includes('Au revoir');"

This, however, crashes with javascript error. Using "fn:output.includes('Au revoir');" (omitting return) works fine.
I suggest fixing the docs.

Done in https://github.com/typpo/promptfoo-docs/commit/e3fa5af2cd00c14e6b8b0d7ba5d89df209c29922, thanks for catching!


Sort order should be retained when returning to page

My publishes library has a lot of duplicates in it.  These are real duplicates.  So, I sorted my list by name and started going through it to remove the duplicates.  But every time I hit Back to return to the main list, it changes the sort order back!  Very annoying, especially if I'm scrolled down the page as the sort control scrolls off.
Also, if a change has happened (like I deleted an item) then when I return to by publishes page it's going to update, but it can take 20 seconds.  If I change the sort order before it updates, then when it updates it changes my sort order.  This can be very annoying especially if it refreshes just as I'm going to click on something since I end up clicking on the wrong item.
Sort of on a related note, when it refreshes like this, it also resets the page, so in those 20 seconds I may have changed the sort order and scrolled down the page.  When the reset happens it not only resets the sort order, it doesn't remember my scroll point.
Steps to reproduce:

Go to My LBRY | publishes.
Choose any sort except for "Newest First"
Click on any of your published items.
Hit the back button
Note that the sort always reverts to "Newest First"

Expected Behaviour
It should remember that I changed the sort order.
Actual Behaviour
It forgets the sort order.
Suggested Solutions
I would vote to remember the sort order of both Downloads and Publishes, even if I'm clicking between them or away to Explore or Subscriptions (not just for back).  The user changed the sort order for a reason, the page should honor that.  Also, when resetting the page it should remember the sort order as well as the current scroll position on the page.
System Configuration

LBRY App version: 0.25.0
LBRY Installation ID: 8jTfoiRnN7Gux5LUhcAb5Twq3cU4XVhnoF4Y6nr6mVVjP6piiRwXBxt2stQc6xAKfE
Operating system: Windows 10

Thanks for filing this @42degrees ! Similarly, we should persist these filters in other areas of the app, i.e. https://github.com/lbryio/lbry-desktop/issues/1154

I have spent some time researching this and https://github.com/lbryio/lbry-desktop/issues/1154
It seems like there is a choice to create a new state object in local app redux state, or to just use the existing navigation object that records, for example, scrollY.
Supposing the best choice is to persist during the session in the navigation local redux object. This will involve:

an action in src/renderer/redux/reducers/navigation.js

named doRecordFiltered type ACTIONS.LIST_FILTERED in ,
future requirements may ask for a doRecordSorted as well

a reducer in src/renderer/redux/reducers/navigation.js

that assigns filterString to filterState: string in the local app navigation state object

In any target list component (fileList, transactionList, etc)

import appropriate selectors and reducers as app/index.js does to handle doRecordScroll.
component's handle*Changed method dispatches doRecordFiltered with the filter value.
Props type and object are updated to include a ?filterState property

lbry-redux needs ACTIONS.LIST_FILTERED action type constant

Confirm this as a good path forward?

@seanyesmunt or @skhameneh can you provide clarity or guidance for @jessopb on this? Let's not leave a good contributor hanging!
This seems roughly correctly, though I may disagree with this part:

So it looks like this requires building a new state object for all persisted presentation options, or changing the way navigation state recording works.

My thought would have to store them in state in either:

The same place settings are stored (settings.file_download_sort_order or whatever)
The same place the most closely data type is stored (wallet.transaction_list_sort_order)

Also, when this is done, I'd suggest that these become independent components as well <SelectTransactionListOrder>, <SelectDownloadedFileListOrder>, etc.
If they were all in settings, you may even be able to do something like this:
<SettingSelect setting="transaction_list_order" values=values>

@jessopb Sorry about that!
I don't think it makes sense to include this in the navigation state. I agree with @kauffj that it would be fine in either settings or wallet. My suggestion would be wallet since this is something that android app might want to do also.

Actually after going over this issue again I think wallet makes sense for transactions sorting, but not for "your {publishes, downloads}"
Maybe that toggle should live in the file_info reducer?

My plan is to move forward in lbry-redux:wallet and lbry-redux:file_info the way @seanyesmunt seemed to be leaning (nobody objected to file_info), and a  (common/form-component) that takes as props 'options: []' and 'presentationSelection: string' as @kauffj suggested. I think I'll turn the list of  in the transaction filter into a map: Object.values(TRANSACTIONS).map(tt => (...) which, tested, works.
I'm interested in any votes or comments on better names.
Should the standard be doSet/GetThing vs doVerbNoun vs just doNoun?
ActionTypes:
wallet: SET_TRANSACTION_LIST_FILTER | TRANSACTION_LIST_FILTERED
file_info: SET_FILE_LIST_SORT | FILE_LIST_SORTED
Reducers:
wallet state: transactionListFilterSelection: string
file_info state: fileListSortSelection: string
Selectors:
wallet: selectTransactionListFilterSelection
file_info: selectFileListSortSelection
Actions:
wallet: doTransactionListFilterSelection | TransactionListFiltered ?
file_info: doFileListSortSelection | doFileListSorted ?


can template support multiple  loader ?

can template support multiple loader ?  like this:
!!html!ejs!src/views/page/tempate.html

yes

It seems not to work correctly.
With a following webpack configuration,
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
  output: {
    path: 'dist',
    filename: '[name].js'
  },

  plugins: [
    new HtmlWebpackPlugin({
      template: 'ejs!html!index.html',
    })
  ]
}

HtmlWebpackPlugin outputs this JS code to dist/index.html.
module.exports = "<!DOCTYPE html>\n\n\n\n\n
hello
\n\n\n";

The original index.html is here.
<!DOCTYPE html>

hello

webpack: 1.13.3
html-webpack-plugin: 2.24.1
ejs-loader: 0.3.0
html-loader: 0.4.4

It is important to understand what a loader does.
In your example the ejs-loader does the following transformation:

<%= title %>
 --> ejs-loader --> module.exports=function(data) { return "
" + title + "
"; };
If you now use the output of the ejs-loader for the html-loader the html-loader will try to execute its code on the javascript code and will fail.

I understand. Both of the html-loader and ejs-loader take HTML but return JavaScript code
so we can't pipe them, correct?
Thank you for the explanation 🙇


Tg bot issure

I disconnected the bot from my phone but on the dapp it is still acting like I am connected and will not allow me to use it because it can't find any of the groups I am in. So I need a way to disconnect and reconnect. Would be a good idea maybe to have a disconnect button on the dapp

Button added, implementing additional TG auth methods, until TG solves all QR issues.


[Example] use local image in all demos

Signed-off-by: Jianbai Ye<EMAIL_ADDRESS>

The license for those two images is here, which is the same as this repo

The license for those two images is here, which is the same as this repo

Putting a link to identify the source of these photos is better.

Hi @gusye1234
Could you add a link to the original image? I will merge this once the link and license information is done.

Add the links and licenses in readme

Thanks!


Wrong app slug read from expo.conf.js

Build/Submit details page URL
No response
Summary
Hi, I just tried to build a dev client using eas build --profile development. However I get the following error:
rror: Project config: Slug for project identified by "extra.eas.projectId" (xx-yyy-zzz) does not match the "slug" field (xx_yyy_zzz)..
I can confirm that the eas project matches with the one from the error message with the dashes. However, in my expo.conf.js the same slug is set with dashes so I don't know here the underscores come from.
I tried to rollback to 2.0.0 and with this version everything works fine. With version 2.6 or 2.7.1 the error occurs.
Managed or bare?
managed
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^46.0.0 => 46.0.17
react: 18.0.0 => 18.0.0
react-native: 0.69.4 => 0.69.4
Expo Workflow: managed
Error output
npm run build:dev

build:dev
eas build --profile development

√ Select platform » Android
Error: Project config: Slug for project identified by "extra.eas.projectId" (cg-update-app) does not match the "slug" field (cg_update_app). Learn more: https://expo.fyi/eas-project-id
Reproducible demo or steps to reproduce from a blank project
Create a project with dashes in the slug?

You must have changed the slug at some point.
I cannot repro the issue:

Hey @Lerosen
Have you tried Side by Side installation ?
https://github.com/flexbox/appjs-one#side-by-side-installation--appconfigjs

@dsokal The issue happened when the project already existed. Have you tried to do the build again after the initial creation?
For me, the issue is reproducible, just tried it again today.

I was facing the same issue while running eas build. You probably changed the project slug but still have the old extra.eas.projectId in your app.json. Remove the projectId and when you build your project again, eas will generate a new projectId for you

I was facing the same issue while running eas build. You probably changed the project slug but still have the old extra.eas.projectId in your app.json. Remove the projectId and when you build your project again, eas will generate a new projectId for you

Work for me, thank you :)


refactor(module:all): support Angular 7.0

PR Checklist

[x] More Strict & TSLint
[x] rm less 2.7 dependency
[x] rm unused dependencies
[x] OnPush

[x] Alert
[x] Badge
[x] Button
[x] Card

[x] Support Angular 7.0

Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
[x] Yes
[ ] No

Other information

i am facing issue on production build on production only
main.168dac91807e83b9a739.js:1 ERROR Error: Uncaught (in promise): Error: StaticInjectorError[t -> t]:
StaticInjectorError(Platform: core)[t -> t]:
NullInjectorError: No provider for t!
Error: StaticInjectorError[t -> t]:
StaticInjectorError(Platform: core)[t -> t]:
NullInjectorError: No provider for t!
i think related to select drop down (user example)


Go back in time

Hi @pkaske
Thank you for your hard work!
As far as I know, it is not possible to go back in time in the chart.
Do you think this is achievable? I am interested on it I will like a bit of guidance if possible.
Looking to hear from you,
Kind regards.

Hi,
you would need to figure out how to programmatically start and control the replay feature.
It's probable that there are APIs in the TradingView site to do that.
If that works it would just be a matter of extending request params.

Hi @pkaske
Thank you for you answer. I don't even need to use replay feature, just go back in time to specific date and set the price axis (y axis) to a specific value.
Have you been able to get axis values using selenium? It is kind of new to me.
Thanks again!

Ah you mean moving the time axis. Yeah you would need to automate that goto feature that let's you set a date and a time I guess. The project isn't using selenium. It's using puppeteer tho.

Thank you so much, and sorry for bothering you.
I don't know why I think it was using selenium!


Add TimesRoman

Let's add a new class TimesRoman that represents a Times Roman font.

Closed by d99e69b and 019c288.


Get-DscConfiguration failing when multiple IPs are present on interface

Hello guys,
I am really happy with the module, but I found a little issue with it - on NLB interface I have 2 IPs - nlb_IP and vip_IP. When it comes to checking the nlb_IP, it fails.
Hope this helps!
Regards,
get_dscConfig_error.txt

Hi @paveldokov  - thanks for the feedback! :smile:
Are you able to post the output from Start-DSCConfiguration with the -Verbose parameter added? It should give us more feedback on what is going wrong.

Hello,
Actually, the configuration applies and test correctly. Issue occurs only when I run 'Get-DscConfiguration'
Please, find the log from 'Start-DSCConfiguration -Verbose' attached.
Regards,
Pavel
{E4489580-5FF9-11E6-80CF-02BF0A0F015E}-0.details.json.txt

Hi @paveldokov - I'm haven't been able to solve this one yet. I've assigned two IP Addresses to the same adapter and Get-TargetResource still returns the exepected values.
So I have a few more questions to help me solve this if you don't mind:

Which version of xNetworking are you using?
Could you post the Config you're applying (feel free to remove any sensitive info)?
Could you post the output of this command run on the box applying the DSC config:

Get-NetIpAddress -InterfaceAlias '<Put the alias of your Network adapter with the VIP/NLB IP>' -AddressFamily IPv4

Thank you very much for helping me look into this one.

Hello,
Sorry for the delayed response. Here is my NIC extract from config file:
     foreach ($NIC in $Node.NICs) # Configure NICs
     {
        foreach ($IP in $NIC.IPs) # Configure IP Address (multiple address option available)
        {
            xIPAddress $IP.Name
            {
                InterfaceAlias = $NIC.Alias
                IPAddress = $IP.IP
                AddressFamily = $NIC.IPFamily
                SubnetMask = $NIC.SM
                DependsOn = $IP.DependsOn
            }
        }
        if ($NIC.GW -ne $null) # Configure GateWay
        {
            xDefaultGatewayAddress $NIC.Alias
            {
                Address = $NIC.GW
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
            }
        }
        if ($NIC.DNS -ne $null) # Configure DNS Servers
        {
            xDNSServerAddress $NIC.Alias
            {
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
                Address = $NIC.DNS
            }
        }
        if ($NIC.NICBinding -ne $null) # Configure bindings if any
        {
            foreach ($binding in $NIC.NICBinding)
            {
                xNetAdapterBinding $binding
                {
                    InterfaceAlias = $NIC.Alias
                    ComponentId = $binding
                }
            }
        }
        if ($NIC.Routes -ne $null) # Configure static routes on NICs if any
        {
            foreach ($Route in $NIC.Routes)
            {
                xRoute $Route.Name
                {
                    AddressFamily = $NIC.IPFamily
                    DestinationPrefix = $Route.Prefix
                    InterfaceAlias = $NIC.alias
                    NextHop = $Route.GW
                    Ensure = "Present"
                    RouteMetric = 2
                }
            }
        }
     }

Here is Data part:
		NICs = @(
                    @{
                        Alias = "NLB"
                        IPs = @(
                            @{
                                Name="NLB_IP"
                                IP = "IP_NLB_NIC"
                             }
                            @{
                                Name="VIP_IP"
                                IP = "IP_VIP_NLB_NIC"
                                DependsOn = "[xIPAddress]NLB_IP"
                             }
                               )
                        SM = mask
                        GW = "GW_IP"
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        NICBinding = @("ms_wlbs")
                      }
                    @{
                        Alias = "Management"
                        IPs = @(
                            @{
                                Name="Mgmt_IP"
                                IP = "IP_Mgmt_NIC"
                             }
                                )
                        SM = mask
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        Routes = @(
                                    @{
                                        Name= "Route1"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R1"
                                     }
                                    @{
                                        Name= "Route2"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R2"
                                     }
                                  )
                    }
                )

Here is output of the command:
PS C:\Windows\system32> Get-NetIpAddress -InterfaceAlias 'NLB' -AddressFamily IPv4
IPAddress         : IP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
IPAddress         : IP_VIP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : True
PolicyStore       : ActiveStore
Hope this helps. Thanks a lot for the effort!
Regards

Hello,
Sorry for the delayed response. Here is my NIC extract from config file:
     foreach ($NIC in $Node.NICs) # Configure NICs
     {
        foreach ($IP in $NIC.IPs) # Configure IP Address (multiple address option available)
        {
            xIPAddress $IP.Name
            {
                InterfaceAlias = $NIC.Alias
                IPAddress = $IP.IP
                AddressFamily = $NIC.IPFamily
                SubnetMask = $NIC.SM
                DependsOn = $IP.DependsOn
            }
        }
        if ($NIC.GW -ne $null) # Configure GateWay
        {
            xDefaultGatewayAddress $NIC.Alias
            {
                Address = $NIC.GW
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
            }
        }
        if ($NIC.DNS -ne $null) # Configure DNS Servers
        {
            xDNSServerAddress $NIC.Alias
            {
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
                Address = $NIC.DNS
            }
        }
        if ($NIC.NICBinding -ne $null) # Configure bindings if any
        {
            foreach ($binding in $NIC.NICBinding)
            {
                xNetAdapterBinding $binding
                {
                    InterfaceAlias = $NIC.Alias
                    ComponentId = $binding
                }
            }
        }
        if ($NIC.Routes -ne $null) # Configure static routes on NICs if any
        {
            foreach ($Route in $NIC.Routes)
            {
                xRoute $Route.Name
                {
                    AddressFamily = $NIC.IPFamily
                    DestinationPrefix = $Route.Prefix
                    InterfaceAlias = $NIC.alias
                    NextHop = $Route.GW
                    Ensure = "Present"
                    RouteMetric = 2
                }
            }
        }
     }

Here is Data part:
		NICs = @(
                    @{
                        Alias = "NLB"
                        IPs = @(
                            @{
                                Name="NLB_IP"
                                IP = "IP_NLB_NIC"
                             }
                            @{
                                Name="VIP_IP"
                                IP = "IP_VIP_NLB_NIC"
                                DependsOn = "[xIPAddress]NLB_IP"
                             }
                               )
                        SM = mask
                        GW = "GW_IP"
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        NICBinding = @("ms_wlbs")
                      }
                    @{
                        Alias = "Management"
                        IPs = @(
                            @{
                                Name="Mgmt_IP"
                                IP = "IP_Mgmt_NIC"
                             }
                                )
                        SM = mask
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        Routes = @(
                                    @{
                                        Name= "Route1"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R1"
                                     }
                                    @{
                                        Name= "Route2"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R2"
                                     }
                                  )
                    }
                )

Here is output of the command:
PS C:\Windows\system32> Get-NetIpAddress -InterfaceAlias 'NLB' -AddressFamily IPv4
IPAddress         : IP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
IPAddress         : IP_VIP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : True
PolicyStore       : ActiveStore
Hope this helps. Thanks a lot for the effort!
Regards

Hello,
Sorry for the delayed response. Here is my NIC extract from config file:
     foreach ($NIC in $Node.NICs) # Configure NICs
     {
        foreach ($IP in $NIC.IPs) # Configure IP Address (multiple address option available)
        {
            xIPAddress $IP.Name
            {
                InterfaceAlias = $NIC.Alias
                IPAddress = $IP.IP
                AddressFamily = $NIC.IPFamily
                SubnetMask = $NIC.SM
                DependsOn = $IP.DependsOn
            }
        }
        if ($NIC.GW -ne $null) # Configure GateWay
        {
            xDefaultGatewayAddress $NIC.Alias
            {
                Address = $NIC.GW
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
            }
        }
        if ($NIC.DNS -ne $null) # Configure DNS Servers
        {
            xDNSServerAddress $NIC.Alias
            {
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
                Address = $NIC.DNS
            }
        }
        if ($NIC.NICBinding -ne $null) # Configure bindings if any
        {
            foreach ($binding in $NIC.NICBinding)
            {
                xNetAdapterBinding $binding
                {
                    InterfaceAlias = $NIC.Alias
                    ComponentId = $binding
                }
            }
        }
        if ($NIC.Routes -ne $null) # Configure static routes on NICs if any
        {
            foreach ($Route in $NIC.Routes)
            {
                xRoute $Route.Name
                {
                    AddressFamily = $NIC.IPFamily
                    DestinationPrefix = $Route.Prefix
                    InterfaceAlias = $NIC.alias
                    NextHop = $Route.GW
                    Ensure = "Present"
                    RouteMetric = 2
                }
            }
        }
     }

Here is Data part:
		NICs = @(
                    @{
                        Alias = "NLB"
                        IPs = @(
                            @{
                                Name="NLB_IP"
                                IP = "IP_NLB_NIC"
                             }
                            @{
                                Name="VIP_IP"
                                IP = "IP_VIP_NLB_NIC"
                                DependsOn = "[xIPAddress]NLB_IP"
                             }
                               )
                        SM = mask
                        GW = "GW_IP"
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        NICBinding = @("ms_wlbs")
                      }
                    @{
                        Alias = "Management"
                        IPs = @(
                            @{
                                Name="Mgmt_IP"
                                IP = "IP_Mgmt_NIC"
                             }
                                )
                        SM = mask
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        Routes = @(
                                    @{
                                        Name= "Route1"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R1"
                                     }
                                    @{
                                        Name= "Route2"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R2"
                                     }
                                  )
                    }
                )

Here is output of the command:
PS C:\Windows\system32> Get-NetIpAddress -InterfaceAlias 'NLB' -AddressFamily IPv4
IPAddress         : IP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
IPAddress         : IP_VIP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : True
PolicyStore       : ActiveStore
Hope this helps. Thanks a lot for the effort!
Regards

Hello,
Sorry for the delayed response. Here is my NIC extract from config file:
     foreach ($NIC in $Node.NICs) # Configure NICs
     {
        foreach ($IP in $NIC.IPs) # Configure IP Address (multiple address option available)
        {
            xIPAddress $IP.Name
            {
                InterfaceAlias = $NIC.Alias
                IPAddress = $IP.IP
                AddressFamily = $NIC.IPFamily
                SubnetMask = $NIC.SM
                DependsOn = $IP.DependsOn
            }
        }
        if ($NIC.GW -ne $null) # Configure GateWay
        {
            xDefaultGatewayAddress $NIC.Alias
            {
                Address = $NIC.GW
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
            }
        }
        if ($NIC.DNS -ne $null) # Configure DNS Servers
        {
            xDNSServerAddress $NIC.Alias
            {
                AddressFamily = $NIC.IPFamily
                InterfaceAlias = $NIC.Alias
                Address = $NIC.DNS
            }
        }
        if ($NIC.NICBinding -ne $null) # Configure bindings if any
        {
            foreach ($binding in $NIC.NICBinding)
            {
                xNetAdapterBinding $binding
                {
                    InterfaceAlias = $NIC.Alias
                    ComponentId = $binding
                }
            }
        }
        if ($NIC.Routes -ne $null) # Configure static routes on NICs if any
        {
            foreach ($Route in $NIC.Routes)
            {
                xRoute $Route.Name
                {
                    AddressFamily = $NIC.IPFamily
                    DestinationPrefix = $Route.Prefix
                    InterfaceAlias = $NIC.alias
                    NextHop = $Route.GW
                    Ensure = "Present"
                    RouteMetric = 2
                }
            }
        }
     }

Here is Data part:
		NICs = @(
                    @{
                        Alias = "NLB"
                        IPs = @(
                            @{
                                Name="NLB_IP"
                                IP = "IP_NLB_NIC"
                             }
                            @{
                                Name="VIP_IP"
                                IP = "IP_VIP_NLB_NIC"
                                DependsOn = "[xIPAddress]NLB_IP"
                             }
                               )
                        SM = mask
                        GW = "GW_IP"
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        NICBinding = @("ms_wlbs")
                      }
                    @{
                        Alias = "Management"
                        IPs = @(
                            @{
                                Name="Mgmt_IP"
                                IP = "IP_Mgmt_NIC"
                             }
                                )
                        SM = mask
                        DNS = @("DNS1", "DNS2")
                        IPFamily = "IPv4"
                        Routes = @(
                                    @{
                                        Name= "Route1"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R1"
                                     }
                                    @{
                                        Name= "Route2"
                                        Prefix = "network/mask"
                                        GW = "GW_Address_R2"
                                     }
                                  )
                    }
                )

Here is output of the command:
PS C:\Windows\system32> Get-NetIpAddress -InterfaceAlias 'NLB' -AddressFamily IPv4
IPAddress         : IP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
IPAddress         : IP_VIP_NLB_NIC
InterfaceIndex    : 14
InterfaceAlias    : NLB
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : mask
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : True
PolicyStore       : ActiveStore
Hope this helps. Thanks a lot for the effort!
Regards

Sorry for taking so long to resolve this @paveldokov, but it is currently being addressed by this PR https://github.com/PowerShell/xNetworking/pull/206 which should be merged soon.

Hi @paveldokov - PR #206 was merged a little while back. Have you had a chance to see if that fixes the issue?

Hello,
It is tested and working.
Sorry for the delayed response, but I had to go through change management process.
Thank you very much for the good work!
Regards,
Pavel

Awesome! Thanks @paveldokov - no worries and great to hear! I'll close this one. Thanks again.

No, thank you for the module and the dedication!


source-1 (interaudiosrc) sometimes fixed to rate:48000

source-1 (interaudiosrc) is sometimes fixed to rate:48000.
The fixing is done in ...
static GstCaps *
gst_inter_audio_src_fixate (GstBaseSrc * src, GstCaps * caps)
{
  GstStructure *structure;

  GST_DEBUG_OBJECT (src, "fixate");

  caps = gst_caps_make_writable (caps);
  caps = gst_caps_truncate (caps);

  structure = gst_caps_get_structure (caps, 0);

  gst_structure_fixate_field_string (structure, "format", GST_AUDIO_NE (S16));
  gst_structure_fixate_field_nearest_int (structure, "channels", 2);
  gst_structure_fixate_field_nearest_int (structure, "rate", 48000);
  gst_structure_fixate_field_string (structure, "layout", "interleaved");

  return caps;
}

... and the rationale is unclear, but nevertheless the troubling thing is that the caps argument randomly (i.e. seemingly a race condition) is...

on "good" runs, has rate:8000 (I'm testing with PCMA)
on "bad" runs, has rate:1..2^32

Consequentially:

on "good" runs, I'm no longer hitting resampling at all
on "bad" runs, source-1 is fixated to rate:48000 and I experience significantly higher CPU usage due to resampling

Here's what a virgin media-renderer looks like -- before caps negotiation:

(You can see that everybody is pretty much rate-agnostic.)
Here's what interaudiosrc looks like when it's "good":

Here's what interaudiosrc looks like when it's "bad":

After a crash course on GStreamer by @sdroege , I've realized the culprit wasn't what I thought it was.
Actually there's no harm in InterAudioSrc fixating on rate:48000, since it will reconfigure as soon as it receives data from its InterAudioSink. (Yes, there's a race condition here, but it's not what's at fault.)
The trouble is that osxaudio will not reconfigure its caps once it's playing. Actually it's totally safe to do, and this change seems to solve it:
static GstCaps *
gst_osx_audio_sink_getcaps (GstBaseSink * sink, GstCaps * filter)
{
   ...
#if 0
    if (buf->acquired && buf->spec.caps) {
      /* Caps are fixed, use what we have */
      ret = gst_caps_ref (buf->spec.caps);
    }
#endif
    ....

The capscaps will be followed:
1. gst_audio_base_src_setcaps (not overridden by osxaudiosink)
2.  ↳ gst_audio_ring_buffer_acquire
3.        ↳ gst_core_audio_set_format
4.             ↳ AudioUnitSetProperty

PS. Isn't it weird that we have this race condition, regardless? Race conditions that cause the audio component to be (sometimes!) reconfigured for 48000 and afterwards 8000 doesn't sound like very healthy design.

The reason it works this way is likely that interaudiosrc provides silence
buffers in the absence of buffers from the corresponding interaudiosink.
There is no way to predict what format will arrive later, so the
renegotiation is inevitable.
On 3 February 2015 at 03:52, Ilya Konstantantinov<EMAIL_ADDRESS>wrote:

PS. Isn't it weird that we have this race condition, regardless? Race
conditions that cause the audio component to be (sometimes!) reconfigured
for 48000 and afterwards 8000 doesn't sound like very healthy design.
—
Reply to this email directly or view it on GitHub
https://github.com/EricssonResearch/openwebrtc/issues/154#issuecomment-72551128
.

And of course, if the caps / first buffer become available before the
interaudiosrc has to provide its first buffer, then we don't have to do any
such reconfiguration.
On 3 February 2015 at 11:13, Arun Raghavan<EMAIL_ADDRESS>wrote:

The reason it works this way is likely that interaudiosrc provides silence
buffers in the absence of buffers from the corresponding interaudiosink.
There is no way to predict what format will arrive later, so the
renegotiation is inevitable.
On 3 February 2015 at 03:52, Ilya Konstantantinov <
<EMAIL_ADDRESS>wrote:

PS. Isn't it weird that we have this race condition, regardless? Race
conditions that cause the audio component to be (sometimes!) reconfigured
for 48000 and afterwards 8000 doesn't sound like very healthy design.
—
Reply to this email directly or view it on GitHub
https://github.com/EricssonResearch/openwebrtc/issues/154#issuecomment-72551128
.

(y)
Submitted as https://bugzilla.gnome.org/show_bug.cgi?id=743925

That ticket was closed and the change was pushed into GStreamer. Does that mean that this issue is now closed or is something more needed for osxaudio supporting reconfiguration?

That specific issue is solved, yes. There are some more pending changes for osxaudio though.


Fix unnecessary uses of sentinel slices

For values returned from Lua, using sentinel slices (specifically [:0]const u8) makes sense. It accurately reflects the data returned, and can be easily used in Zig. For values passed into Lua, this often does not make sense. Most "strings" in Zig aren't null terminated, and it can require an extra allocation to pass a string to Lua this way.
It appears I got a bit excited and used [:0]const u8 far too often for function parameters. These should be audited and changed to []const u8 wherever possible.

Noting some examples here:
    /// Checks whether the function argument `arg` is a slice of bytes and returns the slice
    /// See https://www.lua.org/manual/5.1/manual.html#luaL_checklstring
    pub fn checkBytes(lua: *Lua, arg: i32) [:0]const u8 {
        var length: usize = 0;
        const str = c.luaL_checklstring(lua.state, arg, &length);
        // luaL_checklstring never returns null (throws lua error)
        return str[0..length :0];
    }

I guess there's no reason for this to be [:0]?  In fact, is this a bug?  What if the lua string contains a \0?  Will any Zig functions operating on this prematurely truncate the string at first occurrence of 0?
This probably too since we know the length of the string?
    pub fn toString(lua: *Lua, index: i32) ![*:0]const u8 {
        var length: usize = undefined;
        if (c.lua_tolstring(lua.state, index, &length)) |str| return str;
        return error.Fail;
    }

And using c.lua_pushlstring below would avoid [:0].
    /// Pushes a zero-terminated string onto the stack
    /// Lua makes a copy of the string so `str` may be freed immediately after return
    /// See https://www.lua.org/manual/5.1/manual.html#lua_pushstring
    pub fn pushString(lua: *Lua, str: [:0]const u8) void {
        c.lua_pushstring(lua.state, str.ptr);
    }

Thanks for pointing out these specific issues! I want to prioritize https://github.com/natecraddock/ziglua/issues/33 before working on this. This will make any future changes so much easier to make

I wonder if a better naming would be pushString for []const u8 and pushStringZ for [:0]const u8? This is similar to the naming convention used in the Zig std library, e.g., alloc.dupeZ(...) which is the sentinel version of alloc.dupe(...)

I never really loved the bytes/string naming I used, I like this a lot more

I think there may be no really hard and fast rule for these.  For example, in a lot of case a string literal can be directly passed from Zig down to Lua code, in which case [*:0] or [:0] is the right choice as it just passes the string down without touching it.

After taking a look at this again after a few months, I struggled to find more than only a handful of functions where [*:0] or [:0] were misplaced. I made all of the updates I could think of in https://github.com/natecraddock/ziglua/pull/72 including renaming to use pushString and pushStringZ and similar
Re checkBytes

I guess there's no reason for this to be [:0]? In fact, is this a bug? What if the lua string contains a \0? Will any Zig functions operating on this prematurely truncate the string at first occurrence of 0?

I believe this is a non-issue. Returning [:0] signifies that the string is null-terminated. It is possible that there are 0 bytes somewhere in the middle of the string too (per the Lua docs), but in Zig we can just use the .len of the slice to be safe.
But using a :0 means that it is also usually safe to use .ptr on the slice, because all strings returned from Lua will be null terminated. The only time this could go wrong is if there is a 0 somewhere in the string before the true end.

I took a look at your change and it looks all great!
Regarding checkBytes: I think you're right. Also, I see that you've removed checkBytes since it's already covered by all those *String functions -- this also looks like the right thing to do.

Thanks for taking a look! I'll go ahead and close this then


Is batch_norm_param argument missing in the depthwise convolution 2d layer implementation?

This is with reference to: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/layers/python/layers/layers.py#L1850
The line says "if batch_norm_params is None" but there is no batch_norm_params argument included in the function, and it doesn't seem that batch_norm is implemented within the function as an option. Is the batch_norm function included in the regularizer function or has it not been implemented by default within the function?
Thanks for your help.

It looks like it's a remnant of a copy-paste. Do you want to submit a PR fixing the doc?

@drpngx I have submitted a PR fixing the description error and including batch_norm by default as the normalizer_fn.

Thanks! Adding cross-link: #9652.

Merged. Thanks!


ci: Setup e2e scripts

Description of changes
This change allows us to trigger e2e workflows for codebuild, without the need for webhooks.
It also supports beta environments (cloud-e2e-beta), which is configurable via .env

Issue #, if available

Description of how you validated changes
Checklist

[ ] PR description included
[ ] yarn test passes
[ ] Tests are changed or added
[ ] Relevant documentation is changed or added (and PR referenced)
[ ] New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
[ ] Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

:exclamation: No coverage uploaded for pull request base (cb@aeb26ae). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@          Coverage Diff          @@
##             cb   #12629   +/-   ##
=====================================
  Coverage      ?   47.58%
=====================================
  Files         ?      843
  Lines         ?    38364
  Branches      ?     7846
=====================================
  Hits          ?    18256
  Misses        ?    18477
  Partials      ?     1631

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Dynamic quorum size

Still draft but creating PR to show direction I have taken at this first step.

Closing as branch name is misleading (a quorum slice is a subset of the nodes in a quorum that agree on the Value). Updates now in https://github.com/bosagora/agora/pull/2880


added authentication for login page

Fixes : https://github.com/Open-Science-Community-Saudi-Arabia/MOOCs/issues/124
Summary
The PR :

Adds Authentication and validation to the login page
Ensures only authenticated users can access the dashboard page
Ensure proper error handling and responses

@sandygudie, I'll check it out

@sandygudie, just tested it, it works fine. Good one


Replace sorbet with update-gems workflow.

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew tests with your changes locally?
[x] Have you successfully run brew man locally and committed any changes?

Update all Gems and RBI files in one workflow. Also disable Dependabot.

I know auto-vendoring gems is also on the @dependabot-bot roadmap.

I'd say until it is supported, using an action to do it is preferable to manually checking out a pull request, running brew vendor-gems and pushing.

I'd say until it is supported, using an action to do it is preferable to manually checking out a pull request, running brew vendor-gems and pushing.

If we can have an action that creates one PR per changed gem (except for Sorbet) then I'd agree 👍🏻


Add Native Instruments Controller Editor 2.1.0

After making all changes to the cask:

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

Additionally, if adding a new cask:

[x] Named the cask according to the token reference.
[x] brew cask install {{cask_file}} worked successfully.
[x] brew cask uninstall {{cask_file}} worked successfully.
[x] Checked there are no open pull requests for the same cask.
[x] Checked the cask was not already refused in closed issues.
[x] Checked the cask is submitted to the correct repo.

I’d rather not have a url do block for a driver cask. That seems like a maintenance burden for little gain.

I’d rather not have a url do block for a driver cask. That seems like a maintenance burden for little gain.

Agreed.


fix water and sediment routing onto land parcels

Main change is to change the replacement of "dry" cells to weight == 0 into a weight == np.nan.
This makes it so that sediment and water parcels are not routed onto land at any time.
This change breaks the consistency tests.
bug source
The problem was that when a parcel landed up against the model "land" cells when the water surface was otherwise flat, the weights were determined to be zero everywhere, and so the returned probabilities from get_weight_at_cell() were all equal to 1/9. This is despite the fact that the probabilities should be [0, 0, 0, 1/6, 1/6, 1/6, 1/6, 1/6, 1/6]. This discrepency allowed the parcel to walk off into the "land" cells, and then sometimes eventually to out-of-bounds and raising and IndexError (see #75).
The fix is to just not let sediment get onto the land at all. The problematic line was:
weight[depth_nbrs <= dry_depth] = 0

which would replace the "land" cells (three nans across the top) with 0s, because the depth of the land cells was 0.
My fix was to change the index here to use the drywall index created above, which should capture both dry cells and "land" cells, and to make the new values nans rather than 0s, because this makes the returned probabilities ==0 for these nan cells.
a different potential fix
It may be worth noting at this time that the "original" pyDeltaRCM code gave a very small chance of routing sediment onto dry parcels, and zero chance of routing them onto land:
weight[depth_ind <= self.dry_depth] = 0.0001
weight[cell_type_ind == -2] = np.nan

The water routing is a little more complicated, but I believe it prevented parcels from entering dry cells or land cells whatsoever.
weight_sfc[(depth_ind <= self.dry_depth) | (ct_ind == -2)] = 0
weight_int[(depth_ind <= self.dry_depth) | (ct_ind == -2)] = 0

    ...

self.weight = self.gamma * weight_sfc + (1 - self.gamma) * weight_int
self.weight = depth_ind ** self.theta_water * self.weight
self.weight[depth_ind <= self.dry_depth] = np.nan

so, an alternative fix, to bring this back in line with the older codes, could be to pass another argument, which is dry_depth_weight, which would be nan or 0 for water, but 0.0001 for sediment.
thoughts?

UPDATE: this needs to stay as a draft for now. I believe this fix triggers some other bug, somewhere else, resulting in segmentation faults. I need to test this more effectively, in isolation from #92, to determine where the problems are.

outdated change due to changes in #133


issue: Missing Email Validation in Login System

Describe the bug
The current login system lacks proper email validation beyond the basic HTML5 validation. This allows users to potentially create accounts with invalid or fake email addresses, leading to issues such as:

Spam account creation
Invalid email entries in the user database
Difficulties in user communication and account recovery

Steps To Reproduce

Navigate to the registration page.
Enter an invalid or non-existent email address (e.g., "invalidemail@", "user@domain", etc.) using developer tools to bypass HTML5 validation.
Complete the registration process.
Observe that the account is created without any validation error.

Expected behavior
The system should enforce email validation to ensure that users enter a valid email address and verify it by sending a confirmation link or OTP mail.
Proposed Solution:
Implement an email verification process to ensure users enter a valid and active email address. This can be achieved by:

Sending a confirmation email containing a verification link that users must click to activate their account.
Sending a one-time password (OTP) to the entered email address that users must enter on the site to complete the registration process.

@dvjsharma , Assign me this issue.

Hey @dvjsharma , Actually all the ecommerce site use OTP method for account creation because that is more convenient to user rather clicking on a link.

@dvjsharma , let me know your preference.

Implementing confirmation email containing a verification link .

closing against #155


Call to get_mac_address hangs when called with unknown IP-address

Describe the bug
If I call get_mac_address and specify an IP-address for which the corresponding ARP entry doesn't exist on the system, the call will hang for a long time. It doesn't matter the value of network_request.
To Reproduce
import logging
logging.basicConfig(level=logging.DEBUG)
import getmac
getmac.getmac.DEBUG = 1000  # Something high
getmac.get_mac_address(ip='<IP_ADDRESS>', network_request=False)

Yields this:
DEBUG:getmac:Trying: '_read_arp_file' (to_find: '<IP_ADDRESS>')
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: '<lambda>' (to_find: '<IP_ADDRESS>')
DEBUG:getmac:Running: '/bin/ip neighbor show <IP_ADDRESS>'
DEBUG:getmac:Output from '/bin/ip' command: b''
DEBUG:getmac:Exception: list index out of range
DEBUG:getmac:Traceback (most recent call last):
  File "/home/postlund/pyatv_dev/pyatv/lib/python3.6/site-packages/getmac/getmac.py", line 525, in _try_methods
    found = m(to_find)
  File "/home/postlund/pyatv_dev/pyatv/lib/python3.6/site-packages/getmac/getmac.py", line 485, in <lambda>
    .partition(x)[2].partition('lladdr')[2].strip().split()[0],
IndexError: list index out of range

DEBUG:getmac:Trying: 'arp <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'<IP_ADDRESS> (<IP_ADDRESS>) -- no entry\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -an'
DEBUG:getmac:Running: '/usr/sbin/arp -an'
DEBUG:getmac:Output from '/usr/sbin/arp' command: <<stripped>>
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -an <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp -an <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'arp: in 40 entries no match found.\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'<IP_ADDRESS> (<IP_ADDRESS>) -- no entry\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -a'
DEBUG:getmac:Running: '/usr/sbin/arp -a'
<<HANGS HERE>>

The address resolution probably takes all the time. Since the same command has already been run (with expected -n flag), the last call shouldn't even be needed.
Expected behavior
Should return "fast".
System info
(please complete the following information):

OS name: Debian Linux
OS Version: Some old version, like 7.1 maybe
Python version: 3.6.1 x64

Additional context
The command takes long time to execute if I run it manually from a shell as well.

Thank you for the detailed report!
Generally speaking, the case of a non-existent host is currently severely punished performance wise, due to hitting every command available. This is a known issue, and one that I'm currently in the progress of addressing, though a fix probably won't be out for a while (essentially, the core logic of how commands are checked and failures handled is being refactored completely). The redundant commands is a significant part of this issue, since currently it doesn't know for sure what command will work on what platform (e.g. differing syntax between versions of command included, distro-specific customization of output that appeared in X-release of the distro only, etc.). Once fixed, if it can't find the address in, say, the /proc/net/arp, it'll fail without trying the other commands.
That notwithstanding, in this specific case it's quite odd that arp <IP_ADDRESS> is being run twice, and I can't tell from a cursory glance of the code why that would happen. If you get a chance, could you provide some more information?

Version of net-tools: apt-cache show net-tools | grep "Version"
Version of getmac: getmac --version (or import getmac;print(getmac.__version__);)
lsb_release -a
uname -a

One potential (though far from ideal) workaround is to execute the function in a thread and timeout after a short while, e.g. thread.join(timeout=0.5). Docs: https://docs.python.org/3.7/library/threading.html#threading.Thread.join
If you can think of a way to fix it in getmac though I'm all ears, just short on time for the next few months.

Thanks for the fast reply! Yeah, I agree with you that all the redundant commands are a culprit here. I'm just gonna keep it short and say that these are the offending lines:

            # Darwin oddness
            (r'\(' + esc + r'\)\s+at\s+' + MAC_RE_DARWIN,
             0, 'arp', [to_find, '-a', '-a %s' % to_find]),

I tried removing them at it worked after that (and since Debian is not Darwin, that seems reasonable too). I don't have my Mac in front of me, so I can't check what arp accepts there (in case of a non-resolve flag). Maybe just include the Darwin-stuff in case of running on Darwin as a work-around?
Also, I would recommend hardcoding paths to commands to avoid potential PATH-hijacking:
https://www.hackingarticles.in/linux-privilege-escalation-using-path-variable/
It's a complete different issue, but i mention it so I don't forget.

That seems reasonable enough. Pretty busy currently, so while I may be able to get to it Saturday, it'll probably be more like next Saturday since I need to find the old Mac I used for testing. If you're able to test a fix on your Mac though I'd be fine with accepting that as well.
Thanks for the heads up on PATH, definitely agree it's a potential issue. I'll have to look into how to mitigate it without breaking compatibility.

I updated my [findpi](https://github.com/jamesacampbell/findpi) package to use this and I didn't want to have it hang, so I implemented this:
def ThreadId(ipaddress, macaddress):
    macaddress = get_mac_address(ip=ipaddress)
    if macaddress:
        if ("b8:27:eb" in str(macaddress.lower())) or ("dc:a6:32" in str(macaddress.lower())):
            print(f'Found pi: {ipaddress}')

def checkMacs(ip_address):
    """
    checks if mac address found from nmap that matches raspberry pi
    Accepts: ip_address var as string
    Returns: nothing
    Prints: found ip of pi if found
    """
    macaddress = str()
    th = threading.Thread(target=ThreadId, args=(ip_address, macaddress))
    #data = get_mac_address(ip=ip_address)
    th.start()
    th.join(timeout=0.5)
    return

based on the suggestion to use thread and setting a timeout. Seems to work fine and findpi continues to be faster than nmap to find pi's on a network. Thanks!

Using getmac version 0.8.3 on:
$ uname -a
Linux hosanna 5.18.10-76051810-generic #202207071639~1659403207~20.04~cb5f582~dev-Ubuntu SMP PREEMPT_DY x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

I do not get this hang. Debug output:
>>> getmac.get_mac_address(ip='<IP_ADDRESS>', network_request=False)
DEBUG:getmac:Trying: '_read_arp_file' (to_find: '<IP_ADDRESS>')
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: '<lambda>' (to_find: '<IP_ADDRESS>')
DEBUG:getmac:Running: '/sbin/ip neighbor show <IP_ADDRESS>'
DEBUG:getmac:Output from '/sbin/ip' command: b''
DEBUG:getmac:Exception: list index out of range
DEBUG:getmac:Traceback (most recent call last):
  File "/home/jkugler/.local/lib/python3.8/site-packages/getmac/getmac.py", line 590, in _try_methods
    found = m(to_find)
  File "/home/jkugler/.local/lib/python3.8/site-packages/getmac/getmac.py", line 537, in <lambda>
    lambda x: _popen("ip", "neighbor show %s" % x)
IndexError: list index out of range

DEBUG:getmac:Trying: 'arp <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'<IP_ADDRESS> (<IP_ADDRESS>) -- no entry\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -an'
DEBUG:getmac:Running: '/usr/sbin/arp -an'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'? (<IP_ADDRESS>) at c0:56:27:d2:b0:98 [ether] on wlp4s0\n? (<IP_ADDRESS>) at
 f8:0f:f9:88:2c:2e [ether] on wlp4s0\n? (<IP_ADDRESS>) at c8:e0:eb:38:31:2b [ether] on wlp4s0\n? (<IP_ADDRESS>) at <incomplet
e> on virbr0\n? (<IP_ADDRESS>) at 84:ea:ed:90:0a:5f [ether] on wlp4s0\n? (<IP_ADDRESS>) at 98:5d:ad:d8:6d:8a [ether] on wlp4s0\n
'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -an <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp -an <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'arp: in 6 entries no match found.\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'<IP_ADDRESS> (<IP_ADDRESS>) -- no entry\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -a'
DEBUG:getmac:Running: '/usr/sbin/arp -a'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'? (<IP_ADDRESS>) at c0:56:27:d2:b0:98 [ether] on wlp4s0\nGoogle-Nest-Mini.aza
riah.com (<IP_ADDRESS>) at f8:0f:f9:88:2c:2e [ether] on wlp4s0\nariel.azariah.com (<IP_ADDRESS>) at c8:e0:eb:38:31:2b [ether]
on wlp4s0\n? (<IP_ADDRESS>) at <incomplete> on virbr0\nRokuUltra.azariah.com (<IP_ADDRESS>) at 84:ea:ed:90:0a:5f [ether] on w
lp4s0\ngateway (<IP_ADDRESS>) at 98:5d:ad:d8:6d:8a [ether] on wlp4s0\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: 'arp -a <IP_ADDRESS>'
DEBUG:getmac:Running: '/usr/sbin/arp -a <IP_ADDRESS>'
DEBUG:getmac:Output from '/usr/sbin/arp' command: b'arp: in 6 entries no match found.\n'
DEBUG:getmac:Result: None

DEBUG:getmac:Trying: '_uuid_ip' (to_find: '<IP_ADDRESS>')
DEBUG:getmac:Result: None

DEBUG:getmac:Raw MAC found: None

This should be resolved with version 0.9.0. If it's still occurring, please re-open the issue, and include log output of the issue using the 0.9.0 release.


A lot of intellisense issues

Hi.
Am i the only one experiencing a lot of intellisense issues and false errors?
I am using a Apple M1 - i have tried my code on a Windows machine and there are no errors.
VS Code version:
Latest
C# Extension version:
Latest

I haven't had any luck finding any mention of this, but I too am having intermittent issues of false errors. I have never looked here though.
Case:  I'm using VS Code with Unity.
Platform: Windows 10
Versions: All latest.
Details and Commentary:
This is an old issue for me and has occurred over many versions for well beyond a year's time. The only thing I've found to help is restart, recompile, reboot. I don't know what goes on behind the scenes for this to occur, but something about resetting some of these things eventually works.
Basically what happens is one or more scripts will throw dozens to hundreds of errors; saying invalid something or other, namespace doesn't exist, etc. Think of an error, it's there. But the thing that I find odd, is that in those scripts with errors exists things that in other scripts with the same do not give errors. It also throws syntax highlighting way out of whack.
Yet, the code compiles just fine. Bizarre, disruptive, and confusing at times. Occasionally it'll trigger and I'm unsure whether there really is an error or if it's bugging out.
My best guess for what happens in my case is that Unity won't compile until all errors are resolved, and it might be jacking up the connection between it and VS Code/Omnisharp. I wouldn't be surprised if it's more Unity's fault though, since they've only recently started bridging with VS Code. Anyways, hope this is helpful.

I have issues like this all the time, and also sometimes omnisharp is so slow that it takes 15 minutes to have all files parsed.

@imflitch Can you please sahre the OmniSharp log from the Output pane?

I'm trying to use a M1 Macbook but there is no intellisense with Razor. It's in the release pipeline fixing this?

Closing due to lack of response.


📊 Forest loss by driver

Hey @Marigold - this is still very much a WIP but I'm running into some issues in the etl-unit-tests build.
I've added the Google Earth Engine module (ee) by running poetry add earthengine-api. Then I was getting an error that suggested I should run poetry lock, which I did. It looks a little like I've messed up adding Earth Engine to poetry, do you know how it could be fixed?

@Marigold that worked, thanks wizard!

To Do:

[ ] Add regions
[ ] Add an 'Other' category for tree cover loss that happens outside of the dominant driver mask - Global Forest Watch has this. I will probably separately calculate total tree cover loss and estimate 'Other' from this
[ ] Tree cover loss per capita/per area of country


Integration Test - Release - 2018/10/15 09:00:12

Auto create for integration test. AnotherAuthorUpdatedArticleFlow

@PRMergerTest1 : Thanks for your contribution! The author, @v-caxian, has been notified to review your proposed change.


iOS: Option to swipe right anywhere on an article to go back to the article list

I love how 'native' NNW feels in general and wouldn't want it to stray from that too much, but I super miss (from Unread) being able to swipe anywhere in an article to go back to the article list.
Now that articles support swiping anywhere to navigate between them, would it be possible to also have an option to swipe right anywhere on an article to get back to the article list?

I just installed the latest TestFlight beta and it is working as expected? If you do the gesture from the left edge, it goes back.

I am suggesting an option to be able to swipe from anywhere on the article, rather than only from the left edge.

I’m sorry you are having problems. Muscle memory can be a pain to retrain. Unfortunately we don’t have any plans to make gestures configurable at this time.

Even though there aren't any plans for this right now, I also want to throw my vote in for this feature.
I tend to have a lot of articles to go through, so my main view is the listing, where I tap into an article I'm interested in, then return to the listing page when I'm done. I rarely want to navigate from one article to the next, because that would take too long.
I know you can swipe from the left edge of an article to return to the listing. However, since I repeat this gesture many times, reaching across the screen to do a full swipe each time is noticeably tiring.
@vincode-io


Release/1.6

Issue: 270
https://github.com/tmobile/pacbot/issues/270.
Change the Manage Rule value to ManageRule.
Update the DB for all rule whose value is Manage Rule to ManageRule

 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.Robin Joseph seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Closing the PR since there was a commit from a mail id which didn't have a GitHub. So not able to sign the CLA


Use private instead of dummy repository

Found that using "private": true instead of a dummy "repository": "none" field also shuts up npm about the missing repository field and has the added benefit of preventing accidental publication of private repositories.
Gives a better example for people.

Thanks


Cstar 67

This isn't ready yet, but @mambocab and I want to offer early feedback in a useful place, so I'm opening this.

:fireworks: Get ready for a proposed scope increeeeease :fireworks:
In the long haul, imo, it'd be good to have tests for our utility functions, so we don't stop catching C* bugs when we break our code. This might be a good opportunity to start introducing some meta-tests so we know these functions work correctly.

Might be nice, in a separate PR, to add a msg parameter to these assertion methods (unless there already is one and I've missed it.

Rather the commenting 100x more times, can you just use assert_one and assert_all everywhere they should be used in upgrade_test/cql_tests

First pass of review probably done

Also you need to rebase, and placate Travis

Sean, I found a bug in the assert_X functions. They should not default to Cl.ONE, because we risk overriding a default consistency level set on that session

Running the upgrade changes here http://cassci.datastax.com/view/Parameterized/job/parameterized_dtest_multiplexer/128/

So @smccarthy788, we'll need to run this again on cassci, to make sure my huge rebase didn't break anything, and @mambocab if you could re-review it with me, that would be great. I did turn 66 interleaved commits into 3 sequential ones.

http://cassci.datastax.com/view/Dev/view/smccarthy788/job/smccarthy788-cassandra-3.0-dtest/13/

Dtest run reveals issues, @c-kodman can you fix?

Do all the tests pass now? Can you rebase, and squash the extra commits

Tests have been hanging because meta_tests/assertions.py doesn't have it's mock dependency available. I'm running it again with my bucketizer here: http://cassci.datastax.com/view/Dev/view/smccarthy788/job/smccarthy788-cassandra-3.0-dtest/17/

Can you re-run against the main bucketizer? All dependency issues should be resolved. Also travis is unhappy

Latest build:
http://cassci.datastax.com/view/Dev/view/c-kodman/job/c-kodman-trunk-dtest/

http://cassci.datastax.com/view/Dev/view/c-kodman/job/c-kodman-trunk-dtest/lastCompletedBuild/testReport/

Looks like you have three errors in that build, and travis is still sad. Still waiting on the changes to the recent PR from Alex P., as well, then we should be good to merge

http://cassci.datastax.com/view/Dev/view/c-kodman/job/c-kodman-trunk-dtest/

http://cassci.datastax.com/view/Dev/view/c-kodman/job/c-kodman-trunk-dtest/

Craig is running a build, but this is ready for final review now, @mambocab want to both tackle, or just me?

@mambocab want to both tackle, or just me?

I want in plz

http://cassci.datastax.com/view/Dev/view/c-kodman/job/c-kodman-trunk-dtest/

I left some nits

Left some comments, mostly nits. Great work, folks, some awesome changes in there.
Could you collate my followup requests into an internal JIRA ticket?

Merging!


Improvement with the PUT and POST methods

Now, when we create or update any object we put a JSON in this input text:

But we can’t know all the fields of this object:

Is it possible to add a relationship between service and objects in the POST and PUT methods? Also to change the input text to a textArea.
For example:

That is the Swagger implementation:

Thanks again.
Best regards, Mauro.

Hey @Mauro1983 I am working on this issue that seems very similar to #69. I am wondering why, in your issue, you asked for a "template" for path parameters. Currently I have implemented this feature only on the body object. Do you think it is enough? Could you provide the signature of a controller method which handles the use case you pointed out? Thank you.

@fabiomaffioletti , is there any chance that the playground will have cool body object field like Google have?
https://developers.google.com/drive/v2/reference/comments/insert

@yohanakh it's a good improvement. I'll evaluate it. Everybody is welcome to work on this and if the solution is good I'll integrate it into the master branch. I'm moving this issue to another milestone since I needed to release today.


Adding IntCodec?

Currently, there seems to be no "IntCodec" supported. So to pass a single integer as an input, I'm using the workaround of encoding it as a string and then using StringCodec to decode it inside the MLServer microservice.
Do you plan to add such support? Or is there anything I'm missing here?

Hey @rlleshi,
If all you want is a list of integers, you should be able to use the data field directly - right?

Hello @adriangonz
I want to pass a single integer actually. For example the input request:
    inference_request = {
        'parameters': {
            'content_type': 'str'
        },
        'inputs': [
            {
                'name': 'prompt',
                'data': prompt,
                'shape': (1,),
                'datatype': 'str',
            },
            {
                'name': 'max_tokens',
                'data': [200],
                'shape': (1,),
                'datatype': 'int',
            },
...
        ]
    }
    ```
    Currently, I'm passing it as a list so that I can access it from the `TensorData` class. But this is just another workaround.

Right - the Open Inference protocol is designed around tensors. Therefore, at the payload level the data field will always need to be a list. An IntCodec seems quite ad-hoc, so I'd not be too keen to add one.
For this case, the simplest would be to create a RequestInput object directly (i.e. RequestInput(name='max_tokens', datatype='INT32', data=[200], shape=[1])).


🫐 🐛 Operator is not setting the fsGroup ID specified through the statefulset securityContext

What happened?
Redpanda data directories are incorrectly being assigned the systemd-journald group ID, and systemd-resolve user ID in the host.

What did you expect to happen?
The value I set as fsGroup to be set as group ID in Redpanda's data directory.
How can we reproduce it (as minimally and precisely as possible)?. Please include values file.

The securityContext I'm setting:
statefulset:
  securityContext:
    allowPrivilegeEscalation: false
    runAsNonRoot: true
    runAsUser: 65530
    runAsGroup: 65530
    fsGroup: 65530

Which are the affected charts?
Redpanda, Operator
Chart Version(s)

❯ helm -n redpanda list
NAME             	NAMESPACE	REVISION	UPDATED                               	STATUS  	CHART          	APP VERSION
redpanda         	redpanda 	3       	2024-04-03 15:51:16.648405 -0400 EDT  	deployed	redpanda-0.1.1 	0.1.0
redpanda-broker  	redpanda 	2       	2024-04-03 19:08:29.79347033 +0000 UTC	deployed	redpanda-5.7.37	v23.3.10
redpanda-operator	redpanda 	1       	2024-04-01 18:14:29.732128 -0400 EDT  	deployed	operator-0.4.20	v2.1.15-23.3.7

Cloud provider

Azure / AKS

I would probably get the same result but that's not the real user or group owning the data in the node, right? Basically, in Azure's case, if the node gets compromised through any of these systemd components, the intruder will have full access to the data. So, ideally we use UIDs and GIDs dedicated to Redpanda.

Or we just map them to the user and group nobody in the host.

Is this really a limitation of the operator thought? We are asking that the container use a known user for the container. You are suggesting that the PVs be provisioned on the vm using that same user correct? Even though that user may not exist on the VMs' OS? Have you seen this work with other tools? If you have can you point them to me, it may help me close my knowledge gap quicker.

It would think it is if it doesn't let me set what I want. I'm setting fsgroup and it doesn't seem to be taking it.

we just found out there are more properties from securityContext not being set despite we setting them: capabilities, runAsGroup, and privileged

FWIW, here is what I'm trying to set in most of our pods:
podSecurityContext:
  runAsNonRoot: true
  runAsUser: 65534
  runAsGroup: 65534
  fsGroup: 65534

securityContext:
  privileged: false
  allowPrivilegeEscalation: false
  runAsNonRoot: true
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: true
  runAsUser: 65534
  runAsGroup: 65534

@c4milo, when you have a second would you mind verifying if the issue was due to local-path-provisioner or if we need to fix something on our end?

@c4milo As far as I understand with https://github.com/redpanda-data/cloudv2/pull/17151 you fixed the issue. If you think that the issue is not resolved please re-open or create new one.


[Docs]: Request Algolia search resource approval

Type
Maintenance task
What do you want to report?
We need to get approval for the Algolia search plan resource.
Code of Conduct

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

See: https://github.com/renderedtext/tasks/issues/6862


feat: typescript build

@six7 needs a good functional test. I did update the webpack config to fail when encountering typing errors. So from this point on once ready/merged we should always have a completely typed codebase.

@six7 needs a good functional test. I did update the webpack config to fail when encountering typing errors. So from this point on once ready/merged we should always have a completely typed codebase.

currently for us it fails to launch the plugin (and there's a failing test)

Steps:

add JSONBin sync
Create new tokens set
sync (worked)
add new color token
Sync
Edit token
ERROR

From the console
Uncaught TypeError: value.replace is not a function
at :29813:87
at mountMemo (:125844:19)
at Object.useMemo (:126217:16)
at useMemo (:146320:21)
at DownshiftInput (:29812:69)
at renderWithHooks (:124983:18)
at mountIndeterminateComponent (:127809:13)
at beginWork (:129047:16)
at HTMLUnknownElement.callCallback (:113951:14)
at HTMLUnknownElement.sentryWrapped (:17930:23)
at Object.invokeGuardedCallbackDev (:114000:16)
at invokeGuardedCallback (:114062:31)
at beginWork$1 (:133957:7)
at performUnitOfWork (:132772:12)
at workLoopSync (:132700:5)
at renderRootSync (:132663:7)
at performSyncWorkOnRoot (:132286:18)
at :121325:26
at unstable_runWithPriority (:149922:12)
at runWithPriority$1 (:121274:10)
at flushSyncCallbackQueueImpl (:121320:9)
at flushSyncCallbackQueue (:121307:3)
at discreteUpdates$1 (:132413:9)
at discreteUpdates (:113762:12)
at dispatchDiscreteEvent (:115887:3)
at HTMLBodyElement.sentryWrapped (:17930:23)
After restart, plugin doesn't open, in console:
[LaunchDarkly] network error (NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://app.launchdarkly.com/sdk/evalx/626fb05d52e5c715abd11b5e/users/eyJrZXkiOiIxMDQ4MjcwMTk4NDY0NjM5ODgxIiwiY3VzdG9tIjp7InBsYW4iOiIiLCJlbWFpbCI6IiIsIm9zIjp0cnVlfX0': Document is already detached.)

@mikekamminga you are right - the error was introduced while merging in the next changes.

Settings: Can't select Local document anymore

Settings: All sync providers seem to be active at the same time

Having Git sync and having local changes no longer, restarting the plugin no longer asks the user if they want to Pull or keep their local changes (we introduced this recently on the next branch but seems to have been broken now)

GitHub sync: Pushing to GitHub seems to have been broken. Console says Buffer is not defined

@six7 thanks for testing

I tested the selecting of local document. This appears to work as expected compared to the live plugin. I can confirm it doesn't re-select LOCAL if LOCAL is already selected as the storage type (but you have selected another credential type to edit)
I fixed the annotation placement
I looked at the typography editor - I can't seem to reproduce the issue with the auto suggest opening by default. I tried by editing and by creating new tokens.
The provider active status is fixed
The new git "Ask to pull" is fixed, something went missing during the merge
The Buffer error is also fixed. This was introduced because I properly upgraded to Webpack 5. It looks like we were still using Webpack 4 up until now due to multiple versions being installed. Webpack 5 drops the buffer polyfil by default so I had to manually enable it.

I looked at the typography editor - I can't seem to reproduce the issue with the auto suggest opening by default. I tried by editing and by creating new tokens.

You can load the preset and then edit one of the typography tokens to see the bug in action
https://user-images.githubusercontent.com/4548309/169469319-03d3aced-38ab-4691-affa-4a95df670853.mp4
Other bugs

Launching the plugin in a new file results in endless Loading screen
The bug with Local changes is not fixed quite yet. It doesn't give me the popup when I was on GitHub storage and had local changes (I noticed it has this bug when you press the Update button, if you dont press that it works fine). It also seems to now ask when storage is set to Local and you have changes if you'd like to "Pull from Local" which seems to be a regression. There's no pulling on Local storage as the local storage is always the source of truth. This should ask you only when you have local changes that weren't pushed yet to the repository. See video

https://user-images.githubusercontent.com/4548309/169470623-a2dc2fae-af58-44a3-adee-ff0335fb8773.mp4

Updating or adding token descriptions doesn't work currently (tried on different token types, happened on all of them)

@six7 I was just doing some test and it looks like all the bugs you mentioned (aside from the description update) are also present on the next branch currently. Shall we fix these in a different branch? (I did fix the description update)

@six7 I was just doing some test and it looks like all the bugs you mentioned (aside from the description update) are also present on the next branch currently. Shall we fix these in a different branch? (I did fix the description update)

You're right. I created new issues to tackle these.
From my end this is working functionally. @esthercheran @mikekamminga anything you noticed? Otherwise let's merge it in.

@six7 yea would love to get this merged in so we can move forward type safe with all further branches

Got it, from my end we can merge it in 👍


RaisePropertyChanged in different threads crashed

I created an App with multiple Windows. If I open a new Window in a new thread and the RaisePropertyChanged event is called than I get this error message:
"Unable to cast COM object of type 'System.ComponentModel.PropertyChangedEventHandler' to class type 'System.ComponentModel.PropertyChangedEventHandler'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface."
The exception stack Looks like this:
System.StubHelpers.StubHelpers.GetCOMIPFromRCW_WinRTDelegate(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget)
System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
Template10.Mvvm.BindableBase.<>c__DisplayClass4_1.b__0()
Template10.Common.DispatcherWrapper.d__8.MoveNext()
System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
Windows.ApplicationModel.Core.UnhandledError.Propagate()
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, UnhandledErrorDetectedEventArgs e)
So it Looks like there is a Problem in the RaisePropertyChanged Event.
Do you have an idea where the Problem is? Or is this an known issue?

Are you using a single view-model across views? That will always cause this exception and there's really nothing you can do to change that, @Florian-Haar. It's not Template 10, here, it's just threading in XAML.


Arducam mini 5MP with Arduino pro

Hi @ArduCAM
I'm a 5MP arducam mini camera, and trying to test with the "ArduCAM_Mini_Video_Streaming" example.
But I got nothing in the host_app (ArduCAM_Host_V2) : no image. In the Serial monitor I could only see reverse question mark diplaying. Any help would be welcome, thanks.
These are the connections I used :
CS--> D10
MOSI-->D11
MISO-->D12
SCK-->D13
VCC-->5V
GND-->GND
SDA-->A4
SCL-->A5

@Idavickit
Hi,
In our ArduCAM_Mini_Video_Streaming demo, we define CS 7.
Regards.

Thank you for your answer @UCTRONICS
I defined CS 10 instead of CS 7 since I'm using arduino pro board. I saw here https://store.arduino.cc/usa/arduino-pro that D10 is CS pin for this board.
Although, I've just tried with CS 7 but it's still not working.
I'm wondering if arducam is not compatible with this board...
Thanks

@Idavickit
Hi,
Arducam should be compatible with this board.We have test it on Pro mini board.
You can test I2c and SPI separately.
Regards.


please port item renaming from 13

Description
using a pen or a crayon to rename an item so i dont have to pray/ahelp would help RP greatly.
Screenshots

Additional context
i have a character that requires a renamed item for its central RP, and having to ahelp each time gets the admins mad

Can't you use the labler or am I not understanding?

Can't you use the labler or am I not understanding?

that adds it on the end, but it doesnt rename it entirely like i need

now pros will rename their pen to energy sword or blood-red hardsuit to troll

only use this for mrp


How to add permission to builtin role in storage account?

I have a storage account and I want to give permission to one of my App Service in "Storage Account Key Operator Service Role".
Similar to the below action in Azure portal.

Hi @himanshu219, thanks for reaching out!
Please refer to this guide.

Thanks for the answer but I have already looked into that. This feature is under preview and is not for production use.

@himanshu219 does the guide answer your question?

HI @himanshu219, are you looking for a sample like this one?

Thanks I found the api and answered the question here https://stackoverflow.com/questions/52771941/how-to-add-permission-to-builtin-role-in-storage-account-using-azure-python-sdk/52773467?noredirect=1#comment92594352_52773467