Catch refresh token failure

This is more of a question than an issue.
I have set up the interceptor as per the documentation. The interception/refresh token works as expected but in cases when the refresh token had already expired and returns a 401 response, i'd like to redirect to a login page. Is there a way this can be done because I am unable to catch  401 responses/errors from the refresh token auth logic.
Here is what I have (basically same as in the documentation)
export default function setup() {
  function getAccessToken() {
    return localStorage.getItem('token');
  }
  // Use interceptor to inject the token to requests
  if (store.getters['isAuthenticated']) {
    axios.interceptors.request.use(request => {
      request.headers['Authorization'] = `Bearer ${getAccessToken()}`;
      return request;
    });
  }

  const refreshAuthLogic = failedRequest => {
    let refreshToken = store.getters['refreshToken'];
    store.dispatch('logout')

    return axios.post('/api/token/refresh', {
      refresh_token: refreshToken
    })
      .then(tokenRefreshResponse => {
        store.dispatch('refresh', tokenRefreshResponse)
        failedRequest.response.config.headers['Authorization'] = 'Bearer ' + tokenRefreshResponse.data.token;
        return Promise.resolve()
      })
      .catch(err => {
        console.log(err);
      // redirect to login
      })
  }

  // Instantiate the interceptor (you can chain it as it returns the axios instance)
  createAuthRefreshInterceptor(axios, refreshAuthLogic)
}

I had to include a response interceptor to get failed responses

Can you post your code?
I'm trying the same but it didn't work.
I have the refresh logic:
const refreshAuthLogic = failedRequest => axios.post(
  '/api/refresh-token',
  {},
  {
    headers: {'Authorization': 'Bearer ' + localStorage.getItem("refresh_token")}
  }
).then(tokenRefreshResponse => {
    localStorage.setItem('access_token', tokenRefreshResponse.data.access_token);
    failedRequest.response.config.headers['Authorization'] = 'Bearer ' + tokenRefreshResponse.data.access_token;
    return Promise.resolve();
}).catch(error => {
  localStorage.removeItem('access_token')
  localStorage.removeItem('refresh_token')
  localStorage.removeItem('user')

  router.push('/pages/login')
})

// Instantiate the interceptor (you can chain it as it returns the axios instance)
createAuthRefreshInterceptor(axios, refreshAuthLogic)

And i added the interceptor
axios.interceptors.response.use(function (response) {
  console.log('here')
  // Any status code that lie within the range of 2xx cause this function to trigger
  // Do something with response data
  return response;
}, function (error) {
  // Any status codes that falls outside the range of 2xx cause this function to trigger
  // Do something with response error

  console.log('redirect to login')
  return Promise.reject(error);
});

The problem is that after I got a 401 from my refresh-token endpoint i never end in the interceptor.

@patrickkenekayoro @iskyd guys could you post the working code?

@vtarelkin the code I posted works fine. The only thing is that you have to put the interceptor before the createAuthRefreshInterceptor.
So here you have your custom interceptor
axios.interceptors.response.use(function (response) {
  // Any status code that lie within the range of 2xx cause this function to trigger
  // Do something with response data
  return response;
}, function (error) {
  // Any status codes that falls outside the range of 2xx cause this function to trigger
  // Do something with response error

  if(error.response.config.url.includes('/api/refresh-token')) {
    localStorage.removeItem('access_token')
    localStorage.removeItem('refresh_token')

    router.push('/pages/login')
  }

  return Promise.reject(error);
});

Then you the createAuthRefreshInterceptor
const refreshAuthLogic = failedRequest => axios.post(
  'refresh-token',
  {},
  {
    headers: {'Authorization': 'Bearer ' + localStorage.getItem("refresh_token")}
  }
).then(tokenRefreshResponse => {
    // your own logic
    localStorage.setItem('access_token', tokenRefreshResponse.data.access_token);
    failedRequest.response.config.headers['Authorization'] = 'Bearer ' + tokenRefreshResponse.data.access_token;
    axios.defaults.headers.common['Authorization'] = 'Bearer ' + tokenRefreshResponse.data.access_token;
    return Promise.resolve();
}).catch(error => {
  localStorage.removeItem('access_token')
  localStorage.removeItem('refresh_token')
  localStorage.removeItem('user')

  router.push('/pages/login')
});

// Instantiate the interceptor (you can chain it as it returns the axios instance)
createAuthRefreshInterceptor(axios, refreshAuthLogic)

@iskyd  how did you get to include the response interceptor? I mean there is nothing about it in this library.Without it I couldn't catch errors in my refreshAuthLogic? It seems I couldn't because now I don't have response interceptor and it doesn't stop at the catch block. But you have the same logic in the response interceptor and catch block in the refreshAuthLogic...

@vtarelkin  you cant catch it in the refreshAuthLogic but you can with an axios interceptor.

@iskyd then why we need the response interceptor? Without it it won't work?

@iskyd no need to response interceptor, but there should be another instance of axios and it catches errors just fine

@iskyd  Apologies for the late response. This is what I ended up with
import axios from 'axios'
import store from '../store'
// import router from '../router'
import createAuthRefreshInterceptor from 'axios-auth-refresh';

const axiosApiInstance = axios.create({baseURL: ''});

// auth refresh token logic
const refreshAuthLogic = failedRequest => {
  let refreshToken = store.getters['refreshToken'];
  store.dispatch('logout')

  return axios.post('/api/token/refresh', {
    refresh_token: refreshToken, pauseInstanceWhileRefreshing: true
  })
    .then(tokenRefreshResponse => {
      store.dispatch('refresh', tokenRefreshResponse)
      failedRequest.response.config.headers['Authorization'] = 'Bearer ' + tokenRefreshResponse.data.token;
      return Promise.resolve()
    })
}
createAuthRefreshInterceptor(axiosApiInstance, refreshAuthLogic);

// request interceptor ---- add JWT Token
if (store.getters['isAuthenticated']) {
  axiosApiInstance.interceptors.request.use(
    config => {
      const token = localStorage.getItem("token");
      if (token) {
        config.headers.Authorization = `Bearer ${token}`;
      }
      return config;
    },
    err => {
      return Promise.reject(err);
    }
  );
}

//response interceptor
axiosApiInstance.interceptors.response.use(
  response => {
    return response;
  },
  error => {
    if (error && error.response && error.response.status === 401) {
      // 401 error redirect to login
      // router.push({path: '/ads/login'})
      window.location = "/ads/login"

      return Promise.reject(error);
    }

    if (error.response.status !== 401) {
      return new Promise((resolve, reject) => {
        reject(error);
      });
    }
  }
);

export default axiosApiInstance;

Then import axiosApiInstance  for your API requests


add pinning support!!!!!!!

test it plp

Coverage decreased (-0.6%) to 80.25% when pulling 8e76284e812ae25dca7bd234f99bab108cb500a9 on synopsis into 001413c80835db5ff8dcaa9d5a4b827e1e47d93f on master.

:+1:


Add IsPortable flag to UpdateManager or Locator

Not hard for Windows. Probably implement it by just writing a .portable file of some kind to the portable package root (where update.exe is) and detect that since it's preserved through updates.
On Linux, we only bundle as a .AppImage, so portable is always true.
On OSX, the only distinction on macos is whether the user used the .pkg to install it, or whether they downloaded and extracted the .app from the zip, but this distinction hardly matters. A portable zip package could be extracted by the user to /Applications, in which case there's no difference between this and an app that was installed with a .pkg. For this reason, I think portable should always be false.

developed in d7fe3edbfa10fdc8ef8eb4d391c0bcd6a75967b2


New nix infrastructure

CC @Zimmi48

[x] Update ref.yml

@Zimmi48 I reached something satisfactory, want to talk about it?

Sure! I'm available anytime tomorrow, Tuesday or next Thursday/Friday.

woops ;)

It seems to me that the instructions on how to define / extend tasks should still be present even if the initial list of tasks was generated from meta.yml given that as soon as you copy the file into config.nix, you are on your own and you cannot rely on this generation process to edit them anymore.

I think there should be two distinct docs anyway: one on coq-community/template functionalities and one on the coq-community/coq-nix-toolbox functionalities. When one copies fallback-config.nix to config.nix they should be warned that by doing so 1. the handling of task should be removed from meta.yml and 2. they must now refer to coq-nix-toolbox documentation.
Anyway meta.yml is now able to generate everything that most user may want from config.nix. The missing feature is code factoring as in
https://github.com/math-comp/analysis/pull/345/files#diff-a4e04df48252cabe60d40e7d9b7417d7c5f9259e81e4be5e86f18430a22d011aR1-R8
or using overrideAttrs instead of override (which I never had to use because I prefer overlays).

BTW, now that tasks generation is also handled by the templates, what is the remaining justification for leaving the possibility to the user to copy and manually edit the fallback-config.nix file?

I'm not sure anymore (I did not expect to reach that level of automated generation when I started...)

I'm not sure anymore (I did not expect to reach that level of automated generation when I started...)

Yeah, me neither! Anyway, my opinion is that having to copy the template fallback config to a new file was fine when you couldn't do most things except by hand but now it doesn't really make sense anymore. So what I suggest is to have config.yml auto-generated and some option in meta.yml to disable its generation when people want to switch to manually editing this file. We should anyway have a general mechanism to disable a list of files from the auto-generation process (beyond listing explicitly all the files that you want to get, which doesn't scale).

This PR cannot be merged until https://github.com/coq-community/coq-nix-toolbox/issues/49 is fixed.

At this stage, my opinion is that it's better if we don't have to maintain three different complex CI generation procedures, so it would make sense to only focus on the generation mechanism of the standalone installation procedure, and to only provide a lightweight CI template here like in #99. So I propose to close this.

Ok! I'd rather keep the branch though...


spring cloud config server does not want to take local cache

If the config server does not connect to the git repository, it will read the cache file local to the config server.
But, If I want the config server not to take its own cache file, what should I do?

I am not sure what you are asking, can you elaborate?


ListWebAppFunctionKeys returns all null values

When invoking
  var listWebAppFunctionKeysResult = ListWebAppFunctionKeys.InvokeAsync(new ListWebAppFunctionKeysArgs
  {
      Name              = "sitename",
      FunctionName      = "functionname",
      ResourceGroupName = "resourcegroupname"
  }).Result;

the resulting ListWebAppFunctionKeysResult has all nulls. I have tried invoking the REST API directly with:
az rest --method post --url https://management.azure.com/subscriptions/subId/resourceGroups/resourcegroupname/providers/Microsoft.Web/sites/sitename/functions/functionname/listkeys?api-version=2019-08-01
And it works as expected; I presume there could be a problem invoking it or in the deserialization or using the correct API version.
Would be nice if I could debug this further to give you more details, but I am having trouble getting Fiddler for Linux working in my distro; that triggered the idea of getting some verbose/debug logging for the provider to also include the REST URLs invoked with body. I will open another issue, hopefully that can be taken into consideration. Thank you.
EDIT:
I had a closer look at the code and the response; according to the MS documentation (and coherent with the Pulumi SDK), the REST call should return an object with { Id, Kind, Name, ... }, but it is returning instead an object: { keyName: KeyValue }. That may be the issue. I presume I need to raise a ticket with Microsoft for this to change the schema that feeds the autogenerated code in Pulumi...

Would be nice if I could debug this further to give you more details

You can get HTTP debug logs with pulumi up -v=9 --logtostderr --logflow --debug.

thank you @mikhailshilkov , I will try it immediately, I tried v=9 and debug previously alone and did not help; I was assuming it was not achievable currently (ver 0.51). I will try it immediately, thank you.
By the way, I raised an issue on the MS spec GitHub: https://github.com/Azure/azure-rest-api-specs/issues/12889
Given that this is not a Pulumi issue, I'll close the ticket
Thank you

I think you may need 0.6.0

Regarding the issue, it's an API issue that I reported a while ago https://github.com/Azure/azure-rest-api-specs/issues/11401

Ah, that goes back to October, not good. They may fix it in the next ver; in the meanwhile I am using the old provider as fallback.

I'll keep the issue open for now to see what we can do

FWIW, the .NET SDK is generated from the same API spec, and it seems to face the same problem. The method returns a StringDictionary:
public async Task<AzureOperationResponse<StringDictionary>> ListFunctionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))

while StringDictionary does match the over-the-wire shape:
public partial class StringDictionary : ProxyOnlyResource
{
    // ...
    [JsonProperty(PropertyName = "properties")]
    public IDictionary<string, string> Properties { get; set; }
}

FWIW ListWebAppHostKeys works as expected and returns both the master key and the function keys.


Fix CUDA tests

Update the CUDA backend to replace _dump_assembly() with
get_asm_str()
Prevent a header with no code being produced in the case where
there is no returned assembly string, which is the case for the
CUDA backend.

I've just re-run the tests here - the first Travis CI test failed with the error message related to #926.


Cant load AsciidoctorJ on Jenkins plugins

Hi guys,
I'm trying to use AsciidoctorJ on a jenkins plugin but the following error is raised when Asciidoctor.Factory.create(); is called:
ERROR: Publisher com.github.cukedoctor.jenkins.CukedoctorPublisher aborted due to exception
java.lang.NoSuchMethodError: jnr.constants.platform.OpenFlags.defined()Z
at org.jruby.RubyFile.createFileClass(RubyFile.java:149)
at org.jruby.Ruby.initCore(Ruby.java:1545)
at org.jruby.Ruby.bootstrap(Ruby.java:1330)

Here is the plugin maven dependencies:
 <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-pdf</artifactId>
            <version>1.5.0-alpha.11</version>
        </dependency>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>1.5.4</version>
        </dependency>
        <dependency>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
            <version><IP_ADDRESS></version>
        </dependency>

more details here: https://github.com/rmpestano/cukedoctor-jenkins-plugin/issues/1
thanks in advance.

Is this happening on a specific operating system, or on all operating systems?

Hi Dan, its on lunux (Ubuntu 15)  but I will test on windows as soon I get in the work.

I would guess that there is some old version of JRuby available from somewhere.
The method jnr.constants.platform.OpenFlags.defined() was defined sometime around mid 2014 and for example JRuby 1.7.12 contains the class, but not this method.
If it works in your CLI and not in Jenkins, I would suspect that Jenkins uses an old version of JRuby.
Maybe @lordofthejars could chime in, he surely has some more knowledge about Jenkins :-)

@rmpestano I was only asking about Windows because that's what the JRuby issue you reference in the upstream issue points to (https://github.com/jruby/jruby/issues/3332). So perhaps that isn't the underlying problem at hand.

I think it's more likely what @robertpanzer is saying.

Looks like I need 'jenkins-plugin-runtime' gem installed: https://github.com/jenkinsci/jenkins.rb/wiki/Getting-Started-With-Ruby-Plugins
can't test it here at the company (can't even install a downloaded gem ;( )
thank you so far.

I've got exactly same stacktrace on windows, I'll try with jenkins-runtime gem when I got home.

Interesting fact, I have a maven plugin which executes the same steps that jenkins plugin executes  but the maven plugin can load asciidoctor and convert files even when maven plugin is executed in a jenkins job.
Looks like its more a missing configuration in jenkins plugin than an environment issue.
Any hints?

Hi again, some progress here.
When I downgrade jruby to 1.7.x. I don't get 'NoSuchMethodError: jnr.constants.platform.OpenFlags.defined()' instead I receive:
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- jruby/java

but then if I set Asciidoctor classloader here:
Asciidoctor.Factory.create(CukedoctorPublisher.class.getClassLoader());

then html documentation is generated successfuly!
the only problem now is pdf which somewhat depends on jruby 9.x, right?
here is the stacktrace for pdf backend:
org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (EBADF) Bad file descriptor - asciidoctor: FAILED: C:/projetos/cukedoctor-jenkins-plugin/work/jobs/teste/workspace/living-documentation/documentation.adoc: Failed to load AsciiDoc document - Bad file descriptor - Bad file descriptor
	at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:345)
	at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:549)
	at com.github.cukedoctor.jenkins.CukedoctorPublisher.execute(CukedoctorPublisher.java:167)
	at com.github.cukedoctor.jenkins.CukedoctorPublisher.perform(CukedoctorPublisher.java:146)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
	at hudson.model.Run.execute(Run.java:1763)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: org.jruby.exceptions.RaiseException: (EBADF) Bad file descriptor - asciidoctor: FAILED: C:/projetos/cukedoctor-jenkins-plugin/work/jobs/teste/workspace/living-documentation/documentation.adoc: Failed to load AsciiDoc document - Bad file descriptor - Bad file descriptor
	at org.jruby.RubyIO.write(org/jruby/RubyIO.java:1411)
	at org.jruby.RubyKernel.warn(org/jruby/RubyKernel.java:1351)
	at RUBY.next_block(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:484)
	at Asciidoctor::Parser.parse_blocks(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:1132)
	at Asciidoctor::Parser.build_block(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:1115)
	at RUBY.next_block(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:855)
	at Asciidoctor::Parser.parse_blocks(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:1132)
	at Asciidoctor::Parser.build_block(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:1115)
	at RUBY.next_block(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:855)
	at Asciidoctor::Parser.next_section(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:315)
	at Asciidoctor::Parser.next_section(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:303)
	at RUBY.next_section(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:303)
	at RUBY.next_section(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:303)
	at RUBY.parse(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/parser.rb:67)
	at RUBY.parse(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:471)
	at RUBY.load(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1344)
	at RUBY.convert(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1462)
	at RUBY.convert_file(C:/Users/rafael-pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1576)
	at RUBY.convertFile(<script>:68)
	at org.jruby.gen.InterfaceImpl666964712.convertFile(org/jruby/gen/InterfaceImpl666964712.gen:13)

With jruby-complete 9.x I always got:
java.lang.NoSuchMethodError: jnr.constants.platform.OpenFlags.defined()Z
	at org.jruby.RubyFile.createFileClass(RubyFile.java:149)

Hi Rafael,
AsciidoctorJ 1.5.x is still delivered with JRuby 1.7.21. 1.7.24 should also work.
When running on Windows there are currently some issues with JRuby 9K, so I recommend not using it on Win.
It could be that the maven plugin uses 1.7.23, which stumbles over this with asciidoctorj-pdf: https://github.com/jruby/jruby/issues/3496
Please try to set the version of jruby-complete to 1.7.24.
Cheers
Robert

Hi @robertpanzer, just came here to confirm that!
working great also for pdf, the stacktrace I posted above was caused by a misconfiguration in adoc file.
To summarize: working with jruby 1.7.24 setting Asciidoctor classloader to plugin classloader.
Thank you so much for the help!

Hi guys,
It's quite "embarrassing" but I can't make it work on linux ;(.
I made it work on windows (at my company) and a clean windows machine (which I didn't used for years) I have at home.
Here is the stacktrace:

ERROR: Build step failed with exception
org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (NotImplementedError) stat unsupported or native support failed to load
	at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:345)
	at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:549)
	at com.github.cukedoctor.jenkins.CukedoctorPublisher.execute(CukedoctorPublisher.java:185)
	at com.github.cukedoctor.jenkins.CukedoctorPublisher.perform(CukedoctorPublisher.java:155)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
	at hudson.model.Run.execute(Run.java:1763)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: org.jruby.exceptions.RaiseException: (NotImplementedError) stat unsupported or native support failed to load
	at org.jruby.RubyFile.mtime(org/jruby/RubyFile.java:457)
	at RUBY.load(/home/pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1311)
	at RUBY.convert(/home/pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1462)
	at RUBY.convert_file(/home/pestano/.m2/repository/org/asciidoctor/asciidoctorj/1.5.4/asciidoctorj-1.5.4.jar!/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1576)
	at RUBY.convertFile(<script>:68)
	at org.jruby.gen.InterfaceImpl1760938920.convertFile(org/jruby/gen/InterfaceImpl1760938920.gen:13)

Will reopen the issue while we don't find a solution.

This sounds like the root of the solution.
https://github.com/jruby/jruby/issues/1754
In short, it's some sort of library conflict that impacts JRuby.

I also opened an issue at jenkins Jira: https://issues.jenkins-ci.org/browse/INFRA-616.

As per jira issue looks like we will have to solve the issue on asciidoctor side.
I've tested on another (clean) linux distro (rhel 7) and the issue is the same but looking at the stacktrace now the issue is not on loading asciidoctor anymore but in document conversion itself.

Just found it works with asciidoctorJ 1.5.1 (jruby 1.7.9). Don't know on windows now hehe

The "upper bound" dependency for Jruby is 1.7.13, this way I could make the AsciidoctorJ (1.5.4) work on linux (both for html and pdf backend).
Note that the classloading 'trick' mentioned in this comment is still needed in any case (win or linux) otherwise the plugin will throw:
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- jruby/java

there is any problem using AsciidoctorJ with an old version of jruby?
sorry for the spams  :pensive:
Lets see how things goes on windows now :pray:

working on windows also ;), will close the issue. Thanks for the help.

Could it be that a GEM_PATH is leaking through?
Can you try passing (String) null to the create() method?
Am Mittwoch, 23. März 2016 schrieb Rafael M. Pestano :

Closed #442 https://github.com/asciidoctor/asciidoctorj/issues/442.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/asciidoctor/asciidoctorj/issues/442#event-600803010

Hi Robert,
You mean this:
   asciidoctor = Asciidoctor.Factory.create("null");

It throws the same exception: 'no such file to load -- jruby/java'

Nope, it should be:
asciidoctor = Asciidoctor.Factory.create((String) null);

same error, it look like the plugin is loaded by a different classloader then its dependencies...

I had the same problem with asciidoctorj-pdf plugin:
Caused by: java.lang.NoSuchMethodError: jnr.constants.platform.OpenFlags.defined()Z
        at org.jruby.RubyFile.createFileClass(RubyFile.java:151)
        at org.jruby.Ruby.initCore(Ruby.java:1490)
        at org.jruby.Ruby.bootstrap(Ruby.java:1274)
        at org.jruby.Ruby.init(Ruby.java:1173)
        at org.jruby.Ruby.newInstance(Ruby.java:338)
        at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:79)
        at org.asciidoctor.internal.JRubyAsciidoctor.createJRubyAsciidoctorInstance(JRubyAsciidoctor.java:119)
        at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:62)
        at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:683)
        at org.asciidoctor.gradle.AsciidoctorTask.instantiateAsciidoctor(AsciidoctorTask.groovy:630)
        at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:577)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)

but it was fixed after adding settings.gradle to gradle project in child directory.
Nevertheless, the problem reproduces again when I run gradle build from parent gradle project. Build phase is depend on asciidoctor phase at child gradle project. When I run gradle build in child project, it end successfully. I don't know yet how to fix it.

Hi @render1980,
this issue is related to a Jenkins plugin (this one) which uses AsciidoctorJ on the jenkins plugin itself.
Your problem seems to be related to a gradle build and that should be ok. As you can see on this comment there is no issue when asciidoctorJ is used via maven plugin during application build.

Hi @rmpestano
Thanks for advice. But the reason is not quite that.
The reason as I've understood that parent project doesn't see jnr-constants in classpath (on static linking stage). I've added this dependency to classpath and it works (last string in dependencies section):
dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath('se.transmode.gradle:gradle-docker:1.2')
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"

        classpath 'com.github.jnr:jnr-constants:0.9.9'
    }

Hi @render1980, thank you for the info.
I still get the exception:
        at org.jruby.RubyFile.createFileClass(RubyFile.java:149)
        at org.jruby.Ruby.initCore(Ruby.java:1491)
        at org.jruby.Ruby.bootstrap(Ruby.java:1275)
        at org.jruby.Ruby.init(Ruby.java:1174)
        at org.jruby.Ruby.newInstance(Ruby.java:339)
        at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:79)
        at org.asciidoctor.internal.JRubyAsciidoctor.createJRubyAsciidoctorInstance(JRubyAsciidoctor.java:129)
        at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:72)
        at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:695)

Here is the plugin classpath:

Note that I can even load the OpenFlags before classing Asciidoctor.create
Class.forName("jnr.constants.platform.OpenFlags")

but still got same exception.
I've also printed OpenFlags methods:
Method: description - return: class java.lang.String
Parameters:
Method: toString - return: class java.lang.String
Parameters:
Method: values - return: class [Ljnr.constants.platform.OpenFlags;
Parameters:
Method: intValue - return: int
Parameters:
Method: longValue - return: long
Parameters:
Method: valueOf - return: class jnr.constants.platform.OpenFlags
Parameters:
arg0,Method: valueOf - return: class jnr.constants.platform.OpenFlags
Parameters:
arg0,Method: name - return: class java.lang.String
Parameters:
Method: equals - return: boolean
Parameters:
arg0,Method: hashCode - return: int
Parameters:
Method: compareTo - return: int
Parameters:
arg0,Method: compareTo - return: int
Parameters:
arg0,Method: valueOf - return: class java.lang.Enum
Parameters:
arg0,arg1,Method: getDeclaringClass - return: class java.lang.Class
Parameters:
Method: ordinal - return: int
Parameters:
Method: wait - return: void
Parameters:
arg0,arg1,Method: wait - return: void
Parameters:
arg0,Method: wait - return: void
Parameters:
Method: getClass - return: class java.lang.Class
Parameters:
Method: notify - return: void
Parameters:
Method: notifyAll - return: void
Parameters:

Alright, got it working now!
Jenkins plugins first look into jenkins libs by default but we can change that in the hpi-plugin:
 <plugin>
                <groupId>org.jenkins-ci.tools</groupId>
                <artifactId>maven-hpi-plugin</artifactId>
                <configuration>
                    <pluginFirstClassLoader>true</pluginFirstClassLoader>
                </configuration>
            </plugin>

Note that in this case there is no need to add 'com.github.jnr:jnr-constants:0.9.9' dependency because it is already bundled in jruby-complete.
Thank you very much for all the help!


Dont set body class if isOpen not change

@khmelevskii I'm afraid I'm going to need to revert this commit.  It seems that it actually breaks some tests :(  I failed to run them before merging.  It seems that  the biggest thing it does is fails to properly execute the appropriate things when the modal has an initial render that includes the modal being open.
I like the idea, but we'll need to revisit this with an alternative solution.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_6dadd9c1-59fc-46e9-bcf7-7dbb93cecb40/pull/1 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target_6dadd9c1-59fc-46e9-bcf7-7dbb93cecb40.git

Docs Build status updates of commit 726e888:
:clock10: Pending: waiting for processors (49 builds ahead of you)
:warning: Docs Build is busy, currently there are 49 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 726e888:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-11-01-05-04-44 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-11-01-05-04-44

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fabo/ ignore changelog check on master

Closes #ISSUE
Description:

Thank you! 🚀

For contributor:

[ ] Added entries in PENDING.md with issue # and GitHub username
[ ] Reviewed Files changed in the github PR explorer
[ ] Attach screenshots of the UI components on the PR description (if applicable)
[ ] Scope of work approved for big PRs

For reviewer:

[ ] Manually tested the changes on the UI

instead of ignoring pending on master, shouldn’t we actually check the changelog?

I think that would be over engineering. If this would be a problem I volunteer to implement that check in the future.


Engines to >= 4

Was taking a look at this: https://github.com/ParsePlatform/parse-server/issues/4
The reason tonic uses node 0.12 is because the engines variable isn't set in parse-server's package.json. If you set engines: { node: ">= 4" }  then Tonic will appropriately choose node 4 and the syntax error won't happen. Given that the package expects ES6 to be natively present this seems like the right engine. An alternative is to have a pre-publish step that babel-ifies the code so that it can work on any node.
Thanks,
Francisco

Fixed, thanks.  This tag was in the server-example but not here.  :+1:


mvnmin does not work with M1 processor

mvnmin clean install -DskipAllTests -Dpmd.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.elasticpath.tools.mavenminimal.MvnMinCli.getProjectsFromStdin(MvnMinCli.java:258)
	at com.elasticpath.tools.mavenminimal.MvnMinCli.determineRequestedModules(MvnMinCli.java:124)
	at com.elasticpath.tools.mavenminimal.MvnMinCli.run(MvnMinCli.java:96)
	at com.elasticpath.tools.mavenminimal.MvnMinCli.main(MvnMinCli.java:69)
Caused by: java.lang.RuntimeException: Unable to load jansi native library
	at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:62)
	at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:30)
	... 4 more
Caused by: java.lang.Exception: No native library found for os.name=Mac, os.arch=aarch64, paths=[/Users/wellington.souza/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
	at org.fusesource.jansi.internal.JansiLoader.loadJansiNativeLibrary(JansiLoader.java:333)
	at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:60)
	... 5 more```

Appears to be related to https://github.com/fusesource/jansi/issues/207

I've issued https://github.com/elasticpath/mvnmin/pull/22 to address this.  I don't have an M1 to test on, but this seems like a good fix regardless.  I'll commit and roll a release soon.

I have released 1.0.2, including the accompanying homebrew formula

https://github.com/elasticpath/mvnmin/releases/tag/mvnmin-1.0.2
https://github.com/elasticpath/homebrew-mvnmin

I have been unable to properly test. I'm being forced to update xcode.  Which is forcing me to upgrade macos 🤦 😴  .
Meanwhile, if you're using homebrew upgrading should work (if that's how you're consuming):
brew upgrade mvnmin

Feedback appreciated!

Confirmed working on an M1 here. Thank you for the fix!


Link in offline or standby nodes leads to empty page

I clicked on contracts on toast

and I got this

should be done after #1587

Verified,

Devnet
8b2c863
TC2437 - Get notified if contract gone grace period or node went down.

The link is now pointing to your contract page.

Verified:

Devnet
ec2ed3d


es6-shim is included in package.json but not in index.html.

This makes chrome unable to run the quickstart app as-is.

We discuss it in the text as an option to add if you need it. Most browsers don't. Not sure if we should just throw it on to index.html "in case". Will ask around.

I think shim related issues will remain despite callouts to this effect. Additionally, these are problems that a user might not have during the quickstart, but rather later on when he is doing a chapter (or his own experiments) on a different browser.
In fact, if I were to use A2 now, or in the future, in a production system, as a seasoned developer I would see myself forced to add the shim. If I do not, it is merely a question of time until a user has problems.
This makes me think that having the shim should be the default, and removing it should be optional.

Also #564 seems to be the same as this.

Ok. I will update all TS samples, plunkers, and the TS quickstart to load the shim by default. Would you look at the JS side of this please?

All samples ship with a complete set of shims in packages and in index.html. Don't think this is a problem anymore.


Allow null signer on transfers to account for non-archive indexing of historical transactions

Fixes #1023

Codecov Report

Merging #1026 (b386383) into main (e3aef00) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1026   +/-   ##
=======================================
  Coverage   99.98%   99.98%
=======================================
  Files         302      302
  Lines       19903    19903
=======================================
  Hits        19901    19901
  Misses          2        2

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

FireFly core is failing the PostgreSQL migration with the following:
firefly_core_0_1  | [2022-08-31T13:39:47.847Z] DEBUG Log level: debug pid=1
firefly_core_0_1  | [2022-08-31T13:39:47.847Z]  INFO Hyperledger FireFly pid=1
firefly_core_0_1  | [2022-08-31T13:39:47.847Z]  INFO © Copyright 2022 Kaleido, Inc. pid=1
firefly_core_0_1  | [2022-08-31T13:39:47.848Z]  INFO Starting up pid=1
firefly_core_0_1  | [2022-08-31T13:39:47.849Z] DEBUG Debug HTTP endpoint listening on localhost:6060 pid=1
firefly_core_0_1  | Error: FF10163: Database migration failed: FF10163: Database migration failed: migration failed: syntax error at or near "'key'" (column 41) in line 3: BEGIN;
firefly_core_0_1  |
firefly_core_0_1  | ALTER TABLE tokentransfers ALTER COLUMN 'key' DROP NOT NULL;
firefly_core_0_1  |
firefly_core_0_1  | COMMIT;
firefly_core_0_1  |  (details: pq: syntax error at or near "'key'")
firefly_core_0_1  | Usage:
firefly_core_0_1  |   firefly [flags]
firefly_core_0_1  |   firefly [command]
firefly_core_0_1  |
firefly_core_0_1  | Available Commands:
firefly_core_0_1  |   completion  Generate the autocompletion script for the specified shell
firefly_core_0_1  |   help        Help about any command
firefly_core_0_1  |   showconfig  List out the configuration options
firefly_core_0_1  |   version     Prints the version info
firefly_core_0_1  |
firefly_core_0_1  | Flags:
firefly_core_0_1  |   -f, --config string   config file
firefly_core_0_1  |   -h, --help            help for firefly
firefly_core_0_1  |
firefly_core_0_1  | Use "firefly [command] --help" for more information about a command.
firefly_core_0_1  |
firefly_core_0_1  | FF10163: Database migration failed: FF10163: Database migration failed: migration failed: syntax error at or near "'key'" (column 41) in line 3: BEGIN;
firefly_core_0_1  |
firefly_core_0_1  | ALTER TABLE tokentransfers ALTER COLUMN 'key' DROP NOT NULL;
firefly_core_0_1  |
firefly_core_0_1  | COMMIT;
firefly_core_0_1  |  (details: pq: syntax error at or near "'key'")

New migration error:
firefly_core_0_1  | ALTER TABLE tokentransfers ALTER COLUMN key DROP NOT NULL;
firefly_core_0_1  |
firefly_core_0_1  | COMMIT;
firefly_core_0_1  |  (details: pq: relation "tokentransfers" does not exist)
firefly_core_0_1  | 	* pq: current transaction is aborted, commands ignored until end of transaction block in line 0: SELECT pg_advisory_unlock($1)


running error

Hi, @JiaxuanYou
Thank you for sharing your code.
When I tried to run  your code with python main.py --model GCN --layer_num 3 --dataset grid , it gave such error:
Traceback (most recent call last):
  File "main.py", line 101, in <module>
    out = model(data)
  File "/media/newhd/my_path/anaconda3/envs/pt1.0/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in
__call__
    result = self.forward(*input, **kwargs)
  File "/media/newhd/my_path/project/P-GNN/model.py", line 133, in forward
    x = self.conv_first(x, edge_index)
  File "/media/newhd/my_path/anaconda3/envs/pt1.0/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in
__call__
    result = self.forward(*input, **kwargs)
  File "/media/newhd/my_path/anaconda3/envs/pt1.0/lib/python3.7/site-packages/torch_geometric/nn/conv/gcn_conv.py", line 99, in forward
    return self.propagate(edge_index, x=x, norm=norm)
  File "/media/newhd/my_path/anaconda3/envs/pt1.0/lib/python3.7/site-packages/torch_geometric/nn/conv/message_passing.py", line 100, in propagate
    out = scatter_(self.aggr, out, edge_index[i], dim_size=size[i])
  File "/media/newhd/my_path/anaconda3/envs/pt1.0/lib/python3.7/site-packages/torch_geometric/utils/scatter.py", line 28, in scatter_
    out = op(src, index, 0, None, dim_size, fill_value)
RuntimeError: scatter_add() expected at most 5 argument(s) but received 6 argument(s). Declaration: scatter_add(Tensor src, Tensor index, int dim=-1, Tensor? out=None, int? dim_size=None) -> (Tensor)

Seems like it has something to do with the scatter_add in torch_geometric. However, mine is 1.1.2 like yours.  ( I've also tried several other versions, none works）
So, do you have any idea how to solve this? Thank you again.

I just found that the problem is caused by the wrong torch_geometric version.
When I use the mentioned version 1.1.2 in the README, it will report the error above. But the newest version won't have any problem.


Added ANSI/VT banners

Added ANSI/VT banners for the Windows console and the Windows Terminal, for 80 and 120 columns.
These 4 text+VT inband control files display the Build 2020 banner in the Windows console and Windows Terminal, formatted for 80 columns or 120 columns.
OEM/ANSI .ans versions can be used in cmd.exe with the type command (preceded by chcp 437 if needed) and UTF-8 .utf8 versions can be used with PowerShell with Get-Content filename.utf8 -Encoding UTF8 or WSL using the cat command.

Files can also be used directly from GitHub:
curl https://raw.githubusercontent.com/PhMajerus/Build2020_DigitalSwag/master/Console%20%26%20Windows%20Terminal%20ANSIs%20-%20Build%202020/Build2020_WinTerm_120.utf8
curl https://raw.githubusercontent.com/PhMajerus/Build2020_DigitalSwag/master/Console%20%26%20Windows%20Terminal%20ANSIs%20-%20Build%202020/Build2020_WinTerm_80.utf8

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

Can you update the filename with some unique name. We want to make sure you get credit for it

@isaacrlevin
The banners include a dim "PHM.lu" mark as author watermark as is common in ANSI-art files. I updated the folder and files names to better match the naming found in existing folders and to include "_PHM" token as author flag as well, don't really need more credit since it's mostly based on the assets already designed by Microsoft.
Hope this meets your requirements, feel free to fix, change, adapt or anything.

@PhMajerus looks good, are you done updating? If so, I will merge

@isaacrlevin Yeah, I changed the 4 files before posting the update message. I don't have anything more right now except if users like it and start asking different sizes or ANSI-art logos.


Enhancement: Accept Grayscale as Input

Currently when detection is performed, the code reads the channels of a Mat object as input. But if it is in grayscale (Channels == 1) it is converted again to color:
detector.h
virtual inline int det(cv::Mat& image) {
    if(image.empty()) return 0;
    if(image.channels() == 1) {
        cv::cvtColor(image, image, CV_GRAY2BGR);
    } CHECK(image.channels() == 3);
    dlib::cv_image<dlib::bgr_pixel> img(image);
    mRets = mFaceDetector(img);
    return mRets.size();
}

However, the Dlib documentation points out that: "Any built in scalar type may be used as a grayscale pixel type. For example, unsigned char, int, double, etc."
So bgr_pixel type is not the only alternative.

Solution:
virtual inline int det(cv::Mat& image) {
  if(image.empty()) return 0;
  if(image.channels() > 1) {
    //Convert to GrayScale
    cv::cvtColor(image, image, CV_BGR2GRAY);
  }
  dlib::cv_image<uchar> img(image);
  mRets = mFaceDetector(img);
  return mRets.size();
}

This is really speeding up the detection!!! Hope helping somebody

Thanks!
I followed the method u mentioned, another error came out:
E/cv::error(): OpenCV Error: Assertion failed (!fixedType() || ((Mat*)obj)->type() == mtype) in void cv::_OutputArray::create(cv::Size, int, int, bool, int) const, file /Volumes/Linux/builds/master_pack-android/opencv/modules/core/src/matrix.cpp, line 2191
when executing
cv::cvtColor(image, image, CV_BGR2GRAY);

It does not work because you are not sending the gray scaled mat to the detector. You keep sending the original in color.
cv::cvtColor(bgrMat, grayMat, cv::COLOR_BGR2GRAY);
Here, "grayMat" is the new simplified Mat you must give to the detector. But you keep sending "image" (the original full color Mat):
dlib::cv_image<unsigned char> img(image);

@EzequielAdrianM   I did send gray scaled mat to the detector, NOT the bgr mat. For ur convenience, I adjust the code sequence as following:
`
cv::Mat image_gray;
if (image.channels() > 1) {
cv::cvtColor(image, image_gray, CV_BGR2GRAY);
}
//CHECK(image.channels() == 3);
// TODO : Convert to gray image to speed up detection
// It's unnecessary to use color image for face/landmark detection
//dlib::cv_image<dlib::bgr_pixel> img(image);
dlib::cv_image<unsigned char> img(image_gray);
mRets = mFaceDetector(img);

`
Is it right ?

Yes, it is right

How to change the minimum detection area ? As u mentioned in stackoverflow


refactor: use secret file for object versions

Signed-off-by: Anish Ramasekar<EMAIL_ADDRESS>
Reason for Change:

Requirements

[ ] squashed commits
[ ] included documentation
[ ] added unit tests and e2e tests (if applicable).

Issue Fixed:

Does this change contain code from or inspired by another project?

[ ] Yes
[ ] No

If "Yes," did you notify that project's maintainers and provide attribution?
Special Notes for Reviewers:

Codecov Report

Merging #761 (8db43ec) into master (c06bc12) will decrease coverage by 0.36%.
The diff coverage is 38.70%.

@@            Coverage Diff             @@
##           master     #761      +/-   ##
==========================================
- Coverage   62.02%   61.65%   -0.37%
==========================================
  Files           7        7
  Lines         782      785       +3
==========================================
- Hits          485      484       -1
- Misses        263      267       +4
  Partials       34       34

/azp run pr-e2e-azure


Cannnot build

Hello I am attempting to make the example work, with nothing changed. I followed the steps by copy and pasting the commands. I cloned, yarn install, and yarn build. During yarn build I get the error:
lerna ERR! yarn run build exited 137 in '@solana/wallet-adapter-mathwallet'
lerna ERR! yarn run build stdout:
$ yarn clean && tsc -p tsconfig.json && tsc-esm -p tsconfig.json && tsc -p tsconfig.cjs.json
$ shx rm -rf lib/*
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
Killed
error Command failed with exit code 137.
lerna ERR! yarn run build exited 137 in '@solana/wallet-adapter-mathwallet'
lerna WARN complete Waiting for 16 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 137.
Basically it seems like App.tsx (in wallet-adapter/packages/starter/create-react-app-starter/src) "Cannot find module '@solana/wallet-adapter-react' or its corresponding type declarations." and "Cannot find module '@solana/wallet-adapter-react-ui' or its corresponding type declarations" and "Cannot find module '@solana/wallet-adapter-wallets' or its corresponding type declarations."
I figured that the yarn install should have taken care of it but I figured I could install them individually when I do yarn add @solana/wallet-adapter-base, that failed import goes away, however when I try to individually install the other ones, not only do the other failed imports not go away but @solana/wallet-adapter-base also somehow stops working.
This is a very weird problem and I assume it has something to do with my machine since I simply cloned the repo with no changes and it seems to be working for everyone else. Any ideas?
Edit: it seems that it is not specific to any part of the program, just anytime there is an import I get a "Cannot find module '@(any module)' or its corresponding type declarations.". These usually start with an @. It can find @solana.web3.js just fine I think it cannot find anything without a .something ending such as '@solana/wallet-adapter-wallets'.
@jordansexton

I have the same problem and still trying to figure it out.

I am having the same issue. Please help.

@jordansexton maybe? there was a recent shift in dependency management involving peerdependencies. I am also having this error

I did now what?

Hi!
try to add to devDependencies on package.json what is missing:
@solana/wallet-adapter-react-ui
@solana/wallet-adapter-wallets

I just ran the following commands:
git clone https://github.com/solana-labs/wallet-adapter.git

cd wallet-adapter
yarn install
yarn build

This builds all the packages, including the example and all its dependencies.
I then ran:
cd packages/starter/example
yarn dev

open http://localhost:3000

The example builds and runs successfully.

In case it helps, I'm using

Mac OS 12.2.1 (M1 Pro)
Node v16.14.0
Yarn 1.22.17

I tried many thing to get this code work, but I can figure it out yet.
@jordansexton I followed your step
git clone https://github.com/solana-labs/wallet-adapter.git
cd wallet-adapter
yarn install
yarn build

Here is the result when I try to build
..\crypto\wallet-adapter> yarn build
yarn run v1.22.17
$ lerna run build
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 29 packages: "yarn run build"
lerna ERR! yarn run build exited 1 in '@solana/wallet-adapter-base'
lerna ERR! yarn run build stdout:
$ yarn clean && tsc -p tsconfig.json && tsc-esm -p tsconfig.json && tsc -p tsconfig.cjs.json
$ shx rm -rf lib/*
$ echo '{"type":"commonjs"}' | npx json > lib/cjs/package.json && echo '{"type":"module"} ' | npx json > lib/esm/package.json
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
json: error: input is not JSON: Unexpected ''' at line 1, column 1:
        '{"type":"commonjs"}'
        ^
error Command failed with exit code 1.
lerna ERR! yarn run build exited 1 in '@solana/wallet-adapter-base'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Here  what I'm using
Git 2.35.1
Node 17.8.0  (I also tried with v16.14.0 with same result)
yarn 1.22.17
npm 8.5.4 (I also tried using npm instead of yarn with similar result)
Windows 10, x64 based PC
I tried to individually install modules like @MichaelMuz did and I was stuck at the same place.
Any suggestion for the next move ?
Thanks

If it can help others... I solved my problem by installing WSL for Windows https://docs.microsoft.com/en-us/windows/wsl/install-win10


Feature request: Select multiple nodes using rectangular selection

This a common UX operation for groups of items.
We need to decide how to differentiate between panning and selection modes. Maybe key modifier like Alt or Shift can be used.

ALready implemented using Shift.


How to handle https SSL_connect issue when deploy?

Hi, @stakach , this is not a spider-gazelle issue, but, just a discuss of https://github.com/spider-gazelle/spider-gazelle/blob/master/Dockerfile,
And, i have one SSL_connect issue which happen when i build my tiny myip app use alpine static on arch linux(latest), then deploy it on a older CentOS Stream release 8.
When i run it with following command, i get error.
[root@192 /]# ./myip -l
ip111.cn：从国内测试：<IP_ADDRESS> 中国SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
ip111.cn：从国外测试：<IP_ADDRESS> 香港
ip111.cn：从谷歌测试：<IP_ADDRESS> 香港
SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Timeout!

the complete backtrace is this:
Unhandled exception in spawn: SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed (OpenSSL::SSL::Error)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???

In fact, i ask this question on forum here, straight-shoota give me some really useful answer, but i still want to know your's solution in practice, i saw code like this, https://github.com/spider-gazelle/spider-gazelle/blob/master/Dockerfile#L100-L101, so, your way is just copy cert file to a place, and set SSL_CERT_FILE to there, right?
Thanks.

yeah, those lines and the earlier RUN update-ca-certificates


VirtualService: HeaderMatch fails with prefix=""

Hi folks,
Using Anthos Service Mesh 198-1 (Istio 1.9.8)
Tried deploying a VirtualService with header matching.
According to docs (https://istio.io/v1.9/docs/reference/config/networking/virtual-service/#HTTPMatchRequest):

If the value is empty and only the name of header is specfied, presence of the header is checked.

e.g.
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: api
spec:
  hosts:
    - "*"
  gateways:
    - gw
  http:
    - match:
        - uri:
            exact: /health
          headers:
            x-my-header:
              prefix: "" # Empty value means only the presence of the header is checked
      route:
        - destination:
            host: echo-service.default.svc.cluster.local
            port:
              number: 80

This doesn't work because I used prefix: "" rather than exact: "".
Perhaps this is simply a documentation issue?
The error in my ingress gateway:
2021-10-05T23:41:28.472641Z	warning	envoy config	gRPC config for type.googleapis.com/envoy.config.route.v3.RouteConfiguration rejected: Proto constraint validation failed (RouteConfigurationValidationError.VirtualHosts[i]: ["embedded message failed validation"] | caused by VirtualHostValidationError.Routes[i]: ["embedded message failed validation"] | caused by RouteValidationError.Match: ["embedded message failed validation"] | caused by RouteMatchValidationError.Headers[i]: ["embedded message failed validation"] | caused by HeaderMatcherValidationError.PrefixMatch: ["value length must be at least " '\x01' " runes"]): name: "http.80"
virtual_hosts {
  name: "*:80"
  domains: "*"
  routes {
    match {
      path: "/health"
      case_sensitive {
        value: true
      }
      headers {
        name: "x-my-header"
        prefix_match: ""
      }
    }
    route {
      cluster: "outbound|80||echo-service.default.svc.cluster.local"
      timeout {
      }
      retry_policy {
        retry_on: "connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes"
        num_retries {
          value: 2
        }
...

Thanks, I'm loving Istio!

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: api
spec:
  hosts:
    - "echo"
  gateways:
    - mesh
  http:
    - match:
        - uri:
            exact: /health
          headers:
            x-my-header: {}
      route:
        - destination:
            host: echo-service.default.svc.cluster.local
            port:
              number: 80

is the expected


thread problem

I am using python-xbee for a little complex case which thread will be used. I am able to request data from API mode coordinator to AT mode router in normal cases, but once I put the code in a thread (actually using "threading") it will never able to read any frame.
I know this should be something related to thread safety things. Then how to solve this problem?
Thanks~

This doesn't sound like an issue with the library. You'll find more help from the community by posting your issue to Stack Overflow and including the tags python and xbee. Include example code where you are seeing this issue so we can help trace down the issue.
Go ahead and respond to this comment with a link to your post on Stack Overflow so that anyone who comes across this can find your question (and hopefully an answer) there.

No, it is not. I think it should come from the thread related things because this library uses thread. I will check online how to fix this. Thanks anyway.


set build opt level in bevy dev mode

Objective

Run example faster

Solution

Set the opt level for Bevy dependencies

This will:

slow down build time when developing Bevy
slow down build time when running examples
run examples faster when not specifying --release
NOT impact other project that depends on Bevy

I think this might be a good call, as it improves the experience of new users testing the performance of bevy that don't yet understand Rust's --release flag / optimization defaults. But I'm also worried that this will have long term consequences that are harder to track than users complaining that bevymark is slow: Bevy Engine developers will now need to wait longer to evaluate their changes, unless they know (and/or remember) to change the optimization mode. I suspect that most wont. I'll probably forget on occasion. Across hundreds (and ultimately thousands) of contributors working on thousands of different features spanning many years, an extra 30 seconds on each build could literally waste years of human lives, in aggregate. Compare that to educating a few vocal Rust newbies about a core Rust behavior and I'm not sure thats a fair trade.

As bjorn3 already pointed out in a comment, the opt level of 3 applies to non-workspace members.
I agree that longer compile times can waste a lot of developer time. But most of the time when I want to evaluate changes in Bevy, Cargo will only have to recompile Bevy crates. And as workspace members, they still have the same optimisation level as before.

It will only add time on clean build (new checkout, rust updates, ...)
To reduce this overhead but still improve execution times, we could identify the few crates that have the larger impact on execution and only change build settings for those

Looking only at the new rendering pipeline examples, the dependency optimisations actually changes very little, but:

3d_scene_pipelined have roughly the same fps in release / debug (~10 FPS difference). The difference can be made up by compiling bevy_render2 with optimisations.
bevymark_pipelined has a dramatically lower fps in debug mode (~130 FPS difference for 10000 bevys). Optimised bevy_sprite2 fixes most of that difference, bevy_render2 the rest.

So... what is bevy_sprite2 doing that is so slow without optimisations?
Also, compile times:

crate
without optimisations
with optimisations

bevy_render2
5.3s
13.6s

bevy_sprite2
1.8s
7.4s

As bjorn3 already pointed out in a comment, the opt level of 3 applies to non-workspace members.
I agree that longer compile times can waste a lot of developer time. But most of the time when I want to evaluate changes in Bevy, Cargo will only have to recompile Bevy crates. And as workspace members, they still have the same optimisation level as before.

Ah interesting. So we're only optimizing dependencies. In that case I don't see much value in this. Most of the "work" happens in Bevy workspace crates (bevy_ecs, bevy_render, bevy_pbr, bevy_sprite, bevy_transform). Looks like @mockersf's perf tests corroborate that.

It will only add time on clean build (new checkout, rust updates, ...)

In my experience, incremental compiling in release still takes way longer for me, which gets worse the deeper in the crate tree I get.

So... what is bevy_sprite2 doing that is so slow without optimisations?

bevy_sprite2 is registers a lot of CPU-heavy work: we're extracting a ton of sprites, computing sprite vertex buffers / calculating transforms, etc.

bevy_sprite2 is registers a lot of CPU-heavy work: we're extracting a ton of sprites, computing sprite vertex buffers / calculating transforms, etc.

Maybe enable optimizations for bevy_sprite2 too by default?

Maybe enable optimizations for bevy_sprite2 too by default?

It increases the build time for that crate by 4. It adds only 5 seconds on my (fairly recent) CPU, not sure how much that would be on something older for a crate that a contributor may want to work on.

Oops correction: this line wouldn't apply when only optimizing dependencies.

In my experience, incremental compiling in release still takes way longer for me, which gets worse the deeper in the crate tree I get.

@mockersf was right to say that this would only affect clean builds.

Closing as it doesn't do what I though it did


Add "public" logs

Allow a bunch of settings for certain things that will be public:

Switch for channels
Switch for users
Array of channels to be private (if channels default to public) or to be public (if channels default to private)

Done


Tuya: EOF on RTSP stream

I've got a Philips branded Tuya baby monitor. It works as expected with both Tuya Smart and the Philips Avent app (currently using Tuya Smart). I can successfully get the rasps url but cannot stream anything as I only get a EOF error (with both your script + go2rtc and FFMPEG). Apparently the streaming url is not got or something else is broken as streaming only works in the Tuya app and in no other app/script/tool.
Any hint to debug it or figure out what the problem is?

Which script are you referring to?
get_stream.sh or get_tuya_stream_url.py?

Have you tried with HLS?

By the way, during testing phase, don't hook go2rtc yet. Call the script and try to play the output in something like VLC (just be fast, because the URL for Tuya streams expires in a few seconds).

I tried with HLS and RTSP. Both with the Python script. I tried with VLC and none is working.
I can share the camera if you give me an email address.

Both output a stream link, but none works, right?

Yes, both output a link and none works.

Got it. In this case, there's nothing I can do for you. The purpose of my scripts is to give you the stream URLs. If they don't work, that's beside the point. Sorry. :(
However, I have some suggestions for you:

Try this WIP WebRTC Tuya source for go2rtc: https://github.com/AlexxIT/go2rtc/pull/1379
I never tried, but there's this one too: https://github.com/AlexxIT/go2rtc/pull/1412

Oh, by the way, do you have Live Stream API active?

Alright. If you ever find a solution for this, I'd appreciate you let me know how. Good luck!


A smart todo application added

First thing, PLEASE READ THIS: ReactPlay Code Review Checklist

Description
Fully functional smart todo app built with React to keep track of the tasks you plan to complete within a specific amount of time, most probably a day. Users can create a task, edit a task, mark a task as 'complete' and delete a task and also can delete all the tasks by one click.
Resources

React Icons

Type of change

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Screenshots or example output

Hi @wyarejali
We have made a bunch of linting fixes recently and enabled some rules. Could you please pull the from the main, fix the linting errors(if any) and then push? We will finish the review right after that.


Plugin panics if there is more than 5000 apps

Since v3 api returns hrefs with full path vs v2 that returns them relative to the api endpoint the pagination code is broken when there is more than 5000 apps as getting page 2 results in a 404 due to requesting the following url.
/https://api.mydomain.com/v3/apps?page=2&per_page=5000

vs expected
/v3/apps?page=2&per_page=5000

Duplicate of https://github.com/cloudfoundry/stack-auditor/issues/21


Add issue referencing (#) to the action bar

Maybe we add it as an action bar key instead? I like having the return key
Sent with GitHawk

I'm leaning towards this now. Should I create a new issue in favor of this one?
Originally posted by @BasThomas in https://github.com/GitHawkApp/GitHawk/issues/2183#issuecomment-431130380
Opened in favor of #2183

This should add a # at the cursor point in the message and trigger the issue referencing interface.

Do you think numbering and/or quoting should also have action bar shortcuts ?

I don't feel like we should add them right now, or how they should work. Quoting is already in place for comments. Numbering is a bit trickier I think?

But feel free to open separate issues for them if you feel like it.


Network: Add support for sticky DHCPv4 dynamic allocations for ovn NICs

This PR introduces the instance volatile key volatile.<name>.last_state.ip_addresses which is used to store a comma-separated list of the DNS IPs associated to an OVN NIC port on last start.
This is then provided to the OVN driver when creating the port so that the OVN driver can choose to allocate this IP to the port if it is still appropriate to use an available for use.
This fixes an issue where, because OVN allocates IPs from the subnet sequentially (unlike dnsmasq), if an instance with an IP lower than another instance is stopped/deleted and then that other instance is rebooted it will be then allocated that lower IP.
Whilst technically correct, there are some applications (Juju) that expect IPs to remain allocated across a reboot.
Fixes #11658

@peppepetra this should help with the DHCPv4 reboot issue.

Documentation preview available at: https://linuxcontainers.org/lxd/docs/pr.11686/


How can I edit and modify the color values of a theme? Is there any way to know the corresponding position of these indexed colors

Thank you very much for your work "fltk-theme". It is really great and gives the fltk framework a beautiful appearance. However, I hope to be able to customize the theme and allow users to dynamically adjust it. This requires understanding which colors correspond to these indices and where they will appear. Previously, I searched for them by their color values, but this method was difficult.

Hello
So the corresponding index can be found here:
https://www.fltk.org/doc-1.4/fltk-colormap.png
The cmap macro just basically calls Fl::set_color(index, r, g, b) or in fltk-rs terms app::set_color(Color::by_index(index), r, g, b), however some of the colors are automatic, like when setting the background color, this will also change the gray ramp. and how deactivated widgets would appear.
See also the dynamic.rs example, which loads map files from examples/themes (where you can find some comments as well).
You can also try experimenting without fltk-theme:
    app::set_color(Color::Background, 0x21, 0x25, 0x2b);
    app::set_color(Color::Background2, 0x28, 0x2c, 0x34);
    app::set_color(Color::Foreground, 0xab, 0xb2, 0xa2);
    app::set_color(Color::Selection, 0x32, 0x38, 0x42);
    app::set_color(Color::Inactive, 88, 0, 0);
    app::set_color(Color::by_index(some_index), r, g, b); // fill rgb values

The themes were taken from https://groups.google.com/g/fltkgeneral/c/3A5VC_854ok/m/uFhew6WJBAAJ, so you might be able to get more information from there.


[stable/instana-agent] Add the ability to enable a minimal pod security policy for the Instana Agent

What this PR does / why we need it:
Add the ability to enable a minimal PodSecurityPolicy for the Instana agent. Some Kubernetes clusters require pods to have a PodSecurityPolicy in order to be accepted into the cluster.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/cc @jbrisbin

/cc @nfisher

/uncc @wiggzz @jbrisbin

Actually, don't review/approve this year. I'm getting a partner of ours to test this change on one of the clusters they manage.

@unguiculus Would it be possible to add @nfisher to the list of helm members: https://github.com/orgs/helm/people ? He's on the list as a maintainer/approver in our OWNERS file and also the Chart.yaml but can't review PRs because he's not a member of the GitHub org. Thank you!

This is nice. I created a cluster with some very restricted default pod security policies. Then I tried install the helm chart and saw that it failed because the default policy had been applied.
Then I tried again with the podSecurityPolicy.create enabled, and it worked and began monitoring the cluster. So I think it is definitely nice to have a built in PSP for those who do not want to craft one.
The only other thing I mentioned, is that it would be nice to be able to also specify an existing "privileged" PSP for the service account to use by default.

/cc @wiggzz

/lgtm


[Feature Request] Is it possible to add a feature to build underwater?

Fixed in the next release~


Change log level to improve messages on error/invalid requests

Currently all requests that fail write a log as error.
Improve that by defining the level based on the error, for instance:

[ ] 5xx -> error
[ ] 404 -> warning
[ ] 4xx -> error

Windshaft is no longer a server so this doesn't make sense anymore.


Problem disabling autocomplete quotation marks and brackets

I love your Awesome VIM config, and it has been a great experience using it.  The only thing that I really need to disable is the autocomplete function to complete a closing quotation mark and bracket when I insert a left one.  Would you please add the choice or instruction to disable it?  I see many people prefer not to have this function enabled, but they can't figure out how to change the default mapping in the config file, extended.vim.  Thanks a lot!

In my_configs.vim add the following to disable auto pairs:
let g:AutoPairs = {}


Out of date

These instructions no longer match the page layout in Azure portal (and may no longer be relevant)

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

ID: 0ce34b51-c8d3-32cc-6a22-7928fb522a05
Version Independent ID: 59b90561-8d1e-6521-0f60-98fbfda70922
Content: Quickstart - Access & create new tenant - Azure AD
Content Source: articles/active-directory/fundamentals/active-directory-access-create-new-tenant.md
Service: active-directory
Sub-service: fundamentals
GitHub Login: @ajburnle
Microsoft Alias: ajburnle

@arvidcarlandercompose
Thanks for your feedback! We will investigate and update as appropriate.

@arvidcarlandercompose
Walking-through the documentation, for step 3, I see that it says to "Select Identity, and then select Azure Active Directory". However, this step is outdated and it's best to "search for Azure Active Directory and select it".
I have created a PR to update the documentation and will now close out this issue. Please allow some time for the changes to reflect and if you don't see the document update, please let me know.

I will be more than happy to re-open this issue and look into what happened.
Thank you for your time and patience!


URL clean command

Clean out URLs from event description - to get around annoying bug in gcal MOBILE, where the URLs are not parsed and get duplicated, on every edit!
gcal-move-it.py clean-urls <month-index> [-dryrun]

[x] DO write unit tests!

fixed!


x/pkgsite: Something is wrong with formatting

Consider this package documentation: https://pkg.go.dev/github.com/joho/godotenv#Load
This is the code:
// Load will read your env file(s) and load them into ENV for this process.
//
// Call this function as close as possible to the start of your program (ideally in main)
//
// If you call Load without any args it will default to loading .env in the current path
//
// You can otherwise tell it which files to load (there can be more than one) like
//
//		godotenv.Load("fileone", "filetwo")
//
// It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults
func Load(filenames ...string) (err error) {
	filenames = filenamesOrDefault(filenames)

	for _, filename := range filenames {
		err = loadFile(filename, false)
		if err != nil {
			return // return early on a spazout
		}
	}
	return
}

If you call Load without any args it will default to loading .env in the current path appears under the function signature and also in bold elsewhere.

@joho

Fixing in https://github.com/joho/godotenv/pull/197
@pjebs as your comment was just my name it took me quite a while to look into what this actually was, and then a bit longer to care.
In future when summoning maintainers you might want to add a bit of context.


Added fix for iOS when app is killed app

Use hasListeners to check whether or not listeners have been added yet.
Queue the listeners and once the listeners are added, send them to the event.

I have merged https://github.com/eddieowens/react-native-boundary/pull/46, as Android was not working in the background. And that PR hasn't been merged for months.
It should now be fully working for both Android & iOS when the App is killed (both Android <8 and 8+).
I have modified it, so you can specify your own title/text and icon for the ongoing notification.
<meta-data  android:name="rnboundary.notification_title"
    android:value="Location found"/>
<meta-data  android:name="rnboundary.notification_text"
    android:value="You are close to the to the geofence"/>
<meta-data  android:name="rnboundary.notification_icon"
    android:resource="@mipmap/ic_notification" />```

It seems like there hasn't been any update on that repo for months, I wonder if we should move to another repo and maintain it?

Changing repos may be useful. We would want to make sure that we upload the new version to npm as well. :)

Whats the status on this @NuclearKev @cladjules ? Will this be released in some way?
Thanks already for the great work!

I tested it in iOS, it is working well. The package should be released soon? @NuclearKev  @cladjules

Hey. I am currently testing this on iOS and I am facing a bit strange behaviour.
When the App is in fore- or background everything is normal. When the app is killed and the device leaves a geofence, the onExit event is triggered twice, with a ~1 second delay.

The first event in this screenshot is from when the app was in the foreground.
The following two arrived when the app was killed. Why is it duplicated? Can anyone of you reproduce this as well?

@cladjules I am suddenly facing several new issues. Might be related to issues with new Android patches? (I know they worked a bit on these APIs for the Corona Apps)
Sometimes it fails to add geofences.
I get the log message:
 RNBoundary: Failed to add geofence.

and the function is rejected with an error with the message 1000:.
Secondly, it happens quite often (more or less 50% of the time) that geofence crossings are not reported when the app is killed. This was working pretty stable before. Any idea what could be the reason for this?
@NuclearKev do you face the same behavior?

Thanks for this great work and it works in ios without any issues but  I also get the same issue in android now. and is giving me the error
error :( Error: 1000:
at Object.promiseMethodWrapper [as add] (NativeModules.js:103)
at index.js:35
Would it be possible for you @cladjules @NuclearKev to check this and help.It would be really helpful it this gets resolved

I have merged #46, as Android was not working in the background. And that PR hasn't been merged for months.
It should now be fully working for both Android & iOS when the App is killed (both Android <8 and 8+).
I have modified it, so you can specify your own title/text and icon for the ongoing notification.
<meta-data  android:name="rnboundary.notification_title"
    android:value="Location found"/>
<meta-data  android:name="rnboundary.notification_text"
    android:value="You are close to the to the geofence"/>
<meta-data  android:name="rnboundary.notification_icon"
    android:resource="@mipmap/ic_notification" />

It seems like there hasn't been any update on that repo for months, I wonder if we should move to another repo and maintain it?

Would it also work for android 10+, given the baclground restrictions that were introduced?

Would it also work for android 10+, given the baclground restrictions that were introduced?

I've been using the a fork of this on Android 10+ for months and it's been working fine. You just need to make sure you have the correct permissions enabled. Here is the fork if you want to use it. https://github.com/skedlife/react-native-boundary


[Bug v2]: Can't update dynamic scripts in opt-out mode when no consent is made.

Description
Hi! Is it possible to pass default_enabled_categories to _manageExistingScripts in updateScripts call? I use opt-out mode. I need this behavior to update dynamic scripts when no consent is made. In this case updateScripts just do nothing, because cookie is not set and default_enabled_categories are not provided, but they exist in config.

Proposed solution
There are two ways to do this:
1.
_cookieconsent.updateScripts = function(must_enable_categories?: string[]){
            _manageExistingScripts(must_enable_categories);
 }

_cookieconsent.updateScripts = function(){
            _manageExistingScripts(default_enabled_categories); //pick from config if opt-out mode
 }

Additional details
Can this be made based on 2.9.1 version? I use it right now.

This is a bug actually, will be fixed in the upcoming release!

@orestbida thanks! Do you have a date of the release?

Most likely by the end of the week.

@HannaHabr v2.9.2 is out!


LEGO: Pull request from lego/hb_935_20170721151735580 to master

LEGO: Pull request from lego/hb_935_20170721151735580 to master with localized lcls

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


Custom DataType DB Objects

I'm looking to experiment with a custom DataType to handle accessing of a structures virtual members. I can create a class ending in DataType so the classloader loads it and I get the intended behavior until it gets added to a DataTypeManager. I haven't found anything in the API, but is there a way I can register a callback for a corresponding DB class for when my DataType is added to the DataTypeManager? I would like it to be able to work in a plugin.
I think I could extend an existing DataTypeManager to get it to create the DB object but I'm uncertain if the correct DB object will appear in the listing.

This can get rather confusing as to what technique to use.   New DB implementations should not be  considered an option, although BuiltIn types may. If the result is an in-memory structure, you can consider either a FactoryDataType or an analyzer, both result in applied Structure datatypes applied to memory, the resulting in-memory structures would be recognized by the Decompiler.
Other approaches have the following drawbacks:

Decompiler will not know how to handle adhoc BuiltIn types
If new BuiltIn type is not included within a Ghidra distribution it will be difficult to share project files
If type is Dynamic it may only be applied to initialized memory or in pointer form with Function variables/parameters.
I am sure I omitted other considerations.  You may want to look at the approach adopted by the MicrosoftCodeAnalyzer module for applying RTTI data structures.

@ghidra1 I actually did mirror the MicrosoftCodeAnalyzer module for the creation of gcc RTTI data structures in my C++ Class Analyzer
This is for the same thing I'm trying to do with #1016 . I want to be able to tell the decompiler that when it accesses a structures _vptr field that is is pulling a ptrdiff_t from the offset_to_virtual_base array. My hope is that it will take the constant in the array, apply it and resolve the correct field. From the perspective of the decompiler, the offset of the virtual member at runtime doesn't actually matter. For decompiling purposes it is only necessary to know to access the offset of the virtual member in the structure of the this parameter.
I was at one point able to do it with a StructureDataType which I tested in python. It just didn't work once added to the DataTypeManager because the manager would create a StructureDB which wouldn't replicate the behavior. I scrapped the idea and came back to it this morning wondering if it was actually possible.

Did you isolate why the StructureDataType and StructureDB did not behave the same.  This sounds fishy and is worth identifying the cause, particularly since it would be a much cleaner solution if it works.  These two implementation are suppose to act the same given they are associated with the same DataTypeManager / DataOrganization.

Did you isolate why the StructureDataType and StructureDB did not behave the same. This sounds fishy and is worth identifying the cause, particularly since it would be a much cleaner solution if it works. These two implementation are suppose to act the same given they are associated with the same DataTypeManager / DataOrganization.

I had created a DataType which extended StructureDataType. This allowed me to override the behavior when accessed with a negative index. When adding it to a DataTypeManager it sees it is a Structure instance and creates a StructureDB instance for it which doesn't contain the desired behavior.

Ooo... I guess you found out the hard way you should not attempt to extend any datatype which is not a BuiltInDataType since other types must resolve to a corresponding DataTypeDB.  Any new type you create should extend BuiltInDataType, although as mentioned the decompiler will not know how to cope with such types.  Adding new DB DataTypes is not something we recommend due to the very large impact it would have.
We are aware of the case you are trying to solve and others like it, although I don't know the timeline for a solution.  I would be curious to see your custom Structure implementation which seemed to solve your case.

It was just a prototype. It may work in theory but it depends on how the decompiler fetches the component. All I did was override getComponentAt and a few other methods to accept a negative input. Also virtual inheritance is implementation defined so how the data is laid out is compiler specific. Visual Studio has the vbase array directly after the vftable while gcc has it directly before it.
Now that I'm thinking about it again, having a "pointer to member" datatype might work. That is assuming the constants will get resolved if I set the value of the varnode to the correct address.
I guess another possibility with the way things currently are would be to make the structure at the start of the base array. I would then have to increment the value of the varnode to correctly offset it.
Probably going to have to go back to the drawing board. If I need to do testing with a DataTypeDB I'll likely patch in a way of creating a callback for faster testing. I am hoping I can get away with just manipulating the varnodes and references.
Thank you for your time.


AST Deserialization Issue On CELT-0.7

Hi I'm having this error pop up whenever i'm trying to build the project, even after i created a blank project and cloning mumblekit and installing from scratch via read-me instruction.
error: input is not a PCH file: '/Users/kai/Library/Developer/Xcode/DerivedData/TestMumble-dujksylaedcqpwheqtkzmmavptvw/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/9107948004434689704/CELT-0.7.pch.gch'
fatal error: file '/Users/kai/Library/Developer/Xcode/DerivedData/TestMumble-dujksylaedcqpwheqtkzmmavptvw/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/9107948004434689704/CELT-0.7.pch.gch' is not a valid precompiled PCH file
I'm using Xcode 10.1 and swift 4, building a project for the iOS phone. If you need any more info let me know

@KaiZhone Very nice.... that also fixed it for me, too.


Add  algorithms related to traversal, deletion etc operations in data structures like linked list, stack, queue

Comment on the issue so that I can assign this issue to you

Hey , i would like to contribute on this issue

Sure you can Contribute to this issue.

I have assigned this issue to you

Hey , i would like to contribute on this issue

hey , i would like to  contribute to this issue.

hey , i would like to contribute to this issue.

I am assigning this to you also

kindly assign this to me . I have an very efficient algorithms and want to contribute in this @Mridul-1-Sharma

I would like to contribute to this issue @Mridul-1-Sharma

ok Start contributing I have assigned it you also

ok Start contributing I have assigned it you also

ok Start contributing I have assigned it you also

please assign this to me

This repository is excluded from hacktoberfest


Add tagview from another taglistview

Hi
Is it possible to add/copy tagview from a taglistview to another taglistview now? I tried, but it just freeze and seems to be in a infinite loop eating up all memory. TagView is not conformed to nscopy so it seems I have to recreate the same tagview using all the attributes again. Any thing I missed?

You are right, currently you can't copy a tag view. Instead, you can just create new tag views using the same content.


Support for histoCAT image/folder generation

For those of us migrating to Steinbock from the IMCPreprocessingPipeline, it is still common to check the quality of the segmentation/single-cell data by loading the masks/images into histoCAT. So far I have not seen a command in the CLI usage to generate histoCAT-compatible folders, and have had to use the code in the old IMCPreprocessing jupyter notebook script to accomplish this (with a bit of tweaking since the directory structure has changed). Would it be possible to add a command within the Docker implementation that does this?

steinbock v0.9.0 now supports a steinbock export histocat command, see https://bodenmillergroup.github.io/steinbock/latest/cli/export/#histocat


Upgrading from 1.5.10 to 1.6.0 causes the PyTorch WandB logger to produce multiple experiments

🐛 Bug
Upgrading from 1.5.10 to 1.6.0 causes the PyTorch WandB logger to produce multiple experiments.
Expected behavior
Lightning should create only a single experiment for a single training job when logging with DDP and Weights & Biases (WandB) across multiple compute nodes and GPUs.
Additional context
This only occurs on my LSF compute cluster when I upgrade to PyTorch Lightning 1.6.0. Downgrading to version 1.5.10 resolves the issue.
cc @awaelchli @morganmcg1 @AyushExel @borisdayma @scottire @manangoel99

Hey @amorehead
Are you running the latest version of wandb? Because version >= 0.12.10 had some improvements that were integrated with PL 1.6.
On the other hand, the source of the problem might be that the rank_zero_only doesn't work properly because the rank variable from LSF is not included here:
https://github.com/PyTorchLightning/pytorch-lightning/blob/2ee187ea1375a75aaf04dea29c7532eb7d037b0e/pytorch_lightning/utilities/rank_zero.py#L39-L42
We would probably have to include the variable JSM_NAMESPACE_RANK.

Could you give my patch a try?
pip install git+https://github.com/PyTorchLightning/pytorch-lightning@bugfix/rank-zero-lsf
(or checkout the branch rank-zero-lsf if you have the PL source locally)

@awaelchli, even with version 0.12.11 of WandB, version 1.6.0 of PyTorch Lightning creates duplicate experiments in WandB's online logging platform. However, with your patch, my issues with version 1.6.0 of Lightning are resolved! Thank you for your help and quick reply/solution

@amorehead great! Happy to help.
I'll keep the issue open until my fix is merged.


City name not appearing when generating reports in "Portuguese - Brazil"

Describe the bug
When we generate the reports in "Portuguese - Brazil", some sentences keep "São Paulo" instead of using the actual city name.
Expected behavior
All sentences in the report should use the analysed city name.
Screenshots
We noticed that some cells in the "Portuguese - Brazil" column ("_report_configuration.xlsx" > "languages" worksheet > "Portuguese - Brazil") still have "São Paulo" instead of {city_name}:

Additional context
I edited the "_report_configuration.xlsx" file in Excel to address the issue and also adjusted some suboptimal translations observed.
File:
_report_configuration_adjusted_Giovani.xlsx

Hi @gigioLR , I see that hard-coded city names from the initial translations for our 25-city study is an issue for a few cities; thank you for picking up on this.  I'm making a start on an update to address this, and will let you know once this has been merged in the main branch.   Thank you for spotting and letting us know! Carl

@carlhiggs, I absolutely can test it! I'll give you feedback by Friday.

Hi @carlhiggs , we tested here and it asks for the "template_web" worksheet, which is missing.
Report (web PDF template; English)
Traceback (most recent call last):
  File "/home/ghsci/process/generate.py", line 166, in
    main()
  File "/home/ghsci/process/generate.py", line 162, in main
    r.generate()
  File "/home/ghsci/process/subprocesses/ghsci.py", line 123, in generate
    generate_resources(self)
  File "/home/ghsci/process/generate.py", line 142, in generate
    generate_report_for_language(
  File "/home/ghsci/process/subprocesses/_utils.py", line 317, in generate_report_for_language
    capture_return = generate_scorecard(
  File "/home/ghsci/process/subprocesses/_utils.py", line 1254, in generate_scorecard
    pages = pdf_template_setup(config, 'template_web', font, language)
  File "/home/ghsci/process/subprocesses/_utils.py", line 1024, in pdf_template_setup
    elements = pd.read_excel(
  File "/env/lib/python3.10/site-packages/pandas/io/excel/_base.py", line 486, in read_excel
    data = io.parse(
  File "/env/lib/python3.10/site-packages/pandas/io/excel/_base.py", line 1551, in parse
    return self._reader.parse(
  File "/env/lib/python3.10/site-packages/pandas/io/excel/_base.py", line 746, in parse
    sheet = self.get_sheet_by_name(asheetname)
  File "/env/lib/python3.10/site-packages/pandas/io/excel/_openpyxl.py", line 569, in get_sheet_by_name
    self.raise_if_bad_sheet_by_name(name)
  File "/env/lib/python3.10/site-packages/pandas/io/excel/_base.py", line 597, in raise_if_bad_sheet_by_name
    raise ValueError(f"Worksheet named '{name}' not found")
ValueError: Worksheet named 'template_web' not found

HI @gigioLR , I actually made quite a few additional changes to the templating yesterday --- so changes combined with code and the Excel file --- but I think if you are using the old code, it should still work if you open the Excel file and rename the worksheet "policy_spatial" to "template_web".  Its basically the same (some small difference to English prose).
It was a coincidence that yesterday I was already working on updating the spatial template, in addition to the translation aspect, and then my colleague Melanie got in touch about the redesign of the policy/spatial combined template (to use the new policy instrument).  It will probably take some time for all of this to work smoothly -- but if you do run the new code with the new spatial template, I think you will appreciate this.   It has a preview of a 'context' box that you can configure, and a more detailed study region map with satellite basemap.
Anyway - let me know how you go, and apologies for the mix up in that way.

Oh, I see.
Our worry was that the error also happened using the latest release, but everything went well after the name change.
We are looking forward to test the new spatial/policy template!
Thanks, @carlhiggs !


⚠ Bofrost.de has degraded performance

In 7fc0dd1, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1309 ms

Resolved: Bofrost.de performance has improved in 490d561 after 6 minutes.


Video Listener

This looks like an awesome script.
I need something just like this but if the end user is watching a presentation video we don't want it redirecting. How difficult would it be to add a video listener to this?
Thanks!

I have the same issue with file uploader

You could pause and resume idletimer, but I would personally destroy it when the video starts and recreate on pause or stop. Same would apply to file upload.
Is there a reason idletimer should listen to those events directly instead of coding for it externally?