Swagger-UI authorization headers stopped being sent in 2.8.0

I just updated from 2.7.0 to 2.8.0 and the authorization headers in Swagger-UI stopped working.
My config looks like this:
    @Bean
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
                .paths(PathSelectors.any())
                .build()
                .apiInfo(apiInfo())
                .securitySchemes(Collections.singletonList(new ApiKey(RestSecurityFilter.HTTP_REQUEST_API_KEY, RestSecurityFilter.HTTP_REQUEST_API_KEY, "header")))
                .useDefaultResponseMessages(false);
    }

Under 2.7, I enter the key:

And this is an example of the URL sent (with key starred out).  Note that it adds the key as a --header.
curl -X GET --header 'Accept: application/json' --header 'X-SEERAPI-Key: *************' 'https://api.seer.cancer.gov/rest/mph/groups'

If I only switch to the 2.8.0 release, I add the key the same way

But the call that swagger-ui makes does not include the header:
curl -X GET "https://seerapi-dev.imsweb.com/rest/mph/groups" -H "accept: application/json"

Is there additional configuration required for 2.8.0?  I didn't see anything in the release notes.
I also see an error at the bottom of the swagger ui page which says there is an error:
{
"schemaValidationMessages": [
{
"level": "error",
"message": "Can't read from file https://seerapi-dev.imsweb.com/v2/api-docs"
}
]
}

However that URL loads fine and I entered it in the online swagger editor and there were no warnings.
Are there migration changes to get from Swagger 2.7.0 to Swagger 2.8.0

@ctmay4 Thanks for the configuration. I'll try to see if I can reproduce

I have the same issue. Thanks

I have the same issue too. Thanks.

See here to: https://github.com/springfox/springfox/issues/2137
It works with 2.8 Springfox
My gear: Spring Boot + H2 db, oauth2 and Swagger 2.8
Here are all my Settings i hope someone make is a better solution of it.
		<dependency> 			<groupId>io.springfox</groupId> 			<artifactId>springfox-swagger2</artifactId> 			<version>2.8.0</version> 		</dependency> 		<dependency> 			<groupId>io.springfox</groupId> 			<artifactId>springfox-swagger-ui</artifactId> 			<version>2.8.0</version> 		</dependency> 		<dependency> 			<groupId>io.springfox</groupId> 			<artifactId>springfox-bean-validators</artifactId> 			<version>2.8.0</version> 		</dependency>
You dont need those but i think its better if you want to change is someday, so you only need to change the application.properties.
    @Value("${security.oauth2.client.clientId}")
    private String clientId;

    @Value("${security.oauth2.client.clientSecret}")
    private String clientSecret;

  @Bean
    public Docket api() {

        return new Docket(DocumentationType.SWAGGER_2)
                .select()
                    .apis(RequestHandlerSelectors.basePackage("com.bla.de.blub"))
                    .paths(PathSelectors.regex("/api.*"))
                    .build()
                .pathMapping("/")
                .securitySchemes(Arrays.asList(apiKey()))
                .securityContexts(Arrays.asList(securityContext()))
                .apiInfo(apiInfo());
    }

Thats the important part. If you use oauth2, your keyname has do be "Authorization" only!
    private ApiKey apiKey() {
        return new ApiKey("apiKey", "Authorization", "header");
    }

    private SecurityContext securityContext() {
        return SecurityContext.builder()
                .securityReferences(defaultAuth())
                .forPaths(PathSelectors.regex("/api.*"))
                .build();
    }

    private List<SecurityReference> defaultAuth() {
        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
        authorizationScopes[0] = authorizationScope;
        return Arrays.asList(new SecurityReference("apiKey", authorizationScopes));
    }

    @Bean
    public SecurityConfiguration security() {
        return SecurityConfigurationBuilder.builder()
                .clientId(clientId)
                .clientSecret(clientSecret)
                .realm("realm")
                .appName("test-app")
                .scopeSeparator(",")
                .additionalQueryStringParams(null)
                .useBasicAuthenticationWithAccessCodeGrant(false)
                .build();
    }

application.properties
security.oauth2.client.clientId=cliendid
security.oauth2.client.clientSecret=secret

So after you set everthing up, no comes the my stupid solution ^^
After you create a token it should look like this:
{"access_token":"d5660fa9-6d96-4c5b-af3b-feb6e312956c",
"token_type":"bearer","refresh_token":"acc17965-177b-4c15-afd8-f501e9f6164b",
"expires_in":3599,"scope":"read write trust"}

The tokentype is "bearer".
Enter this in your Swagger UI (notice that the "b" in bearer should be uppercase)

I notice that if you type Authorization: Bearer in the keyname of apiKey you get another ":" (colon).
Thats why i get an error, saying my token is invalid. But in fact my curl is wrong.
I hope anybody finde a better solution,

Thanks @JotaroJewstar

I resolved issue with missed authorization header by setting authorizations parameter in @ApiOperation annotation for all methods in my controller. @kasecato message helped me to check authorization settings.

@MaximAntonovich The security context in the configuration is supposed to help with that. If thats not working there seems to be a bug

Getting a 401 from swagger-resources/configuration/ui because the backend is behind a reverse proxy. which wants a bearer token in the auth header.

I've solved the problem only adding the annotation at my controller method:
@ApiOperation(value="Enviar um log para o servidor", authorizations=@Authorization(value="oauth2", scopes=@AuthorizationScope(description="write", scope="write")))
the "oauth2" value refers to the SwaggerConfig method I've declared:
@Bean
public SecurityScheme oauth() {
    return new OAuthBuilder()
            .name("oauth2")
            .grantTypes(grantTypes())
            .build();
}

private List<GrantType> grantTypes() {
    GrantType grantType = new ClientCredentialsGrant(authLink);
    List<GrantType> grantTypes =  new ArrayList<GrantType>();
    grantTypes.add(grantType);
    return grantTypes;
}

@Bean
public SecurityConfiguration securityInfo() {
    return new SecurityConfiguration("", "", "", "", "", ApiKeyVehicle.HEADER, "", " ");
}

I know the SecurityConfiguration is deprecated, I've changed it yet. However, worked for me...

But still, we can't send an Bearer Token for Basic Username:Password Auth, right?

That is correct. swagger-ui doesnt support basic authentication

Still facing the same issue. Is there any workaround for this ? The swagger-ui with 2.7.0 looks quite primitive compared to 2.8.0

The UI looks better, but the "try" button is disturbing me.
Now I need a second step to execute the statement....
Am 16. März 2018 09:55:50 MEZ schrieb balasenthil-d<EMAIL_ADDRESS>
Still facing the same issue. Is there any workaround for this ? The
swagger-ui with 2.7.0 looks quite primitive compared to 2.8.0
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/springfox/springfox/issues/2194#issuecomment-373645739

--
Mit freundlichen Grüßen
Martin Dünkelmann

@MartinX3 unfortunately that is not maintained by this project. It is the Swagger-ui project.
@balasenthil-d could you try with 2.8.1-SNAPSHOT I think its fixed.

@dilipkrish I tried 2.8.1-SNAPSHOT and I am not even able to load http://localhost:8080/swagger_ui.html. I used the same configuration as I had for 2.7.0.

@balasenthil-d that doesn't help me figure out what your configuration is in the first place. Ideally if you can share a repository I can see what is happening.

The solution mentioned by @ptheohar works. In addition you need to add authorizations to the needed APIs as in
@ApiOperation(value = "", authorizations = {             @Authorization(value="apiKey", scopes = {                     @AuthorizationScope(scope = "global", description = "accessEverything")             })     })
This will ensure the API needs to be authorized (as can be seen with lock icon) and would start sending out Authorization token.
The client_id, client_secret and realm can be null if you are adding the token manually.
This works in 2.8.0 itself and I believe this ticket can be closed.

Hi, Silly  question, but I cant find "SecurityConfigurationBuilder"...

Uh, Gradle was caching 2.7...

Just wanted to follow up that I have this working now.  As @balasenthil-d mentioned I used the template supplied by @ptheohar and also needed to add the following to every one of my endpoints.
@ApiOperation(value = "", authorizations = { @Authorization(value="apiKey") })

This was not required in the prior version and would have definitely been nice to have been able to set it as a default programmatically.
Thanks to everyone for their help getting this resolved.

here is what I did after reading the open API doc and it works

@OAS\SecurityScheme(
securityScheme="bearerAuth",
type="http",
scheme="bearer",
bearerFormat="JWT"

)

/////////////////////////////////////////
security={

      {"bearerAuth": {}}

    }

@kranthi610 what language is that in?

@dilipkrish Those are swagger annotations and I used them in php language

Hi All , is there a way to include for all methods by default instead of providing @ApiOperation to all the methods. And also am using restrepository resources so can need to include it by default.

You can provide a security context and security reference in the docket to the methods you want to protect @selvaebi

Below configuration works for me. I found to make Authorization header to pass in curl please make sure APIkey have name and keyname have same value like.
private ApiKey apiKey() {
    return new ApiKey("Authorization", "Authorization", "header");
}

Refer below code
public class SwaggerConfig extends WebMvcConfigurationSupport {
@Bean
public Docket productApi() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo())
.select().apis(RequestHandlerSelectors.basePackage("com.roche.platform.auth.controller"))
.paths(PathSelectors.any()).build()
.useDefaultResponseMessages(false)
.securitySchemes(Collections.singletonList(apiKey()))
.securityContexts(Collections.singletonList(securityContext()));
}
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
    .addResourceLocations("classpath:/META-INF/resources/webjars/");

}
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("Auth Microservice")
.description("Interface between services and UI")
.termsOfServiceUrl("Terms of Service")
.contact(new Contact("Test", "", "test@test.com"))
.license("License").licenseUrl("License Url").version("1.0").build();
}
private ApiKey apiKey() {
return new ApiKey("Authorization", "Authorization", "header");
}
private SecurityContext securityContext() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.any())
.build();
}
// Below method is to override Authorization header value
private List defaultAuth() {
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
return Arrays.asList(new SecurityReference("Authorization", authorizationScopes));
}
}

Thanks for sharing @sg-garg

A lot of the examples posted here and in the Springfox documentation felt too complicated for our use case, which is just to send a JSON Web Token and that's it. We don't have OAuth or cookies or anything. Here is a minimal config I found that works for us:
@Bean
public Docket jsonApi() {
    return new Docket(SWAGGER_2)
        .securitySchemes(singletonList(new ApiKey("JWT", AUTHORIZATION, HEADER.name())))
        .securityContexts(singletonList(
            SecurityContext.builder()
                .securityReferences(
                    singletonList(SecurityReference.builder()
                        .reference("JWT")
                        .scopes(new AuthorizationScope[0])
                        .build()
                    )
                )
                .build())
        )
        .select()
        .apis(RequestHandlerSelectors.basePackage(/* package here */))
        .build();
}

This will apply the header to every endpoint - you do not need to add any authorizations arguments. You also do not have to set up a security bean or a fake scope or anything, because that is only important for OAuth. See Swagger docs here: https://swagger.io/docs/specification/2-0/authentication/api-keys/
The user flow, then, is:

Open Swagger UI
Call the login endpoint
Copy the token from the response
Click the Authorize button
Type "Bearer " into the Authorization text box and then paste the token to complete the header
Now all subsequent requests will be authenticated

@kranthi610 has a good answer that got me on the right track, but I think it will only work in Open API 3.0. See https://swagger.io/docs/specification/authentication/bearer-authentication/

Thanks for the example. Can you provide a list of imports?

Hi @camdav sure, this should be all you need to create the bean.
import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;

import static io.swagger.models.auth.In.HEADER;
import static java.util.Collections.singletonList;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
import static springfox.documentation.spi.DocumentationType.SWAGGER_2;

Is it possible to set authorization header per class?
Just like this
@Api(value = "api/owners", authorizations = { @Authorization(SwaggerConfig.BEARER_API_KEY) })
...
public class OwnerController {
...

Why authorizations not work by using above solutions?

Connecting to swagger-ui now calls project root / and /csrf after adding above examples.
I'm not sure why csrf is being called as I have disabled in in my WebSecurityConfigurerAdapter#configure

Any body has complete code then please send me<EMAIL_ADDRESS>

@alisonatwork Thanks for your solution here. Is there a way to apply the header to specific endpoints only?

Hi @sen4ik I am not working on a service using Springfox any more so i cannot help directly with this, but I think one place you could start looking is the SecurityContextBuilder. In there it allows some filtering of only applying to some paths, which might solve your problem.

@alisonatwork Thanks for reply. I was able to figure it out. In case someone will need to restrict authentication to specific endpoints, here is my code.
`
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.securitySchemes(
singletonList(
new ApiKey("JWT", AUTHORIZATION, HEADER.name())
)
)
.securityContexts(
securityContext()
)
.select()
.apis(RequestHandlerSelectors.basePackage("com.sen4ik.oacapi.controllers"))
.paths(PathSelectors.any())
.build();
}
private List<SecurityReference> securityReference = singletonList(SecurityReference.builder()
        .reference("JWT")
        .scopes(new AuthorizationScope[0])
        .build()
);

private List<HttpMethod> methods = Arrays.asList(
        HttpMethod.POST,
        HttpMethod.PUT,
        HttpMethod.DELETE
);

private List<SecurityContext> securityContext() {
    List<SecurityContext> lsc = new ArrayList<>();

    lsc.add(SecurityContext.builder()
            .securityReferences(securityReference)
            .forPaths(PathSelectors.ant(Constants.API_PREFIX + "/category/**"))
            .forHttpMethods(Predicates.in(methods))
            .build()
    );

    lsc.add(SecurityContext.builder()
            .securityReferences(securityReference)
            .forPaths(PathSelectors.ant(Constants.API_PREFIX + "/tag/**"))
            .forHttpMethods(Predicates.in(methods))
            .build()
    );

    lsc.add(SecurityContext.builder()
            .securityReferences(securityReference)
            .forPaths(PathSelectors.ant(Constants.API_PREFIX + "/file/**"))
            .forHttpMethods(Predicates.in(methods))
            .build()
    );

    lsc.add(SecurityContext.builder()
            .securityReferences(securityReference)
            .forPaths(PathSelectors.ant(Constants.API_PREFIX + "/user/**"))
            .build()
    );

    return lsc;
}

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    if (enableSwagger) {
        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
}`


The layout at the time of code display may be broken

I can not see the code on the left side.

It became visible if the window size was reduced.

This is a bug that has been fixed recently in rustdoc: https://github.com/rust-lang/rust/pull/60032.

However the line numbers aren't correctly aligned. I need to fix that!

Ok. Thanks!

I will close it because it has been fixed.


Example pipeline for TRMM or GPM level 2 radar data

Source Dataset

Link to the website / online documentation for the data https://docserver.gesdisc.eosdis.nasa.gov/public/project/GPM/README.TRMM.pdf
The file format (e.g. netCDF, csv) HDF5
How are the source files organized? (e.g. one file per day) one file per orbit
How are the source files accessed (e.g. FTP) https

provide an example link if possible https://disc2.gesdisc.eosdis.nasa.gov/data/TRMM_L2/GPM_2APR.06/2015/091/2A.TRMM.PR.V8-20180516.20150401-S102735-E115838.098987.V06A.HDF5

Any special steps required to access the data (e.g. password required) NASA Earthdata Login

Transformation / Alignment / Merging

Output Dataset

See also #5

Challenge here is that the files have dimensions that change every orbit as the satellite captures an arbitrary number of scans.  @rabernat noted that this functionality may be added soon, but just putting this here as a placeholder.


XML for Select Query

Issue description
XML Structure for Select Query does not include  tags. These should be there in the structure to allow for Clumn Selection in the Select Query.
Should be similar to what is defined in the SAP PI Help Documentation.
Feedback Type (Optional)
incorrect statement
Page Title on SAP Help Portal (prefilled)
Payload and Operation
Page URL on SAP Help Portal (prefilled)
https://help.sap.com/docs/integration-suite/sap-integration-suite/payload-and-operation

Hi @varunr87
Thank you for your feedback. We will check and get back to you.

Hi @varunr87
Thanks for the feedback. We have enhanced the sample code with column selection example in Select query.
The updated content will be visible with the next SAP help portal refresh release.

72993


[ Tizen7.0 ] Include neuralnet.h in -dev header

Update the code to include neuralnet.h in -dev header.
Some applications, e.g., ReinforcementLearning uses forwarding and backwarding directly. To support it, this commit adds the header into dev package.

Self-evaluation:

Build test: [X]Passed [ ]Failed [ ]Skipped
Run test:   [X]Passed [ ]Failed [ ]Skipped

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2730. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


Bump dependency versions

Purpose

$Subject

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/3390544871

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/3390544871
Status: success


Providing full support for ACL, including role-based ACL

In the serializer, I use a straightforward way to add ACL into an parse object. It provides the low level management over the ACL, including adding role-based control and public readability control.
In order to send the following ACL through REST API
  {
    "8TOXdXf3tz": {
      "read": true
      "write": true
    },
    "role:Whole_Company": {
      "write": true
    },
    "*": {
      "read": true
    }
  }

Programmers need write this
    objectToSave.ParseACL = {
        raw : [
          {
            "id" : this.get('session.userId'),
            "permission" : {"read": true, "write": true}
          },
          {
            "id" : "role:Whole_Company",
            "permission" : {"write": true}
          },
          {
            "id" : "*",
            "permission" : {"read": true}
          }
        ]
      };

Any comment will be welcomed. I'll improve this according to your suggestions.
I'm currently developing a dashboard-like website based ember.js and parse

I like this.
Could you submit this PR to ember-parse-adapter? They don't have any support for ACLs. Also it needs tests.

I see, you are merging this repo back to clintjhill/ember-parse-adapter.
But they don't have blueprint for ember generate. I need some time to take a look

Hi @gcollazo , after looking into ember-parse-adapter, they don't have blueprint, and no 'session', hence I can't find things like 'session.isAuthenticated'.
Your repo looks better to me. I don't know how to migrate my project to theirs. Can you give me some suggestion?

I believe they support the session feature via ember-simple-auth-parse which is an optional addon. I will merge your PR here but I strongly suggest you make a contribution to ember-parse-adapter, so we can all benefit from it.

Sure, I'm planning to make some contribution there.
I found this repo joshfester/ember-parse-adapter
They implemented the ACL long time ago, including tests. It looks pretty good.
Here is the diff


Custom layer: trainable threshold

I attempt to build a 'ThresholdLayer' that changes input data to 0 and 1 depending on the threshold.
The threshold is a trainable Tensorflow Variable.
However I'm getting weird results, please help!
import pickle
import tensorflow as tf
import numpy as np
import keras
from keras.layers import Lambda
from keras import losses, activations, optimizers, initializers
from keras.models import *
from keras.engine.topology import Layer

sess = tf.Session()

with open(r'E:\VirtualDesktop\pandas\planet\pkl\predict.pkl', 'rb') as f:
    data = pickle.load(f)
with open(r'E:\VirtualDesktop\pandas\planet\pkl\geological_tags.pkl', 'rb') as f:
    target = pickle.load(f)
target = target[:data.shape[0]]
input_shape = data.shape[1:]
input_layer = Input(shape=input_shape)

threshold = tf.Variable(initial_value=0.2, trainable=True)
class ThresholdLayer(Layer):
    def __init__(self, **kwargs):
        super(ThresholdLayer, self).__init__(**kwargs)

    def build(self, input_shape):
        # Create a trainable weight variable for this layer.
        self.kernel = self.add_weight(name='threshold', shape=(1,), initializer=initializers.constant(0.2))
        super(ThresholdLayer, self).build(input_shape)  # Be sure to call this somewhere!

    def call(self, x):
        ge = tf.greater_equal(x, self.kernel)
        return tf.where(ge, x=tf.ones_like(x), y=tf.zeros_like(x))

    def compute_output_shape(self, input_shape):
        return input_shape

x = ThresholdLayer()(input_layer)

model = Model(inputs=input_layer, outputs=x)
model.compile(optimizer=optimizers.SGD(), loss=losses.MSE)

model.fit(data, target, batch_size=10, nb_epoch=1, verbose=True, shuffle=True)

print(sess.run(threshold))

I was thinking about trying to implementing something similar @zeka0, good job, this looks nice!
What kind of "weird results" where you getting? Did you find a solution?
I dont think this is an issue with keras. I would suggest some of the problem comes from the operation defined in ThresholdLayer.call :
y=0 if x<threshold, and
y=1 if x>=threshold,
which have a gradient = 0 for all threshold and infinite at the exact threshold value. This will probably makes the SGD unable to optimize the threshold with respect to MSE?
What about using an extreme Sigmoid function (S) like:
S(C[x-threshold]),
where C is a large constant. For example like this:
`import numpy as np
import tensorflow.keras as keras
import tensorflow as tf
np.random.seed(seed=1)
tf.set_random_seed(seed=1)
true_cutoff = 0.2
n=10000
rand_window = 0.05
generate random number
x = np.random.rand(n).reshape(-1,1)
y = ((x+np.random.rand(n).reshape(-1,1)2rand_window-rand_window )>=true_cutoff)*1
input_layer = keras.Input(shape=(1,))
threshold layer
class ThresholdLayer(keras.layers.Layer):
def init(self, **kwargs):
super(ThresholdLayer, self).init(**kwargs)
def build(self, input_shape):
    self.kernel = self.add_weight(name='threshold', shape=(1,), initializer='uniform',
                                  trainable=True)
    super(ThresholdLayer, self).build(input_shape)

def call(self, x):
    return keras.backend.sigmoid(100*(x-self.kernel))

def compute_output_shape(self, input_shape):
    return input_shape

out = ThresholdLayer()(input_layer)
model = keras.Model(inputs=input_layer, outputs=out)
model.compile(optimizer='sgd', loss='mse')
model.fit(x, y, epochs=5)
model.get_weights()`
which in my case resulted in a threshold equal to 0.21047172 while the true threshold is 0.2.
Probably better ways to do this, would love to see other suggestions!

because you include randomness into y there is overlap as show in above plot. Therefore your result threshold not equal to true threshold. Below will get 0.20008925. Thanks for your code!
import numpy as np
import tensorflow.keras as keras
import tensorflow as tf

np.random.seed(seed=1)
tf.set_random_seed(seed=1)
true_cutoff = 0.2
n=10000
x = np.random.rand(n).reshape(-1,1)
y = x>=true_cutoff

input_layer = keras.Input(shape=(1,))
class ThresholdLayer(keras.layers.Layer):
    def __init__(self, **kwargs):
        super(ThresholdLayer, self).__init__(**kwargs)

    def build(self, input_shape):
        self.kernel = self.add_weight(name="threshold", shape=(1,), initializer="uniform",
                                      trainable=True)
        super(ThresholdLayer, self).build(input_shape)

    def call(self, x):
        return keras.backend.sigmoid(100*(x-self.kernel))

    def compute_output_shape(self, input_shape):
        return input_shape
out = ThresholdLayer()(input_layer)
model = keras.Model(inputs=input_layer, outputs=out)
model.compile(optimizer="sgd", loss="mse")

model.fit(x, y, epochs=5)
model.get_weights()


It need to click block area twice to cancel selected-element

FIX https://github.com/idrawjs/idraw/pull/99


Update Functions Host v2 to 2.0.13616

Please hold on and don't merge this yet. Still fixing a pipeline issue.

Yep, the pipeline is good now. 🚢


Training Rules Update - Data Order

WG decided today that this is good to merge.  We'll merge once we resolve the CLA issues.

recheck


no-unused-variable: don't crash at destructuring

PR checklist

[x] Addresses an existing issue: #2876, #3001
[x] New feature, bugfix, or enhancement

[x] Includes tests

[ ] Documentation update

Overview of change:
Avoid typescript crash when trying to get type of destructured variable declaration.
Also avoid walking the AST multiple times when --declaration is not enabled. That should result in better performance and fewer false negatives.
[bugfix] no-unused-variable fixed crash when using destructuring
Fixes: #2876
Fixes: #3001
Is there anything you'd like reviewers to focus on?

CHANGELOG.md entry:

Hi, we would love to get this fix. Any idea when we can expect it to make its way into a release?

@pelotom we'll try to release v5.6.0 this week. in the meantime you can grab the latest commit from master


The Travis-CI build is passing but should fail

Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

[x] I am running the latest version
[x] I checked to make sure that this issue has not already been filed

Expected Behavior
the travis build should fail as many of the tests are failing.

Current Behavior
What is the current behavior?
The travis-CI build should be failing as many of the tests are failing still the build passes.
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Go to link: https://travis-ci.com/scorelab/fact-Bounty/builds/145793526
working on this!

PR #518 refered to this issue


Openssl 3.x makes ArchWSL corrupt

Describe the issue
Installing openssl 3.x will make ArchWSL corrupt.
This package is a dependency of base-devel(base-devel -> sudo -> openssl), which is required to build an AUR.
To Reproduce
$ sudo pacman -Sy openssl
Packages (1) openssl-3.0.7-2
[===installing===]

$ pacman
pacman: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Enviroment:

Windows build number: 10.0.22621.819
Security Software: Windows Defender
WSL version 1/2: WSL2
ArchWSL version: <IP_ADDRESS>
ArchWSL Installer type: appx
Launcher version: 22020900

That's not beacuse of ArchWSL, that's just the consequences of a partial update.
openssl updated and a lot of things along with it, which now expect the new version.
Either download the libcrypto.so.1.1 and temporarily place it in /usr/lib manually, or, if available, install an older version cached by pacman and update all relevant packages at once

Acctually, I was encountered this issue when installing base-devel, which carries pacman, sudo, and some other base-level packages depends on openssl, so it's not a partial update. And most important, after pacman finishes installing openssl, all post-transaction were failed because they cannot found libcrypto.so.1.1, also validates this is not be a partial update issue.
Btw, I tested sudo 1.9.12p1-1 on an Arch VM, it works well with libcrypto.so.3.

Test again with a fresh installed ArchWSL:
$ sudo pacman -Sy sudo
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
resolving dependencies...
looking for conflicting packages...

Packages (2) openssl-3.0.7-2  sudo-1.9.12.p1-1

Total Download Size:    6.79 MiB
Total Installed Size:  17.79 MiB
Net Upgrade Size:       3.46 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 sudo-1.9.12.p1-1-x86_64                  1765.2 KiB  3.08 MiB/s 00:01 [#######################################] 100% openssl-3.0.7-2-x86_64                      5.1 MiB  4.06 MiB/s 00:01 [#######################################] 100% Total (2/2)                                 6.8 MiB  5.23 MiB/s 00:01 [#######################################] 100%
(2/2) checking keys in keyring                                         [#######################################] 100%
(2/2) checking package integrity                                       [#######################################] 100%
(2/2) loading package files                                            [#######################################] 100%
(2/2) checking for file conflicts                                      [#######################################] 100%
:: Processing package changes...
(1/2) upgrading openssl                                                [#######################################] 100%
(2/2) upgrading sudo                                                   [#######################################] 100%
ldconfig: Can't link /usr/lib/wsl/lib/libnvoptix_loader.so.1 to libnvoptix.so.1
ldconfig: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link

:: Running post-transaction hooks...
(1/3) Reloading system manager configuration...
systemd-detect-virt: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
  Skipped: Current root is not booted.
(2/3) Creating temporary files...
/usr/bin/systemd-tmpfiles: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
error: command failed to execute correctly
(3/3) Arming ConditionNeedsUpdate...

What you showed is just updating openssl, after which the things dependant on openssl 1.1 break, since you just uninstalled that.
A full system update pacman -Syu should fix this.

I think it is a partial update, you've just updated openssl by running pacmam with -Sy but other packages depending on openssl were not updated, so the shared library dependencies were broken.
If pacman and sudo also broken, you may login as root (maybe with wsl.exe -d Arch -u root) and download pacman-static manually as a workaround
wget https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/pacman-static
chmod a+x pacman-static
./pacman-static -Syu

or install openssl-1.1 first and then pacman -Syu.
Always remember:

In practice, do not run pacman -Sy package_name instead of pacman -Syu package_name, as this could lead to dependency issues.^1

@horror-proton You're right, -Syu do fix this.  So I bearly using -Syu on ArchWSL. I see ArchWSL is stable now. Appreciate ur help.


header-line should not inherit mode-line

If we ever customize mode-line via face-remapping-alist, the head-line will be affected too.
I don't see the reason why we make one depends on other, this will limited the ability to customize face.
Also, mini-modeline is also affected from this https://github.com/kiennq/emacs-mini-modeline/issues/31
Is it good if I can provide a PR to separate head-line and mode-line face?

Yes! Thanks a lot man. Sorry for the late reply, I've had a couple of busy days.


Add support for DartNativeExternalTypedData to enable zero-copy buffers

Since there is already an impl for Vec<u8> I'm not sure of a good way to add this zero-copy approach to into_dart without it conflicting with the existing copy approach so I've just included a working example below. For now we're doing the work shown in application code and passing the resulting DartCObject to isolate.post() and it works well. This PR adds the necessary types to enable that.
The Dart VM exposes both the DartNativeTypedData and the DartNativeExternalTypedData as a Uint8List but in the DartNativeExternalTypedData case the finalizer calls the provided callback to deallocate.
The implementation that sends a zero copy mutable buffer to Dart looks like this:
impl IntoDart for Vec<u8> {
    fn into_dart(mut self) -> DartCObject {
        self.shrink_to_fit();
        let length = self.len();
        assert!(length == self.capacity());
        let ptr = self.as_mut_ptr();
        std::mem::forget(self);

        DartCObject {
            ty: DartCObjectType::DartExternalTypedData,
            value: DartCObjectValue {
                as_external_typed_data: DartNativeExternalTypedData {
                    ty: DartTypedDataType::Uint8,
                    length: length as isize,
                    data: ptr,
                    peer: ptr,
                    callback: deallocate_rust_buffer,
                },
            },
        }
    }
}

For reference, we've been doing some experiments with Rust -> Flutter on embedded systems. Avoiding a buffer copy is more performant in some cases, and also enables zero-copy serialization approaches such as flat_buffers, capnproto, etc. At a large enough buffer size, doing a full copy using DartNativeTypedData will block the receiving isolate, and if that happens to be the main isolate, drop frames.
We're still doing some experiments to see just how effective this approach is, but the idea is to enable transmitting data from Rust -> Dart in a way that makes frame drops unlikely.

That's really really interesting for me too, I guess we can swap the current Vec<u8> implementation with this new one and release it under v0.2.0-beta version or something and test it out in our applications.
Another approach is to create a wrapper type over anything that can be converted Into<Vec<u8> à la ZeroCopyBuffer and that way we don't introduce any breaking changes and update the docs with an example.
In my opinion the second approach is better and maybe in the future like when releasing a v0.2 we can make it the default.
My current use case for this that I'm building something that uses ProtocolBuffers as Request Response approach, instead of calling a lot of FFI functions in both languages.
I would like to see if we could work on the ZeroCopyBuffer First with a nice API around it.

That looks good so far, thank you @jerel.
Could you please fix the lints too?

Ok it sounds that it is something with CI uses nightly, which uses different rules for formatting.
Let me know if it is now ready, I will merge and fix the lints issue after that.
And then we would release a new version to crates.io

@shekohex ah, ok. I was surprised that CI failed this last time because I ran clippy and fmt locally. Yes, it's ready as far as I'm concerned.

Thanks, Merged 🎉

Available now since v0.1.9.
Thanks, everyone!


Add example for running remark with lint plugin

Specifies that using remarkrc lint plugin does not require -u flag

Did not change the .remarkrc example as getting the same output in both examples makes it clearer that these do the same thing - IMO.

I'm on mobile, but I think the extra line is failing travis!

Yeah, I just pushed the fix.

Thanks, I’m reviewing it as we speak!

Thanks! I included a tiny change to the .remarkrc too, so that it actually affect the output. Great work! :+1:


feat(i18n-jsx): migrate data store from context to redux

BREAKING CHANGE:
Component public API has changed - HOCs now follow react-redux style of
withHOC(selectorFunction)(component)
Instead of providing context value in form of object / selector for object, we now use selector function that is used to pick values from redux store.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Choose the command that is triggered when ctrl-click is pressed in the code editor

Is your feature request related to a problem? Please describe.
When I use VS Code with a .NET/C# project, and when I want to navigate in the source code, I want to be able to easily navigate to a method implementation. For this it seems natural to press CTRL+Click, but it triggers the Go to Definition command.
Right now there is no way how to go to the implementation with the mouse...
This seems to be a strange decision to use Go to Definition as the default action on Ctrl+click. In the majority of the scenarios, developers want to navigate to the implementation of a type/method.
I think it would be so nice to have an option in the settings to select the default behavior.
Describe the solution you would like
In the settings of OmniSharp:

Add a dropdown "Ctrl+click command" with the following options

goToDefinitions (default?)
goToImplementations

no one? 😢

This would be a request for Microsoft/vscode as the Ctrl+click behavior is owned by the Editor itself.


How to accelerate training speed?

I have a lot of videos to process, so I would like to inquire about how to speed up the training? Reducing a certain level of performance is acceptable. Thank you a lot!

Thank you for your question. You may consider reducing the number of samples on a ray (--num_samples_ray), setting --use_affine to False, or downsampling your videos to smaller resolutions.
Alternatively, depending on the specific tasks you are thinking about, other works might be useful too. You may consider feedforward approaches for dense and long-range tracking that don't require per-video optimization and thus are much faster, like TAPIR (https://deepmind-tapir.github.io/) and CoTracker (https://co-tracker.github.io/)


Why did you have to disable automatic updates

From the newsletter:

We had to disable automatic updates for the beta

Why? Just curious.

@zeke to be really honest, I don't now why I disabled it 😛 It was 4 am and we're excited to ship it and I thought that it was better to disable it. For some reason, I didn't want people to replace their current Kap.app with the beta one, so I thought it was better to disable it and say you'll have to download the final version again when it's out ¯_(ツ)_/¯
We'll release the 0.3.0 tomorrow and we'll make sure to let you know! 😄 🙌

Cool. Just wanted to make sure it wasn't something upstream.

Thanks for your concern ❤


Fvk dbt dcpy utils

Small function to add a dataset to a dbt project with our norms. Don't want to iterate on this now or implement anything else, but think it's small and isolated enough that maybe it'd be fine to just merge, so that anyone else could iterate if they'd like at some point?

Excited to see dbt utils :) 2 nits:

would be nice to validate whether a dataset is already present in sources/staging yaml files
a lil test to confirm it works

Excited to see dbt utils :) 2 nits:

would be nice to validate whether a dataset is already present in sources/staging yaml files before adding it to the list. If it, probably want to abort it to avoid duplication?
a lil test to confirm the functionality works

I'm gonna push back on both fronts

with it being a sort of silly little cli util at the moment, I'd prefer we keep the behavior simple and predictable - just add something to these files - and put the onus on the user to use appropriately
again with it currently being a silly little cli call, I'd rather not implement a test for what could be a moving target

Let's at least add a TODO docstring/comment that tests are needed. That way, we set expectations about usage of this code in the future: if someone attempts to use it, they are aware to test it extensively. Given how much we are adding/changing, I think there is a risk of accumulating a significant chunk of untested codebase, and having some sort of a todo note would be helpful.


[Migrated] Zappa update fails with "import pip" command

Originally from: https://github.com/Miserlou/Zappa/issues/1446 by iwitaly
I use Gitlab CI for updating my Zappa app with the following script.
  - export PIPENV_VENV_IN_PROJECT=true
  - pip install pipenv
  - pipenv install
  - export VIRTUAL_ENV=.venv/
  - export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_DEV
  - export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_DEV
  - export ENVIRONMENT=dev
  - pipenv run python manage.py migrate --settings=admin_dashboard.settings.dev
  - pipenv run zappa update dev

I also use lambci/lambda:build-python3.6 as a base image.
Until today all updates were good, but today I've got this error

What could that mean?

old migrated issue, considered resolved.
closing.


undefined tunny function

when attempting to build with go1.12.14 I get
pre_commit.go:102:15: undefined: tunny.CreatePoolGeneric

It should be noted that while this function does exist in the version of tunny specified by glide it no longer exists in the current version of tunny. I'm not suggesting that's the bug (it does exist in what glide pulled down). I'm suggesting that if you're going to poke it anyway, you may want to update to the latest tunny API.

@masukomi: Thanks for the report! I'll check this out tomorrow and see how easy it is to update to a newer version of tunny.


Add php 8.3 with Alpine 3.20

Usabilla PHP Docker Template
Reviewers: @usabilla/oss-docker
Type
Please specify the type of changes being proposed:

Q
A

Documentation?
no

Dockerfile change?
no

Build feature?
yes

Apply CVE Patch?
no

Remove CVE Patch?
no

Changelog

Please make sure you have checked our Contributing guidelines

Looks like we need a rebase to get the new workflow update

Some other small changes were needed, since the GHA pipelines were fixed due to some dependency deprecations. Let me know if you prefer me to split this PR :)


get vm info does not work

Describe the bug
tf-grid-cli  get vm examplevm
command does not work same issue for k8s

steps to produce :

install grid cli and download the latest binary
deploy a vm
try to get the vm info

Verified,
Get contract is working fine with no error now.


Make QBE queries paramaterizable

As a Java developer, I don’t want to build JSON or XML QBEs as strings. String assembly in Java is difficult to write, difficult to read, and thus error prone. Ad hoc queries are handy in development and for quick examples, but as soon as you get to a real application, you want to lock down the particular queries and only provide parameters at runtime, sanitized for injection attacks. QBE should support this.

This feature might be best implemented in the REST API:

A configuration service along the lines of /v1/config/query converts the parameterized QBE
to a parameterized JSON or XML serialization of a cts:query and persists it on the server.

A query along the lines of /v1/semantics/sparql passes value bindings
for the parameter placeholders.

Benefits:

Clients of all stripes get consistent templating of QBE.
We can get some performance benefits by skipping the QBE conversion to cts:query.
REST adminstrators can encourage applications with predictable performance by persisting queries.

Bonus points:

Also save a search:query as a parameterized cts:query
Persist queries as modules instead of documents so the query is in the module cache

One footnote:  the principle of persisting parameterized queries and supplying the value bindings in requests would apply not only to cts:query but also to SPARQL, SQL, and Optic queries.

Unless we're registering them like registered query, what's the advantage of persisting?


Added transaltions for hindi language

#47

@cedricve can you take a look at my PR please.

Impressive! can't read it but trust it will be good! I'll add Hindi to the language selector once approved. Thank you so much @fadkeabhi


Bug: Battery Plugins stays in 'AC' even if the laptop if on battery

Describe the bug
Hey ! First of all, thank you for taking the time to forked this repo and tweaks it to use Kanagawa theme, I love this theme. I have a weird issue on the battery plugin, it always stays on ♥ AC even tho the laptop is on battery... I know this is only a fork but I was wondering if you know something about this bug.
System
Here is my tmux.conf
# Make colors inside tmux look the same as outside of tmux
# see https://github.com/tmux/tmux/issues/696
# see https://stackoverflow.com/a/41786092
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'Nybkox/tmux-kanagawa'

# kanagawa-theme setup
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, krbtgt, playerctl, kubernetes-context, synchronize-panes
set -g @kanagawa-theme 'dragon'
set -g @kanagawa-plugins "ssh-session cpu-usage ram-usage battery time"
set -g @kanagawa-ignore-window-colors true
set -g @kanagawa-show-powerline true

# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, `window`, or any character.
set -g @kanagawa-show-left-icon hostname

# Datetime
set -g @kanagawa-show-timezone false
set -g @kanagawa-day-month true
set -g @kanagawa-show-flags true

set -g @kanagawa-cpu-usage-label "\uf4bc"
set -g @kanagawa-ram-usage-label "\uec19"
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

Thank you for your time

Okay I have fixed my issue lol. I just used the master branch version of battery.sh from the dracula/tmux repo

@joncvn, could you create a PR with a fix?

@joncvn, could you create a PR with the fix?

I have just create the PR, thanks for your reply


Port code from the HA integration

I'm not sure if you're aware, but the implementation of the Roborock API that @rovo89 managed to create has been utilized for a Home Assistant integration that has progressed quite far already.
I'm sure the code there could help you to develop this adapter:
https://github.com/humbertogontijo/homeassistant-roborock

I wasn't aware of it, but it's great to see that it's more than a proof of concept now. 😊
From a software architecture and reusability point of view, I think it would make sense to package the low level API (basically the code from the Gist) into an npm package, and maybe even have another package with a higher-level API. Problem: I haven't done anything with Node.js/npm before, so I have to research how to do that 😂
I thought maybe something could be extracted back from HA, but it's Python. Same thoughts there, but I'd concentrate on Node.js first.
I think the python code will be useful to understand the API calls/usage, especially the complicated ones for the map.

Thanks so much for the API decompilation BTW, glad to see that you're aware of how excited so many people are about it. Not being forced to use the Xiaomi Home app anymore is a revolution for so many people.
If you're looking for your next decompilation challenge, the front video camera would be a good candidate:
https://github.com/humbertogontijo/homeassistant-roborock/issues/9


[Backend] Track Privacy Experience that surfaced Notices/ Pull data from request headers

❗ Contains migration
❗ Dependent on #3292
Closes #3133
Closes #3196
Description Of Changes
Start tracking additional fields when saving consent preferences to demonstrate compliance and move some of the existing fields from the request body to extract from request headers.
Code Changes
Start tracking new fields:

PrivacyPreferenceHistory.anonymized_ip_address which is really a truncated version of the ip address and stored encrypted
PrivacyPreferenceHistory.method - The method of consent preference in a modal (buttons, individual notices)
PrivacyPreferenceHistory.privacy_experience_config_history_id - the particular version of the Config that surfaced the notice (contains the copy)
PrivacyPreferenceHistory.privacy_experience_history_id - the particular Experience - contains the region, type, and delivery mechanism
Starts surfacing these new fields in the historical report

Start pulling some fields off of request headers or experience themselves:

request_origin (privacy center/overlay now comes off of the experience)
user_agent now comes off of request headers
url_recorded is now retrieved from the Referer header
privacy_experience_config_history_id is pulled off of the experience if applicable

Bug fix:

Fixes saving preferences with for users under a fides user device id - bug where uniqueness constraint was being violated

Steps to Confirm
In the postman collection

[ ] Save some notices POST {{host}}/privacy-notice
[ ] Save a preference for those notices PATCH {{host}}/privacy-preferences

Verify method, experience_config_history_id and privacy_experience_history can be passed in now

[ ] Get historical privacy preferences GET {{host}}/historical-privacy-preferences

[ ] Verify truncated ip address is in the response

Pre-Merge Checklist

[ ] All CI Pipelines Succeeded
Documentation:

[ ] documentation complete, PR opened in fidesdocs
[ ] documentation issue created in fidesdocs

[ ] Issue Requirements are Met
[ ] Relevant Follow-Up Issues Created
[ ] Update CHANGELOG.md
[ ] For API changes, the Postman collection has been updated

got it, thanks for the payload, that's helpful! I think I'm a little behind on this, but just to state my understanding:

Currently, the privacy center sends a PATCH to /consent-request/{id}/preferences. This endpoint is being deprecated
We will switch, with the migration to start using privacy notices, the privacy center to PATCH to /consent-request/{id}/privacy-preferences instead and that endpoint will expect the payload you provided above
And fides-js will do the same thing as step 2 here (since it was never using the deprecated endpoint)

does that sound right?

@allisonking yes! both payloads for both the privacy center and the components for saving preferences are intended to be similar, although the privacy center additionally may have a code in it, if it's the verified identity  workflow


Is there an additional '.'?

Sandcastle example:
Browser:
Operating System:

Is there an additional '.' ?
https://cesium.com/learn/3d-tiling/on-prem/on-prem-3d-buildings/#available-options

I misunderstood

I misunderstood


feat(nip-64): Display Chess (PGN) messages

Summary
In order for NIP-64 to be approved, it needs to be implemented in two clients.
Would Primal be interested in displaying kind := 64 as chess board in the web interface?
The spec is quite simple and straightforward–so it should be rather easy.
It would need to include a dependency on a library capable of drawing chess boards.
Please, let me know :pray:
Basic example
NIP-64: https://github.com/theborakompanioni/nips/blob/nip-64/64.md
Website: https://jesterui.github.io/nip64/
Motivation
See above: In order to get NIP-64 approved, make chess players and enthusiasts happy. The expected outcome is to bring a whole new and wide audience to Primal.

Update: NIP-64 has been merged :muscle:


CMake install question

Hi,
When I build the project with CMake for both Release and Debug configuration, only one lib file is created and both files tinyxml2-static-targets-release.cmake and tinyxml2-static-targets-debug.cmake point to this one lib file ${_IMPORT_PREFIX}/lib/tinyxml2.lib. Obviously the lib files for release and debug configuration are different.
I wonder if I have to change CMakeLists.txt file to use CMAKE_DEBUG_POSTFIX and change tinyxml2-static-targets-debug.cmake file to be able to use release and debug version of the Tinyxml2 lib?

Fixed it with giving cmake "-DCMAKE_DEBUG_POSTFIX=d" option.

I always recommend just including the tinyxml2.cpp/h file in your source code / build to avoid these sorts of issues.


organized_code

I Organized the code of Dashboard, because Whenever other contributor want to contribute new feature then he/she have to repeat code of header, footer, navbar and modal.
Solution: I break the code of Explore/index.php file into header.php, footer.php, navbar.php, modals.php files which is present in      components/common folder.
fixes #59
Here is the demonstrated video :
https://user-images.githubusercontent.com/63240102/113553207-08242c00-9615-11eb-8273-3e69f7156d6b.mp4

@sakshi300699 mam, Here is screenshot of footer.php file

@asmitsirohi Shouldn't the footer code be in this file?

@sakshi300699 mam, Actually there is no code for footer is present in Explore/index.php file. I just created footer.php for future reference.

It showing "This branch has conflicts that must be resolved", Can you please specify me what is the conflict.

@asmitsirohi  Check the conflicted files mentioned. Explore/index.php file

@sakshi300699 mam, I resolved the conflict. Please Check it now.

Sure! @asmitsirohi


API

Description
I suggest being able to make an api that with "GET" methods can obtain the information of a person or player such as their group or permissions to be able to make discord bots ect for easier sync ect (Make it a configurable option and that you can put the port to choice). I think it's a good idea for developers
Proposed Behaviour
I would do a "GET" method to a specific url and I would receive some information in json format for example
{"fran2019":{"group":"owner"}"}
or something similar
and the url is
http://ip:port/luckperms/api/users/(user)
Extra Details
And I think that if the option of adding a token to the "API" could be added separately to make it more secure to consult

See rest-api

how i can use it?

Check out the project readme as well as the openapi spec

ok ty


[BEAM-6928] Update changelog with WriteToBigQuery changed requirements.

Also update a test in the release validation script.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @pabloem @chamikaramj
I tested this fix and confirmed that it works in #12792


Tentative forest RL algorithm

WIP has instabilities
@yolken

Closing this as we realize that decision trees result in flat Q surfaces with no gradient to walk up or down


Optimize BroadPhase2dHashGrid to not pair elements on different layers

Closes #45824, up from <1fps to 60fps on my laptop so I'll call that a success.
This could use some testing, but I could not figure out how to set up a BroadPhase2dHashGrid in a test in a way that I could monitor it.

Thanks!


Wemo insight (+ perhaps maker) state attributes don't update

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.29.0.dev0 (latest dev branch pull)
Python release (python3 --version):
Python 3.4.3
Component/platform:
switch/wemo
Description of problem:
when using my wemo insight the state attribute "current power mwh" and "today mwh" never update when a device is attached to the wemo insight that have power usuage fluctuations. This happens after the switch has been turned on.  I have another program that reads the power values from my wemo insights and you can see the values change yet the state attributes described above never update.
if i change the code so it returns true with should_poll, the state attributes and power values do update every 30 seconds. It just doesn't happen when it's set to false.
I'm guessing this problem / bug came to live by switching from polling wemo devices to using subscriptions.
Perhaps polling should still be used to update the state attributes every so often or specified with scan_interval ?
Expected:
state attributes, espcially current power mwh updating ever X seconds or when the value changes
Problem-relevant configuration.yaml entries and steps to reproduce:

use a wemo (switch) component with a wemo insight
attach a device that does not have a constant power usuage, but fluctuates (a bit)
turn on the switch
watch the state attributes never change (it does change in the beginning but that's because it recives notifications from turning on the device and the device going to another mode then standby) after a minute or so it never updates again.

Traceback (if applicable):

Additional info:
Might also impact wemo maker state attributes as this is "updated" in the same way as the wemo insight. Someone using wemo maker as a switch might have to test this as well.
Setting shouldpoll to true again fixes it but i'm uncertain if this is the correct way to fix the issue hence the ticket

I also have this problem with the lack of updates, also I believe the units should be mW (milliwatts), mwh is milliwatt hours.

I will also second this.
Setting should_poll does fix it, but I agree that breaks subscriptions for switches/other things. I tried adding a config option, but the overlap of discovery is making things a bit complicated.
#3828 by @pavoni also references the mWh mislabeling.

I investigated this a little a while back. The switches update subscribers if the standby threshold of the switch is crossed. The default is (I think) 8W - but you can change it in the wemo app. I use this in my setup to trigger HA if a device is turned on (the switch 'state_detail' attribute will also  be set). Otherwise the switches don't send an update. We could poll although it's a lot of traffic unless you really need it.
Interested in how people want to use it. Would setting a threshold help (we could improve the docs)? Or we could add a 'poll for energy useage' parameter.

@joyrider3774 What maker attributes are you having difficulty with? I get subscription updates correctly for  sensorstate and switchstate.
switchmode and  hassensor seem more like set-up options and you'd restart HA anyway after changing them.

@pavoni i only mentioned wemo maker because i saw that it also has state attributes,  but i don't have one myselve,  hence the "+perhaps maker"  in the title.
A threshold to update the value say every x seconds should be fine,  the problem now is that values never update again after a wemo switch had been turned and stayed on while the power of the device fluctuates.  I can verify this as i log the values using my own written program to emoncms. And this also a usecase since the emoncms_history component got relased.  People can create an intermediate template sensor that displays the power value if the switch is on and 0 when not,  to immediatly see the values. I have multiple insights so i want the power values seen in a group for all my switches.  Then using the emoncms_history coomponent i can send the power data using these intermediate template sensor to emoncms for further processing (it can convert to kwh usage,  keep history of the data display alk kinds of graphs,  view daily, weekly, montly, yearly usuage and cost etc). This all wont work if the power value does not update reguarly in the state attributes of wemo insight switches as now if you dont turn off the device and its above the standby threshold (mines set at 2W) the value just never changes again. So the data is incorrect.

perhpas a seperator wemo insight sensor would be better to display power usuages instead of the state attributes?


application/json repeated twice in Accept header

Describe the bug
When querying http service, accept header is added twice:
"1 > Accept: application/json,application/json"
To Reproduce
Steps to reproduce the behavior:

use FetchMessageService.fetch
check in logs , it would have this:

1 > Accept: application/json,application/json

Expected behavior
should only send application/json once
Desktop (please complete the following information):

OS: Ubuntu 20.04

Additional context
I think the issue is here:
https://github.com/DKE-Data/agrirouter-sdk-java/blob/ca24abb35e109104679763f2bf987ae3a5727ebc/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/RequestFactory.java#L57-L58

Hey @tim-reply,
thanks a lot, I will take a look at it and provide a fix.
Regards
Sascha


Support operations between Dataset(Slice) and Variable(Slice)

This is not supported in C++ yet. We need it for operations with quantities added in #120. For example
d.subset['alice'] += ds.Variable(1.5, unit=ds.units.m*ds.units.m)

I made a start on this in https://github.com/mantidproject/dataset/tree/dataset_binary_with_variable. Whoever picks this up should continue with that branch, adding all the remaining variants (all combinations between Dataset(Slice) and Variable(Slice), all relevant operators, and Python exports.
There are some unsolved subtleties to the definition of what such an operation should do. For now, it operates as follows:

Tag tag-less variables, operate on all Data::Value and Data::Variance (if applicable, i.e., not for + and -, but for * and /). This would thus ignore event-data, but we can ignore this for now.
Otherwise, just convert variable into dataset and rely on existing implementation (might not be very useful right now, because this is likely to throw in most cases, but I recommend not touching this at this point).

This was fixed in #164


doc consistence

Hi，
In the doc，http://mxnet.incubator.apache.org/versions/master/tutorials/onnx/export_mxnet_to_onnx.html，has a page give the supported op：https://cwiki.apache.org/confluence/display/MXNET/ONNX+Operator+Coverage，but in the code，the list is different：
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py

@mxnet-label-bot add [ONNX, doc]

Updated https://cwiki.apache.org/confluence/display/MXNET/ONNX+Operator+Coverage. This doc has a list of operators according to ONNX 1.3 spec.
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/contrib/onnx/mx2onnx/_op_translations.py may have other operators which are specific to MXNet

Thanks！


Fix black line while blurred

Before accepting please have others check this too. This solution works for rig without me noticing any other visual problems and also not affecting other functionality -- at least as far as I intend to use this greeter theme.

This issue only affects HiDPI, could you just remove the transition in the already existing media query below that only affects HiDPI ?

I also have similar issues to @pakro , and was wondering whether this fix is still being considered?

I close this since I added a new view to let the user choose such options, thanks for your suggestion!


[change] Remove tracking from series plugin

Motivation for changes:
Tracking previously as is made it impossible to discover sequence based episodes since searching 1 resulted episodes 10, 11, etc accepted. Then episode 2 was rejected because being too much in the past.
Detailed changes:
The tracking is replaced by relying on begin which can be set from CLI and via plugins. This should work better overall. Fixed couple probably bugs while at it.

I'm running this for a while locally before merging

I'm good with it 👍


Support zod data transformation

Hi, awesome library!
Is your feature request related to a problem? Please describe.
I would like the option of transforming my form data with the same zod validation schema
Describe the solution you'd like
const schema = z.object({
  currency: z.string().length(3),
  amount: z.number().nonnegative().transform(amount => amount * 100),
});

const form = createForm(
  validate: zodForm(schema)
);

const onSubmit = data => {
    console.log(data.amount); // should be the user's input times 100
};

Describe alternatives you've considered
Passing a transform option to the schema validator, although IMO this should be an opt-out behavior since transforming data with zod is really common
const form = createForm(
  validate: zodForm(schema, { transform: true })
);

Passing a transform function
const form = createForm(
  validate: zodForm(schema)
  transform: zodTransform(schema)
);

Note that in this case zodForm could also be renamed to zodValidate to better reflect what it does here
Additional context
I'm currently able to achieve the same by just parsing the values again in the onSubmit which shouldn't fail since it was already validated with that same schema.

Thank you for your interest in Modular Forms and your commitment to improve the library. Already at the very beginning, before the integration of Zod, I thought about a transform feature. Primarily to transform data from the database, e.g. cent amounts to decimal numbers and then, before storing them in the database, back to cent amounts. Furthermore, a transform feature could be useful to bring phone numbers or IBANs into the correct formatting. However, the implementation must be well thought out so that the API remains simple and understandable. It is crucial that the user can decide at the field level when the transformation takes place.
In your case, until Modular Forms has this functionality, I would recommend you write a small helper function that does the transformation for you after the form is submitted. Below is an example.
import { createForm, Form , zodForm} from '@modular-forms/solid';
import { z } from 'zod';

// utils/transformSubmit.ts

function transformSubmit<T extends z.ZodType<any, any, any>>(
  schema: T,
  action: (values: z.output<T>) => void | Promise<void>
) {
  return (values: z.input<T>) => action(schema.parse(values));
}

// routes/form.tsx

const schema = z.object({
  currency: z.string().length(3),
  amount: z
    .number()
    .nonnegative()
    .transform((amount) => amount * 100),
});

export default function FormRoute() {
  const form = createForm<z.input<typeof schema>>({
    validate: zodForm(schema),
  });

  const handleSubmit = transformSubmit(schema, (values) => {
    …
  });

  return (
    <Form of={form} onSubmit={handleSubmit}>
      …
    </Form>
  );
}

zodForm cannot be renamed to zodValidate because there is also a zodField adapter. By the current naming it is clear where the respective adapter must be applied. Also, if you look closely with validate: zodForm(schema) it leads to a readable and understandable API. However, I am open to improvements if you have more ideas on this.

Thanks for the quick response! Will be using this helper in the mean time.
Regarding renaming zodForm and zodField, that seems only necessary if a zod transform function is introduced, in that case i could see something like zodValidateForm, zodValideField, zodTransformForm, and zodTransformField

@fabian-hiller why don't allow transformations by default? I think that's an intuitive default behavior

This has to do with the history of Modular Forms. Initially, I didn't implement it for schema libraries. To support that, I would have to rewrite some code.

@fabian-hiller thanks for the answer!
Is there a way to apply transformations in the back side without parsing the object twice?

I don't think so. The problem is that valiForm$ and zodForm$ only return an error map and not the output of the schema. But there are plans to rewrite Modular Forms and optimize its code for schema libraries.


Add trait that converts from DataWord to a custom word type

Users of this library will probably be transmitting words that, while they may use the same sync/parity bits, interpret the u16 word bodies in a specific way (not as bytes, &str etc). To support this, we need to:

[x] Provide a way of quickly creating a custom word

Initially thought this would be a trait but investigating proc-macro^1
Derive(Word) on a custom struct that has two attributes (data and parity) decorated
Proc macro crate could be a sub-crate of mil_std_1553b

[x] Provide access to the Field struct

[x] Make the Field struct part of the public API
[ ]  Update the Field struct to support fields greater than 8 bits
[x] Add documentation and examples to the Field struct

[x] Update the Message::get method to be generic or add another, generic getter method.^2
[x] Add a comprehensive example for defining and parsing custom words. #54

After everything is implemented a user should be able to do the following:
#[derive(Word)]
pub struct CustomWord {
    /// the body of the word
    #[data]
    mydata: [u8;2],

    /// the parity bit of the word
    #[parity]
    myparity: u8,

    /// some other data
    othervar: u8,
}

impl CustomWord {

    /// Mask for parsing a custom flag from the leading bit
    pub const CUSTOM_FLAG: u16 = 0b1000000000000000;

    /// Field definition for the custom flag
    pub const CUSTOM_FLAG_FIELD: Field = Field::from(Self::CUSTOM_FLAG);

    /// Check the custom flag on the word
    pub fn is_custom_flag(&self) -> bool {
        Self::CUSTOM_FLAG_FIELD.get(self) == 1
    }

}

Resoved by #66, I'll make a separate issue for the change to field.


Fixed generate_artifacts_table_grafana_redis() not to rely on args

Codecov Report

Merging #348 (7c68f31) into master (1d8f457) will increase coverage by 0.06%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
+ Coverage   53.72%   53.78%   +0.06%
==========================================
  Files          56       56
  Lines        4473     4473
==========================================
+ Hits         2403     2406       +3
+ Misses       2070     2067       -3

Impacted Files
Coverage Δ

redisbench_admin/run/grafana.py
16.66% <0.00%> (ø)

redisbench_admin/run_remote/run_remote.py
19.02% <ø> (ø)

redisbench_admin/run/git.py
96.42% <0.00%> (ø)

redisbench_admin/utils/remote.py
67.41% <0.00%> (+0.74%)
:arrow_up:

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 1d8f457...7c68f31. Read the comment docs.


Clarify instalation instructions for Jira 9.x

There is a slight UI change in Jira 9 for creating the application link. This new dialogue was added.

To install an instance the user must select Atlassian product. This is very counter intuitive.
I propose we update the instructions to guide people setting up with Jira 9.x
Current step 2.
Enter https:///plugins/jira as the application link, then click Create new link.
Proposed step 2.
Click "Create link" and enter https:///plugins/jira as the application link and then click "Continue".
For Jira 9.x - Ensure "Atlassian product" is selected as the Application type.

@mickmister and @hanzei  Please provide feedback. And possibly some information on why we have to Slect the Atlassian option. I'm a bit confused on this.

@DHaussermann I agree that the docs need to be updated for this
I'm not sure the details of "Application product", though I know that "External application" is not the correct option based on its description. Our integration does not support OAuth 2.0, so that option won't work.

From related comment https://github.com/mattermost/mattermost-plugin-jira/issues/864#issuecomment-1407476027

Make sure you created an ATLASSIAN application link
Ignore errors on the URL
On the "Link application" dialog, just enter the name (Mattermost) and select "Create incoming link". Leave all other fields empty
On the next page enter the data (public key...)

For more context you might want to read
https://community.mattermost.com/core/pl/pw4gs7imhidaugn4rrjbcgueno
in the Mattermost community


Finishing third delivery

Pull Request Test Coverage Report for Build 111

41 of 41 (100.0%)  changed or added relevant lines in 11 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 108:
0.0%

Covered Lines:
453

Relevant Lines:
453

💛  - Coveralls


Cannot delete a subkey tree because the subkey does not exist

I make my sharepoint site just as described here https://learn.microsoft.com/en-us/sharepoint/support-for-organization-fonts-in-powerpoint-for-the-web and all previous commands work fine, however whenever I try to run the Set-SPOCustomFontCatalog with my path and library URL I keep getting the Cannot delete a subkey tree because the subkey does not exist error.

We appreciate any feedback that improves the content in the Microsoft docs but we haven't had any response from you so we are going to close this issue.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


Upgrade to C# 10 language

Leverage:

Single-line namespace statements
Global using statements

The project is already .NET 6 and C# 10


Add support for HKDF.

I've added support for HKDF from RFC5869.

@dchest all done.

@dchest done.

@dchest please publish a new version, i'm preparing a JS version of age-encryption.org @ https://github.com/paulmillr/jage

yup, just published 1.2.0.


Update license text to apache incubator

i believe this is done. I have updated all texts I could find.


Move to promises

I was just wondering if there is any internal conversations going about potentially moving to a promised-based architecture? Or providing both a callback and promise-based API?

This has been asked about a few times - and at this point, we will not be adding promises directly.
See the discussion below:
https://github.com/robconery/massive-js/issues/37
https://github.com/robconery/massive-js/issues/81
https://github.com/robconery/massive-js/issues/142

I probably should have done a quick search... I'm a fan personally but I will continue to promisify for now

I'm actually open to moving to promises in v3 - just need some help.


📋 [TASK] - Update PUML Component Diagram Template

Parent Feature
#761
Task Description
As an AaC Developer, I want to update the gen-puml puml-component diagram templates, so that I have a correct and consistent diagram returned to end users.
Acceptance Criteria

[ ] Component diagram template is updated to use AaC generate helper functions as necessary.
[ ] Component diagram template is updated to use the new definition object.
[ ] Component diagram template is updated to meet diagram needs.

Unresolved questions
No response

This is covered under the proper repository by https://github.com/DevOps-MBSE/aac-puml/issues/8, so closing this issue out.


Parallel compilation

This PR depends on: https://github.com/CraneStation/cranelift/pull/613

Can you give an estimate of the improvement this brings?


MB-12225 cypress complete ppm entry

Jira ticket for this change
Summary
These changes add cypress tests for step 5 (starting the complete PPM flow after service counseling).
navigateToUploadDocs.js starts with a move that has been approved by a counselor.
Minor changes have been made to the review.js and entireShipment.js flows.
Setup to Run Your Code

💻 You will need to use two separate terminals to test this locally.
Terminal 1
Start the server locally.
make server_run

Terminal 2
Start cypress locally.
make e2e_test_fresh

Verification Steps for Author
These are to be checked by the author.

[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

Verification Steps for Reviewers
These are to be checked by a reviewer.

Backend

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.

Screenshots

Messages

:book:
:link: MB-12225

  Generated by :no_entry_sign: dangerJS against 12121ca1c1052556f59c80b4c797c332e9ae430c


Dank Memer Flash Sales

Could you put here the dank memer flash sales feature like in Noumenon?

No, that's a private cog.


Fix spelling of "Xcode"

This may seem trivial but it really grinds my gears - the correct spelling is Xcode.

You know what grinds my gears? Unnecessary, counterproductive, unenforceable NDAs. But I fixed it anyhow :)

Thank you for respecting my inner pedant.  :)


ml_training test in workflow

Description
Please include a summary of the change and which is fixed.

Add A
Fix B

How has this been tested?
Please describe the tests that you ran to verify your changes.

[ ] UnitTest
[ ] Benchmark

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

Comparison is base (c231bd7) 90.40% compared to head (1d4d5f7) 90.40%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage   90.40%   90.40%
=======================================
  Files         127      127
  Lines        4327     4327
  Branches      693      693
=======================================
  Hits         3912     3912
  Misses        274      274
  Partials      141      141

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


[4.0.2] ERROR [preprocess]: Can not load "webpack"!

I got this error after update from 4.0.0-rc.6 to 4.0.2.
18 06 2019 16:32:50.308:ERROR [preprocess]: Can not load "webpack"!
  SyntaxError: Invalid flags supplied to RegExp constructor 'null'
    at new RegExp (<anonymous>)
    at cloneRegExp (/user/app/node_modules/karma-webpack/node_modules/shallow-clone/index.js:52:14)
    at clone (/user/app/node_modules/karma-webpack/node_modules/shallow-clone/index.js:42:14)
    at cloneDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:18:14)
    at cloneObjectDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:30:18)
    at cloneDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:14:14)
    at cloneArrayDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:40:14)
    at cloneDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:16:14)
    at cloneObjectDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:30:18)
    at cloneDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:14:14)
    at cloneObjectDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:30:18)
    at cloneDeep (/user/app/node_modules/karma-webpack/node_modules/clone-deep/index.js:14:14)
    at Plugin (/user/app/node_modules/karma-webpack/dist/karma-webpack.js:68:20)
    at invoke (/user/app/node_modules/di/lib/injector.js:75:15)
    at Array.instantiate (/user/app/node_modules/di/lib/injector.js:59:20)
    at get (/user/app/node_modules/di/lib/injector.js:48:43)
    at /user/app/node_modules/di/lib/injector.js:71:14
    at Array.map (<anonymous>)
    at Array.invoke (/user/app/node_modules/di/lib/injector.js:70:31)
    at Injector.get (/user/app/node_modules/di/lib/injector.js:48:43)
    at instantiatePreprocessor (/user/app/node_modules/karma/lib/preprocessor.js:50:20)
    at Array.forEach (<anonymous>)

Operating System: CentOS 6
Node Version: 10.15.0
NPM Version: 6.9.0
webpack Version: 4.34.0
karma-webpack Version: 4.0.2

Code
karma.conf.js
require('@babel/register');
const path = require('path');
const webpack = require('webpack');
const webpackConf = require('./webpack.config.babel').default;

module.exports = function (config) {

    webpackConf.resolve.alias.test = path.resolve(__dirname, './src/test/');

    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: __dirname,

        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: ['jasmine'],

        // list of files / patterns to load in the browser
        files: [
            'src/test.es6'
        ],

        // preprocess matching files before serving them to the browser
        // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
        preprocessors: {
            'src/test.es6': ['webpack']
        },

        webpack: webpackConf,
        webpackMiddleware: {
            noInfo: true,
            stats: "errors-only"
        },

        // test results reporter to use
        // possible values: 'dots', 'progress', 'spec'
        // available reporters: https://npmjs.org/browse/keyword/karma-reporter
        reporters: ['spec'],

        // web server port
        port: 9876,

        // enable / disable colors in the output (reporters and logs)
        colors: true,

        // level of logging
        // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
        logLevel: config.LOG_INFO,

        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: false,

        // start these browsers
        // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
        // You may use 'ChromeCanary', 'Chromium' or any other supported browser
        browsers: ['ChromeHeadlessNoSandbox'],
        // you can define custom flags
        customLaunchers: {
            ChromeHeadlessNoSandbox: {
                base: 'ChromeHeadless',
                flags: ['--no-sandbox']
            }
        },

        // Continuous Integration mode
        // if true, Karma captures browsers, runs the tests and exits
        singleRun: true,

        // Concurrency level
        // how many browser should be started simultaneous
        concurrency: Infinity
    })
};

Running into this same error, while trying to upgrade from karma v3.1.0 to 4.1.0 and karma-webpack 3.0.0 to 4.0.2.
These are the module.rules of the used webpack configuration:
[{
	"test": /.+i18n[\/\\](.*)\.yaml/,
	"use": [{
		"loader": "raw-loader"
	}, {
		"loader": "yaml-loader"
	}]
}, {
	"test": /\.(gif|ico|jpg|png|svg|txt)$/,
	"use": [{
		"loader": "url-loader"
	}]
}, {
	"test": /\.html$/,
	"use": [{
		"loader": "html-loader",
		"options": {
			"attrs": ["img:src", ":ng-src"],
			"minimize": true
		}
	}]
}, {
	"test": /\.tsx?$/,
	"use": [{
		"loader": "ng-annotate-loader"
	}, {
		"loader": "ts-loader",
		"options": {
			"experimentalFileCaching": true,
			"transpileOnly": true
		}
	}]
}, {
	"test": /\.scss$/,
	"use": [{
		"loader": "null-loader"
	}]
}]

Can you both post your entire webpack config? It appears its failing to clone it when it gets to a regular expression somewhere

I managed to launch Karma with a Chrome debugger, and got the place where the error is coming from and found it is this issue jonschlinkert/shallow-clone#4 and was fixed in v3.0.1 of that project.
Seems like updating shallow-clone to that version, should solve this issue.

I am experiencing the same issue. @schmkr what do you mean with shallow clone?

I meant with that this project depends on the clone-deep package which has a dependency on shallow-clone. That package, seems to have fixed the Invalid flags supplied to RegExp constructor error in version 3.0.1 and if I recall correctly at the time of writing previous comment, the installed version of shallow-clone was not yet 3.0.1

I'm having this issue, and it seems to be due to karma-webpack being installed as a dependency of another package that I'm using, and this other package has a dependency on both karma-webpack and webpack (this other package automates the karma configuration and execution).
So I the node_modules ends up looking like this:
node_modules/
  the-automation-package/
    node_modules/
      webpack/
  karma-webpack/

And because of this, karma-webpack can't find webpack. I'm not sure what a good fix is.
Maybe I need to tell the-automation-package to make a symlink to ensure that the install result looks like this:
node_modules/
  the-automation-package/
    node_modules/
      webpack/
  karma-webpack/
  webpack --> ./the-automation-package/node_modules/webpack

I was mistaken: the Can not load "webpack"! message simply happens any time there's any error in the plugin. In my case, the plugin tries to interact with older Webpack APIs that don't exist in the newer Webpack that I have installed.

At some point when I got this something removed my install of webpack.
The steps I took that seemed to matter was:
npm uninstall karma-webpack
npm i<EMAIL_ADDRESS>--save-dev
npm install webpack --save-dev
At this point it worked with version 4.0.0-rc6. I have no idea when webpack was uninstalled, but it was missing at some point.
After all that I ran:
npm uninstall karma-webpack
npm i karma-webpack --save-dev
This then worked with the latest version. No clue why.

Can anyone on an older build let me know if this is fixed with version 5.0.0-alpha.6 ? I believe it should be compatible with webpack 4.

Closing this as this does not seem to be an issue in 5.0.0, if you are still having trouble, feel free to open another issue and I'll assist as best I can!


DeveloperGuide.adoc: added use cases

Coverage remained the same at 92.19% when pulling ef731ab74b2a4a2d7b14f41605388e33f98e757a on itsdickson:addUseCases into c75e4ab09a3022aff6e2fdd5df73027450e5acec on CS2103AUG2017-T15-B3:master.


chore: add a clippy job in CI

Description
Applied clippy suggestions.
Also bumped the dev-dependencies to the latest major versions.
gimli
Now the only not yet updated dependency in Cargo.toml is gimli.
When trying to upgrade it, I got an deprecation warning about Dwarf::borrow and it requires more work to get rid of this warning message.
Also gimli::read::Dwarf is in the public API of walrus, upgrading major version of gimli is a breaking change.
pub struct ModuleDebugData {
    pub dwarf: read::Dwarf<Vec<u8>>,
}

Since we just released version 0.21.0, I believe it's not the best time to introduce a small change that would necessitate another major release soon.

While this is not a BytecodeAlliance project specifically, BA projects as a general rule don't take clippy PRs or CI jobs.
That said I would be happy to apply improvements, but without anything that specifically calls out clippy or clippy conventions (ie the CI job and the clippy attribute).

Since we just released version 0.21.0, I believe it's not the best time to introduce a small change that would necessitate another major release soon.

If you would like to look at the Gimli upgrade here, posting an immediate 0.22.0 would be fine by me actually, especially given that 0.21.0 has been out for not very long.

I see. I will make another PR which only upgrade dependencies and fix deprecation warnings.


Custom head1 emoji can't attach a empty space

When customizing heads' and bulletpoints' emoji icons, H1 and bullet points can't use "a space" after the icon, like my current config here
Taking H1 as an example, if I add the space after the icon (i.e. '🐹 ' rather than '🐹'),  the first char ('f') after the H1 is overlapped (screenshot below)

Here is the text version

This issue doesn't apply to H2, H3....

Yeah, this is due to the number of characters we have on an h1. Since it's only the single # and the space, there are only 2 characters available to us before we start overwriting the title. Some more details on it here: https://github.com/MeanderingProgrammer/markdown.nvim/issues/12#issuecomment-2035556921.

I see, thanks for the explanation. I agree it's better to keep it simple and not mess up with the original text.

I did push a fix for this here https://github.com/MeanderingProgrammer/markdown.nvim/commit/5ce35662725b1024c6dddc8d0bc03befc5abc878, if you want to try using longer icons / text and are using neovim >= 0.10.0.

Thanks for notifying! I will give it a try


Truncate image card

Changes made:
• Truncate description - set character limit to 65
• ImageCard shifts up a little bit when hovered over
• TOC gets highlighted
• 3 Image cards in a row for sector/solution page


Added 2-cells du configurations hello-world xml

Already covered in https://github.com/opennetworkinglab/smart5g-sim-o1-interface/pull/4


feat(carousel): create initial implementation

Create carousel and slide implementations

This is a WIP atm - currently having problems hooking into the lifecycle event in the test, any comments/suggestions are welcome.
Plunk of WIP (buggy atm)
This should close #12.

Read the slack conversation. You don't really need to use onChange in here and I think you shouldn't because that overrides the whole change mechanism so you need to do everything by hand. (if I got the hook idea correctly)
What you need to do is:
private _active = false;

@Input()
set active(value) {
  this._active = value;
  // Do something with the new value
}

get active() {
  return this._active;
}

Try with that.

Updated code to where the Plunker is in a working state - tests still fail though.

@wesleycho I had some more time to look into the proposed implementation and it goes in the right direction, so let's land it sooner than later. However I would like to propose few changes:

let's keep a reference to an active slide, instead of an index;
let's use slides as attributes on a template element;

Why those changes? The most important argument is an API where it is a carousel who knows which slide is active, instead of each slide tracking its own "active" state. This, IMO, creates less confusing API and avoid corner cases where multiple sides have the "active" slide set to "true" (I know that we can check and correct those situation but I would say it is better when those situations are disallowed "by design").
Here is a plunker with what I'm proposing: http://plnkr.co/edit/fL78MvzQY5L7nXja4MJ5?p=preview
Note that this implementation requires an equivalent of the NgbInsert directive. Such a directive will be part of the core (see https://github.com/angular/angular/issues/7615). I hope to land it in core in the coming days but we could host our impl till then.
Open to discuss this more!

This makes a lot of sense for now - I'll refresh this PR sometime in the next week and refactor it to a single component.
I did a similar refactor with UI Bootstrap to have the state tracked at the carousel level because of weird code slide level active state causes, making it hard to reason about.

FYI, I've just created PR https://github.com/angular/angular/pull/8021 to add a NgInsert directive. When it lands to the core our carousel directive will look like so: http://plnkr.co/edit/0SYcvPewTbQIjlL4Zyv2?p=preview

So this like an ng-include for

@Foxandxss yes, more or less. It should support components as well in the future, see discussion in the PR

Suppressed by #179


Compatibility to Akeneo 4.0

Now that Akeneo 4.0 was released, this bundle needs to be made compatible with this Akeneo version.

+1

+1


possible inconsistency upon algorithm queue crashes

crash between backups could lead to this inconsistency
there are two kinds of inconsistency that I could think of:
An incoming task that received but has not been back up yet:
In these case, we need to add a new state  under the taskId object on the ETCD for algorithm queue backup
the pipeline driver should listen to this state and verify that  the state changed correctly after timeout reached and if not to cancel the job
An outgoing job where the job was already sent but it still appears on the algorithm queue after the recovering
In this case, the worker that gets the job should verify that the taskId state is correct
Solution:

Developed a snapshot module for backup data (NFS/S3) with no size limit.
Handle graceful shutdown, which will ensure that no new jobs will be processed and snapshot data before exit.
Limit the scoring array to max 5000, to avoid etcd errors.

Solution:

Developed a snapshot module for backup data (NFS/S3) with no size limit.
Handle graceful shutdown, which will ensure that no new jobs will be processed and snapshot data before exit.
Limit the scoring array to max 5000, to avoid etcd errors.


[rpc] Expose AggregateAuthoritySignature on Checkpoint

Validator signature can be found in CheckpointResponse. We want to add an additional field for validator signature in https://github.com/MystenLabs/sui/blob/7a65769db8deb4eb446834144632dd3e43a62990/crates/sui-json-rpc-types/src/sui_checkpoint.rs#L18

Will have a follow PR to include this field on get_checkpoints

https://github.com/MystenLabs/sui/pull/10139
Closed with the above PR^^


When moving a file with the editor, if there is a file with the same name it replaces it without any notice

Godot version:
Godot 3.0.2.stable.official
OS/device including version:
MACOSX
Issue description:
if I move a file with the same name of another file in a target directory, this one will be replaced without any notice.

Steps to reproduce:
Moving a file with the same name of a target directory
Minimal reproduction project:

Confirmed on all OS, Ubuntu and Manjaro(Linux) and also on Windows 10.

Any ideas how it should be implemented, probably it should only ask if you want to overwrite or not, or should it also ask for renaming on being denied overwrite.? So some other way.

We should probably front-load the options in the first pop-up, rather than having the user rename when selecting the 'don't overwrite' option. It would save the user time clicking through dialog boxes and imo would be slightly less annoying. I would imagine the options would probably look like the following.
Notify the user that they are trying to overwrite a file. Give them 3 options:

Overwrite the file
Rename the file manually the user is trying to save
Don't overwrite.

Would it be neccesary to cover the case where the user is moving multiple (potentially many) files? If so, the options would probably look like this:

Overwrite this file
Overwrite this file and all following files
Rename the file the user is trying to save
Don't overwrite this file
Don't overwrite this file and all following files.

Fixed by #19245.