Leaks or use-after-frees in TS_VERIFY_CTX accessors

The TS_VERIFY_CTX accessors return the value passed in. This is a bit strange.
https://github.com/openssl/openssl/blob/cbb1cda67f61b34c89fb49c8e2267ec6217bc33f/crypto/ts/ts_verify_ctx.c#L51-L77
One possible explanation is that the appropriate freeing of already present struct members were missed. This is the interpretation taken in #16347 for TS_VERIFY_CTX_set_imprint().
Or perhaps the idea of https://github.com/openssl/openssl/commit/ca4a494cb7437a7af155361b0084de8329c0bf25 was that they should return the old value of the relevant ctx member so that the caller can free them? However, that doesn't make sense with the error checking that was added with their use in ts.c.
Either way, the current behavior means that whatever was set on the ctx is likely leaked if an application calls one of these setters a second time.
As already mentioned, this was changed for TS_VERIFY_CTX_set_imprint() in #16347 (without treating the other functions the same way). This was a dangerous change since it makes the API behavior inconsistent and, worse, it causes a use after free or a double free for callers who would previously take care of freeing the old pointer themselves to avoid a leak.
This problem would arise for example in ruby/openssl if someone were to add an X509_STORE_free(store) at the top of TS_VERIFY_CTX_set_store() similar to #16347 .
Presumably the only way to fix this without breaking existing consumers is to deprecate the existing API and to add set0 or set1 versions of these setters that don't have these issues.

I searched for usages of these functions in public GitHub repositories. From the usages found, it seems people expect that the return value indicates whether the value has been successfully set. While most of these functions do not have manual pages, the function TS_VERIFY_CTX_set_certs does:
RETURN VALUES
       TS_VERIFY_CTX_set_certs() returns the stack of X509 certificates the user passes in via parameter certs.

I recommend adding documentation pages to the existing functions, clearly stating that the returned value is the one passed in. This clarification would help prevent misunderstandings about the return value being a status indicator.
Regarding adding OPENSSL_free to these functions:

If data in a context is released using OPENSSL_free, the context is still in use, but the pointer to this data isn't set to NULL, I consider this as bad programming practice.
Without documentation on how these functions should be used, it's hard to fault users for misuse.
Deprecating the existing methods and replacing them with well-defined ones seems reasonable, especially since they are rarely used.

Proposed Changes
@t8m I would create a pull request with the following changes:

Create a new set of all TS_VERIFY_CTX_set_* functions named TS_VERIFY_CTX_set1_*.
Change the return type to int, returning 1 on success and 0 on failure, consistent with the rest of the API.
Free any previously allocated data before assigning new data.
Write documentation for all new methods.
Deprecate all old methods.

Collected Usages
https://github.com/openssl/openssl/blob/2f0b4974dfbd9bc71e1164e0742fc7fdb2b2b70e/apps/ts.c#L923
        if (data != NULL) {
            f |= TS_VFY_DATA;
            if (TS_VERIFY_CTX_set_data(ctx, BIO_new_file(data, "rb")) == NULL)
                goto err;
        } else if (digest != NULL) {

https://github.com/Ptival/pirate/blob/b4d9f71674331f6b73c0645e1b2995aa9d8142fe/demos/time_demo/src/ts_crypto.c#L539
    if (TS_VERIFY_CTX_set_data(ctx, data) == NULL) {
        goto end;
    }
    data = NULL;         /* Freed by TS_VERIFY_CTX_free */

https://github.com/andronat/dcmtk/blob/5e874fa8c1675df9f6fb3ed1fa0934e8665cb74b/dcmsign/libsrc/sitstamp.cc#L58
#define TS_VERIFY_CTX_set_data(x,y) ((x)->data = (y))

https://github.com/open-eid/libdigidocpp/blob/41bba271a3f16afacbe35171b7e0546a28c84087/src/crypto/TS.cpp#L252
        TS_VERIFY_CTX_set_flags(ctx.get(), TS_VFY_IMPRINT|TS_VFY_VERSION|TS_VFY_SIGNATURE);
        TS_VERIFY_CTX_set_imprint(ctx.get(),
            (unsigned char*)OPENSSL_memdup(digest.data(), digest.size()), long(digest.size()));
        TS_VERIFY_CTX_set_store(ctx.get(), store.release());
        if(TS_RESP_verify_token(ctx.get(), d.get()) != 1)
        {
            unsigned long err = ERR_get_error();

https://github.com/openssl/openssl/blob/2f0b4974dfbd9bc71e1164e0742fc7fdb2b2b70e/apps/ts.c#L961
    if (untrusted != NULL) {
        certs = load_certs_multifile(untrusted, NULL, "extra untrusted certs",
                                     vpm);
        if (certs == NULL || TS_VERIFY_CTX_set_certs(ctx, certs) == NULL)
            goto err;
    }
    ret = 1;

I am actually not sure it is worth it touching this particular issue. But if you want to, your plan seems OK except for naming the new functions. They should be named TS_VERIFY_CTX_set0_* not set1. set1 is used in case the callee doesn't take ownership of the passed-in reference.

@t8m I agree, it’s a subtle point, but I believe it’s better to fix it before these functions see actual use. Thank you for pointing out the correct set0 naming convention. I will start working on a PR.

@t8m I assumed deprecation for the 3.4.0 release and split the documentation into two files to avoid distracting the reader with the deprecated function calls.

@t8m I assumed deprecation for the 3.4.0 release and split the documentation into two files to avoid distracting the reader with the deprecated function calls.

I am not sure it makes sense to split the docs. But it is up to you.


"A detailed description of the available fields, their types, and definitions in CloudEvents v0.1 is available here."

The text quoted in this issues heading references v0.1, however the link is actually the now published v1.0 - the text should be updated to v1.0

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

ID: ddd55e19-eb11-3b0f-c6e1-3710f712fd58
Version Independent ID: f413f074-6a81-73fa-0674-f8bc98aeac1d
Content: Use Azure Event Grid with events in CloudEvents schema
Content Source: articles/event-grid/cloudevents-schema.md
Service: event-grid
GitHub Login: @banisadr
Microsoft Alias: babanisa

Hi @jimmcslim Thanks for your feedback. We will review and update as appropriate.

@jimmcslim PR has been created for this which will address this. Thanks so much for providing the feedback that help us in improving the documentation. For now I will proceed with closure of this and If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Unable to assign multiple source_address_prefixes

When I try to create a custom rule to limit access to specific source_address_prefixes I get the following error:
Error: Inconsistent conditional result types

  on .terraform\modules\nsg-database\main.tf line 47, in resource "azurerm_network_security_rule" "custom_rules":
  47:   source_address_prefix                      = length(lookup(var.custom_rules[count.index], "source_application_security_group_ids", [])) == 0 ? lookup(var.custom_rules[count.index], "source_address_prefix", "*") : ""
    |----------------
    | count.index is 0
    | var.custom_rules is tuple with 1 element

The true and false result expressions must have consistent types. The given
expressions are tuple and string, respectively.

main.tf has the following specification:

main.tf

module "nsg-database" {
  source              = "Azure/network-security-group/azurerm"
  version             = "3.3.1"
  security_group_name = "nsg-database"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location
  custom_rules = [
    {
      name                   = "SQL Server"
      priority               = 100
      source_address_prefix  = ["<IP_ADDRESS>/24","<IP_ADDRESS>/24"]
      access                 = "Allow"
      direction              = "Inbound"
      protocol               = "TCP"
      destination_port_range = 1433
      description            = "Allow SQL only at application layer"
    }
  ]
  tags       = var.tags
  depends_on = [azurerm_resource_group.main]
}

Expected result during terraform plan:
[...]
  # module.nsg-database.azurerm_network_security_rule.custom_rules[0] will be created
  + resource "azurerm_network_security_rule" "custom_rules" {
      + access                      = "Allow"
      + description                 = "Allow SQL only at application layer"
      + destination_address_prefix  = "*"
      + destination_port_ranges     = [
          + "1433",
        ]
      + direction                   = "Inbound"
      + id                          = (known after apply)
      + name                        = "SQL Server"
      + network_security_group_name = "nsg-database"
      + protocol                    = "TCP"
      + resource_group_name         = "az-landingzone"
      + source_address_prefix       = ["<IP_ADDRESS>/24","<IP_ADDRESS>/24"]
      + source_port_ranges          = [
          + "0-65535",
        ]
    }

Plan: 2 to add, 0 to change, 0 to destroy.

Edit: the error does not occur when I use a single source_address_prefix, as seen below:
main.tf:
module "nsg-database" {
  source              = "Azure/network-security-group/azurerm"
  version             = "3.3.1"
  security_group_name = "nsg-database"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location
  custom_rules = [
    {
      name                   = "SQL Server"
      priority               = 100
      source_address_prefix  = "<IP_ADDRESS>/24"
      access                 = "Allow"
      direction              = "Inbound"
      protocol               = "TCP"
      destination_port_range = 1433
      description            = "Allow SQL only at application layer"
    }
  ]
  tags       = var.tags
  depends_on = [azurerm_resource_group.main]
}

same issue with multiple address
source_address_prefix       = ["<IP_ADDRESS>/24","<IP_ADDRESS>/24"]

@yupwei68 I'm not sure if you're ahead of this module but you might want to take a lot at this. Thanks.

Are you all actually getting the source_address_prefix applied to the specific rules you declare them in?
To me it seems that the source_address_prefix in the specific rules is ignored and replaced by the default for the module ("*").
At least, for the predefined rules, that's behaviour that I notice...

I've created a pull request to solve this issue.

Hi @carlosdoliveira Thanks for opening this issue. Sorry that currently we have not support source_address_prefixes. We'll support it in the next release.


Custom Procedure - returning data

Hi,
I have a problem: I've created custom procedure - it is working fine, is doing all things as I am expected I just have no idea how to return any custom data to response object?
Can you help me how to do it ?
For example I have:
var result = {'status': true, 'something': false};
and now I would like to return it to response object so I can do something with that in PHP.
Thanks

This should do the trick:
console.log(JSON.stringify(response, undefined, 4));
Where response is the data you want to send back. After that your PHP $request object should contain all the data from response.


Add Lesson 1

Thanks

I moved your files to the correct location : https://github.com/ring-lang/ring/tree/master/developers/Arabic/Asmaa Elabd
To upload files in the future, You will need to add your files to this new folder.
(Simple steps to do, but not the perfect way)
(1) Delete your fork of ring-lang/ring
(2) Fork again
Then upload your files in the future to the correct location.


how to use bazelisk to build projects?

why I cannot use bazelisk or bazel to build project? cannot find bazel,but bazel is downloaded

Please make sure that $PATH contains the directory with the bazelisk binary.

Please make sure that $PATH contains the directory with the bazelisk binary.

Thank you help me for the problem


🐞 - If animation is disabled then postfix/prefix don't work in inputNumber

Which @taiga-ui/* package(s) are the source of the bug?
kit
Please provide a link to a minimal reproduction of the bug
https://taiga-ui.dev/stackblitz
Is this issue blocking you?
Non-Blocking
Description
* {
  animation: none !important;
  transition: none !important;
}

@waterplea @nsbarsukov @vladimirpotekhin what do you think is it expected behavior?

Angular version
latest
Taiga UI version
latest
Which browsers have you used?

[X] Chrome
[ ] Firefox
[ ] Safari
[ ] Edge

Which operating systems have you used?

[X] macOS
[ ] Windows
[ ] Linux
[ ] iOS
[ ] Android

if I comment current line

then works as expected

I don't think you can rely on everything working properly, if you enforce your custom styles on everything.


Get @Param or @Header annotation value from a variable if the val…

…ue is not specified
Modifications:

Add findParamName and findHeaderName to AnnotatedHttpServiceParamUtil in order to
obtain the variable name if a @Param or @Header annotation does not have a value.
Refactor BeanRequestConverterFunction for cleanup.
Documentation.

Result:

Closes #570

@Default annotation can be used only for method parameter now,
can we just remove this annotation, and add a new defaultValue attribute to @Param and @Header annotation?
e.g:
change @Header("username") @Default("hello")
to @Header(value="username", defaultValue="hello")
and change @Param("age") @Default("20")
to @Param(value="age", defaultValue="20")
so, we can specify default value for any methods/constructors/parameters/fields annotated by @Param and/or @Header

@Header(value="username", defaultValue="hello")
@Param(value="age", defaultValue="20")

the annotation attribute name value here is a little ambiguous, can we change it to name?
e.g:
@Header(name="username", defaultValue="hello")
@Param(name="age", defaultValue="20")

the annotation attribute name value here is a little ambiguous, can we change it to name?

Is it still possible to use @Param("name") with that change?

Is it still possible to use @Param("name") with that change?

You are right, this will be a little problem.
I will try if I can find an elegant solution.
But do you agree the basic idea of merging @Default into  @Param and @Header?
If that is OK, I will create a PR for it.

@LiYing2010 wrote:

@Default annotation can be used only for method parameter now,
can we just remove this annotation, and add a new defaultValue attribute to @Param and @Header annotation?
...
do you agree the basic idea of merging @Default into  @Param and @Header?
If that is OK, I will create a PR for it.

Perhaps we could just allow specifying @Default on a method and a field? e.g.
public class MyBean {
   @Param("id") @Default("something")
   private String id;

   @Param("foo") @Default("bar")
   public void setFoo(String foo) { ... }
}

.. or did I miss something?

@LiYing2010 Basically, I also agree your idea about specifying a default value of a field or method. But I think that @trustin 's suggestion slightly looks better because specifying name = "value" is a little inconvenient to me.

Basically, I also agree your idea about specifying a default value of a field or method. But I think that @trustin 's suggestion slightly looks better because specifying name = "value" is a little inconvenient to me.

I think @Default means a default value of parameter, but parameter can be retrieved only from @Param or @Header.
So, when we use @Default,  we must use it as a pair with @Param or @Header.
It will make more sense if we change default value as a attribute of @Param or @Header.
If we keep @Default separated from @Param and @Header

it will be a little harder to understand, so user may use it improperly
we have to take care of @Default everywhere @Param or @Header appears, our code will be more complex

specifying name = "value" is a little inconvenient

That's true.
how about we define 3 attributes for @Param and @Header: value/name/defaultValue
and implement something like Spring AliasFor
then we can support both:  @Param("foo") and  @Param(name="foo", defaultValue="bar")

I'm not sure I like the idea of introducing an additional annotation property, mainly because it makes annotations look inconsistent:
public void someMethod(@Param("foo") String foo,
                       @Param(vaule="bar", defaultValue="def") String bar,
                       @Param("baz") String baz) { ... }

// vs.
public void someMethod(@Param("foo") String foo,
                       @Param("bar") @Default("def") String bar,
                       @Param("baz") String baz) { ... }

@Default is shorter and it gives us better aligned code.

No, it's rather about sometimes having to specify attribute name and sometimes not:
@Param("without_name")
       ^
@Param(value="with_name")
             ^ -> Inconsistent column alignment
@Param("without_name_2")
       ^

I'm not sure if it's a good idea to rename value to name since it will only increase the number of keystrokes a user has to make even when a user doesn't want to specify a default value:
@Param(name="why should a specify attribute name when there's only a single attribute?")
@Param(name="...", defaultValue="...")

If we keep @Default separated from @Param and @Header

it will be a little harder to understand, so user may use it improperly
we have to take care of @Default everywhere @Param or @Header appears, our code will be more complex

Could you show me an example code that shows its increased complexity and improper use?

I'm not sure if it's a good idea to rename value to name since it will only increase the number of keystrokes a user has to make even when a user doesn't want to specify a default value:

I have explained this here:

how about we define 3 attributes for @Param and @Header: value/name/defaultValue
and implement something like Spring @AliasFor
then we can support both: @Param("foo") and @Param(name="foo", defaultValue="bar")

Ah, I see. That sounds not that bad, then. However, I'm still curious why the current API leads to increased complexity and improper use. Any examples?

Could you show me an example code that shows its increased complexity and improper use?

I think defaultValue and name are a pair of attributes which describe detail information of Query Parameters or HTTP Headers.
In concept, defaultValue is a part of  @Param and @Header, but it is implemented as a separated annotation,
so, everytime we process anything about @Param or @Header, we have to check if there is @Default, and take care of it, instead of using the defaultValue attribute attached to @Param or @Header.
By "user may use it improperly", I mean, user could declare a @Default without @Param or @Header, which make no sense.
And BTW, @RequestParam and @RequestHeader in Spring MVC also uses same strategy I proposed:

attribute name() and defaultValue()
attribute value() as a alias for name()

implement something like Spring @AliasFor

About this part, I have read source code and document of Spring, what they do is:

Spring will synthesize an annotation by wrapping it in a dynamic proxy that transparently enforces attribute alias semantics for annotation attributes that are annotated with @AliasFor

I think we can implement the same thing.
Of course, not all the features of Spring @AliasFor, but only what we need: Aliases within an Annotation

I understand that some people may prefer the proposed API, but I still fail to see that its benefit outweighs the removal of @default .

OK, understood.

Thanks a lot, @hyangtack and reviewers!


Add Jimmy Mannan to Contributors list

@jiimms, I'm quite elated about your PR. I wanna evolve this project to addresses various problems faced by first time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a PR and learned that I accepted it?

@Roshanjossey It feels like I have cleared a big hurdle. I have been trying to step into opensource but it looked very tricky. The detailed steps here have made it very easy for a firsttimer.
Thanks for this opportunity

@jiimms, Are you looking in to other projects to contribute to?
If you're unclear on which project to contribute to, do go through the list at the end of tutorial.
I'm trying to get feedback if that list is really useful.


Add a RegexMatcher Builder

Similar to #220 , this PR adds a RegexMatcher Builder to build a RegexMatcher operator from a given set of properties (a map of <String, String> representing properties).

Current coverage is 60.55% (diff: 93.33%)

Merging #221 into master will increase coverage by 0.15%

@@             master       #221   diff @@
==========================================
  Files           120        121     +1
  Lines          3073       3088    +15
  Methods           0          0
  Messages          0          0
  Branches        499        502     +3
==========================================
+ Hits           1856       1870    +14
- Misses         1099       1100     +1
  Partials        118        118

Powered by Codecov. Last update f621bb4...141505f

LGTM.


Update v1.9.x to Docker 20.10.x

If I understand https://www.docker.com/blog/extending-support-cycle-docker-community-edition/ correctly it means that Docker 19.03.x versions are supported 7 months after 20.10.0 release which means that so on July we should release v1.9.x version with latest Docker 20.10.x.
Open issues which are targetted to be fixed on Docker 20.10.6 can be found from https://github.com/moby/moby/issues?q=is%3Aopen+is%3Aissue+milestone%3A20.10.6 and especially https://github.com/moby/moby/issues/41775 is critical to verify if that happens on BurmillaOS too.

Based on https://github.com/moby/moby/pull/42015#issuecomment-842130307 it sounds that time has come.


extend the dedup test cases for more hash functions, as done for upsert

Extending the dedup test cases for more hash functions, as done for upsert. Currently, the dedup test cases are hard coded for use NONE hash func.
Also renamed the test methods to start with test.

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

Project coverage is 0.00%. Comparing base (59551e4) to head (c82c864).
Report is 923 commits behind head on master.

:exclamation:  There is a different number of reports uploaded between BASE (59551e4) and HEAD (c82c864). Click for more details.
HEAD has 53 uploads less than BASE

Flag
BASE (59551e4)
HEAD (c82c864)

integration
7
1

integration2
3
1

temurin
12
1

java-21
7
1

skip-bytebuffers-true
3
1

skip-bytebuffers-false
7
0

unittests
5
0

unittests1
2
0

java-11
5
0

unittests2
3
0

integration1
2
0

custom-integration1
2
0

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #13869       +/-   ##
=============================================
- Coverage     61.75%    0.00%   -61.76%
=============================================
  Files          2436     2502       +66
  Lines        133233   138575     +5342
  Branches      20636    21540      +904
=============================================
- Hits          82274        0    -82274
- Misses        44911   138575    +93664
+ Partials       6048        0     -6048

Flag
Coverage Δ

custom-integration1
?

integration
0.00% <ø> (-0.01%)
:arrow_down:

integration1
?

integration2
0.00% <ø> (ø)

java-11
?

java-21
0.00% <ø> (-61.63%)
:arrow_down:

skip-bytebuffers-false
?

skip-bytebuffers-true
0.00% <ø> (-27.73%)
:arrow_down:

temurin
0.00% <ø> (-61.76%)
:arrow_down:

unittests
?

unittests1
?

unittests2
?

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


RecyclerView.Adapter are not working properly in tests

After #188 there is issue in https://github.com/hawkular/hawkular-android-client/blob/master/mobile/src/androidTest/java/org/hawkular/client/android/adapter/AlertsAdapterTester.java and https://github.com/hawkular/hawkular-android-client/blob/master/mobile/src/androidTest/java/org/hawkular/client/android/adapter/MetricsAdapterTester.java

@free4murad Cure it ASAP :wink:

Sure, will send a PR in an hour or 2

Closed with #193


Nit: flag matching should look at entire flag, not HasPrefix

/kind bug
What versions of software are you using?
Operating System:
Mac OS Catalina
Output of odo version:
odo v2.0.0 (6fbb9d9bf)
How did you run odo exactly?
Ok, this is a nit :) . I wanted to confirm I had installed v2 correctly, so I automatically typed "odo -version" (some other clis I have use the single - approach).
Actual behavior
✗  invalid argument "ersion" for "-v, --v" flag: strconv.ParseInt: parsing "ersion": invalid syntax
Expected behavior
✗  unknown flag: -version
or
✗  Invalid command - see available commands/subcommands above

we do provide odo version not even --version or -version.

Yes, I know and figured it out. Some other tools use -version so I did that out of habit, and the output is just odd - it should say something like 'invalid command' instead of the current error.

/lifecycle frozen

/lifecycle frozen

I'm afraid this is "normal" behavior for the cobra library we are using for cli handling.
even kubectl has the same behavior
$ kubectl -version
error: invalid argument "ersion" for "-v, --v" flag: strconv.ParseInt: parsing "ersion": invalid syntax
See 'kubectl --help' for usage.


Update 01-server-installation.md

noticed this was giving me a 404, and it was because the file name did not match the repo.

this is a duplicate


Remove paper & benchmark scripts

Currently both these set of scripts do not run, and haven't been updated in years. I also think they're not the top priority when it comes to maintaining this package. We should focus on making sure the examples always run smoothly.
I suggest we remove these sets of files. They will be available within the git history, and in releases in case anybody wants them ( I would gues not?).
cc @brainglobe/active-devs

I agree, I think focusing on the examples is the best idea!


API input Validation Exceptions do not provide useful information which can be used to correct the input

Hello,
I'm getting the exception
An exception occurred: 400 Client Error: Bad Request for url:
This exception message is too generic and does not provide any hints into what needs to be corrected in order to build a valid
API request.
I'm trying to use the portainer rest API to install applications from (https://github.com/Lissy93/portainer-templates)
This app templates URL was already configured in Portainer
app_headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {jwt_token}'}

    install_app_payload = {
        "type": 2,
        "method": "repository",
        "endpointId": get_docker_endpoint_id(portainer_service_url, jwt_token),
        "name": app_name,
        "repository": portainer_repository,
        "network":f"{ constants.INFRA_USER }_cross_servers_network",
        "hostname": app_name
        }

    logger.info(f"install_app_payload: {json.dumps(install_app_payload, indent=4)}")

    # install app
    stacks_url = f"{portainer_service_url}/api/stacks"
    app_response = requests.post(stacks_url, json=install_app_payload, headers=app_headers)

@distributev
Are you trying to deploy a stack from App Templates?
There is no API for this and its only a frontend function geared towards Click-Ops.
method: repository is to deploy a stack from a compose file that is stored in a git repo. Not for deploying a stack from App Template.

If I provide myself the docker compose file content inline in the API request (as an argument) this would work with the API?
In any case the API validation message 'An exception occurred: 400 Client Error: Bad Request for url:' could offer more hints into what needs to change in the input arguments for making the API request successful.

Yes, using the right method (string) if yu are provifing it inline should work.
I'll raise this with product as an enhancement.
Thanks

OK - or if instead of the docker-compose file content inline I would provide the portainer template content inline (see below) this would work too? (with the API call)
can I call the /api/stacks API by passing it something like that?
{
      "categories": [
        "Tools"
      ],
      "description": "This is a Bitwarden server API implementation written in Rust compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal.",
      "image": "vaultwarden/server:latest",
      "logo": "https://raw.githubusercontent.com/xneo1/portainer_templates/master/Images/bitwarden.png",
      "name": "vaultwarden",
      "note": "This project is not associated with the Bitwarden project nor 8bit Solutions LLC.",
      "platform": "linux",
      "ports": [
        ":80/tcp"
      ],
      "restart_policy": "unless-stopped",
      "title": "Vaultwarden",
      "type": 1,
      "volumes": [
        {
          "bind": "/portainer/Files/AppData/Config/Vaultwarden",
          "container": "/config"
        }
      ]
    }

No, It needs to be an actual compose file.
This json template will not work for that. It's intended for Portainer to understand and show these templates as items in the UI.

OK, thank you.

I get the same generic ' An exception occurred: 400 Client Error: Bad Request for url' for something which, by following documentation, looks a valid API call. Since this message does not give any hint of what might be wrong is there any better way to debug API calls to portainer?
get_docker_endpoint_id () and get_docker_compose_src_code() correctly return what they have to return. The post call to /api/stacks fail
request_headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {jwt_token}'}

    # Define the query parameters as a dictionary
    request_query_params = {
        "type": 2,
        "method": "string",
        "endpointId": get_docker_endpoint_id(portainer_service_url, jwt_token),
    }

    request_payload = {
        "body_compose_string": {
             "fromAppTemplate": False,
              "name": app_name,
              "stackFileContent": get_docker_compose_src_code(f'{portainer_app_templates_extra_url}/{app_name}', ".docker-compose-file > pre > code", app_name)
        },

    }

    logger.info(f"request_payload: {json.dumps(request_payload, indent=4)}")

    # install app
    stacks_url = f"{portainer_service_url}/api/stacks"
    app_response = requests.post(stacks_url, json=request_payload, params=request_query_params, headers=request_headers)

How about your portainer_service_url ?
Is it http or https ?


Mouse Modes need more explanation

There are 6 modes of a mouse. Probably "Navigation" is the most frequently used. How to others work? (When to use them?)

Disable the unused modes.


SlurmClusterResolver cannot be configured to use no GPUs

Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
2.9.1
Custom Code
No
OS Platform and Distribution
Linux custom cray distribution
Mobile device
N/A
Python version
Conda evn installed python 3.10
Bazel version
N/A
GCC/Compiler version
N/A
CUDA/cuDNN version
N/A
GPU model and memory
N/A
Current Behaviour?
Attempting to use zero GPU's causes an error

Traceback (most recent call last):
  File "test.py", line 17, in <module>
    strategy = tensorflow.distribute.MultiWorkerMirroredStrategy(cluster_resolver=cluster_resolver)
  File "/global/homes/m/markcian/.conda/envs/parallel_tensorflow/lib/python3.10/site-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 189, in __init__
    communication_options=communication_options))
  File "/global/homes/m/markcian/.conda/envs/parallel_tensorflow/lib/python3.10/site-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 327, in __init__
    self._initialize_strategy(self._cluster_resolver)
  File "/global/homes/m/markcian/.conda/envs/parallel_tensorflow/lib/python3.10/site-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 338, in _initialize_strategy
    if cluster_resolver.cluster_spec().as_dict():
  File "/global/homes/m/markcian/.conda/envs/parallel_tensorflow/lib/python3.10/site-packages/tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py", line 327, in cluster_spec
    range(num_tasks), range(0, self._gpus_per_node, self._gpus_per_task)):
ValueError: range() arg 3 must not be zero

If I attempt to set gpus_per_task to 1 to fix this error,
Traceback (most recent call last):
  File "test.py", line 6, in <module>
    auto_set_gpu=False)
  File "/global/homes/m/markcian/.conda/envs/parallel_tensorflow/lib/python3.10/site-packages/tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py", line 271, in __init__
    raise RuntimeError('Requested more GPUs per node then available.')
RuntimeError: Requested more GPUs per node then available.

The expected behavior is that I would be able to configure tensorflow to not use GPUs and that it won't even attempt to use them if there are no GPUs on the node especially when installed with pip install tensorflow_cpu.

### Standalone code to reproduce the issue

```shell
import tensorflow

cluster_resolver = tensorflow.distribute.cluster_resolver.SlurmClusterResolver(gpus_per_node=0,
                                                            gpus_per_task=0,
                                                            tasks_per_node=1,
                                                            auto_set_gpu=False)

Relevant log output
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
v2.9.0-18-gd8ce9f9c301 2.9.1

@cianciosa
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!

This simple code should produce the first error message.
import tensorflow

cluster_resolver = tensorflow.distribute.cluster_resolver.SlurmClusterResolver(gpus_per_node=0,
                                                            gpus_per_task=0,
                                                            tasks_per_node=1,
                                                            auto_set_gpu=False)

@cianciosa Sorry for the late response!
I suspect that gpu is not declared so it’s  not getting detected.
You have installed Cpu version of tensorflow  using  pip install tensorflow_cpu and used  gpu = false in this line  File "test.py", line 6, in
auto_set_gpu=False) ( Change to True after setting GPU mode)
Could you install cuda tool kit through " Conda install cuda toolkit  " command and also install NVIDIA driver.
then gpu_per_node  = 2 or 4 according to GPU cards. Please let me know if it helps?
Thank you!

I'm trying to run this on multiple Haswell Nodes at NERSC.
https://docs.nersc.gov/systems/cori/
There's no physical GPUs in the machine Nvidia or otherwise. The problem is stemming from line https://github.com/tensorflow/tensorflow/blob/4c4f4d90edcb2c23d1049e57a99d5fe635b116db/tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py#L323
range needs a non-zero value for the 3rd argument. The code as written assumes there are GPUs available which are not the case on this machine. What the code should do instead is
if self._gpus_per_node > 0:
    for port_offset, gpu_offset in zip(range(num_tasks), range(0, self._gpus_per_node, self._gpus_per_task)):

        host_addr = '%s:%d' % (host, self._port_base + port_offset)
        task_list.append(host_addr)
        gpu_id_list = []

        for gpu_id in range(gpu_offset, gpu_offset + self._gpus_per_task):
          gpu_id_list.append(str(gpu_id))

        self._gpu_allocation.append(','.join(gpu_id_list))

Thanks for reporting the issue.
cluster_resolver is basically designed for TPU and GPU only, it is not intended to without any of those hardware.
But even with the changes which you have suggested, it may fail in the below condition
    if self._auto_set_gpu:
      os.environ['CUDA_VISIBLE_DEVICES'] = self._gpu_allocation[self._rank]

above value should be set to
os.environ['CUDA_VISIBLE_DEVICES'] = ""
or
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
To use CPU only.


Organize in folders by show name.

Downloads are not being organized in any method. I have the box checked.

Are you using magnet links? That option only works if you're not.

I'm using both and I have transmission just start them without asking me, so I don't know if the ones they downloaded are magnet links or not. But I guess they probably are since it isn't working.
If I turn off magnet links, what kind of effect will that have on quality/speed etc...?

Downloads will take a bit less time to start since there's no magnet metadata to download, and you'll find a few torrent files in the trash :)

So you run yours with magnets turned off?

No I use magnets, but I don't care about organization. File names are enough for me, and the files are short lived.

Ha, ok. I never cared before I cut the cord, no reason to start now. Thanks for the insight though, at least if I change my mind I know how to fix it.


Update CONTRIBUTORS.md

Mention your issue which you worked upon
Closes: #issue
In this way

@ShivangiBhargava Please mention the issue you worked upon

@ShivangiBhargava ??


BSOD on resume on Windows 10

Hi,
i have a BSOD crash after my system is in sleep mode and will resume. But not every time. The system has to be in sleep mode for some hours.
I found the already closed issues regarding SGX in your issue list. But none of the reported fixes works for me.
I own an Lenovo Thinkpad T480s with an i7-8550U with 24GB of RAM and have installed version 7.3.0 of HAXM.
After run an driver verify like described here the IntelHaxm.sys is reported as the driver who crashes the system.
Here is the strack trace from the memory.dmp:
STACK_TEXT:
ffffd006`92757618 fffff804`26b5ae43 : 00000000`000000c4 00000000`00002000 fffff802`da2d33e8 00000000`00000000 : nt!KeBugCheckEx
ffffd006`92757620 fffff804`265b359b : fffff804`266b3300 00000000`00002000 fffff802`da2d33e8 00000000`00000000 : nt!VerifierBugCheckIfAppropriate+0xdf
ffffd006`92757660 fffff804`26b5264c : 00000000`484d454d fffff804`266b3300 fffff802`da2d33e8 ffffffff`80001b58 : nt!VfReportIssueWithOptions+0x103
ffffd006`927576b0 fffff804`26b50633 : 00000000`00000000 ffffd006`92757950 00000000`00000070 00000000`00000000 : nt!VfCheckPoolType+0x90
ffffd006`927576f0 fffff802`da2d33e8 : 00000000`00000000 00000000`00000001 ffffe586`74692b80 ffffd006`92757950 : nt!VerifierExAllocatePoolWithTag+0x53
ffffd006`92757740 fffff802`da2da5c3 : ffffe586`74692b80 ffffe586`74692b80 ffffd006`927577e0 00000000`20206f49 : IntelHaxm+0x33e8
ffffd006`92757770 fffff802`da2d21a3 : ffffe586`74692b80 00000000`00000001 ffffe586`743c6fd0 ffffd503`4d52afe0 : IntelHaxm+0xa5c3
ffffd006`927577a0 fffff802`da2fb020 : ffffe586`00000200 ffffe586`746a2000 00000000`00000000 ffff3503`11ff2728 : IntelHaxm+0x21a3
ffffd006`92757820 fffff804`268dabc5 : 00000000`00000000 00000000`00000000 ffffe586`74692b80 00000000`00001000 : IntelHaxm+0x2b020
ffffd006`92757850 fffff804`268d9e6a : ffffe586`6e3580a8 00000000`00000000 00000000`00000100 ffffe586`654dfb70 : nt!IopLoadDriver+0x4bd
ffffd006`92757a30 fffff804`2630611a : ffffe586`00000000 ffffffff`80001b58 ffffe586`6c782080 ffffd006`00000000 : nt!IopLoadUnloadDriver+0x4a
ffffd006`92757a70 fffff804`263ca6c5 : ffffe586`6c782080 ffffe586`654a1300 ffffe586`6c782080 000024ed`bd9bbfff : nt!ExpWorkerThread+0x16a
ffffd006`92757b10 fffff804`2646138c : ffffc001`911b9180 ffffe586`6c782080 fffff804`263ca670 00000000`00000000 : nt!PspSystemThreadStartup+0x55
ffffd006`92757b60 00000000`00000000 : ffffd006`92758000 ffffd006`92751000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x1c

I can provide the full Memory.dmp (700MB) if it helps for find the bug.
Thanks for your help & Regards
Andreas

Thanks a lot for the report and analysis.
It would be great if you could provide the crash dump. Even the minidump (C:\Windows\Minidump\*.dmp) would help a lot. Alternatively, you could rerun the WinDbg crash dump analysis with haxm-windows-v7_3_0-symbols.zip to get a better stacktrace. In order to tell WinDbg about the new symbols file, you need to create a system environment variable (or update the existing one):
echo %_NT_SYMBOL_PATH%
srv*c:\Symbols*http://msdl.microsoft.com/download/symbols;X:\path\to\haxm-windows-v7_3_0-symbols\x64;

We'd also like to try to reproduce the issue on our side. Other than the long sleep, is there anything else that you do every time before the BSOD, e.g. running Android Emulator?

Hi,
sorry. I have testet with version 7.2.0. So the PDB does not match with the dump file.
The dump files are zipped and can be downloaded here
I now have HAXM 7.3.2 installed and will observe my system.
My system crashes nearly every day when it was in sleep mode or shut down with quick launch enabled, no matter if i run Android emulator or not.
Several system checks, from the bios and from MemTest86 does not detect any error.

Thanks. I analyzed the minidump and was able to resolve the HAXM 7.2.0 symbols. But I don't think this is the same BSOD that you see after waking up your laptop from a long sleep. Rather, it's an unrelated "warning" condition treated as an error by Windows 10 Driver Verifier, which I think is quite rigorous and may catch issues that won't actually result in a BSOD.
Could you provide the original crash dump (that was generated before you had enabled Driver Verifier)? If you don't have it, please just turn off Driver Verifier and keep using HAXM 7.3.2, until you reproduce the BSOD again. Then, please provide the crash dump.
FYI, here's the cause of the BSOD as recorded in the minidump:
DRIVER_VERIFIER_DETECTED_VIOLATION (c4)
A device driver attempting to corrupt the system has been caught.  This is
because the driver was specified in the registry as being suspect (by the
administrator) and the kernel has enabled substantial checking of this driver.
If the driver attempts to corrupt the system, bugchecks 0xC4, 0xC1 and 0xA will
be among the most commonly seen crashes.
Arguments:
Arg1:<PHONE_NUMBER>002000, Code Integrity Issue: The caller specified an executable pool type. (Expected: NonPagedPoolNx)
Arg2: fffff802da2d33e8, The address in the driver's code where the error was detected.
Arg3:<PHONE_NUMBER>000000, Pool Type.
Arg4:<PHONE_NUMBER>4d454d, Pool Tag (if provided).

It basically describes an issue that we are already aware of, that HAXM allocates memory from the executable memory pool instead of the No-Execute (NX) pool. The latter is more secure, since there's no need to mark memory pages executable when they only contain data (no code). However, using the executable pool is still allowed, and should never cause a BSOD, especially because the NX pool is not available on Windows 7:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ne-wdm-_pool_type
HAXM needs to support Windows 7, and it currently ensures that by simply not using any Windows API specific to Windows 8 and later. A more elegant solution is to build separate drivers for different Windows versions, and we do plan to create a build configuration for the Windows 10 driver and use new APIs such as NonPagedPoolNx. Then, Windows 10 Driver Verifier shouldn't complain about this "code integrity" issue anymore.

Hi,
thank you for the feedback.
I'v updated all drivers through device manager yesterday. After some restarts through device driver updates i don't use the android emulator and shut down my system with windows quick launch enabled. This is nearly like sleep mode AFAIK.
Today i received a BSOD right after the login screen is showing. I don't have time to login into the system before the BSOD occur.
You can find the fresh minidump here.
Hope it helps to find the bug.

Thanks. I loaded this minidump in WinDbg, but the bugcheck analysis showed no trace of HAXM:
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M (1000007e)
This is a very common bugcheck.  Usually the exception address pinpoints
the driver/function that caused the problem.  Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003.  This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG.  This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG.  This will let us see why this breakpoint is
happening.
Arguments:
Arg1: ffffffffc0000005, The exception code that was not handled
Arg2: fffff8023664ab89, The address that the exception occurred at
Arg3: ffffd7897d78d648, Exception Record Address
Arg4: ffffd7897d78ce90, Context Record Address
...
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

FAULTING_IP:
nt!SMKM_STORE_MGR<SM_TRAITS>::SmFeStoreDelete+127c25
fffff802`3664ab89 410fb74004      movzx   eax,word ptr [r8+4]

EXCEPTION_RECORD:  ffffd7897d78d648 -- (.exr 0xffffd7897d78d648)
ExceptionAddress: fffff8023664ab89 (nt!SMKM_STORE_MGR<SM_TRAITS>::SmFeStoreDelete+0x0000000000127c25)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]:<PHONE_NUMBER>000000
   Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
...
STACK_TEXT:
ffffd789`7d78d880 fffff802`36522f0f : 00000000`00000010 ffffd889`52321000 fffff802`368f19c0 fffff802`36471be9 : nt!SMKM_STORE_MGR<SM_TRAITS>::SmFeStoreDelete+0x127c25
ffffd789`7d78d9c0 fffff802`36a3b26c : ffffffff`ffffffff fffff802`368f19c0 ffffd789`00000000 fffff802`368f19c0 : nt!SMKM_STORE_MGR<SM_TRAITS>::SmStoreMgrCallback+0x3f
ffffd789`7d78d9f0 fffff802`3653dd9a : 00000000`00000004 fffff802`3653dd60 ffffd789`7a117750 ffffd889`394639f0 : nt!SmKmStoreDelete+0xe4
ffffd789`7d78da40 fffff802`3647111a : ffffd889`48671080 ffffd889`48671080 fffff802`36831e00 ffffd889`00000000 : nt!SmKmStoreDeleteWhenEmptyWorker+0x3a
ffffd789`7d78da70 fffff802`365356c5 : ffffd889`48671080 ffffd889`3947f300 ffffd889`48671080 fffffe7f`00000000 : nt!ExpWorkerThread+0x16a
ffffd789`7d78db10 fffff802`365cc38c : fffff802`3513f180 ffffd889`48671080 fffff802`36535670 fffff802`3644c9a6 : nt!PspSystemThreadStartup+0x55
ffffd789`7d78db60 00000000`00000000 : ffffd789`7d78e000 ffffd789`7d787000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x1c

As you can see, IntelHaxm.sys does not appear in the stacktrace. The immediate cause of the BSOD is that a Windows kernel function (SMKM_STORE_MGR<SM_TRAITS>::SmFeStoreDelete) tries to read from an invalid memory address (0xffffffffffffffff). IMHO, it is very unlikely that this bug has anything to do with HAXM. But to confirm that:

If the BSOD happens often enough, you can uninstall HAXM and see if the problem goes away.
Maybe you can run Driver Verifier again, this time selecting all drivers except HAXM, and see if you can identify a real bug in another driver.

Meanwhile, I encourage you to report this issue to Lenovo and Microsoft.

How is it now? I noticed that there is a finger Touch ID on your laptop, maybe it conflict with haxm, have you login by it? By disable its driver in device manager would check this.

Sorry for not responding.
i had no issues with the 8gb internal ram. When the additional ram module with 16gb was installed i had this issue.
I changed the ram module and it's fine now. No more BSODs with the full 24gb of ram.
So i close this issue.
Thanks & Greetings
Andreas


⚠ Bofrost.at has degraded performance

In d0c1454, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1541 ms

Resolved: Bofrost.at performance has improved in c917ad9 after 13 minutes.


https://redux.js.org/ description indexed by Google seems malicious/unintended

What is the current behavior?
Searching for Redux on Google gives quite a strange, unrelated description.  See screenshot below, particularly Dating > Бланк почтового конверта формата а4 скачать бесплатно.

Able to reproduce from my own Google Fiber connection via Firefox (61.0.2 (64-bit))
and from a T-Mobile LTE connection on Android via Firefox.
What is the expected behavior?
Other search engines like DuckDuckGo/Yahoo show a relevant description.
We have a variety of resources available to help you learn Redux, no matter what your background or learning style is.

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
Not related to the library, but the hosted https://redux.js.org/

Well, that is bizarre.  I see it myself.  Searching the contents of the served-up main docs HTML page doesn't show any of that text that I can see .
@SamyPesse , any idea what's going on here?

I searched through commits and couldn't find any of the text either. Only thing I could think of that would cause this is that the contents of the hosted server were changed post deploy/compile....

It could be someone submitted the URL as well

@michaelgv wouldn't you need to have verified the domain/url as your property though?

Oddly enough Google seems to have indexed the same website with a different description when you use different search terms?

Maybe something to do with the js.org domain? Do you get this result for other sites on that parent domain?

@markerikson That is really bizarre.
I'm investigating if it could be related to GitBook. But we've never seen something similar on the platform.
We are always fighting with lot of spam content, but it never affected legit content.
When checking the HTML sources of your pages, these pages have no description (you can add one using the YAML front matter), but Google should default to fragment of your content.
Can you try re-indexing the homepage on Google ?

It's now working as expected on our side, Have you changed something ?

It's cleared up for me too.
I guess it's an alert for you if someone is attempting to game the system somehow. Although, I'm not sure how injecting the text that translates to The form of postal envelope format A4 download free does anything for a spammer. Google doesn't index itself :)
But since it's fixed and it's mostly on Google's end, I'm closing this out.


Use core::mem::zeroed to get a zero-initialized struct

Instead of mem::transmute
The struct sgx_uswitchless_config_t contains a function pointer,
so it's size may vary by implementation. The previous implementation
for zeroing it used transmute with an array of fixed size.
This implementation is correct for x86_64 but sgx_types may
also be used outside the enclave, for instance it is dependended on
by sgx_urts. This change improves portability, and readability.

Cool. Thanks!


Support for outputting position files

Hi!
Thank you for publishing this action. For me, it would be very useful to be able to export position files with this action. I wonder if you think it would be suitable to have support for that in this library.
If so, would it be acceptable that it always exports the position file? That, I believe, would simply be a matter of adding another line to entrypoint.sh.

I have added a new option "position-format", which defaults to none. If you put in "csv" "gerber" or "ascii" the workflow will generate a position file.

Wow, thanks!! 🥇
I tried it out, and it works great if I set position-format: gerber, but not with csv or ascii. The output from the job doesn't really indicate any error - the last line I get from this step is Loading board, which is the same that I get if I locally run kicad-cli pcb export pos --format ascii -o production-files my-pcb.kicad_pcb - but the job fails after that. If I instead use csv or ascii, I get 2 lines of Loading board, also as expected since kicad-cli is invoked 2 times in this case, but then the job proceeds successfully.

Ah you're right. I assumed that, like drill files, when given a directory the tool would place a file in there. Apparently not. Thanks for pointing that out, the fix has been implemented in v2.0.4.

Thanks for fixing it, I appreciate it! Works perfectly fine now 👍


OVERVIEW: Network cost calculation improvements

Background
The network impact/cost calculation has been implemented a long time ago and many things have happened that reduce its consistency and accuracy. A short summary:
Initial implementation

Based on rules of thumb from TenneT and Alliander for the spare capacity on different parts of the network:

HV network
HV-MV trafo
MV transport network
MV distribution network
MV-LV trafo
LV network

Rules of thumb for the costs of extending capacity of the network components
For each technology the following has been determined:

simultaneousness factors for winter day, winter evening, summer day, summer evening
peak_load_in_mw method that multiplies the maximum (electric) capacity with the number of units. This is a worst case calculation

Adjustment to match expectations of DSO/TSO
The simultaneousness factors have been adjusted in order to reproduce expected increases in costs for the various technologies. This resulted in simult-values being larger than 1.0
Improvement of the modelling of spare capacity

The single-value spare capacity figures have been replaced with arrays which describe the spare capacity as a function of capacity
The simult factors have not been updated in this project keeping 'adjustments' in place which are not necessarily compatible with the new spare capacity description

Dynamic demand curve
The technologies who's loads are now explicitly modelled have been removed from the initial worst case calculation methods. Their impact is now derived from the load profile itself (still for the four times in the year though). This introduces another inconsistency: some technologies are treated in a worst case manner, others more realistically.
Suggestions for improvement
Data
TBA
Modelling
TBA

Also see https://github.com/quintel/etsource/pull/1293#issuecomment-314054130

This issue is solved by the implementation of the new network calculation, so closing.


Hyper doesn't print out any cookies.

Hello guys!
I am using the latest development version of Hyper. I have been trying for hours to be able to print out cookies from using Hyper adapt. I have created a code which looks like:
s = requests.session()
s.mount('https://', HTTP20Adapter()) #As soon as I comment this row (Meaning that this code will not be in use then it works with getting cookies) however as soon as you use this function then you will not receive any cookies
s.headers = OrderedDict()

url = 'https://github.com/'

headers = {
	'upgrade-insecure-requests': '1',
	'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36',
	'accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
	'accept-language': 'sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6'
}

r = s.get(url, headers=headers, timeout=5, verify=False)

print(r.cookies)

Which gives me a output of:
<RequestsCookieJar[]>
However if I change
r = s.get(url, to r = requests.get(url, then I do get output of
<RequestsCookieJar[<Cookie _octo=GH1.1.1584727450.1556359694 for .github.com/>, <Cookie logged_in=no for .github.com/>, , ]>
So the question is, why does it happen like this?

So after some quick digging, here is what I could pull up:
This line is where the cookies are extracted. The extract_cookies_to_jar function in requests is expecting 2 things:

That response has the attribute _original_response. The current implementation only gives an _original_response to response.raw.
That response._original_message.msg contains a list of tuples in the format (header, value).

The current implementation can be hacked in the following way to somewhat get the desired result:
        class FakeOriginalResponse(object):  # pragma: no cover
            def __init__(self, headers):
                self._headers = headers

            def get_all(self, name, default=None):
                values = []

                for n, v in self._headers:
                    if n.lower() == name.lower(): # changed n to n.lower() to be case insensitive
                        values.append(v)

                if not values:
                    return default

                return values

            def getheaders(self, name):
                return self.get_all(name, [])

        response.raw._original_response = orig = FakeOriginalResponse(None)
        orig.version = 20
        orig.status = resp.status
        orig.reason = resp.reason
        # use list comprehension to reformat the headers into a list of tuples.
        orig.msg = FakeOriginalResponse([(k,v) for k, v in response.headers.items()])

        # give response this _original_response attribute
        response._original_response = orig
        extract_cookies_to_jar(response.cookies, request, response)

With the above hack, the cookie jar gets one of the cookies:
<RequestsCookieJar[<Cookie _gh_sess=dE5H..572446 for github.com/>]>
I imagine it is not getting the other cookies due to the change in nature between HTTP/1.1 and HTTP/2.0, and so there should be persistence of cookies for a stream/connection to account for this potentially.


Create Extra Long Factorials Hackerrank

Closing Issue/Referencing Issue
issue reference (#)
Changes Made In Pull Request
*Extra long factorial hackerrank solution added

Thank you for responding


[Central] Search bar overlaps on medium screens

Issue:
Search bar overlaps with Game Creation on Medium sized devices:
Resolution:
Provide more granularity in formatting between sm md large devices
Small (No change required):

Medium (Change required):

Large (No change required):

Putting this in a comment because I can't get central up and running but it seems like the resizing of the elements in the toolbar at the top is based on a variable called isResolutionMobile which determines its state using the useMediaQuery function with "(max-width: 600px)" as input. To account for medium sizes it should be as simple as updating that input to be a larger screen width size, so something like "(max-width: 780px)" might work for what we need


Missing branch protection

We need to turn on branch protection before we hook up automation to a new provider. Otherwise we could stand up and merge bad PRs.

Branch protection added.


Problem with unused library functions

My name is Hernan; with a group of colleagues we are conducting a research about unused code present in dependencies of JavaScript projects. We call this functions, UFF (Unused foreign functions). We found that in most projects there exist a great amount of UFF that are being included in the final bundle.
In the case of angular-countdown (v 1.2.1) our tools detected approximately 856 unused function in dependencies. Removing those functions, the size of angular-countdown bundled could be reduced at least 57% (All tests passed). I’m attaching the reduced version of your project.
bundle(optimized).txt
I’ll be very grateful if you can answer me the following questions:
-Did you were aware of the existence of these unused functions in your projects?
-Do you think that this is a problem?
-Do you think that can be useful a tool for deal with this kind of problem?
Thanks in advance.
Cheers,

Thanks but I'm not interested. If you want to publish this tool as open source I'm sure people will make use of it but I'm not interested in answering survey questions about code slimming.


Improved error reporting on non-JSON payloads

When Communications.makeWebRequest(() fails with INVALID_HTTP_BODY_IN_NETWORK_RESPONSE, is there any way to repeat the call to extract any plain text error message for more helpful user feedback?

Requires a second separate call to Communications.makeWebRequest() with the :responseType changed from HTTP_RESPONSE_CONTENT_TYPE_JSON to HTTP_RESPONSE_CONTENT_TYPE_TEXT_PLAIN, so that any plain text error message can be read. If the problem is transient the second call may not provide the plaint text, but instead the originally desired JSON. So a second call is not a great method of extracting an error message. Further, the asynchronous call with callback function means the flow control gets awkward.


Update bot-framework-user-agent.md

Redirect to published point in our public docs.

@johnd-ms,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Is it possible to implement extended private/public keys?

The library https://github.com/paulmillr/scure-bip32/blob/main/index.ts implements extended keys where you can do hdkey.fromExtendedKey(master.publicExtendedKey).deriveChild(x)
I'm looking for this feature using ed25519 and found this nice hdkeys implementation: https://github.com/paulmillr/ed25519-keygen/blob/main/src/hdkey.ts it looks very similar to scure-bip32, I've tried porting over the code from scure-bip32 to use ed25519 but not to much success, so I figured I should just ask. Is this possible at all?

it may be possible
spec https://github.com/satoshilabs/slips/blob/master/slip-0010.md

That page says this:
Public parent key → public child key
This function always fails for ed25519 since normal derivation is not supported.
I'm looking to be able to derive from the public extended key so this seems to me like it won't be possible for ed25519?

seems like it

FYI non-hardened keys are not secure in terms of privacy.


Fixed #650 - Do not override securityDefinition "name" field with json key

Fixed #650 by changing loadSecurityDefintionsFromJsonFile() to return json keys instead of putting them in the "name" field.

As it turns out, this is a duplicate of https://github.com/kongchen/swagger-maven-plugin/pull/644


fix: casbin mysql adapter import error

Which changes (Bug/Feature):
Fixes casbin mysql adapter import error
Special notes for reviewers:
change casbin beego-orm-adapter change to v2

Codecov Report

Merging #114 (37bd58f) into v1.5.0-feat-app-refactor (574f23c) will not change coverage.
The diff coverage is n/a.

@@                   Coverage Diff                    @@
##           v1.5.0-feat-app-refactor    #114   +/-   ##
========================================================
  Coverage                      4.67%   4.67%
========================================================
  Files                            10      10
  Lines                          1454    1454
========================================================
  Hits                             68      68
  Misses                         1384    1384
  Partials                          2       2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 574f23c...37bd58f. Read the comment docs.

LGTM

casbin beego orm change to  pkg/beego-orm-adapter


Update ISSUE_TEMPLATE.md

what is the issue ?
Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'findbugs' not found.

find issue solution


Investigate how we can create unit tests 'pem'

Need to provide solutions which allow us to implement unit testing for pem. Try to use pem help as testing target. All solutions has to be added as comments.
Will used to verify bug #46 and accept #47.

@extsoft We can use framework shunit2(https://github.com/kward/shunit2)
Here is example of script for pem help testing:
#! /bin/bash

expectedResult=$(<testData.txt)

testPemHelp (){
    actualResult="$(pem help)"

    assertEquals "$expectedResult" "$actualResult"
}

. ~/shunit2/source/2.1/src/shunit2

Which gives such output:
testPemHelp

Ran 1 test.

OK

@extsoft We can use bats (https://github.com/sstephenson/bats)
Here is an example of script for exit code assertion:
#!/usr/bin/env bats
@test "testing 'pem help' command" {
  run pem help
  [ "$result" -eq 2 ]
}

To run test we need to invoke the bats interpreter with a path to a test file.
Example:
bats ~/my_project/test.bats

Which gives output:
bats test.bats
 ✓ testing 'pem help' command

1 test, 0 failures

@extsoft We can use framework bash_unit(https://github.com/pgrange/bash_unit)
Here is example of script for pem help testing:
#! /bin/bash

expectedResult=$(<~/pem/test/testData.txt)

testPemHelp (){
    actualResult="$(pem help)"

    assert_equals "$expectedResult" "$actualResult"
}

Which gives such output:
Running tests in ~/pem/test/test.sh
Running testPemHelp... SUCCESS ✓

@extsoft Another testing framework is provashell (https://github.com/danigiri/provashell)
To run the test we need to execute our script:
./test.sh

Here is an example of test for output assertion:
#!/bin/bash
#@Test
foo() {
    expectedResult=$(<testData.txt)
    actualResult="$(pem help)"
    assertEquals 'Output is not the same' "$expectedResult" "$actualResult"
}
. ./provashell

Which gives output:
provashell: Ran 1 of 1 tests

If test fails, we can see the error message which we add as a first argument after asserEquals.
Output is not the same
provashell: Ran 1 of 1 tests

In my opinion bats is better solution as it has several advantages over provashell.
Like special variables $status and $output, skip command, starting all tests inside a folder and so on. Bats also has a bigger team of contributors at GitHub.

In conclusion, I can say, that mainly shunit2 and bash_unit have similar functionality.
But shunit2 has against bash_unit:

Skipping tests
Suites

When the bash_unit has:

More friendly output of testing result.
Less complicated amount of assert functions.

So, if we need powerful complex tool - shunit2 our choice. If we need lightweight tool, it can be bash_unit.

@AntonKarabaza @ivan-podorozhnyi  we will use https://github.com/sstephenson/bats


Filtering subscription delivery based on the event payload

Hi
We previously discussed in #220 about filtering subscriptions at the field level using directives.  To achieve this in an efficient manner I am going to need to make some tweaks to the resolver.  I also have a number of other changes I wish to make, for example I will be adding optional callbacks that allow the resolver state to be used to determine if the operation should be aborted, instead of throwing exceptions.
I am not a fan of forking third party libraries because applying future bug fix patches can rapidly become a nightmare.
So my (ideal) plan is to make the required modifications by subclassing the service and/or other required classes.  My problem is that the way these classes are written they are not easily subclassable/customisable.
Would it be possible raise a feature request for the service classes able to be more easily inherited from?
For example:

make resolve function on the service::Object virtual
add protected data member getters (return const & non-const ref)

Thanks

Ok, here is how I have dealth with this.
Firstly I have added a new type:
struct DeliveryState : std::enable_shared_from_this<DeliveryState>
{
	virtual bool deliver() const
	{
		return true;
	}
};

and a since we need a new state for each delivery callback, there is a "factory" method for creating these objects
using SubscriptionDeliveryStateCallback = std::function<std::shared_ptr<DeliveryState>()>;
The callback held in the SubScriptionParams
struct SubscriptionParams
{
	SubscriptionDeliveryStateCallback createDeliveryState;
	std::shared_ptr<RequestState> state;
	peg::ast query;
	std::string operationName;
	response::Value variables;
};

This is then further stored in SubscriptionData
struct SubscriptionData : std::enable_shared_from_this<SubscriptionData>
{
        ...
	...
	...
	SubscriptionDeliveryStateCallback createDeliveryState;
};

Now inside the delivery loop, a new DeliveryState is created for each subscription using the factory function.   And it is set on the SelectionSetParams which are passed to the object resolver function
struct SelectionSetParams
{
	...
        ...
        ...
	const std::shared_ptr<DeliveryState>& deliveryState;
};

During the async lambda in the object resolver we capture the deliveryState from the SelectionSetParams and it can then be checked and we can early out of the loop
                        for (auto& child : children)
			{
				auto name = child.first;

				try
				{
					auto value = child.second.get();

					if (deliveryState && deliveryState->deliver() == false)
					{
						break;
					}

The deliveryState can then be passed into the subscription callback as an additional parameter, and after the evaluation of the std::future value, it can be checked to see if the deliveryState indicates that the data should be examined/delivered
void subCallback( const std::shared_ptr<DeliveryState>& state, std::future< Value > v )
{
     auto x = v.get();
     if( state->deliver() )
     {
         ....
     }
}

I'm sure there are 100 other better ways to do this, but I specifically need to avoid just throwing an exception since this will be filtering out subscription events, we can assume that 95% of the time it would throw an exception so this way makes the most sense to me.
Anyway if anyone else has a similar use case, here is an idea on how to implement it.

This is a follow-up to #220. Some of the suggestions there about throwing an exception to return an error from this field were based on the premise that you'd want to short-circuit evaluation of potentially expensive recursive resolvers, but it sounds like you're OK with evaluating the payload for the subscription, you just don't want to call the service::SubscriptionCallback.

The deliveryState can then be passed into the subscription callback as an additional parameter, and after the evaluation of the std::future value, it can be checked to see if the deliveryState indicates that the data should be examined/delivered
void subCallback( const std::shared_ptr<DeliveryState>& state, std::future< Value > v )
{
     auto x = v.get();
     if( state->deliver() )
     {
         ....
     }
}

Since you have evaluated the future at this point, the way I'd handle this would be to combine it with the service::SubscriptionCallback, possibly using a higher-order function to generate the filtering callback:
using DeliveryFilterCallback = std::function<bool(const response::Value&)>;

service::SubscriptionCallback createSubCallback(DeliveryFilterCallback&& filter, service::SubscriptionCallback&& callback)
{
	return [deliveryFilter = std::move(filter), maybeCallback = std::move(callback)](std::future<response::Value> payload)
	{
		// This would be a little simpler in v4.x. The SubscriptionCallback takes a response::Value instead of a
		// std::future<response::Value>, so we wouldn't need to resolve the future or re-wrap it in a promise
		// to call maybeCallback.
		auto value = payload.get();

		if (deliveryFilter(value))
		{
			std::promise<response::Value> promise;

			promise.set_value(std::move(value));
			maybeCallback(promise.get_future());
		}
	};
}

You could also embed more information in the service::RequestState, to make it available to both the resolvers (automatic) and your filter (by capturing it in your filter callback). For example, if you want to filter based on a regular expression, instead of embedding it in the query as a directive, you could make it a member of your service::RequestState sub-class. Then you could both short-circuit expensive recursive calls (if a field is nullable, it can return null instead of throwing an exception), and filter delivery based on the same member in the service::RequestState.


PR: Fix detection of conda and pyenv environments on Windows

@steff456, the detection of environments was failing on Windows due to some small issues. Please take a look at this PR to see if it looks ok for you.
@CAM-Gerlach, could you test if this works locally for you? Thanks!
TODO:

[ ] Remove skip condition for Windows on test.

@CAM-Gerlach, if you don't have conda in your PATH and you installed Anaconda in a non-standard location, the it won't be possible for Spyder to list your envs.
Is that the case for you?

Some additional info now that I've tried to sleep a little...
I thought it was intentional, but I'm also still experiencing #14136 where the status bar widget shows the full path, instead of just the env name, though it may be a side effect of whatever is resulting in these changes not working on my system. Other than that, and the ability to click the env name to get a popup to go to preferences, nothing else appears to be different (good or bad) with this PR, as I can still browse for envs, switch between them, start consoles in them, etc. but they are not autodetected).

Taking a quick look at the code, I don't see anything immediately obvious as to why; there are no spaces in my Miniconda path, it uses the default directory name, and contains conda which it looks like the code checks for. I also have all the new deps installed and no warnings on that.
Some potentially useful output in my default Spyder env, from within Spyder:

And outside of it:

Ok, I think we haven't added C:\Miniconda3 to the list of locations we search for the conda executable.
I'll do that in a bit so you can test again.

@ccordoba12 Sorry, your message didn't how up when I posted mine.
On Windows, conda is not added to the PATH by default; there is a non-default option for that in the installer but it warns strongly against it, so we shouldn't rely on this on that platform. I did install to C:/Miniconda3 via the conda installer instead of the default suggested path (as I did with C:/Anaconda3 before it) due to the conda installer warning me about the space in my username (chosen many, many years ago, before I knew better), but I've seen a significant fraction of other users on our issue tracker do the same, either to avoid spaces/special characters on their path that conda warned about, or for other reasons.
Instead of hardcoding C:/(Ana|Mini)conda or the default Anaconda/Miniconda install paths (which would only work for users who happen to choose that), the officially supported and most reliable way to get the path to the system's default Python install on Windows (Anaconda or otherwise) is with the py launcher that comes with Windows by default, which Anaconda/Miniconda automatically registers itself with as the default Python. Therefore, all you need to do is run the following command (works regardless of what env is activated), which I verified works on my system, to get the path to the Python in the base conda env; its parent directory on Windows is the Anaconda/Minconda directory
py -c "import sys;print(sys.executable)"

If for some reason you need a fallback to that, you could also simply check the sys.executable returned by Spyder's own copy of Python to get the base path to its Python install, either Anaconda/Miniconda, or its standalone Python (not sure what you do already in that case).
Speaking of which, I probably should test this using the Windows installer too? Where can I find that?

Ok, I think we haven't added C:\Miniconda3 to the list of locations we search for the conda executable.
I'll do that in a bit so you can test again.

That should already be in the search path...
spyder.utils.programs.py:107
elif WINDOWS:
    pyenv = [osp.join(home, '.pyenv', 'pyenv-win', 'bin')]

    a = [home, 'C:', osp.join('C:', 'ProgramData')]
    b = ['Anaconda3', 'Miniconda3']
    conda = [osp.join(*p, 'condabin') for p in itertools.product(a, b)]

    req_paths.extend(pyenv + conda)

Thanks @mrclary for your help! I ran that code locally and I think I found the error: C: needs to be C:\\ so it's joined correctly by osp.join.

Thanks @mrclary for your help! I ran that code locally and I think I found the error: C: needs to be C:\\ so it's joined correctly by osp.join.

Thanks @ccordoba12 for catching that! I'm sorry I missed it in the first place.

No worries. @CAM-Gerlach also helped me to found other thorny issues that we hadn't considered before. So the credit to make this one finally work goes to him too.


tutorial 1 count reporting incorrect

The reports files from tutorial 1 intermittently include incorrect count values.  In the case below, the outer-sync count appears to be random memory (uninitialized or corrupted), and the mpi-sync count is 19 instead of 20.  This was reproduced with SHA 8df243b.
Reports from tutorial 1 run on two nodes:
geopm 0.1.1+dev248g8df243b
Profile: ./tutorial_1
Region mpi-sync:
runtime (sec): 0
energy (joules): 0
frequency (%): 0
count: 19
Region outer-sync:
runtime (sec): 85.0606
energy (joules): 11733.6
frequency (%): 106.289
count: 1.84467e+19
geopm 0.1.1+dev248g8df243b
Profile: ./tutorial_1
Region mpi-sync:
runtime (sec): 0.18275
energy (joules): 21.3884
frequency (%): 107.692
count: 20
Region outer-sync:
runtime (sec): 85.0312
energy (joules): 11280.3
frequency (%): 106.254
count: 0

I have traced this back to commit 481ac6bb5754602d06929c424b490357c2b159b3.
Currently looking for a solution.

It is possible I am chasing a new bug and the behavior is not related. Looking into it.

This was indeed a different bug showing similar behavior. After fixing that one, this bug still reproduces.

This problem is fixed/invalid as of bdbfd22611253a6132cc41d88aa5ed3c2eb28fad.
We have changed the way MPI time is accounted for and reported. The tutorial logs are now correct.


Only two items and cannot set any color

Hello,
i love your work, really i do. I only need to use two menu items and i cannot set any background or icon color for that. Is there any solution for this?
Thank you so much.

"If there are fewer than three destinations, consider using tabs instead" https://material.google.com/components/bottom-navigation.html#bottom-navigation-usage

This is still a bug imo.
And you have the same issue for 3 menu items - the background colour is only applied when the private variable mIsShiftingMode is true (ok, there are a few more conditions...) and that only happens once you have 4 or more tabs...
mIsShiftingMode = mMaxFixedTabCount >= 0 && mMaxFixedTabCount < bottomBarItems.length;

A workaround for setting the background colour is to add this
mBottomBar.getBar().setBackgroundColor(ContextCompat.getColor(this, R.color.colorAccent));
after you have added the bottomBar and the menu items

It's not so constrained on versions 2.0 and up anymore.
See the readme


MM-44514: display correctly the emojis independently of the case (should work even if the user typed some capital cases)

Summary
Fully typed emoji that contains a capital letter fails to render as an emoji
Ticket Link
MM-44514
Release Note
Fully typed emoji that contains a capital letter are now correctly displayed

Hello @ismaaylSpiria,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

E2E tests not automatically triggered, because PR has no approval yet. Please ask a developer to review and then try again to attach the QA label.


Floating label not working on iPhone 6 + chrome

Just updated to 0.15.4 in the hope to fix this, but still the same.
If I test my app in browserstack on iPhone 6 + chrome the floating label stays in the field rendering over the user input, similar to previous bug reports.
I tried to open http://www.material-ui.com/#/components/text-field from browserstack to confirm it is not related to my app but the website menu is displayed over the content, so I cannot tell.
the label over the user input:

the website of material-ui not working properly through browserstack:

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.


New version: Hamburg v0.1.20

Registering package: Hamburg
Repository: https://github.com/oem/Hamburg.jl
Created by: @oem
Version: v0.1.20
Commit: a8b046f14e78d85a141fdb9e037d22f4cc927e5a
Git reference: HEAD

fixed the sequential version number issue, this however opened a new PR I am afraid. This one can please be closed in favor of the other one.


map get mixed up!

I imported a world recently and found that my main world is filled with chunks from other places in the same world so u can find a piece of building on a random spot. Any idea what's causing this? I imported the new world successfully tho. This has happened twice already.

I think this may be related to #423. I'm going to close this one (since that one has more activity) and this sounds identical. If it's not please comment here, otherwise, continue discussion on #423.


url path parameters

I'm new to this lib is it possible to have URL path parameters?
my backend in java is @Path("users/{username}")
in clojure I try like this, but not working

(defn fetch-user [username user pass]
  (http/get (url "users/:username")
            { :basic-auth [user pas]
              :headers {"Accept" "application/json"}
              :params {:username username}
              }))

If you mean query parameters (https://en.wikipedia.org/wiki/Query_string), you can use :query-params

not query parameters path parameter like in java @PathParam


feat(ci): add trufflehog secrets detection

What does this PR do?
Adding a GH action to scan for leaked secrets on each commit.
cc @rwightman

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


modifier keys (shift, ctrl...) should also work by themselves in input map

Generally games don't really care much about modifier keys other than just another button to press.  I'm asking for the ability to use Shift, Control, Alt, Meta, Function, Caps Lock as extra buttons  by themselves in Input Map. Right now they only work when modifying another key and not by themselves.

As I stated in #3552, this might be an OSX-only issue. I can successfully create input map actions with only a modifier key on Linux.

Indeed, it works fine here on Linux.

hmm strange it seems godot on osx (or on my system) only detects modifiers when thy are combined with another key

@akien-mga  @vnen  im trying to learn to build my own .  i got scons working i m just trying to figure out how to download the master and make a repo i got smartgit installed but i also can run git in the shell. im gonna try to build my own cause whenever im reporting bugs my godot is a bit older.
if you got any advice or suggestions please let me know. ideally i only need the osx source

@akien-mga  @vnen  i have just successfully compiled godot for osx 32 bit and this problem is still there.

hey guys i noticed something strange looking into my engine.cfg
i defined an ui_sneak function as Shift+Z
shows up as
ui_sneak=[key(Z,S)]
but if i put
ui_sneak=[key(S)]
shows up as S
how you make Shift show up by itself?
could you guys set your input map to Shift then lookinto the engine.cfg see what's written there?

[input]

test=[key(Shift)]

i don't see that. all my shifts get saved as [*,S] lemme try it

After further testing I conclude that modifier keys on my system (or OSX?) do not get detected by themselves until another key is pressed as well then they get detected. This seems to be the case everywhere in Godot Engine for me. Further testing reveals if manually inputed in the InputMap Shift does appear so is just my system that is not detecting it when pressed alone.

#4943 closes this issue


Sometimes unable to detach volume

As opposed to #431, which always fails in client/server mode, I've noticed that when running all-in-one, sometimes volumes still fail to detach. It's not clear to me why.
libStorage log indicates that DO thinks the volume isn't attached: https://gist.github.com/codenrhoden/afb1a4c84df42f66bc3f2dcd4482e3c2
The relevant part is:
ERRO[0367] POST https://api.digitalocean.com/v2/volumes/de89b811-f928-11e6-98b3-000f5339d321/actions: 422 Attachment not found  host=unix:///var/run/libstorage/374435422.sock instanceID=digitalocean=40481570,name=rexray1&region=sfo2 route=volumeDetach server=snapdragon-knight-fm service=digitalocean storageDriver=digitalocean task=0 time=1487795526319 tls=false txCR=1487795493 txID=ab3cb082-c83e-4381-5038-e695e110e8ba
But, listing volumes says it is attached:
[root@rexray1 ~]# rexray -l warn volume unmount rex1
ID  Name  Status  Size
FATA[0007] error unmounting volume                       error.status=500 volume=rex1
[root@rexray1 ~]# rexray -l warn volume ls --path
ID                                    Name  Status    Size  Path
de89b811-f928-11e6-98b3-000f5339d321  rex1  attached  1
[root@rexray1 ~]# rexray -l warn volume detach rex1
ID  Name  Status  Size
FATA[0035] error detaching volume                        error.status=500 volume=rex1
[root@rexray1 ~]# rexray -l warn volume ls
ID                                    Name  Status     Size
de89b811-f928-11e6-98b3-000f5339d321  rex1  attached   1

(previous calls to unmount and detach both results in that HTTP error 422 from DO about attachment not found)
The DO panel also shows the volume as attached:

So, maybe this is either a bug on the DO API side, or the fix for #431 will fix this as well.
rexray config:
rexray:
  logLevel: debug
libstorage:
  service: digitalocean
digitalocean:
  token: XXXXXX
  region: sfo2

I played this a bit more this morning, just to see if maybe things were hitting an error on the backend that is cleared up today.  With libS client and server on the same node, attach/detach seemed stable:
[root@rexray ~]# for x in {1..20}; do rexray volume attach rex; sleep 5; rexray volume detach rex; sleep 5; done
That ran without any errors
I then ran the following:
for x in {1..20}; do time rexray volume mount rex; sleep 5; time rexray volume unmount rex; echo $x; sleep 5; done
The first time I ran that, I got one timeout on attach attempt #5, but then I ran it a second time and it was fine. attach/detach times were consistent as well (not a lot of variance).
So I would say this is looking pretty stable today! This can probably be closed.  I'll try from a remote client next, to see if that attach/detach works (that will prove @protochron's point in #431 about the API choice not mattering).


Show the workspace configuration file when opening VS Code from workspace file

Testing #33278

Have a workspace configuration file on disk
Double click on it to open
VS Code opens the workspace which is good

It will be also good to show the file when the workspace is open. Also true when user drags and drop the workspace configuration file.

I am not sure I would agree, everytime you open a workspace like that you would see the workspace file very prominently. I think in most cases a user just wants to restore the state the workspace had before and not care about the contents.
Compare this to opening a folder today: would you want each time you open a folder to see an editor that shows you the metadata associated with that folder (e.g. settings)?

I thought about the folder argument and agree with yours too.
Actually now I can open the file in VS Code only from VS Code but not from outside easily.

Yeah you cannot drop the file into a window or pass it as argument from the command line to see it raw.

Closing "as designed", I think our current behaviour is good.


perf: no longer rely on jsx-ast-utils, reduce install size

It turns out that we are not using a lot of it, we could completely remove it to reduce the install size. Close #43
from

to

I think it is a very shortsighted decision to inline a dep to worry about something as inconsequential as "install size", especially for a dev tool where disk space is largely infinite and free.

While I generally agree your arguments about the "correctness" in #43, I can't agree your statement about "disk space is largely infinite and free."
Correctness is indeed important - we have tests to ensure that. But blindly don't care about both "install size" and "runtime cost" due to "correctness" is honestly a bit extreme. I would personally try to approach the best on both side - the code can be correct, efficient and small when giving enough care.
In this specific case, we are only using propName and elementType functions - which are simple and pure. The scope is pretty clear and I don't see any "shortsighted" fault it could introduce. Asking everybody to download extra 60MB for the code that is never used is much more irresponsible to me.

I would be happy to extract each of those to a separate package, rather than inlining the code here - would that help ensure implementations can be shared instead of vendored?

In total they are only 50 LoC, pure and well-scoped. Why do you think it's better to serve as separate packages? If so, what would be the difference from the already-inlined utils like isCreateElement or isFirstLetterCapitalized?

That way if there's any fixes, we can both benefit from them without having to remember to update the vendored copies here - same reason vendoring code is a bad practice.
If those already-inlined utils can be shared between jsx-ast-utils and this project, i'd be happy to extract those as well. The entire ecosystem benefits when well-tested code is maximally shared.

My concerns are:

Packages have overhead, both on installing and runtime resolving
Granularity is hard to balance for such utils. Either we go all-in-one like lodash, or we go one-function-package like is-string. The fromer is inefficient in downloading and init unrelated code, the latter is inefficient in having too much package overhead.
CJS/ESM interop can be a problem. For example, require('jsx-ast-utils/elementType') seems to be a scoped sub-entry import, but it's actually a one-line re-export from the entire package. In bundling, it bails out tree-shaking, and in runtime, it forces Node.js to initialize the entire package and its deps, despite we only need a pure function.

I am thinking of rewriting the whole project to use ESM and TS, step by step. And remove unused inline utils gradually (as we only care about formatting but many utils are checking the semantics).
If the shared packages can provide clean ESM for us to consume, I am happy to have it and collaborate. But even so, I guess the list of shared functions needs to wait until we do a few rounds of reactors and clean-ups to have a clear image of what we really need. In that regard, I think it's better to have them inline to iterate faster and extract them when we are settled.

In my experience package overhead is exceedingly minimal compared to all other concerns.
I'm not sure why the format of the package is relevant as long as it can be imported, which CJS can be.
Inlining as an interim step makes sense, but if we're in an interim step, why does install size or perf matter at all? That can be focused on once the functionality is complete.

The format matters because if jsx-ast-utils provides tree-shakable ESM, today I don't need to vendor it - I can just bundle what I need (those 50 LoC), keep the install size small while having a single source code base to maintain and share.
We are not in an interim step, we shipped 1.0 and ppl started migrating. We have people creating #43, which is a direct indicator that the install size matters. We want the first version to be 1:1 equivalent to make the migration easier, but on the other hand, we are just peeled from huge repos that we have many redundant and inefficient parts that we need to refactor. Many files/functions under packages/eslint-plugin-jsx/util are unused but it takes manual efforts to clean them and reduce the maintenance scope for the future.

CJS is tree-shakeable, and if you deep import the files you need from the package (regardless of format) then tree-shaking can't beat it (and can't achieve that anyways).
The install size would be largely addressed by using extracted packages.

The format matters because if jsx-ast-utils provides tree-shakable ESM, today I don't need to vendor it - I can just bundle what I need (those 50 LoC), keep the install size small while having a single source code base to maintain and share.

@antfu IMHO it is better to stick with the jsx-ast-utils, in case any future behavior changes.
If we bundle jsx-ast-utils directly, the final output size would be 72.6 KiB: bundlejs.com.
But if we alias all polyfills with nolyfill during the bundling, the final output size has reduced to 20 KiB: bundlejs.com

I'm fine with either bundling or inlining, the gains are massive in both cases. Inlining is easier and as I see it, the upsteam rarely changes, so it'll be low-maintenance.

CJS is tree-shakeable

To some extent, yes. But I think it's objective that ESM performs much better static analysis and tree-shaking. In this case, jsx-ast-utils/elementType is just not tree-shake very well.

Bundle and nolyfill

I have considered that option. nolyfill is a good way to do so, but I think the main thing is that those packages are not used at all for this project.

Sync manually with upstream

I don't think it going to be a lot of work, considering the scopes (propName and elementType) is pretty well-define and code is short. In the long term I am happy to work with @ljharb to extract as a shared and tree-shakeable utils lib if this is really a concern.

I have merged this for now to reduce the install size for the current users. I am open to discussions for a long-term solution.


add test for pragma version statement

pragma solidity ^0.4.0
pragma solidity 0.4.0

Additionally, this needs to be fixed:
[WARNING] At line: 1, column: 22 -> empty statement: There should be no character(s) before top-level declaration.

@tymat could you paste your code which caused this warning?

@duaraghav8
Any code that has pragma statement on the top.
pragma solidity ^0.4.2;

contract MyContract {

    address public myAddress;

    function MyContract() {
        myAddress = address(this);
    }
}

Oh my bad. I thought you were facing this problem due to some other reason. Thanks for bringing thisto my attention

Also adding that pragma statement should be at the top so therefore change importstatement rule as well, which otherwise throws:
[ERROR] At line: 3, column: 0 -> Import statement must be at the top of the file.

@elenadimitrova @tymat v0.2.0 solves the problems discussed above. But if something still doesn't work, please re-open


Validation of float8 and bfloat8 unit tests

Additional support/operators for Unit tests
Inclusion of f8 types in unit test parameters
Validation of unit tests on all platforms

Need to rebase on develop after PR #227 is in or vice versa


How to do sequence classification training ?

Describe the bug
I want to train a reward model using Easydel with sequence classification. The classifier has been implemented in the Flax sequence classifier classes for each model, but is there any way to load a model to directly with sequence classifier and train it
To Reproduce
Steps to reproduce the behavior

hi
that's not supported at the moment, but i guess ill support that in next 24 hour

I am also thinking of implementing Online DPO trainer with EasyDel, with a little bit of your support if you are interested.
It can be comparable with PPO as per paper from Deepmind, the biggest bottleneck I would be in generation of completitions during training.

Yes seems cool to me
If u needed any helps u can dm me in discord

@sparsh35 SequenceClassificationTrainer is added


#125 add period to filter

connect to #125

@romach resolve conflicts. please

@romach

FilterConverter: why getDefaultItemsPerPage is separate public method? Is it dead code?
FilterWrapperBuilder: it used only in tests, but placed in the production code. Is this correct?
DateTimeUtil: static methods still there, and no new issue about it. discussion
FilterConverterTest.java: placed in package wrapper instead of converter; contains unused import
EventMyBatisDaoDbTest uses  static methods of DateTimeUtil, same as 3.
EventDateReplacementDataSetLoader: you changed format, but didn't change comment described it. Can you explain why did you change format?

@vaa25

FilterConverter: why getDefaultItemsPerPage is separate public method? Is it dead code?

Yes, but this code is yours, should I fix it?

FilterWrapperBuilder: it used only in tests, but placed in the production code. Is this correct?

Will be fixed.

DateTimeUtil: static methods still there, and no new issue about it.

new issue will be created.

//todo will be added

FilterConverterTest.java: placed in package wrapper instead of converter; contains unused import

Will be fixed.

EventMyBatisDaoDbTest uses static methods of DateTimeUtil, same as 3.

new issue will be created.

//todo will be added

EventDateReplacementDataSetLoader: you changed format, but didn't change comment described it. Can you explain why did you change format?

Comment will be fixed. I have changed the format because in this test I receive current  time from database and set time to expected event in this method. So these times must have the same precision (milliseconds).

@romach 1) yes, please) Its very good if somebody thinks that his halfyear code is bullshit)

Fixed according to above comments.
@vaa25, @alex-anakin review me, please.

PASSED
@AndriyBaibak 10 min

@romach

Separate converters.xml context is redundant.
It isn't necessary to run application context in FilterConverterTest if you use mocks. Because running it is a very slow process. But one of the main advantages of the unit test is performance. You can use MockitoJUnitRunner instead SpringJUnit4ClassRunner.
I recommend to use self-explaining methods names instead comments (in class EventDateReplacementDataSetLoader).

@AndriyBaibak time tracking: 20 minutes spent

@alex-anakin

Separate converters.xml context is redundant.

converters.xml deleted

It isn't necessary to run application context in FilterConverterTest if you use mocks. Because running it is a very slow process. But one of the main advantages of the unit test is performance. You can use MockitoJUnitRunner instead SpringJUnit4ClassRunner.

MockitoJUnitRunner is used

I recommend to use self-explanatory methods names instead comments (in class EventDateReplacementDataSetLoader).

EventDateReplacementDataSetLoader refactored