Problem with datas

Hello, first, i m sorry i don't speak chinese.
I want to know if i can adapt the list at runtime for exemple:

wheel A contains A1,A2,A3
wheel B contains B1A1,B2A1,
B1A2,B2A2,
B1A3,B2A3,
So if A1 if selected B1A1 and B2A1 is showing, A2 B1A2 and B2A2, etc , ...
Thanks a lot

我试图用中文来传播
你好，首先，我很抱歉，我不会说中文。
我想知道我是否可以在运行时调整列表，例如：
轮A包含A1，A2，A3
轮B包含B1A1，B2A1，
B1A2，B2A2，
B1A3，B2A3，
所以如果A1如果选择B1A1和B2A1显示，A2 B1A2和B2A2等...

@helsephas  You mean that you need the options change as long as item changes? or next time you open it, change the default selection?  “So if A1 if selected B1A1 and B2A1 is showing, A2 B1A2 and B2A2, etc , ...”  Can you describe it more clearly? I don't quite understand this. Waiting for your reply~

Yes the options2 changes as long as item changes in option 1. Its seems to be like this : https://github.com/Bigkoo/Android-PickerView/blob/master/preview/JsonData.gif.

@helsephas The steps to add datas are as follows:
private ArrayList<Entity> options1Items = new ArrayList<>();
private ArrayList<ArrayList<Entity>> options2Items = new ArrayList<>();

        //options1 data
        options1Items.add(A1);
        options1Items.add(A2);

        //options2
        ArrayList<String> options2Items_02 = new ArrayList<>();
        options2Items_02.add(B11);
        options2Items_02.add(B12);
        ArrayList<String> options2Items_01 = new ArrayList<>();
        options2Items_01.add(B21);
        options2Items_01.add(B22);
        options2Items.add(options2Items_01);
        options2Items.add(options2Items_02);

@helsephas It can be either data of type String or entity data. If you add entity data，your entity class need implements ”IPickerViewData“ interface, and then, In the "getPickerViewText" method, returns the String data what you needs to be displayed.

@helsephas  set linkage picker data after you add data list, like this:
pvOptions.setPicker(options1Items, options2Items);
//or
pvOptions.setPicker(options1Items, options2Items,options3Items);

Thanks for your replies.
I have make so try but i m still blocked with this code and i seem to use exactly like you
I used this like this :
var pickerViewDates =  MyOptionsPickerView(this)
pickerViewDates.setTitle(this.resources.getString(R.string.shopping_cart_pick_date_title))
var now : Date = Date()
var days : ArrayList = ArrayList()
var hours : ArrayList<ArrayList> = ArrayList()
var minutes : ArrayList<ArrayList> = ArrayList()
//init arrays
pickerViewDates.setPicker(days,hours,minutes,true)
pickerViewDates.setCyclic(true,true,true)
pickerViewDates.show()
-> I get an error because type is mismatching (required: ArrayList<String!>! found ArrayList<ArrayList>

@helsephas  Do you need to use timePicker?  you can do that:
        Calendar selectedDate = Calendar.getInstance();
        Calendar startDate = Calendar.getInstance();
        startDate.set(2013, 0, 1);

        Calendar endDate = Calendar.getInstance();
        endDate.set(2017, 11, 1);

        pvTime = new TimePickerView.Builder(this, new TimePickerView.OnTimeSelectListener() {
            @Override
            public void onTimeSelect(Date date, View v) {//callback
            }
        })
                .setType(new boolean[]{true, true, true, false, false, false})
                .setLabel("", "", "", "", "", "")
                .setDividerColor(Color.DKGRAY)
                .setContentSize(21)
                .setDate(selectedDate)
                .setRangDate(startDate, endDate)
                .build();
    }

@helsephas  Calendar's month value is 0-based. e.g., 0 for January.

I can't use time picker because i got a set of ranges dates for example i will get
17 july  8->16 hours 0-> 59 minutes
19 july  8->16 hours 0-> 59 minutes
21 july 9-> 20hours 0-> 59 minutes
etc etc thats why i use String and not date.
My problem is that i can't add arrayList like you did in your example for option 2 because i said that my optionPickerView will be type String and not ArrayList of String thats what i don't understand and we got the same code apparently

@helsephas  1. You can used the linkage datatype. For details, please refer to the fourth reply , dataType :
var days : ArrayList = ArrayList()
var hours : ArrayList<ArrayList> = ArrayList()
var minutes : ArrayList<ArrayList<ArrayList>> = ArrayList()

Or self modify the source code to implement this function( let option1 and option2 linked, option3 is no-linkage), dataType :

var days : ArrayList = ArrayList()
var hours : ArrayList<ArrayList> = ArrayList()  // depend on day
var minutes : ArrayList = ArrayList()     // 0-59

Ye i got this from start i know i can add ArrayList like that. My problem is not that i don't understand how to use it. My problem is that i use this like you say. So i get my Arrays like you But when i use
MyOptionPickerView(String) et and i to setPicker it doesn't accept my options 2 et option 3 arrays.
` var pickerViewDates =  MyOptionsPickerView(this)
pickerViewDates.setTitle(this.resources.getString(R.string.shopping_cart_pick_date_title))
        var now : Date = Date()

        var days : ArrayList<String> = ArrayList()
        var hours : ArrayList<ArrayList<String>> = ArrayList()
        var minutes : ArrayList<ArrayList<ArrayList<String>>> = ArrayList()

        for(cptDays in 0..30){
            val outFormat = SimpleDateFormat("EEEE")
            var dateToLastOne = Date(now.time + 86400000 * cptDays)
            val dayCode = outFormat.format(dateToLastOne).toUpperCase()
            for ( openHoursPerDay in Session.instance.currentCommand.shop.shopParameters.openHours.openHoursPerDay){
                if(openHoursPerDay.day.code == dayCode){
                    if(openHoursPerDay.isOpen) {
                        var startTimeHours = openHoursPerDay.startTime.hours
                        var endTimeHours = openHoursPerDay.endTime.hours
                        var hoursInDay : ArrayList<String> = ArrayList()
                        for (cptHours in startTimeHours..endTimeHours) {
                            //hours.add(cptHours.toString())
                            var minutesInHour = ArrayList<String>()
                            for (cptMin in 0..59) {
                                minutesInHour.add(cptMin.toString())
                            }
                            var minutesPerHour = ArrayList<ArrayList<String>>()
                            minutesPerHour.add(minutesInHour)
                            minutes.add(minutesPerHour)
                            hoursInDay.add(cptHours.toString())
                        }
                        hours.add(hoursInDay)
                    }
                    days.add(dateToLastOne.formatToLocalDay())
                }
            }
        }

        pickerViewDates.setPicker(days,hours,minutes,false)
        pickerViewDates.setCyclic(true,true,true)
        pickerViewDates.show()`

Oki i m sorry for all this. Because my problem was simply that : I used MyOptionsPickerView and not OptionsPickerView so i waste our both time. I m sorry for this. Thanks for all this replies and for your time. Have a nice day.


[BUG] No Report Templates found. Click on 'Create New Template' to design one.

Is there an existing issue for this?

[X] I have searched the existing issues

Description
There is no report templates in the toolkit
Current Behavior

Expected Behavior
From the website
https://aiverify-foundation.github.io/aiverify/using-toolkit-step-by-step/test-ai-model-and-generate-report/2-select-template/
there is template to be selected

Steps To Reproduce
No response
Environment
- Operating System and Version:
- AI Verify Version: docker build ${@:1} -t aiverify:0.10.3 .
- Docker version : Docker Desktop 4.33.0 (160616)
- Any other relevant information (e.g. version of related package dependencies installed):

Did you build using source code or from docker file? If from source code, please provide the below information:
- Python Version:
- Node Version:
- Redis Version:
- Mongo Version:
- Screen Resolution:

Screenshots/ Code snippets
No response
Additional Context
No response
Possible Solution (Optional)
No response

@imda-benedictlee Hi, is there further information required on this ? i reinstalled ubuntu & follow the installations steps again, seems like the issue is still the same using docker file.


remove unused AudioController initializations

These optimizations reduce SpeechPipeline.start() time by ~40ms.

 Improve performance of Spokestack activation


Fixes #3742 - just remove the time range part of the query, each acti…

…vation is keyed with its activation ID already.

Description

Just remove the time range from the query. The activation Id should be sufficient anyway. If the system has two activations with the same ID we have other problems.
Related issue and scope

[x] I opened an issue to propose and discuss this change (#3742 )

My changes affect the following components

[ ] API
[x] Controller
[ ] Message Bus (e.g., Kafka)
[ ] Loadbalancer
[ ] Invoker
[ ] Intrinsic actions (e.g., sequences, conductors)
[ ] Data stores (e.g., CouchDB)
[ ] Tests
[ ] Deployment
[ ] CLI
[ ] General tooling
[ ] Documentation

Types of changes

[ x] Bug fix (generally a non-breaking change which closes an issue).
[ ] Enhancement or new feature (adds new functionality).
[ ] Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

[x ] I signed an Apache CLA.
[ x] I reviewed the style guides and followed the recommendations (Travis CI will check :).
[ ] I added tests to cover my changes.
[ ] My changes require further changes to the documentation.
[ ] I updated the documentation where necessary.

What's the status of this? Any updates?

@mcdan @tysonnorris is this still live?

closing this since SplunkLogStore query is working fine; @mcdan let's discuss in #3742 if you think this is still an issue?


Generic Protobuf MessageCodec example

Hi,
Sorry if this isn't the correct way to submit code but I just came across your repo today while searching for the exact subject.
I wanted to send/receive Protobufs over the eventbus..
After a lot of searching and trial and error I came up with a generic solution that I thought I'd offer for your documentation or code if you'd like.
If you already have something, then you can ignore me :-)
https://github.com/tmulle/VertxProtobufEventBusCodec.git

Hi @tmulle , thank you for sharing. Your solution is interesting but we've been asked in the past how to exchange protobuf messages without creating a codec for each message type.
If you look at the code in #1 , you will see that we need a single codec instance (but that works for Vert.x 4.3+ only)


refactor options pkg

Refactor options package to cmd directory.
/cc @Random-Liu @dchen1107

This change is

LGTM with one nit.

@Random-Liu Comments addressed. PTAL.

LGTM


Set theme jekyll-theme-hacker

Declined.
Perhaps this PR was by mistake and was intended for the developer's fork of the SDK.


Default values for properties vs repeated composition

Well I just encountered rather peculiar problem. Simplified code looks like this.

Action.js

const Action = stampit.statics({
	actionName: null,
	define(name) {
		return this.statics({ actionName: name })
	}
})

export default Action

EngineAction.js

import Action from './Action'

const EngineAction = Action.statics({
	trigger: ...
})

In some other point a do have just Action stamp and conditionally I am composing it with EngineAction, eg. MyAction.compose(EngineAction). What was a surprise to find out that ResultAction.actionName is actually null.
After some debugging I've realized that culprit is obviously that in EngineAction.js I already use Action as a base stamp. In a process of merging it then overrides again the actionName.
Does it classify as a bug? It certainly prevents me to do one of these which would be normally expected to work properly in my opinion.

Set default values for my properties ... makes it less confusing to see everything in one place
Compose same stamp multiple times ... allows not to make any assumptions about used stamps

Does it classify as a bug?

Nope.
There are few ways to solve that.

The default actionName should be undefined instead of null. Then it will work as expected.
I'd have HaveTrigger stamp instead of the EngineAction. Because EngineAction just too bulky and duplicates Action.
...

I see statics abuse in your code. Have you considered configuration/properties instead?

The default actionName should be undefined instead of null. Then it will work as expected.

This kinda sounds like a bug or at least it's not documented? Since it's undefined by default I rather use null so I can easily distinguish if it was set or not at all.
Reason why I am composing Action into EngineAction is because I am calling static method of it.
const Action = stampit.statics({
	setupAction(app) {
		const { setupListeners } = this.compose.deepConfiguration
		// here I am composing stamp from results of all listeners
		return setupListeners.reduce((stamp, listener) => listener.call(stamp, app), this)
	},
	addSetupListener(listener) {
		return this.deepConf({ setupListeners: [listener] })
	}
})

const EngineAction = Action..addSetupListener((app) => {
	const engine = app.engine
	return this.methods({
		trigger() {
			this.log('triggering')
			engine.triggerAction(this.name, this.payload)
		},
	}).statics({ engine })
})

Declaring actions happens way before the app is available. I am aware it's not pretty, but if you have an idea for better solution...

Anything to discuss here? Can you consider closings this one @fredyc?

Yea, I don't really remember how I actually solved it and it's kinda abandoned thing in general so I am closing it.


Fixed an issue where the Qwen model had too much error after quantization

Fixed an issue where the Qwen model had too much error after quantization

I tested perplexity before and after and found that this works!

FP16: 8.672
Main INT4 (duo_scaling=True): 10.224
Main INT4 (duo_scaling=False): 9.949
PR INT4 (duo_scaling=True): 8.846
PR INT4 (duo_scaling=False): 8.860


Unable to stop running instance on server

Trying to stop the running instance gives an error
$ --rpc-eval : RPC failed with reason :nodedown

Looking around I found an unresolved related issue on elixirforum ( https://elixirforum.com/t/why-does-my-release-not-announce-itself-to-epmd/24091/6)

Does manual deploy work ok? I'm fine with manual deploy. Ie I update production following a process defined in readme.

I am trying this out in Ubuntu right now for the SbomPoc Project . Will let you know if it works well on Ubuntu

is this fixed?

Not yet, cant find a solution at the moment. Manual deploy works fine, if we need to automate we can move to distillery to manage our deployment

Not yet, cant find a solution at the moment. Manual deploy works fine, if we need to automate we can move to distillery to manage our deployment


feature: ant-design FormItem add DatePicker

@Germiniku If you want to add date to FormItem, it also need be one of FaasItemType.
And how about to add dayjs's components to reduce package size?

@Germiniku If you want to add date to FormItem, it also need be one of FaasItemType.
And how about to add dayjs's components to reduce package size?

ok,I'm going to add antd time components like TimePicker

@Germiniku If you want to add date to FormItem, it also need be one of FaasItemType.
And how about to add dayjs's components to reduce package size?

我用Dayjs替换moment组件后(文档:https://ant.design/docs/react/replace-moment)
使用@swc/jest测试会引入less 测试报错, 我找不到什么好的解决方案
faasjs/node_modules/antd/lib/style/default.less:2 @root-entry-name: default; SyntaxError: Invalid or unexpected token

@Germiniku I fixed the jest problem in this branch, you could merge the branch then continue to add date and time to Description and Table.

this branch

ok,I'll add it tomorrow

@Germiniku I fixed the jest problem in this branch, you could merge the branch then continue to add date and time to Description and Table.

I have added date and time to Description and Table.

@Germiniku Thank you for your contribute 👍


requirements line 34

On: pip install -r requirements.txt
Collecting win32core==221.36 (from -r requirements.txt (line 34))
Could not find a version that satisfies the requirement win32core==221.36 (from -r requirements.txt (line 34)) (from versions: 221.2, 221.3, 221.4, 221.5, 221.6, 221.7, 221.12, 221.14, 221.15, 221.16, 221.18, 221.20, 221.21, 221.22, 221.23, 221.24, 221.25, 221.26, 221.27, 221.28)
And on python fishy.py:
File "C:\Users**\fishyboteso-master\init.py", line 21, in
from docopt import docopt
ModuleNotFoundError: No module named 'docopt'

sorry for the late reply,
It looks like win32 api is not getting download, try removing that from requirements.txt file and insteall the rest modules,
to install win32 api u can use, pip install pypiwin32 command


Added ProductCode for REALiX.HWiNFO

winget is not able to uninstall this application using moniker, will see if adding product code helps.

Microsoft Reviewers: Open in CodeFlow

Oooo, i see whats wrong here, the ARP is failing to match, probably because the PackageName is HWiNFO64/HWiNFO32 and the Publisher is Martin Malik - REALiX. I think how the matching works is HWiNFO "wildcard" and Publisher just fails is there is a - in it...
We should probably add a installer for x86 with ProductCode: "HWiNFO32_is1"


Migrate to Swift 3

This PR includes migration of library and sample project to Swift 3.

Thanks!
But I wanted to make some API changes, so I have a PR open at https://github.com/cjwirth/RichEditorView/pull/89 and a swift-3 branch.

If you added something like to-do list for Swift 3 transition, I would help that. For now, I don't know what is missing or what do you have in mind for Swift 3 transition.

Thanks!
I'm sorry I've been super lazy, but really the only thing left is figuring out which versions are compatible with semantic versioning.
Hard Way
Do I have things to release on 3.2.0 in the Swift 2 version? --> Release it as either 3.2.1 or 3.3.0 depending on what the changes are
Does the 2.3 branch build with Xcode 7? --> Release 2.3 as 3.3.0 (or 3.4.0, if I chose 3.3.0 in the previous step)
Does 2.3 break projects built with older versions? --> Release it as 4.0.0
Finally, release the Swift 3 version as either 4.0.0 or 5.0.0 based on what the previous version was.
Easy Way
Forget about any lower version, and just release the Swift 3 version as 4.0.0 and be done with it. I think I already made all the API changes I wanted to make (I think...)

Does 2.3 break projects built with older versions?
For this question, most probably I don't see a point to make it 4.0.0. First, it shouldn't break. Second, even if it breaks, you should release it as 3.3 or 3.4. Swift 3 implementation is a really big change in here. So only it should be released as major release.

Does 2.3 break projects built with older versions?

Unlikely, but at this point I don't remember if I made any breaking changes to it or not.

For this question, most probably I don't see a point to make it 4.0.0. First, it shouldn't break. Second, even if it breaks, you should release it as 3.3 or 3.4. Swift 3 implementation is a really big change in here. So only it should be released as major release.

I'm just trying to follow my understanding of semantic versioning. If it's a breaking change, no matter how small, if upgrading to the new version will break your current build, it should be a major version update.
Now, I don't expect too many people to be using Swift 2.3, so I'd be OK just releasing Swift 3 version as 4.0.0 and keeping the Swift 2.3 version as a branch (unreleased)

I guess I should also note that I originally made this with CocoaPods as the main integration method, which is also the one the sample project uses. So when I say "release," I mean both making a tag, as well as pushing a version to the CocoaPods pod repo.

If you don't remember that you did breaking changes for Swift 2.3, leave it on the branch for a while. If anybody wants to use it, they can use it from the branch. And release the Swift 3 as 4.0.0.


Add support for Windows msi files.

I could have made it a one liner, but I tend to prefer multiple lines that are a little less cryptic.  Either works.

Couple of questions, but up to @chrisroberts and HW ultimately.

We've got Windows support coming via #101. Following that release, please review the existing functionality and open a new issue if requirements aren't met.


High increase in indexer queue used percentage when switching to otel

We've been using splunk connect for kubernetes for some time.
We've tried switching to otel, however when we switched we saw a considerable increase in the GBs ingested coming from kubernetes, along with a very big increase in the % used rate for the queues in our indexers.
We are wondering where this increase in indexer load might be coming from.
Here's a hypothesis: We've noted that otel by default sends some new metadada to splunk, in particular this field: k8s.container.restart_count
Is it possible that by trying to index k8s.container.restart_count or other metadata as an indexed field, splunk is suffering a higher load?
Is it possible to stop otel from sending metadata?
Thanks in advance

Multiple things may contribute to a higher usage here.
We have identified that Splunk HEC exporter doesn't use multi-metrics events right now (https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11459). It's also possible you get additional metrics as well since we can get more information from the cluster.
To disable metrics collection, we offer in our docs to set up metricsEnabled to false: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/docs/advanced-configuration.md#disable-particular-types-of-telemetry
Please try this and let us know if it works for you.

@atoulme Thanks for your response!
Currently our configuration looks like:
metricsEnabled: false
tracesEnabled: false
logsEnabled: true
So it seems we are already using the suggested configuration
I wonder if we coud disable index-time field extractions from HEC metadata on the splunk side?
Other than that, I guess its possible the higher usage is coming from the increase in the volume of GBs ingested... But honestly the increase in volume is not that big, that's why I was thinking its more a issue of the 'quality' and not 'quantity' of the logs being ingested.

Could also be the chunk sizes and number of connections.
Can you give some detail about your Splunk deploy? Are the collectors being load balanced? etc

Marking closed as inactive.


Skype: Inbound attachment has no name

Hi,
I am trying to get an attachment from the user, but I found out that the "name" property of the Attachment class is always empty, and moreover the "ContentType" is always "application/octet-stream".
How can I get the file name?
Tom
 private async Task geAttachment(IDialogContext context, IAwaitable<IEnumerable<Attachment>> result)
        {
            string id = "";
            string path = HttpContext.Current.Server.MapPath("~/attachments");

            IEnumerable<Attachment> list = await result;

            Attachment attachment = list.FirstOrDefault();

            string filename = attachment.Name;
            string url = attachment.ContentUrl;
            string contentType = attachment.ContentType;

            Uri uri = new Uri(url);

            using (HttpClient httpClient = new HttpClient())
                {
                    // Skype attachment URLs are secured by a JwtToken, so we need to pass the token from our bot.
                    if (uri.Host.EndsWith("skype.com"))
                    {
                        var token = await new MicrosoftAppCredentials().GetTokenAsync();
                        httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
                    }

                context.PrivateConversationData.TryGetValue<string>("ID", out id);
                var responseMessage = await httpClient.GetAsync(url);

                responseMessage.EnsureSuccessStatusCode();

                // Read response asynchronously and save asynchronously to file
                using (FileStream fileStream = new FileStream(path + @"\" + filename, FileMode.Create, FileAccess.Write, FileShare.ReadWrite))
                {
                    await responseMessage.Content.CopyToAsync(fileStream);

                }

            }

            await context.PostAsync(path + @"\" + filename);
            await context.PostAsync(contentType);
            context.Wait(MessageReceived);
        }

Which version of bot SDK are you using?

It's v3.4

yeah, it should work there. So, what skype clients did you try? Some devices don't support file names

Skype Desktop for Windows latest version.

Hi Tom. We found that it's issue in botframework. They don't send the field "Name" for attachments

Hello Tom. Could you send your bot ID?

@tpernice, are you still experiencing this issue? if yes, can you send your bot id?

closed as old


Authorization error

1) Error in custom provider, com.amazonaws.AmazonServiceException: User: arn:aws:iam::<ID NUMBER>:user/<USER NAME> is not authorized to perform: apigateway:GET on resource: arn:aws:apigateway:us-east-1::/ (Service: null; Status Code: 403; Error Code: null; Request ID: )

With the following swagger:
{
    "swagger": "2.0",
    "info": {
        "version": "0.0.1",
        "title": "Tested Planet"
    },
    "paths": {
        "/test": {
            "get": {
                "description": "Test.\n",
                "parameters": [
                    {
                        "name": "phrase",
                        "in": "query",
                        "description": "phrase",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "schema": {
                            "title": "Test",
                            "type": "object",
                            "properties": {
                                "phrase": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Unexpected error",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                },
                "x-amazon-apigateway-auth": {
                    "type": "none"
                },
                "x-amazon-apigateway-integration": {
                    "type": "aws",
                    "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:<ACCOUNT ID>:function:getTest/invocations",
                    "credentials": "arn:aws:iam::<ACCOUNT ID>:role/lambda_basic_execution",
                    "httpMethod": "POST",
                    "requestTemplates": {
                        "application/json": "json request template 2",
                        "application/xml": "xml request template 2"
                    },
                    "requestParameters": {
                        "integration.request.path.integrationPathParam": "method.request.path.phrase"
                    },
                    "responses": {
                        "2\\d{2}": {
                            "statusCode": "200",
                            "responseTemplates": {
                                "application/json": "json 200 response template"
                            }
                        },
                        "default": {
                            "statusCode": "400",
                            "responseTemplates": {
                                "application/json": "json 400 response template"
                            }
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "Error": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer",
                    "format": "int32"
                },
                "message": {
                    "type": "string"
                },
                "fields": {
                    "type": "string"
                }
            }
        }
    }
}

Did this previously work? It appears that the credentials used in your AWS SDK do not have valid permissions on the API Gateway API.
You will need to define a policy for the user/role similar to below. See http://docs.aws.amazon.com/apigateway/latest/developerguide/permissions.html
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"apigateway:GET"
],
"Resource": [
"arn:aws:apigateway:us-east-1::/restapis/[APID_ID]/*"
]
}
]
}

My policy looks like:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "apigateway:*"
            ],
            "Resource": "arn:aws:apigateway:*::/*",
            "Condition": {
                "Null": {
                    "aws:MultiFactorAuthAge": "false"
                }
            }
        }
    ]
}

I believe there may be some trouble with my MFA tokens, which work for other aws services...

@edubkendo did you end up solving this issue? I am now seeing this w/ an IAM user who has the same group policy you posted but without the MFA condition. Other IAM users with the same group policy had no issue in the past... looking into it currently

Swagger/OpenAPI import is now generally available in the API Gateway REST API, the AWS CLI and all AWS SDKs. You can also import and export Swagger definitions using the API Gateway console. This release addresses many of the open issues and feedback in this repository.
I would encourage you to migrate your workflow to the standard AWS tools. aws-apigateway-importer will receive minimal support from the API Gateway team going forward.
Any feedback or issues with the new importer should be directed to the official API Gateway forums.
Thanks,
Ryan


[fmt] download failed

Downloading https://github.com/fmtlib/fmt/archive/4.0.0.tar.gz... Failed. Status: 4;"A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision."

Hi @dengzikun,
I'm not able to trivially reproduce this issue. Could you elaborate on:

Your system configuration (OS/VS)
Your network setup (are you using a proxy?)
What commands reproduce this issue

windows 10 profressional 64bit  vs 2017 enterprise
using network proxy.
set http_proxy=http://<IP_ADDRESS>:8118
set https_proxy=https://<IP_ADDRESS>:8118
(Through the proxy, I use IE or EDGE can normally download spdlog and fmt)
vcpkg install spdlog
The following packages will be built and installed:

fmt:x86-windows
spdlog:x86-windows
Additional packages (*) will be installed to complete this operation.
Building package fmt:x86-windows...
-- CURRENT_INSTALLED_DIR=D:/development/Tools/git/vcpkg/installed/x86-windows
-- DOWNLOADS=D:/development/Tools/git/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=D:/development/Tools/git/vcpkg/packages/fmt_x86-windows
-- CURRENT_BUILDTREES_DIR=D:/development/Tools/git/vcpkg/buildtrees/fmt
-- CURRENT_PORT_DIR=D:/development/Tools/git/vcpkg/ports/fmt/.
-- Downloading https://github.com/fmtlib/fmt/archive/4.0.0.tar.gz...
-- Downloading https://github.com/fmtlib/fmt/archive/4.0.0.tar.gz... Failed. Status: 4;"A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision."
CMake Error at D:/development/Tools/git/vcpkg/scripts/cmake/vcpkg_download_distfile.cmake:82 (message):
Failed to download file.
Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
D:/development/Tools/git/vcpkg/scripts/cmake/vcpkg_from_github.cmake:103 (vcpkg_download_distfile)
D:/development/Tools/git/vcpkg/ports/fmt/portfile.cmake:2 (vcpkg_from_github)
D:/development/Tools/git/vcpkg/scripts/ports.cmake:72 (include)
Error: Building package fmt:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: fmt:x86-windows
Vcpkg version: 0.0.86-2017-09-06-23c014d43e53fcab98f6d4c9d648213cd1ff7de8
Additionally, attach any relevant sections from the log files above.

Hi @dengzikun , thanks for reporting this issue!
Please open a new issue if this is still a problem for you.
Thx.


Injected arguments that should be null or undefined end up as empty object

Example:
@Controller('/test')
export class TestController {
	@Get('/whoami')
	@Flow(AuthMiddleware(false))
	async getTest(@CurrentUser() user: any): Promise<any> {
		console.log(user); // logs "{}" If ctx.state.user is null/undefined
		return user ?? "unknown"; // returns "{}" instead of "unknown" if ctx.state.user is null/undefined
	}
}

Traced to https://github.com/iyobo/amala/blob/master/src/util/generateRoutes.ts#L105, is null/undefined before and {} after, investigating more

I think this commit is responsible for the change in behavior https://github.com/iyobo/amala/commit/f98163d60a0ca223af285a27c789f93125ac9d8b#diff-ebf4f58c020ad0164c417b6a1a59310b7eb4c6662b80c0797793314434ff5c01L104-L106

Is this intended behavior? 🤔

Definitely a bug. Assigning myself to fix this.

Fixed in v10.0.4 and deployed to NPM.


pulsar: Add version 1.107.1

This PR adds the Pulsar Text Editor manifest.
Closes #11693

[x] I have read the Contributing Guide.

/verify


[BUG] remove optional zod schema from name and bio

Description
These 2 zod schema rules should not be optional (remove .optional())
https://github.com/EddieHubCommunity/BioDrop/blob/e9cfd99b2737f3f29e98f3454d6d5d6e507830bd/config/schemas/jsonProfileSchemas.js#L27-L28
-   name: z.string().optional(),
-   bio: z.string().optional(),
+   name: z.string(),
+   bio: z.string(),

Screenshots
No response
Do you want to work on this issue?
None
Additional information
No response

Could you please kindly assign this to me?

can you please assign me this issue

Hey if no-one is assigned, can i work on this?

Could you please kindly assign this to me?

@HpatricioH I have assigned this to you.


net/zerotier: Restarting ZeroTier is not working and creating new tap interfaces / PORT_ERROR

If restarting the zerotier service new tap interfaces are being created and zerotier-cli listnetworks outputs PORT_ERROR. It is working again after a reboot.

OPNsense 18.1.12-amd64
FreeBSD 11.1-RELEASE-p11
OpenSSL 1.0.2o 27 Mar 2018
Manually starting the zerotier-one daemon results in:

New tap interfaces:

If I kill the zerotier-one process, destroy the tap interface with "ifconfig zt8gk1jge8246sm destroy" and start the service again it is working fine...

Timeout.


Extract Footer from main application controller

add footer.fxml
add FooterController and move code related to the footer area with
social media buttons
share UI code via FXUtils

Part of #462
Co-authored-by: jdrueckert<EMAIL_ADDRESS>

Currently, the launcher fails to start with these changes while loading the application.fxml file, in particular the included footer.xml. Need to investigate this further ...

Hooray Jenkins reported success with all tests good!

Hooray Jenkins reported success with all tests good!

Hooray Jenkins reported success with all tests good!

Hooray Jenkins reported success with all tests good!


Make Runes Work With Multiple Outputs

Currently Runes only work with models which have a single output.
For example: The YAMNet model has 3 separate outputs, as seen by rune model-info.
$ rune model-info yamnet.tflite

Ops: 114
Inputs:
        waveform: Float32[1]
Outputs:
        Identity: Float32[1, 521]
        Identity_1: Float32[1, 1024]
        Identity_2: Float32[1, 64]

Running the Rune fails at Runtime:
$ rune run yamnet.rune --capability=sound:assets/exercise_bike.wav

[2021-05-14T21:19:18.504Z INFO  rune::run] Running rune: yamnet.rune
[2021-05-14T21:19:19.641Z DEBUG rune_wasmer_runtime] Loading image
[2021-05-14T21:19:19.644Z DEBUG rune_wasmer_runtime] Instantiating the WebAssembly module
[2021-05-14T21:19:19.711Z DEBUG rune_wasmer_runtime] Loaded the Rune
[2021-05-14T21:19:19.711Z DEBUG rune_wasmer_runtime] Running the rune
Error: Call failed

Caused by:
    0: Unable to call the _call function
    1: RuntimeError: Unable to execute the model
    2: Unable to execute the model
    3: We can't handle models with less/more than 1 output

I believe this is a duplicate of #112. @Mi1ind, do you mind if I close it?

@Michael-F-Bryan, Sure, go ahead.


docs: migrate rust github link to docs

Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:

[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[x] Read the contribution guide
[ ] Commands include options for Linux, MacOS, and Windows within codetabs
[ ] New file and folder names are globally unique
[x] Page references use shortcodes instead of markdown or URL links
[ ] Images use HTML style and have alternative text
[ ] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:
Description

Update the rust sdk link from github to the docs
Issue reference

@holopin-bot @mikeee Enjoy your Dapr docs badge!


Ruby Advanced Interop Client Side

Implements custom_metadata, status_code_and_message, unimplemented_method, and unimplemeneted_service.
Closes #8477

Only failed test at the moment is tests.cloud_to_cloud:ruby:node_server:timeout_on_sleeping_server, a known flake.
This is blocking #8477.

Addressed all comments

I'll wait to the tests to run for sanity, then merge this in

Going to merge this in. The only failures so far have been tests.cloud_to_cloud:ruby:node_server:timeout_on_sleeping_server, an infamously known flake, and sanity_linux_opt.tools/buildgen/generate_projects.sh, which should be fixed in #9285.
Will keep an eye on Jenkins though.


Comments on inner properties are stripped

TS: 2.0.0
// code.ts
/**
 * Some foo
 */
export const foo = {
  /**
   * Some boo
   */
  boo = 0
}

expect:
// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  /**
   * Some boo
   */
  boo: number;
}

actual:
// code.d.ts
/**
 * Some foo
 */
export declare foo: {
  boo: number;
}

By the way, is there a way to separately control whether comment should be kept in *.d.ts and *.js?
Currently when tsconfig.json/compilerOptions/removeComments = true, comments are removed from both of them.
Would it be nice to keep the comments in *.d.ts but not *.js?

the issue here is this type is infered, and not a type annotation. a similar case would be something like:
const foo = {
  /**
   * Some boo
   */
  boo = 0
}

export const bar = foo;
export const baz = bar;

If the compiler were to propagate the comments, bar and baz will both get the /** Some boo */ comment, which is not necessarily a bad thing.
The recommendation here is to use an explicit type annotation, and that would be written the way you wrote it to the output, e.g.:
/**
 * Some foo
 */
export const foo: {
  /**
   * Some boo
   */
  boo: number
} = { boo: 0 };

If the compiler were to propagate the comments, bar and baz will both get the /** Some boo */ comment, which is not necessarily a bad thing.

In fact I think that is a great thing! Always feel frustrated on JS world when you do:
/**
 * Nice docs
 */
function foo() { ...}

module.exports = {
  foo  // what? No doc?
}

PRs are welcomed. the change would be in the typewriter that walks a type to serialize it.


dark-mode feature

closes #14
https://user-images.githubusercontent.com/64359203/124494405-6ad3c200-ddd4-11eb-9601-c2bd2cd2a30a.mp4
@soumik2012

Closing the issue due to no response Thank you for making the PR you can check other issue


[Documentation]: Fix typo

Description of errors
Please fix typo "differentce" to "difference" in https://rocm.docs.amd.com/projects/HIP/en/latest/user_guide/faq.html#can-hip-api-support-c-style-application-what-is-the-differentce-between-c-and-c
Attach any links, screenshots, or additional evidence you think will be helpful.
No response

Another one: initializtion

Internal ticket has been created to track the fix.

The issue has been fixed in ROCm 6.1.0.
https://rocm.docs.amd.com/projects/HIP/en/latest/old/user_guide/faq.html#can-hip-api-support-c-style-application-what-is-the-difference-between-c-and-c

Not this one:
"initializtion" in https://rocm.docs.amd.com/projects/HIP/en/latest/old/user_guide/faq.html#can-hip-api-support-c-style-application-what-is-the-difference-between-c-and-c
While you are at it, could you also fix this title:
What is maximum limit of kernel launching parameter?
to
What are the maximum limits of kernel launch parameters?

There may be many other typos. Is there a spell check program that we can run on our documentation pages?

Thanks @gsitaram.  I have notified the documentation team.

Hi @gsitaram, both typos have been fixed. You can find the latest revision at Frequently asked questions. Thanks!


Include codec option in settings

See wulkano/aperture#45

Agreed. It should default to HEVC on High Sierra and up and H264 on the rest.
This is blocked by the linked Aperture issue.


The Gradle wrapper shell script is of low quality

The Gradle wrapper shell script is of low quality:

It is brittle, because it does not stop on error. It just blindly carries on.
It does not error on undefined variables, which makes it harder to maintain and modify.
It does not output warnings and errors to stderr instead of stdout.
It only handles up to 9 command-line arguments on Cygwin (for wrapper version 2.14).
It does not mention that it has been automatically generated. If you open a third-party Java project and don't know much about Gradle, you may be tempted to modify it by hand. This has actually happened to me!

In Gradle version 3.xx, the wrapper has switched from bash to a generic POSIX shell, which makes it even harder to get it right, especially since "set -o pipefail" is not available then.
This is an example of an improved wrapper for Gradle version 2.14:
#!/usr/bin/env bash

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

set -o errexit
set -o nounset
set -o pipefail

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME="$(basename "$BASH_SOURCE")"

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
    echo "$*" >&2
}

die ( ) {
    echo >&2
    echo "$*" >&2
    echo >&2
    exit 1
}

is_var_set_and_not_empty ()
{
  if [ -z "${!1:-}" ]; then return 1; else return 0; fi
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
    is_var_set_and_not_empty JAVA_HOME && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH="$APP_HOME/gradle/wrapper/gradle-wrapper.jar"

# Determine the Java command to use to start the JVM.
if is_var_set_and_not_empty JAVA_HOME ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which "$JAVACMD" >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no '$JAVACMD' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="${GRADLE_OPTS:-} \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="${ROOTDIRS:-}$SEP$dir"
        SEP="|"
    done
    # This pattern matches strings that start with an absolute path like "/usr".
    # Paths embedded in an argument will be missed. For example, an argument like "--prefix=/usr" will not be converted to a Windows path.
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if is_var_set_and_not_empty GRADLE_CYGPATTERN; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi

    declare -a CONVERTED_ARGS
    for arg in "$@" ; do
      if [[ $arg =~ $OURCYGPATTERN ]]; then
        CONVERTED_ARGS+=("$(cygpath --path --ignore --mixed "$arg")")
      else
        CONVERTED_ARGS+=("$arg")
      fi
    done

    set -- "${CONVERTED_ARGS[@]}"

    if false; then
      printf -v QUOTED_ARGS "%q  " "$@"
      echo "Found $# arguments: $QUOTED_ARGS"
    fi
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
    JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS ${JAVA_OPTS:-} ${GRADLE_OPTS:-}
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

Thanks for the issue @rdiez. Would you care to contribute a  PR for this issue. See the contributing guidelines for more information.

I am sorry, but I really do not have the time to read through your contributors agreement etc. and find where your generator is located. Most changes are pretty trivial anyway:

Switch back to bash in the shebang, so that you can use the following like I showed you in the script above:

set -o errexit
set -o nounset
set -o pipefail
With the POSIX shell there is no easy way to stop when a process in a pipeline fails.

Add ">&2" to your "warn" and "die" functions, see above.

If you care about Cygwin, diff my script above against your 2.14 version to see the changes in this area. The diff will also show other tiny changes you may want to incorporate.

Just add a comment to mention that the script has been automatically generated and should not be modified by hand.

You don't have to do all changes above, any of them would be an improvement.

Just in case the wrapper gets some love at some point ;) it would be worth looking into not using which as well as it is not available in all environments (e.g. minimal docker images). Generally AFAIK you can use type java to check if java is in PATH and that should be more available as it's a bourne shell builtin.

Additionally it checks for MINGW* and set msys=true, but never test and use the variable, and it is broken under MINGW/MSYS2
Was the PR submitted yet?

It seems MINGW* ploblem is fixed on #8679 .


Feature/tz cache lazy load

The initial singleton design pattern for database access meant that lazy-loading was broken,
due to structure of '_KV' class. So errors were blocking import.
Fix = use 'peewee' proxy database and initialise when needed.

Lazy loading is working correctly but execution will fail on read-only file systems. Were you expecting this?

No didn't expect that. Should be fixed now plus added some unit tests.

There are still some issues with this
import yfinance as yf

# this works
ticker = yf.Ticker("MSFT")

# This returns an empty dataframe when cade is executed in Read only fs
df = yf.download("MSFT")

print(ticker.info)
print(df.tail())

output
[*********************100%%**********************]  1 of 1 completed
1 Failed download:
['MSFT']: _TzCacheException("Error creating TzCache folder: '/root/.cache/py-yfinance' reason: [Errno 30] Read-only file system: '/root/.cache/py-yfinance'")

'address1': 'One Microsoft Way', 'city': 'Redmond', 'state': 'WA', 'zip': '98052-6399', 'country': 'United States', 'phone': '425 882 8080', 'website': 'https://www.microsoft.com', 'industry': 'Software—Infrastructure', 'industryKey':

...

Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: []

I can't reproduce with little effort, so can you re-run after yf.enable_debug_mode()

DEBUG    Entering download()
DEBUG     Disabling multithreading because DEBUG logging enabled
DEBUG     Entering history()
ERROR
          1 Failed download:
ERROR     ['MSFT']: _TzCacheException("Error creating TzCache folder: '/root/.cache/py-yfinance' reason: [Errno 30] Read-only file system: '/root/.cache/py-yfinance'")
DEBUG     ['MSFT']: Traceback (most recent call last):
            File "/yfinance/utils.py", line 981, in _initialise
              _os.makedirs(cls._cache_dir)
            File "<frozen os>", line 225, in makedirs
          OSError: [Errno 30] Read-only file system: '/root/.cache/py-yfinance'

          During handling of the above exception, another exception occurred:

          Traceback (most recent call last):
            File "/yfinance/multi.py", line 275, in _download_one
              data = Ticker(ticker, session=session).history(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/yfinance/utils.py", line 114, in wrapper
              result = func(*args, **kwargs)
                       ^^^^^^^^^^^^^^^^^^^^^
            File "/yfinance/base.py", line 148, in history
              tz = self._get_ticker_tz(proxy, timeout)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/yfinance/base.py", line 1645, in _get_ticker_tz
              tz = cache.lookup(self.ticker)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/yfinance/utils.py", line 1035, in lookup
              self.initialise()
            File "/yfinance/utils.py", line 1028, in initialise
              db = _DBManager.get_database()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/yfinance/utils.py", line 961, in get_database
              cls._initialise()
            File "/yfinance/utils.py", line 983, in _initialise
              raise _TzCacheException(f"Error creating TzCache folder: '{cls._cache_dir}' reason: {err}")
          yfinance.utils._TzCacheException: Error creating TzCache folder: '/root/.cache/py-yfinance' reason: [Errno 30] Read-only file system: '/root/.cache/py-yfinance'

Reproduce locally
Dockerfile
FROM python:3.11

COPY . .
RUN pip install -r requirements.txt

CMD ["python", "your_test_script.py"]

Build the container
docker build -t yfinance-test .

Run the container in a read-only env
docker run --read-only yfinance-test

Line numbers don't match code. Did you git pull ?

Nope, you were right, I wasn't up to date. Everything works perfectly. Can you make a beta release?


Added listener remove functions

I added two listener removal functions.. but i think we need to discuss some situations

If the task is being 'listened' at the time of the removal.. what should happen?
We should really remove all instances when they're the same?
Should we use predicates instead of instances as param? (i personally prefer predicates, the dev has more control over it)
Is there any thread restriction to remove a listener?

I need to mention that dokka generates the .html files based on the system path separator.. which is bad, i got 99 files of diff after generating the docs on windows (my fedora is broken :/), is there any config for that?

Replaying to your comment @Grohden
If the task is being 'listened' at the time of the removal.. what should happen?
What do you mean by "task is being listened"? If a task is currently added as an active listener?
We should really remove all instances when they're the same?
Yes
Should we use predicates instead of instances as param? (i personally prefer predicates, the dev has more control over it)
Predicates are great, but in this case, not required, right? Listeners will be object instances so we can run .equals() to see if the object instances are the same reference. That should do the job.
Is there any thread restriction to remove a listener?
WendyConfig is not thread-safe at this time, as you can see. We will need to make the list of listeners and the mutating functions all thread safe. It would be difficult to see if adding thread safety code works until we have unit testing setup.
With that in mind, I am leaning towards waiting to merge this PR (since it's a nice-to-have and not required since we are using weak references) until we have unit testing setup and this PR can be fully tested. Agree?
Also, we need some tests on Wendy and examples on the example app..
Agree. That should be the top priority at this time.
the example app i don't have ideas for the remove functions uses
The example app used to exist for me to test that Wendy works while not yet having unit testing setup. Because unit testing is a high priority now, the example app will exist to show off best practices and give some example code that people can use to play around with the library. With that in mind, I do not believe we need to add functionality to the example app to remove listeners.

Thanks for the PRs, @Grohden! You are helping to make Wendy better and better.

What do you mean by "task is being listened"? If a task is currently added as an active listener?

I mean, if you write a listener that removes itself on one of its callbacks. (i do not expect someone to do this.. but ¯\(ツ)/¯)

With that in mind, I am leaning towards waiting to merge this PR (since it's a nice-to-have and not required since we are using weak references) until we have unit testing setup and this PR can be fully tested. Agree?

Agreed, i'm not in a hurry for this


feat: Completed frontend take home

Met the following requirements:

Create a page with a chessboard and a sidebar.
On desktop devices the sidebar should be positioned to the right of the chessboard.
On mobile devices the sidebar should be positioned below the chessboard.
The chessboard should resize responsively to consume available space.
Clicking a chessboard square should highlight the square.
Keep track of which squares are clicked and the order in which they're clicked.
Display the information collected from step 6 in the sidebar.

My bad, I was trying to merge into master on my own fork.


Yaml and Markdown yaml front matter doesn't like single digit months or days

According to the YAML spec http://yaml.org/type/timestamp.html, single digits are allowed:

-[0-9][0-9]? # (month)
-[0-9][0-9]? # (day)

Note this applies to both the front matter section at the top of a markdown file (as below) and in a .yml file
Test text:
---
date1 : 2016-8-2
date1 : 2016-8-20
date1 : 2016-08-2
date1 : 2016-08-20
date2 : 2016-11-20
---

I think this is by design. The yaml timestamp spec is weird in this case. Iit looks like single digit months and years are only supported in full timestemp literals that include times:
 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] # (ymd)
|[0-9][0-9][0-9][0-9] # (year)
 -[0-9][0-9]? # (month)
 -[0-9][0-9]? # (day)
 ([Tt]|[ \t]+)[0-9][0-9]? # (hour)
 :[0-9][0-9] # (minute)
 :[0-9][0-9] # (second)
 (\.[0-9]*)? # (fraction)
 (([ \t]*)Z|[-+][0-9][0-9]?(:[0-9][0-9])?)? # (time zone)

In the first ymd option, you have to use two digits for months and days. I've checked a few yaml validators and they seem to be consistent in parsing 2016-8-2 as a string instead of as a date

Ah you're right, I didn't look thoroughly enough and thought the opening paren on the hour line ended at the end. :+1:
I guess I'll just use double digits then :wink:


removed space before method argument if typehint is unknown

Nice one @POPSuL - any suggestions on how we should be testing rendered pages, etc. and maybe even attach screenshots when we make changes to we can see before/after?
/cc @deizel @phillaf

@jadb yes I understand! just we're talking on irc about this, but I duplicate message in this place:

I fixed a small error in templates. before http://storage2.static.itmages.ru/i/15/1011/h_1444564233_8654555_37188888f5.png and after http://storage2.static.itmages.ru/i/15/1011/h_1444564233_5916939_5fe0ca028c.png

@POPSuL i could imagine the mod this change was doing, was more talking to be transparent to the users/community and so people can see what to expect ;)
Thanks again!


[SMALLFIX] Use static imports for standard test utilities

Use static imports for standard test utilities

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/16802/
Test PASSed.

Merged build finished. Test PASSed.


AttributeError: 'NoneType' object has no attribute 'name'

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az storage container create
Errors:
'NoneType' object has no attribute '__name__'
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
cli/command_modules/storage/_client_factory.py, ln 27, in get_storage_data_service_client
    return get_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
cli/core/commands/client_factory.py, ln 178, in get_data_service_client
    logger.debug('Getting data service client service_type=%s', service_type.__name__)
AttributeError: 'NoneType' object has no attribute '__name__'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

az storage container create --name {}

Expected Behavior
Environment Summary
Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.2.5
Python 3.8.3
Installer: RPM

azure-cli 2.7.0

Extensions:
azure-devops 0.17.0

$ cat /etc/os-release
NAME=Fedora
VERSION="32 (Container Image)"
ID=fedora
VERSION_ID=32
VERSION_CODENAME=""
PLATFORM_ID="platform:f32"
PRETTY_NAME="Fedora 32 (Container Image)"

$ rpm -qa | grep azure
azure-cli-2.7.0-1.el7.x86_64

Additional Context

Following is the complete stack trace:
`$ az storage container create --name testing
/usr/lib64/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/common/_connection.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 654, in execute
raise ex
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 709, in _run_job
cmd_copy.exception_handler(ex)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/init.py", line 257, in new_handler
raise ex
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 688, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 325, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 545, in default_command_handler
return op(**command_args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 40, in create_container
client = blob_data_service_factory(cmd.cli_ctx, kwargs)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 76, in blob_data_service_factory
return generic_data_service_factory(cli_ctx, blob_service, kwargs.pop('account_name', None),
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 36, in generic_data_service_factory
return get_storage_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 27, in get_storage_data_service_client
return get_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 178, in get_data_service_client
logger.debug('Getting data service client service_type=%s', service_type.name)
AttributeError: 'NoneType' object has no attribute 'name'
To open an issue, please run: 'az feedback'
`

add to S172

Hi @praveen-pk, could you provide more information with --debug in your command?

@Juliehzl  is the trace with --debug.
$ az storage container create --name testing --debug
Command arguments: ['storage', 'container', 'create', '--name', 'testing', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f0de41675e0>, <function OutputProducer.on_global_arguments at 0x7f0de3f6dc10>, <function CLIQuery.on_global_arguments at 0x7f0de3e6c280>]
Event: CommandInvoker.OnPreCommandTableCreate []
Installed command modules ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'deploymentmanager', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'monitor', 'natgateway', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'security', 'servicebus', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'vm']
Loaded module 'acr' in 0.013 seconds.
Loaded module 'acs' in 0.021 seconds.
Loaded module 'advisor' in 0.002 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'ams' in 0.010 seconds.
Loaded module 'apim' in 0.004 seconds.
Loaded module 'appconfig' in 0.005 seconds.
Loaded module 'appservice' in 0.022 seconds.
Loaded module 'aro' in 0.012 seconds.
Loaded module 'backup' in 0.008 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'batch' in 0.284 seconds.
Loaded module 'batchai' in 0.006 seconds.
Loaded module 'billing' in 0.004 seconds.
Loaded module 'botservice' in 0.008 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'cdn' in 0.009 seconds.
Loaded module 'cloud' in 0.005 seconds.
Loaded module 'cognitiveservices' in 0.003 seconds.
Loaded module 'configure' in 0.002 seconds.
Loaded module 'consumption' in 0.005 seconds.
Loaded module 'container' in 0.007 seconds.
Loaded module 'cosmosdb' in 0.016 seconds.
Loaded module 'deploymentmanager' in 0.005 seconds.
Loaded module 'dla' in 0.010 seconds.
Loaded module 'dls' in 0.006 seconds.
Loaded module 'dms' in 0.003 seconds.
Loaded module 'eventgrid' in 0.007 seconds.
Loaded module 'eventhubs' in 0.006 seconds.
Loaded module 'extension' in 0.002 seconds.
Loaded module 'feedback' in 0.001 seconds.
Loaded module 'find' in 0.003 seconds.
Loaded module 'hdinsight' in 0.006 seconds.
Loaded module 'interactive' in 0.001 seconds.
Loaded module 'iot' in 0.010 seconds.
Loaded module 'iotcentral' in 0.004 seconds.
Loaded module 'keyvault' in 0.013 seconds.
Loaded module 'kusto' in 0.005 seconds.
Loaded module 'lab' in 0.010 seconds.
Loaded module 'managedservices' in 0.004 seconds.
Loaded module 'maps' in 0.003 seconds.
Loaded module 'monitor' in 0.020 seconds.
Loaded module 'natgateway' in 0.003 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'netappfiles' in 0.010 seconds.
Loaded module 'network' in 0.070 seconds.
Loaded module 'policyinsights' in 0.004 seconds.
Loaded module 'privatedns' in 0.010 seconds.
Loaded module 'profile' in 0.003 seconds.
Loaded module 'rdbms' in 0.018 seconds.
Loaded module 'redis' in 0.004 seconds.
Loaded module 'relay' in 0.008 seconds.
Loaded module 'reservations' in 0.004 seconds.
Loaded module 'resource' in 0.018 seconds.
Loaded module 'role' in 0.011 seconds.
Loaded module 'search' in 0.003 seconds.
Loaded module 'security' in 0.006 seconds.
Loaded module 'servicebus' in 0.010 seconds.
Loaded module 'servicefabric' in 0.008 seconds.
Loaded module 'signalr' in 0.005 seconds.
Loaded module 'sql' in 0.017 seconds.
Loaded module 'sqlvm' in 0.005 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'storage' in 0.066 seconds.
Loaded module 'vm' in 0.075 seconds.
Loaded all modules in 0.921 seconds. (note: there's always an overhead with the first module loaded)
Found 1 extensions: ['azure-devops']
Extension compatibility result: is_compatible=True cli_core_version=2.7.0 min_required=2.0.69 max_required=None
Extensions directory: '/home/prapal/.azure/cliextensions/azure-devops'
Loaded extension 'azure-devops' in 1.092 seconds.
Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f0de31810d0>]
az_command_data_logger : command args: storage container create --name {} --debug
metadata file logging enabled - writing logs to '/home/prapal/.azure/commands'.
Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f0de2e0ed30>]
Event: CommandLoader.OnLoadArguments []
/usr/lib64/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/common/_connection.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.protocol = self.protocol if parsed_url.scheme is '' else parsed_url.scheme
Event: CommandInvoker.OnPostArgumentLoad []
Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f0de2e0edc0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f0de2e0ef70>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f0de29e4430>]
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f0de3f6dca0>, <function CLIQuery.handle_query_parameter at 0x7f0de3e6c310>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f0de2e0ee50>, <function handler at 0x7f0de28b8700>, <function DevCommandsLoader.post_parse_args at 0x7f0de1f5d160>]
cli.azure.cli.core.util : The command failed with an unexpected error. Here is the traceback:

The command failed with an unexpected error. Here is the traceback:

cli.azure.cli.core.util : 'NoneType' object has no attribute '__name__'
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 709, in _run_job
    cmd_copy.exception_handler(ex)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 257, in new_handler
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
    result = cmd_copy(params)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 545, in default_command_handler
    return op(**command_args)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 40, in create_container
    client = blob_data_service_factory(cmd.cli_ctx, kwargs)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 76, in blob_data_service_factory
    return generic_data_service_factory(cli_ctx, blob_service, kwargs.pop('account_name', None),
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 36, in generic_data_service_factory
    return get_storage_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 27, in get_storage_data_service_client
    return get_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 178, in get_data_service_client
    logger.debug('Getting data service client service_type=%s', service_type.__name__)
AttributeError: 'NoneType' object has no attribute '__name__'
'NoneType' object has no attribute '__name__'
Traceback (most recent call last):
  File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 709, in _run_job
    cmd_copy.exception_handler(ex)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 257, in new_handler
    raise ex
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
    result = cmd_copy(params)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 545, in default_command_handler
    return op(**command_args)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 40, in create_container
    client = blob_data_service_factory(cmd.cli_ctx, kwargs)
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 76, in blob_data_service_factory
    return generic_data_service_factory(cli_ctx, blob_service, kwargs.pop('account_name', None),
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 36, in generic_data_service_factory
    return get_storage_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 27, in get_storage_data_service_client
    return get_data_service_client(cli_ctx, service, name, key, connection_string, sas_token,
  File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 178, in get_data_service_client
    logger.debug('Getting data service client service_type=%s', service_type.__name__)
AttributeError: 'NoneType' object has no attribute '__name__'
cli.azure.cli.core.util :
To open an issue, please run: 'az feedback'

To open an issue, please run: 'az feedback'
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f0de3181310>]
az_command_data_logger : exit code: 1
telemetry.save : Save telemetry record of length 5301 in cache
telemetry.check : Returns Positive.
telemetry.main : Begin creating telemetry upload process.
telemetry.process : Creating upload process: "/usr/bin/python3 /usr/lib64/az/lib/python3.6/site-packages/azure/cli/telemetry/__init__.py /home/${user}/.azure"
telemetry.process : Return from creating process
telemetry.main : Finish creating telemetry upload process.
command ran in 2.696 seconds.

#14287

Hi @evelyn-ys, could you help follow up this issue?

Hi @praveen-pk, this may caused by azure.multiapi.storage dependency not found. Maybe you reinstall this package with some wrong version or you uninstall this package accidentally.
I have refined our code(#16993 ) to expose the real exception which is ModuleNotFoundError: No module named 'azure.multiapi.storage.v2018_11_09' instead of AttributeError: 'NoneType' object has no attribute '__name__'. Hope this will help you debug more clearly.


determineCanonicalRootUrl may cause crash in PHP 8.1

For some reason determineCanonicalRootUrl(false) returned a null. In the constructor of App, calling urldecode(null) causes a crash in php 8.1. While I'm working to fix my problem with determineCanonicalRootUrl, a crash can be avoided by coalescing urldecode(null ?? '').

Specifically the problem appears to be with parse_url using the PHP_URL_PATH option. There is no terminal '/' character from the determineCanonicalRootUrl result. It looks like it gets stripped in that method, then parse_url returns null, which crashes urldecode in php 8.1. I'm using https://localhost:8888/ as my APP_PUBLIC_URL.

Thank you!
I don’t think PHP 8.x handles paths and hosts different from PHP 7.x with parse_url. PHP 8.0 only changed the behavior for missing/empty query strings and fragments.
You’re probably talking about App#__construct, right?
Which of the following three lines is failing exactly, and where is the cause of the error in your opinion?
!empty($this->canonicalRootUrl[0]) ? \parse_url($this->canonicalRootUrl[0], \PHP_URL_HOST) : null,

// or

!empty($this->canonicalRootUrl[1]) ? \parse_url($this->canonicalRootUrl[1], \PHP_URL_HOST) : null

// or

$canonicalRootPath = \urldecode(\parse_url($this->canonicalRootUrl[0], \PHP_URL_PATH));

(By the way, any chance you could let this run on port 80 instead of 888?)

The easiest fix for php 8.1 would be to just coalesce with an empty string like this:
$canonicalRootPath = \urldecode(\parse_url($this->canonicalRootUrl[0], \PHP_URL_PATH) ?? '');
Apologies, but I haven't traced the issue through the determineCanonicalRootUrl method. Apparently it isn't causing me any problems.

Thanks!
I would include the null check, sure, but it would be good to know where exactly it fails and why, and actually understand the behavior and what we want.
As I said, \parse_url(..., \PHP_URL_PATH) should not behave any different on PHP 8.x, compared to 7.x. So any problem that occurs has probably been present on previous PHP versions as well.

Maybe this has always been a bug that never caused any problems. It looks like determineCanonicalRootUrl always strips the final '/' character, and \parse_url(..., \PHP_URL_PATH) always returns null if there is no final '/' character. In the App constructor, the result is only used to construct a Router (with the local var canonicalRootPath). Because the App's Router is designed to be a root-level router, perhaps it never caused any problems to use a null path in its construction. In the Router, the value is saved to the rootPath which is only used in the createRouteRegex method. Without a root path, the regex would match more (not less) which would hide this bug.


PAPI with ExtraContext crashes server

Using
placeholderapi: true
placeholderapi-placeholders:
  allowflight: "%player_allow_flight%"
  god: "%luckperms_check_permission_essentials.god.others%"

in extracontext causes server to crash whenever luckperm tries to calculate player.
allowflight works and does not produce this bug.
Version: 1.16
LP: 5.1.26
https://pastebin.com/NLZ8z1iY

Have you installed the luckperms papi cloud extension? see: https://github.com/lucko/LuckPerms/wiki/Placeholders

Also what's the output of /papi parse USER %luckperms_check_permission_essentials.god.others%

Of course I did install the extension.
And parsing outputs yes/no accordingly to the user.
Only issue happens when I add placeholder to the extracontext. I can provide more information whether other plugins affect this bug and for what placeholders it happens later this day.

You cannot use LuckPerms placeholders or placeholders which query permissions in the PAPI extracontexts section.

The latest version of EssentialsX adds a dedicated placeholder for god mode anyway btw:)


Add label to "user" column in views.generic.HistoryView

Fixes #12100

Merged in 7fca2d74a04f8aa6a796a7f645215d06e272208b


how to read faster

Many thanks to the dbfread package, it saves my time. But now, it consume lots time of my computer :-)
The API I use is:
for record in DBF(filepath):
    # something really simple

I waste lots of time on reading the file, about 1 minute, the dbf have approximate 12 MB
How can I read it faster?
If I am concerned about the incremental part, how can i read them?
thank you in advance!

I've done all I could think of to make dbfread fast but unfortunately it has to do a lot of processing for each record.
One thing you could try is to use dictionaries instead of OrderedDict:
for record in DBF(filepath, recfactory=dict):
    ...

dbfread uses OrderedDict as default for convenience, but this adds some overhead.
Passing recfactory=None will give you (name, value) tuples which should be even faster but probably harder to work with.
Depending on your data you could read the file in raw mode and decode the byte strings yourself. This would save a lot of decoding if you're only using some of the fields:
for record in DBF(filepath, raw=True):
    name = record['name'].decode('latin1')
    age = int(record['age'])

Passing lowernames=False could help a tiny bit as it would save a call to .lower().
I'll see if I can think of anything else.

Thanks for the advices!

Hi, I have a mistake, most my time is consumed in the simple code, not in read dbf file.
I have changed the code inside for loop, and it speed up.
Sorry for the mistake and thank you very much for this module!
Maybe you can choose to close this issue. :-P

Ah, that's good news. I'll close the issue.


Fix workflow

Just found a complete use-case of hugo+rsync deployment for a website using Github Actions


Cache unit test improvement

We have to implement the following test scenario. It should be run on different combination of conditions.
Main stability test
variatopn A.

Long test which includes:
a. 20 requesting threads.
b. 100M operations per thread
c. 90% regular request to existing files
d. 9% requests to non existing files.
e. 1% of cacnels
f. small random delay in the code to simulate different read speed.
g. Each 100K operation print of the heap status: size, free space + free disk space.

Statistics to be maintained and printed periodically:

Number of total requests
Number of cach hits
Number of cache misses
Number of cancels of active downloads
Number of direct reads (w/o chache)

This statistics will show us that cache is indeed tested.
The goal of the test to see that

no crashes
stable memory and disk space

Condition A.
Compiling code with release compilation.
Condition B
Ranning on single CPU machine
Condition C
Running on dual CPU machine
Condition D
Running with datasets of 10K files
Condition E
Running with datasets of 10 files
Condition F.
Running with dataset bigger then cache size
Condition F.
Running with dataset smaller then cache size

Remained part:
to check the solution with valgrind


Set end padding to title of the timetable item detail screen

Idea Description
Put padding to the end of title description in time able item detail screen
Reference images and links

As-is
To-be

Can I try this issue?🙋

Please try it!


fix(runner): Merge config.client.args with client.args provided by run

Before this change, calling karma run would overwrite any value in config.client.args with the value provided in the karma run request, even if that value was an empty array. This commit does a _.merge to merge the two values together.
Fixes #1746

I've added tests for the following cases:

existing config client.args, empty array run client.args
existing config client.args, nothing passed for run client.args
existing config client.args, value passed for run client.args
no config client.args, value passed for run client.args
empty map client.args, value passed for run client.args

The only wrinkle here, and I'm not sure what can be done about it, is if the user passes [] as client.args, and a map as run client.args. _.merge doesn't convert the [] into a map, and discards the run args.

@danielcompton, How about checking the type of the client-args and take appropriate measures?
E.g. using the helpers in https://github.com/karma-runner/karma/blob/master/lib/helper.js#L20 .

What is this the expected behaviour for merging an array and a map, and for merging a map and an array?

God question, maybe just let the run args override the existing?
On Mon, Feb 29, 2016, 09:17 Daniel Compton<EMAIL_ADDRESS>wrote:

What is this the expected behaviour for merging an array and a map, and
for merging a map and an array?
—
Reply to this email directly or view it on GitHub
https://github.com/karma-runner/karma/pull/1934#issuecomment-190089333.

Yes I think in the case that the the types are not mergeable, i.e. array < object or object < array, we should override and print a warning.

Thanks :octocat:

Thank you!


global variable define fix

There's no way to declare global variable without requesting require("raphael"), but there are possible cases when we have the define.amd, and we need to get the global variable without using amd.

You are using amd or you are not... assign require("raphael") to a global variable in your code if you want... but it's inconsistent from the library point of view.
Sorry, closing it.

Usage of library should'nt be inconsistent, no matter what architecture i have.
I have define.amd but i dont use it, why? its doesn't matter.
I want just add library into head, and get as global variable.

You are using amd or you are not...

but you declares the global variable?

+1 to @Appex .
Another case is shim option in require.js config. It requires a global variable, if I want to rename Raphael module:
'lib/raphael': {
    'exports': 'Raphael'
},

and then
define(['lib/raphael'], function(Raphael) {...});

In this case define() inside of raphael.js is not executed, and global variable is missing. Very inconsistently.
See also https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#register-as-an-anonymous-module-:

Normally you should not register a named module, but instead register as an anonymous module
This allows users of your code to rename your library to a name suitable for their project layout. It also allows them to map your module to a dependency name that is used by other libraries. For instance, Zepto.js can be mapped to fulfill the module duty for the 'jquery' module ID.


Update README on usage of validateDeploy

The README isn't very clear on the exact usage of validateDeploy operations when you also want to replace parameters.

In that case you shouldn't use the ParametersFile parameter on the action, but the OverrideArmParameters parameter.
Also, it is not obvious that ArtifactsFolder should be set to $GITHUB_WORKSPACE.

Full sample for this:
name: ValidateAndDeploy
on:
workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
    - uses<EMAIL_ADDRESS>      with:
        TargetWorkspaceName: 'synapse-tryout-prod'
        ArtifactsFolder: '$GITHUB_WORKSPACE'
        environment: 'Azure Public'
        resourceGroup: 'synapse-tryout'
        clientId: ${{ secrets.CLIENTID }}
        clientSecret: ${{ secrets.CLIENTSECRET }}
        subscriptionId: ${{ secrets.SUBID }}
        tenantId: ${{ secrets.TENANTID }}
        operation: 'validateDeploy'
        OverrideArmParameters: 'myparams.yml'

    - uses: actions/upload-artifact@v3
      with:
        name: my-artifact
        path: ./ExportedArtifacts

Additionally, add to the README a sample on 2 step deploy, where validate is run first and then deploy:
name: ValidateAndDeploy2Steps
on:
workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
    - uses<EMAIL_ADDRESS>      with:
        TargetWorkspaceName: 'synapse-tryout-prod'
        ArtifactsFolder: '$GITHUB_WORKSPACE'
        operation: 'validate'

    - uses<EMAIL_ADDRESS>      with:
        TargetWorkspaceName: 'synapse-tryout-prod'
        TemplateFile: './ExportedArtifacts/TemplateForWorkspace.json'
        ParametersFile: './myparams.json'
        environment: 'Azure Public'
        resourceGroup: 'synapse-tryout'
        clientId: ${{ secrets.CLIENTID }}
        clientSecret: ${{ secrets.CLIENTSECRET }}
        subscriptionId: ${{ secrets.SUBID }}
        tenantId: ${{ secrets.TENANTID }}
        operation: 'deploy'

    - uses: actions/upload-artifact@v3
      with:
        name: my-artifact
        path: ./ExportedArtifacts

Hello @vermegi

Parameters file correspond to the parameters file generated by the Synapse workspace. OverrideArmParameters should always be used for over riding the parameters as mentioned in the READ ME - https://github.com/Azure/Synapse-workspace-deployment#overriding-parameters-overridearmparameters
'Validate' command is not supposed to be executed before 'deploy'. Deploy takes template and parameter files generated by the synapse workspace for the workspace publish branch. validate command generates template and parameter files from the collaboration branch.
There is no need to specify  ArtifactsFolder: '$GITHUB_WORKSPACE' as it is by default the location. You can directly access the folder.

Then what about the way of working that is described here: https://techcommunity.microsoft.com/t5/azure-synapse-analytics-blog/automating-the-publishing-of-workspace-artifacts-in-synapse-cicd/ba-p/3603042
Thisvway of working does not always start from the collaboration/publish branch.


ERROR: See log file for information /var/log/allsky.log

Device: Raspberry pi 3b+
Camera: ZWO ASI 224MC, 120MC-S, 385MC, 662MC
Issue: The Allsky Web GUI is used, and it works with 224MC, 120MC-S, and 385MC, but when the 662MC is plugged in, it displays "ERROR: See log file for information /var/log/allsky.log".
I have checked the allsky.log, and it says *** ERROR: No connected Camera... when the 662MC is connected.
Please scroll down to the very bottom of the log file to see the error message. Sorry for causing any inconvenience.
Thank you very much
allsky.log

@AlexXu12256
The version of the ZWO SDK in the current release I believe is 1.20.0 and doesn't support all the new cameras.  Search for ZWO SDK version in the log file.
The next version of Allsky has version 1.26.0 which includes the file.  I just checked ZWO's developer download page, and it says the latest is from June and is 1.20.0, but when downloading it, the file name is 1.24.0.
If you need support for the 662MC now, unzip the attached file, then:
cd ~/allsky/src/lib/armv7
mv libASICamera2.a libASICamera2.a-OLD

then copy the unzipped file to this directory and restart Allsky.
libASICamera2.zip

@EricClaeys
I have tried adding the new file, but it still gives the same error. The ZWO SDK Version shown in the log file when the old cameras are connected is 1.20.0 (only shows when it works). Is the file you attached in version 1.26.0 or 1.24.0?
Thanks

@EricClaeys
I have tried to replace the file you attached, but it is still outputting the same error. I've tried to replace the libASICamera2.a in armv6, armv8, x64 and x86 with the files found in this link: https://github.com/OpenPHDGuiding/phd2/pull/1005/commits/3db5d555576ca862e7840976b6a661b3973d9e8a#diff-87de52c36d986481a65bc0a52f420997dbcb3abc7a46c2c5fb53e5c0cc45e521
But it still gives the same error.

@EricClaeys
I have tried to replace the file you attached, but it is still outputting the same error. I've tried to replace the libASICamera2.a in armv6, armv8, x64 and x86 with the files found in this link: https://github.com/OpenPHDGuiding/phd2/commit/3db5d555576ca862e7840976b6a661b3973d9e8a#diff-87de52c36d986481a65bc0a52f420997dbcb3abc7a46c2c5fb53e5c0cc45e521
But it still gives the same error.
I have checked the SDK version in the log file, and it still appears to be "1, 20" after copying those files to the directory. Does this mean I am not updating the SDK correctly?

What operating system are you on?  Buster or Bullseye?  And on 32 bit or 64 bit?
Try replacing the armv6 and armv8 files from PHP, then recompile.  I may have been wrong saying armv7 needed to be updated.  I think it depends on which operating system and 32 / 64 bits.

@EricClaeys I'm on Bullseye, 32 bit. Did you mean replacing the armv6 and 8 files with the file you have attached? Thanks.

@AlexXu12256. No, replace the armv6 and armv8 files with the corresponding files from the PHP link you posted.

@EricClaeys Hi there, I have tried replacing the files and the SDK version remains at 1, 20. Thanks.

@AlexXu12256    Please do the following and let me know what you get:
cd ~/allsky/src
make -n capture

This will tell me if you have armv6, armv7, or armv8.

@EricClaeys The output says "make: 'capture' is up to date."

@AlexXu12256   do the following:
cd ~/allsky/src
rm capture
make -n capture

That should show what it will do to compile a new capture.

@EricClaeys
The outputs is shown below:
arm-linux-gnueabihf-g++  capture.cpp -o capture -Werror -Wall -Wno-psabi -Wno-unused-result -g -O2 -lpthread -march=armv7 -mthumb -D_LIN -D_DEBUG -DGLIBC_20 -Llib/armv7 -I./include -I/usr/include/opencv4 -lopencv_stitching -lopencv_alphamat -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_shape -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_ml -lopencv_videostab -lopencv_videoio -lopencv_viz -lopencv_ximgproc -lopencv_video -lopencv_dnn -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -lASICamera2 -I/usr/include/libusb-1.0 -lusb-1.0 allsky_common.o

@AlexXu12256   Thanks.  You have armv7 so updating that file in ~/allsky/src/lib/armv7, then recompiling should work.
As a test, rename ~/allsky/src/lib/armv7/ASICamera2.a to anything. then remove ~/allsky/src/capture, then try to compile again.  It should give an error that it can't find the ASICamera2.a file.  Then restore the file name and try to compile again.
When searching for "ZWO SDK" in the log file, make sure you look at the LAST entry, which is the newest.

@EricClaeys It is working now, thank you so much for the time you have spent on this.

@AlexXu12256    My pleasure.  What did you do to get it working?

@EricClaeys
I run the following commands:
systemctl stop allsky
cd ~/allsky/src
rm capture
(switch the file in armv7)
make capture
cp capture ..
systemctl start allsky
I think the reason the reason it wasn't working before could be that I didn't remove the previous capture.

@AlexXu12256    Good point.  That's what the cp capture .. did.  Allsky uses the capture program in ~/allsky, not ~/allsky/src.


Capture/display the last time a user successfully authenticated

I'm submitting a ...

new feature / enhancement request

Traffic Control components affected ...

Traffic Ops
Traffic Portal

Current behavior:
TP and the TO API will not provide you with any information regarding the last time/date a user successfully authenticated. This information can be helpful when disabling users that no longer use the system. i.e. data cleanup.
New behavior:
When a user successfully authenticates (POST /user/login), capture the time/date and provide this information via the TO api and TP similar to the way user.lastUpdated is captured. This info should be added to:
TO API:

GET /user/current
GET /users
GET /user?id=

TP:

https://tp.domain.tld/#!/users
https://tp.domain.tld/#!/users/{id}
https://tp.domain.tld/#!/user

I can take this one.

I can take this one.


landing page for a design agency

Description
I want to add a responsive landing page for a design agency .
TechStack

[x] html
[x] css

Screenshots

Additional information
This a challenge on frontend mentor . Code will be mine but  designs are provided by them

/assign
i am a gssoc participant .please assign me


GET request with CURLOPT_POSTFIELDS

What is the expected behavior?
When I send GET request with CURLOPT_POSTFIELDS then it doesn't send these fields to server, but should.
What is the actual behavior?
When sending with pure php curl it will send php://input to server
curl_setopt( $handle, CURLOPT_URL, $this->apiUrl.'getcustomers?'. http_build_query($_arrParams));
curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $handle, CURLOPT_USERAGENT, 'test');
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt( $handle, CURLOPT_HTTPGET, true );
curl_setopt( $handle, CURLOPT_POSTFIELDS, json_encode($this->requestData));

With this class ei wont work
$this->curl = new Curl\Curl();
$this->curl->setHeader('Content-Type', 'application/json');
$this->curl->setOpt(CURLOPT_POSTFIELDS, json_encode($this->requestData));
$this->curl->get($this->apiUrl.'getcustomers',$_arrParams);

To check response from server you could just print out php://input
print_r(file_get_contents("php://input"));

Hi. You'll want to avoid manually setting CURLOPT_POSTFIELDS. Try this
$this->curl = new Curl\Curl();
$this->curl->setHeader('Content-Type', 'application/json');
$this->curl->get($this->apiUrl.'getcustomers?'. http_build_query($_arrParams), $this->requestData);


fix(core): pass in tool when loading script directly

fixes #146

@niieani Nice find. Can you add a quick test please.

Hey Miles, didn't have time to add the tests yet. Thanks for merging. 🙇


[Bug][Helm] Rename initArgs to rayStartParams

Search before asking

[X] I searched the issues and found no similar issues.

KubeRay Component
Others
What happened + What you expected to happen
The Ray cluster Helm chart has a field initArgs which maps to rayStartParams in the RayCluster CR.
For consistency, rename initArgs to rayStartParams while maintaining backwards compatibility.
cc @kevin85421
No particular rush on this issue -- just wanted to point it out.
Reproduction script
N/A
Anything else
N/A
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Let's actually resolve this for the KubeRay 0.4.0 release, should be simple.

This is done.


Getting the list of keys based on pattern or all.

Hi
If we have done IDistributedCache implementation, there is currently no method exposed which can give list of all the keys for a particular tenant.
We would like to request a feature where a method is exposed where we give a pattern (or not for all the keys) and get list of keys following that pattern.
A pattern could be as simple as key_containing_this_string or starting_word_is_this_string* or *ending_word_is_this.

A new interface has been exposed in the library for this operation. Download the latest NuGet from here --> https://www.nuget.org/packages/DistributedCache.Extensions.UnifiedRedisPlatform/
Sample Code --> https://github.com/microsoft/UnifiedRedisPlatform.Core/blob/main/src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestWebAppCore.Latest/Controllers/CacheController.cs


No error if --schemaReference doesn't exist

mcclient publish just exits if the hash of the schema doesn't exist without telling you what went wrong.

I get this (less than ideal) message:
(node:41754) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to retrieve schema with object id QmXciNhn4P6veuojsR6uRGHBu27pAztp5o1rtMkkmsTtUz: Not Found
Error: Unknown Object

maybe it's a node version thing though... perhaps the unhandled rejection warning isn't on your version.  I need to be catching that error anyway though, will fix.