METRON-2243: [UI] Update npm dependencies to resolve audit warnings

Contributor Comments
Link to ASF Jira ticket: https://issues.apache.org/jira/browse/METRON-2243
This PR updates a few direct dependencies and multiple nested dependencies in the Alerts and Management UIs due to vulnerabilities listed when running an npm audit report. I updated the dependencies using npm audit fix, which only updates to patch or minor versions of packages. In theory, this ensures we do not introduce breaking changes into the project.
After using the command mentioned above, there is a single low severity vulnerability in a nested dependency for our unit test runner, Karma. You can read more about the vulnerability here: https://www.npmjs.com/advisories/786. Because of the low-risk nature of the issue, I chose not to bump this dependency to its next major version and risk the chance of introducing a breaking change. Whenever we update to Angular 8, this issue will be resolved (that version of Angular uses the next major version release of Karma).
Testing
Clone this branch and run npm audit in either of the UI application directories. The audit report should only show the low-level vulnerability mentioned above.
Since this PR doesn't update anything but minor and patch releases of dependencies, there should be no changes in the appearance or behavior of either the Alerts or Management UI. Unit and e2e tests pass as expect, and a manual visual regression test will show no changes have been introduced into either UIs.
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[ ] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[ ] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[ ] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[ ] Have you included steps or a guide to how the change may be verified and tested manually?

[ ] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[ ] Have you written or updated unit tests and or integration tests to verify your changes?

[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[ ] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

[ ] Have you ensured that any documentation diagrams have been updated, along with their source files, using draw.io? See Metron Development Guidelines for instructions.

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

+1

Spun up full dev and did some sanity testing on the UIs
Ran npm auditon both metron-alerts and metron-config directories. Both reported 1 low severity vulnerability (as already mentioned in the PR description)

Thanks @sardell for the fix!

Hello, may I ask you a question? For testing purposes, I compiled metron according to the source code on github.
Reference links are as follows: https://github.com/apache/metron/tree/master/metron-deployment/packaging/docker/ansible-docker.
The last command to execute is MVN clean package-DskipTests.
The result is successful, showing build success.
Excuse me, how many jar packages are generated by this operation?
How to start metron in docker? Or can we say something about the next operation? I can't find duying in the community anymore. Thank you very much!

@luozhenwei It sounds like your questions are unrelated to this PR, so they have a low likelihood of being answered here. Did you search the Metron user mailing list to see if someone has asked a similar question? You should start by searching for answers there and asking if you cannot find the answers you're looking for. Though we aren't perfect, we try to actively answer as much as we can there. We also have an active Slack channel. You can join by emailing<EMAIL_ADDRESS>and asking for an invite to the channel. Hope this helps!


hyprdim: 2.2.1 -> 2.2.2

Description of changes

Release: https://github.com/donovanglover/hyprdim/releases/tag/2.2.2
Changes: https://github.com/donovanglover/hyprdim/compare/2.2.1...2.2.2

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg eval


Swift Compiler Error Group

Error while building: No such module 'PKHUD'
/Users/user/mymonero-app-ios/Modules/WalletWizard/ViewControllers/CreateWallet_ConfirmMnemonic_ViewController.swift:36:8: No such module 'PKHUD'
Any idea how to fix that?

Hello, per the installation instructions, you need to do a 'pod install'

I did. Thats why I was asking how to fix it.

This probably isn't an issue with the project but rather an issue with your dev env or workflow so in future I might close these sorts of questions, and so I would generally recommend popping into IRC for this sort of thing in the future so we can look at it more interactively.
For now, if you didn't get an error on installation, ensure you're opening the .xcworkspace file rather than the .xcodeproj file per Cocoapods usage guidelines.


Hidpi

Hi!
This PR enables scaling the UI for HiDPI displays. It also includes my previous PR, so if you want to accept it, it should probably be merged after the previous one. The changes are stand-alone though, so I can extract the HiDPI changes if you want.

Hi, thanks again for taking the time to fix this. I would like for this PR to only have the changes to scale for HiDPI.
I don't have a HiDPI screen to test these changes, so if you can post some prints or record a gif of how it looks like would be nice.
Also, can this be a setting? So we can enable and disable scaling by changing the settings.json. { "enableDisplayScaling": true }.
Thanks

I've finally had some time to create screenshots and minimize the changes in this branch a bit:

hiDPI mode is now configurable. If there is no hidpi-part in the config, it's off
The branch now only contains hiDPI-related stuff

The hiDPI-scaling will only be used in the following conditions:

it is enabled in settings.json
the screen scaling is set to anything other than 100%

so for users with low-res screens or users with high-res screens but without scaling, everything looks the same.
I've created a few screenshots to illustrate this. Note that the windows in the first two screenshots have exactly the same physical size on my screen, with the first being almost unreadable since everything is really tiny:
Highres screen, hiDPI mode disabled

Highres screen, hiDPI mode enabled
The UI gets scaled, as does the content. This is very basic scaling done by GLFW, just enough to make THDWB usable on high-res screens.

Lowres screen, with hiDPI mode enabled
Note that this looks exactly like it would without this patch, so no change for users with low-res screens.


fix(deps): update images to latest

This PR contains the following updates:

Package
Type
Update
Change

icr.io/ibm-iac-charts/sysdig-deploy
helm_release
patch
1.37.12 -> 1.37.16

icr.io/ibm-iac/vuln-runtime-scanner

patch
1.6.7 -> 1.6.9

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

:tada: This PR is included in version 1.0.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add certificates tables

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
Add example SQL query results here (please include the input queries as well)

select * from oci_certificates_management_association where associated_resource_id = ''

select * from oci_certificates_management_association where id = ''

select * from oci_certificates_management_ca_bundle

select * from oci_certificates_management_certificate where name = 'API_Client1'

select * from oci_certificates_management_certificate where id =''

select * from oci_certificates_management_certificate_authority

select cmcav.* from oci_certificates_management_certificate_authority cmca
INNER JOIN oci_certificates_management_certificate_authority_version cmcav
ON cmca.id = cmcav.certificate_authority_id

select * from oci_certificates_management_certificate_version

select cmc.id, cmcv.* from oci_certificates_management_certificate cmc
INNER JOIN oci_certificates_management_certificate_version cmcv
ON cmc.id = cmcv.certificate_id

select
    id,
    name,
    config_type,
    issuer_certificate_authority_id,
    description,
    certificate_rules,
    time_of_deletion,
    lifecycle_details,
    current_version,
    subject,
    certificate_revocation_list_details,
    key_algorithm,
    signature_algorithm,
    certificate_profile_type,
    lifecycle_state as state
from
oci_certificates_management_certificate
where config_type = 'IMPORTED'

select
    id,
    name,
    config_type,
    issuer_certificate_authority_id,
    description,
    time_of_deletion,
    kms_key_id,
    lifecycle_details,
    certificate_authority_rules,
    current_version,
    certificate_revocation_list_details,
    subject,
    signing_algorithm,
    lifecycle_state as state
from
oci_certificates_management_certificate_authority

select
    certificate_authority_id,
    version_number,
    stages,
    serial_number,
    issuer_ca_version_number,
    version_name,
    subject_alternative_names,
    time_of_deletion,
    validity,
    revocation_status
from
oci_certificates_management_certificate_authority_version

select
    id,
    name,
    description,
    lifecycle_details,
    lifecycle_state as state
from
oci_certificates_management_ca_bundle

select
    cmca.id,
    cca.name,
    cca.ca_bundle_pem
from
    oci_certificates_ca_bundle cca
    inner join oci_certificates_management_ca_bundle cmca
    on cca.ca_bundle_id = cmca.id

select
    cca.name,
    cca.ca_bundle_pem
from
oci_certificates_ca_bundle cca
where cca.ca_bundle_id in (
   select id from oci_certificates_management_ca_bundle
)

select
    ccab.certificate_authority_id,
    ccab.certificate_authority_name,
    ccab.serial_number,
    ccab.certificate_pem,
    ccab.version_number,
    ccab.validity,
    ccab.stages,
    ccab.cert_chain_pem,
    ccab.version_name,
    ccab.revocation_status
from
    oci_certificates_certificate_authority_bundle ccab
inner join oci_certificates_management_certificate_authority cmca
on ccab.certificate_authority_id = cmca.id

select * from oci_certificates_ca_bundle where ca_bundle_id = ''

select * from oci_certificates_certificate_authority_bundle where certificate_authority_id = ''
AND version_number = 2

select * from oci_certificates_certificate_bundle where certificate_id = ''
and certificate_bundle_type = 'CERTIFICATE_CONTENT_WITH_PRIVATE_KEY'

select
    s.id,
    s.bastion_id,
    s.display_name,
    s.bastion_name,
    s.target_resource_details,
    s.key_details,
    s.session_ttl_in_seconds,
    s.bastion_user_name,
    s.ssh_metadata,
    s.key_type,
    s.lifecycle_state as state
from oci_bastion_session s
INNER JOIN oci_bastion_bastion b
ON b.id = s.bastion_id

select
    ccb.certificate_id,
    ccb.certificate_name,
    ccb.version_number,
    ccb.serial_number,
    ccb.validity,
    ccb.stages,
    ccb.certificate_pem,
    ccb.cert_chain_pem,
    ccb.private_key_pem,
    ccb.version_name,
    ccb.revocation_status,
    ccb.certificate_bundle_type
from
    oci_certificates_certificate_bundle ccb
inner join oci_certificates_management_certificate cmc
on ccb.certificate_id = cmc.id
where ccb.certificate_bundle_type = 'CERTIFICATE_CONTENT_WITH_PRIVATE_KEY'

select
    id,
    name,
    certificates_resource_id,
    associated_resource_id,
    association_type,
    lifecycle_state as state
from
oci_certificates_management_association

select
    id,
    name,
    config_type,
    issuer_certificate_authority_id,
    description,
    certificate_rules,
    time_of_deletion,
    lifecycle_details,
    current_version,
    subject,
    certificate_revocation_list_details,
    key_algorithm,
    signature_algorithm,
    certificate_profile_type,
    lifecycle_state as state
from
oci_certificates_management_certificate

select
    id,
    name,
    config_type,
    issuer_certificate_authority_id,
    description,
    time_of_deletion,
    kms_key_id,
    lifecycle_details,
    certificate_authority_rules,
    current_version,
    certificate_revocation_list_details,
    subject,
    signing_algorithm,
    lifecycle_state as state
from
oci_certificates_management_certificate_authority

select
    cmcav.certificate_authority_id,
    cmcav.version_number,
    cmcav.stages,
    cmcav.serial_number,
    cmcav.issuer_ca_version_number,
    cmcav.version_name,
    cmcav.subject_alternative_names,
    cmcav.time_of_deletion,
    cmcav.validity,
    cmcav.revocation_status
from
    oci_certificates_management_certificate_authority_version cmcav
inner join oci_certificates_management_certificate_authority cmca
on cmca.id = cmcav.certificate_authority_id

select
    cmcv.certificate_id,
    cmcv.version_number,
    cmcv.stages,
    cmcv.serial_number,
    cmcv.issuer_ca_version_number,
    cmcv.version_name,
    cmcv.subject_alternative_names,
    cmcv.time_of_deletion,
    cmcv.validity,
    cmcv.revocation_status
from
oci_certificates_management_certificate_version cmcv
inner join oci_certificates_management_certificate cmc
on cmcv.certificate_id = cmc.id

</details>

Thanks for creating the tables @scotti-fletcher, apologies for the delayed review.
All the merge conflicts and doc updates have been made in https://github.com/turbot/steampipe-plugin-oci/pull/516
Thanks once again for the contribution 👍.


fix(autocomplete): not scrolling to active option when pressing home/end

Fixes the autocomplete not scrolling to active items that were highlighted by pressing home or end.
Switches up the logic to scroll to any newly-focused options. This should make it more future-proof, if we add more shortcuts to the key manager.

Relates to #3496.

I don't think this "resolves" 3496... the home/end keys should act like home/end keys while on the input string. Right now they are blocked which should never happen.

I haven't mentioned anywhere that this should resolve #3496 @stgeorge, however #4544 should.


Add support for multiple dumps per crash

adds ability to generate a payload with multiple dumps--compressed or
uncompressed
moves test correctness assertions to get_payload_and_headers which only gets
called once per payload type
minor related code cleanup and improved documentation
adds test_crash_400k_uncompressed_multiple_dumps test

Fixes #13

This looks great and works for me. Merging r+


fix(build): added version option to bump script

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Performance Test] Create service invocation test app

The test app should open an HTTP web server and return a 200 OK response from a /test endpoint.

Closed by #1428


[OpenGL] Calls to glUseProgramStages (and possibly others) don't show up in the API Calls panel

For the sake of debugging it would be great to have all the API calls in this panel.

I'm going to close this as it's essentially a symptom of #160.


Only the pipeline trigger section on the default branch is used

When I was trying to set up a pipeline to automatically trigger after another pipeline had completed I found that the pipeline was only using the pipeline trigger section as defined on the default branch

Docs Build status updates of commit 04ad10b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

content/resources-pipelines-pipeline.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@Jolton Thank you for adding this clarification. There is a section about this in the Pipeline Completion Triggers article, I have updated your note to link to that article. The default setting is the default branch but it can be configured to something else.
> [!NOTE]
> Pipeline completion triggers use the [Default branch for manual and scheduled builds](/azure/devops/pipelines/process/pipeline-default-branch) setting to determine which branch's version of a YAML pipeline's branch filters to evaluate when determining whether to run a pipeline as the result of another pipeline completing. By default this setting points to the default branch of the repository. For more information, see [Pipeline completion triggers - branch considerations](/azure/devops/pipelines/process/pipeline-triggers#branch-considerations).

#sign-off


[Feature] Support tower::retry::RetryLayer

Component
transports
Describe the feature you would like
I'm hoping to add a retry middleware to the http transport. Telegram discussion pointed me to https://docs.rs/tower/latest/tower/retry/struct.RetryLayer.html. However, experiment with this crate proves unsuccessful so far. Could you help me on how to make this work?
use alloy::providers::{Provider, ProviderBuilder, ReqwestProvider};
use alloy::rpc::client::ClientBuilder;
use alloy::rpc::json_rpc::{RequestPacket, ResponsePacket};
use alloy::transports::{RpcError, TransportErrorKind};
use futures_util::future;
use tower::retry::{Policy, RetryLayer};

#[derive(Clone, Debug, Default)]
pub struct RetryPolicy(usize);

// Simple retry policy that retries a fixed number of times...
// from https://github.com/tower-rs/tower/blob/master/tower/src/retry/policy.rs#L11-L44
type Req = RequestPacket;
type Res = ResponsePacket;
type Err = RpcError<TransportErrorKind>;
impl Policy<Req, Res, Err> for RetryPolicy {
    type Future = future::Ready<Self>;

    fn retry(&self, req: &Req, result: Result<&Res, &Err>) -> Option<Self::Future> {
        match result {
            Ok(_) => {
                // Treat all `Response`s as success,
                // so don't retry...
                None
            }
            Err(_) => {
                // Treat all errors as failures...
                // But we limit the number of attempts...
                if self.0 > 0 {
                    // Try again!
                    Some(future::ready(RetryPolicy(self.0 - 1)))
                } else {
                    // Used all our attempts, no retry...
                    None
                }
            }
        }
    }

    fn clone_request(&self, req: &Req) -> Option<Req> {
        Some(req.clone())
    }
}

#[tokio::main]
async fn main() {
    tracing_subscriber::fmt().init();
    tracing::info!("Hello, world!");

    let rpc_url = reqwest::Url::parse("https://eth.merkle.io").unwrap();
    // Below is a basic, working version without the retry layer
    // let http_provider: ReqwestProvider = ProviderBuilder::default().on_http(rpc_url);
    //
    // Now we add a simple retry layer. This does not compile
    let MAX_RETRIES = 3;
    let retry_policy = RetryPolicy(MAX_RETRIES);
    let client = ClientBuilder::default()
        .layer(RetryLayer::new(retry_policy))
        .http(rpc_url);
    let http_provider: ReqwestProvider = ProviderBuilder::default().on_client(client);
    let latest_block = http_provider.get_block_number().await.unwrap();
    tracing::info!("Latest block: {:?}", latest_block);
}

Additional context
compiler diagnostics:
error[E0271]: type mismatch resolving `<Retry<RetryPolicy, Http<Client>> as Service<RequestPacket>>::Future == Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>`
  --> crates/cli/src/examples/retryhttp.rs:59:10
   |
59 |         .http(rpc_url);
   |          ^^^^ expected `Pin<Box<...>>`, found `ResponseFuture<RetryPolicy, ..., ...>`
   |
   = note: expected struct `Pin<Box<(dyn futures_util::Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + std::marker::Send + 'static)>>`
              found struct `tower::retry::future::ResponseFuture<RetryPolicy, alloy::transports::alloy_transport_http::Http<Client>, RequestPacket>`
   = note: required for `Retry<RetryPolicy, alloy::transports::alloy_transport_http::Http<Client>>` to implement `alloy::transports::Transport`

and
error[E0308]: mismatched types
   --> crates/cli/src/examples/retryhttp.rs:60:79
    |
60  |     let http_provider: ReqwestProvider = ProviderBuilder::default().on_client(client);
    |                                                                     --------- ^^^^^^ expected `RpcClient<Http<Client>>`, found `RpcClient<Retry<RetryPolicy, ...>>`
    |                                                                     |
    |                                                                     arguments to this method are incorrect
    |
    = note: expected struct `RpcClient<alloy::transports::alloy_transport_http::Http<_>>`
               found struct `RpcClient<Retry<RetryPolicy, alloy::transports::alloy_transport_http::Http<_>>>`

for your second error, removing the : ReqwestProvider should resolve it. it occurs because you name the type for the let binding, but then don't provide that type

for your first error, converting into a BoxService should satisfy the Transport trait bounds

Also experiencing challenges setting up a retry policy using the ClientBuilder.


Update notification event Target fields

Update event target to contain a blob descriptor.

@stevvooe updated :+1: no tag field and no fake tag event.

@jlhawn :+1:


neovim v0.8: Cannot commit, tries to access unrelated file in /usr/share and shows server error.

Description
I've installed Neogit without changing any options. I can also commit just fine by using git commit on the command line, but neogit completely fails. See below for what happens.
Neovim version
NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -mabm -madx -maes -mavx -mavx2 -mbmi -mbmi2 -mcx16 -mf16c -mfma -mfsgsbase -mfxsr -mlzcnt -mmmx -mmovbe -mpclmul -mpopcnt -mprfchw -mrdrnd -mrdseed -msahf -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mxsave -mxsavec -mxsaveopt --param=l1-cache-line-size=64 --param=l1-cache-size=32 -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/var/tmp/portage/app-editors/neovim-0.8.0-r1/work/neovim-0.8.0_build/cmake.config -I/var/tmp/portage/app-editors/neovim-0.8.0-r1/work/neovim-0.8.0/src -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.8.0-r1/work/neovim-0.8.0_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.8.0-r1/work/neovim-0.8.0_build/include
Compiled by portage@localhost
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "/etc/vim/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Operating system and version
Gentoo
Steps to reproduce

nvim -nu minimal.lua
:Neogit
cc (fails)
:messages

Expected behavior
No response
Actual behavior

Minimal config
vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "TimUntersberger/neogit",
        requires = {
          { "nvim-lua/plenary.nvim" },
          { "sindrets/diffview.nvim" },
        },
        config = function()
          print("loaded neogit")
          require("neogit").setup()
        end,
      },
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing neogit and dependencies.")
  vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()

I tried the exact version you are using, and it works successfully.
Can you update neogit and try again?

Feel free to reopen this if this is still an issue.


initialize img_to_mono__norm_and_otsu

Prepare an image for input to tesseract.

https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html

kind of a hot landing, but with very little time remaining and only prototyping in #19, it's time to start the refactor, i think
one particularly vexing item is the variation in tesseract run times.  i feel like maybe we were hasty in deciding to use this program since it's sometimes difficult to predict its behavior.  aaanyway, here we are.


Missing documentation

Kindly include these topics in the README file:
Project Title
Project Description
Guidelines for contributing to the project
Kindly assign this issue to me with the gssoc-extd and hactoberfest tag so I can start working on it

@Bhum-ika Please assign this to me if this issue is a part if GSSoC-Ext and please add the tags

I am also a contributor, not a project admin @Muskan-bhatt249

@Bhum-ika you have assigned to do!

unfortunately im closing this issue already someone done this #24


Feat: Only display a notification once #24

This PR implements logic to avoid displaying multiple times the same notification message (mostly affecting nvim-notify users).
Behaviour:
A notification message is repeated only if max_time is reached
Fixes #24

Hmm, now the notification of disable key doesn't show anymore.

Now it should be okay

Thanks for the PR :heart:


Feature suggestion: Provide an "assume yes" setting or flag

[x] Make sure you've installed the latest version using instructions in the wiki

Output from azd version
azd version 1.0.2 (commit 145e046b1ea9394bd4e1b1d539eb32e860d692fb)

Describe the bug
To enable unattended scenarios such running azd from a Bash script or CI/CD pipeline, it would be convenient to have an "assume yes" mode. This would suppress the "(y/N)" prompts by automatically answering "y"es.
This would be similar to:

DEBIAN_FRONTEND=noninteractive on Debian systems
AZURE_CORE_DISABLE_CONFIRM_PROMPT=1 with the Azure CLI
--yes and --force flags found with many other CLIs

I can't use --no-prompt because this defaults to "no" in commands such as azd down.
As a workaround, I was able to write "y" to a file and redirect stdin. It would feel better to use a flag or environment variable. :)
Apologies if this already exists. I didn't see anything listed here or in the sources.
To Reproduce
N/A
Expected behavior
Here are a few examples that demonstrate the concept. Each would suppress the prompt and proceed with "yes"; it's just a matter of which method folks prefer.
# environment variable
AZD_DISABLE_CONFIRM_PROMPT=1 azd down

# environment variable, flavor 2
export AZD_DISABLE_CONFIRM_PROMPT=1
azd down

# --yes
azd down --yes
# --force
azd down --force

Environment
Information on your environment:

macOS 13.4.1 (22F82)
azd version 1.0.2

Additional context
Add any other context about the problem here.

Hello @tpetchel
Have you tried running azd down --force --purge
By using force and purge you can bypass the azd down confirmations:
Flags
        --docs                  : Opens the documentation for azd down in your web browser.
    -e, --environment string    : The name of the environment to use.
        --force                 : Does not require confirmation before it deletes resources.
    -h, --help                  : Gets help for down.
        --purge                 : Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Hi @vhvb1989,
Wow, how did I miss that? azd down --force was even in one of my examples! I think I was so focused on a global option that I missed the flag on this specific command.
This is great. Sorry for the silly question and thanks for the quick response. :)


Update package.json with latest release of api

Update with latest release of api

@tkadlec? @nucliweb?

Thanks!


Activity/Procedure/BC Conditional [CT]

See feature #105

@EMuhlbradt @czwickl: 1 minor review comment for the CT:
Relationship dictionary in the new Condition class is also inherited from SyntaxTemplate

@EMuhlbradt @czwickl: 1 minor review comment for the CT: Relationship dictionary in the new Condition class is also inherited from SyntaxTemplate

@BSnoeijerCD fixed


Redis?

Describe the bug
redis error but it says it only requires rethinkdb?
To Reproduce
Steps to reproduce the behavior:

install only modules and rethinkdb
Start it
Open it in browser
See error

Expected behavior
Site load and work.
Screenshots
None.
Desktop (please complete the following information):

OS: Host: Ubuntu 16.04, Me: Windows 10
Browser: chrome
Version: doesnt matter

Additional context
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.

redis is very much so used for ratelimiting

ok so i installed redis now im getting Invalid OAuth2 redirect_uri after pressing dashboard.
how to fix

Make sure your config is set-up correctly. This software is provided as-is and ee don't really provide support unless you encounter a bug or such issue.

yes its set up correctly ._.

This software is provided as-is and we don't really provide support
unless you encounter a bug or such issue.

On Sat, May 18, 2019, 03:24 Roki<EMAIL_ADDRESS>wrote:

yes its set up correctly ._.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/DankMemer/meme-server/issues/58?email_source=notifications&email_token=AGDDGLC7KHTD6JRSDTH65O3PV5LEDA5CNFSM4HMK2O7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWFAWI#issuecomment-493637721,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGDDGLAI4AYHLF2BZJKHLM3PV5LEDANCNFSM4HMK2O7A
.

then fix tihs "software" if it doesnt work ok?
i have made config filled it from example, pressing dashboard gives invalid redirect uri but from discord generator it works, but after pressing dashboard it requires me to auth again and it redirects to this broken site, so thats not my fault, thats this "software" bug

we clearly don't have this issue in our production configuration. you seem to have a sense of entitlement, assuming we provide selfhost support.. we don't. this repository is open sourced for transparency and educational purposes. anyone who wants to self host an instance is expected to be savvy enough to know what they're doing

then whats this "production configuration" lol? i didnt changed anything

you're missing the point - we don't provide selfhost support, end of story


Unable to publish with AssumeRolePolicy in Globals

Based on https://github.com/awslabs/serverless-application-model/pull/1311, it looks like i should be able to put AssumeRolePolicyDocument in Globals, but when trying to run sam publish, I'm getting:
Publish Failed
Error: Invalid Serverless Application Specification document. Number of errors found: 1. Errors: 'Globals' section is invalid. 'AssumeRolePolicyDocument' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'Layers', 'DeploymentPreference', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig']
Please follow the instructions in https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template-publishing-applications.html

I'm using the aws-sam-cli 0.40.0 installed via pip
sam validate says the template is fine

This was released with aws-sam-cli 0.41.0 yesterday afternoon, closing.


Have Algolia front end client keys set by Rails so Algolia clients all use the same keys

Background
The client-side, JS powered Algolia search uses hardcoded Algolia keys.  This causes confusion on non-prod environments because the Rails powered version of Algolia search uses keys loaded from environment variables at run time.
Outcome
Completing this issue ensures that all Algolia client code uses the same configuration regardless of environment.
The specific code
https://github.com/DFE-Digital/teacher-vacancy-service/blob/317f62ce6fdbcc14d88056b95bf8b1ea4610f97d/app/frontend/src/search/client.js#L11
Done when

[ ] This module is created at runtime by a Rails template
[ ] The module is loaded alongside the other js modules.
[ ] The template automatically includes the environment specific ENV variables for the current environement:
[ ] This code has been PR'd, approved and shown to work on either staging or dev.

No other tests are required except those that may already be associated with this module.
Example Fix (outline)
The template code is likely to look something like this:
 export const search = algoliasearch('<%= ENV["ALGOLIA_APP_ID"] -%>', '<%= ENV["ALGOLIA_SEARCH_API_KEY"] -%>');

And be stored in a template in app/views/js/client.js.erb
Alternately, I'd be fine with the module being built inline inside script tags in the default rails application template.  Whichever is simpler for now.

this is an overly complicated way to do this and has caused problems with .erb loaders and docker. instead assigning relevant (non sensitive) keys to html attributes instead and the javascript client can pick up on those. much simpler


Printing support using Windows spooler

As USB printing is currently not possible and some weird china printers don't seem to really have a good way to make a virtual com port (at least I havent found any) I think a good way to make this possible is to have a "Windows Printer Spooler" printer backend.
This project here (same license, MIT) has such an implementation: https://github.com/mtmsuhail/ESC-POS-USB-NET/blob/master/ESC-POS-USB-NET/Helper/RawPrinterHelper.cs
Essentially, creating a RAW printer in Windows and sending ESCPOS to it like you would to a COM port works just fine like that, but this other library is not nearly as good as this one...

I'm super interested in enabling native USB printer through the windows spooler!  The only criteria I would have are:

library still works on all platforms (it is currently compatible with .net standard and runs on Windows, MacOS, Linux, Xamarin iOS, Xamarin Android).
it uses raw printing still even though it's going through the windows spooler
the usage and setup can be documented in the README.

Is this something you'd be interested in contributing?  I think it would be really valuable for a lot of people who can't use the virtual COM, it's just not something I was familiar with on how to implement.

Hmm, I have hacked together something that works perfectly fine for my things, but I haven't put any junctions in that would properly make it fail on Non-Windows.
Since I have this just as a local class in my application, I'll just paste it here verbatim for now:
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ESCPOS_NET;
using System.Runtime.InteropServices;
using System.Timers;

namespace kasse2 {
    public class WindowsPrinter : BasePrinter {
        private string _printerName;
        private MemoryStream _stream;

        public WindowsPrinter(string printerName) : base() {
            _stream = new MemoryStream();
            Writer = new BinaryWriter(_stream);
            _printerName = printerName;
        }

        public override void Flush(object sender, ElapsedEventArgs e) {
            if (BytesWrittenSinceLastFlush > 0) {
                var bytes = _stream.ToArray();
                _stream = new MemoryStream();
                Writer = new BinaryWriter(_stream);
                SendBytesToPrinter(_printerName, bytes);

            }
            BytesWrittenSinceLastFlush = 0;
        }

        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
        public class DOCINFOA {
            [MarshalAs(UnmanagedType.LPStr)] public string pDocName;
            [MarshalAs(UnmanagedType.LPStr)] public string pOutputFile;
            [MarshalAs(UnmanagedType.LPStr)] public string pDataType;
        }

        #region Declaration Dll

        [DllImport("winspool.Drv", EntryPoint = "OpenPrinterA", SetLastError = true, CharSet = CharSet.Ansi,
            ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
        public static extern bool OpenPrinter([MarshalAs(UnmanagedType.LPStr)] string szPrinter, out IntPtr hPrinter,
            IntPtr pd);

        [DllImport("winspool.Drv", EntryPoint = "ClosePrinter", SetLastError = true, ExactSpelling = true,
            CallingConvention = CallingConvention.StdCall)]
        public static extern bool ClosePrinter(IntPtr hPrinter);

        [DllImport("winspool.Drv", EntryPoint = "StartDocPrinterA", SetLastError = true, CharSet = CharSet.Ansi,
            ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
        public static extern bool StartDocPrinter(IntPtr hPrinter, int level,
            [In][MarshalAs(UnmanagedType.LPStruct)] DOCINFOA di);

        [DllImport("winspool.Drv", EntryPoint = "EndDocPrinter", SetLastError = true, ExactSpelling = true,
            CallingConvention = CallingConvention.StdCall)]
        public static extern bool EndDocPrinter(IntPtr hPrinter);

        [DllImport("winspool.Drv", EntryPoint = "StartPagePrinter", SetLastError = true, ExactSpelling = true,
            CallingConvention = CallingConvention.StdCall)]
        public static extern bool StartPagePrinter(IntPtr hPrinter);

        [DllImport("winspool.Drv", EntryPoint = "EndPagePrinter", SetLastError = true, ExactSpelling = true,
            CallingConvention = CallingConvention.StdCall)]
        public static extern bool EndPagePrinter(IntPtr hPrinter);

        [DllImport("winspool.Drv", EntryPoint = "WritePrinter", SetLastError = true, ExactSpelling = true,
            CallingConvention = CallingConvention.StdCall)]
        public static extern bool WritePrinter(IntPtr hPrinter, IntPtr pBytes, int dwCount, out int dwWritten);

        #endregion

        #region Methods

        // SendBytesToPrinter()
        // When the function is given a printer name and an unmanaged array
        // of bytes, the function sends those bytes to the printer queue.
        // Returns true on success, false on failure.
        public static bool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, int dwCount) {
            int dwError = 0, dwWritten = 0;
            var hPrinter = new IntPtr(0);
            var di = new DOCINFOA();
            var bSuccess = false; // Assume failure unless you specifically succeed.

            di.pDocName = "VIP RAW PrinterDocument";
            di.pDataType = "RAW";

            // Open the printer.
            if (OpenPrinter(szPrinterName.Normalize(), out hPrinter, IntPtr.Zero)) {
                // Start a document.
                if (StartDocPrinter(hPrinter, 1, di)) {
                    // Start a page.
                    if (StartPagePrinter(hPrinter)) {
                        // Write your bytes.
                        bSuccess = WritePrinter(hPrinter, pBytes, dwCount, out dwWritten);
                        EndPagePrinter(hPrinter);
                    }
                    EndDocPrinter(hPrinter);
                }
                ClosePrinter(hPrinter);
            }
            // If you did not succeed, GetLastError may give more information
            // about why not.
            if (bSuccess == false)
                dwError = Marshal.GetLastWin32Error();

            return bSuccess;
        }

        public static bool SendFileToPrinter(string szPrinterName, string szFileName) {
            // Open the file.
            var fs = new FileStream(szFileName, FileMode.Open);

            // Create a BinaryReader on the file.
            var br = new BinaryReader(fs);

            // Dim an array of bytes big enough to hold the file's contents.
            var bytes = new byte[fs.Length];
            var bSuccess = false;

            // Your unmanaged pointer.
            var pUnmanagedBytes = new IntPtr(0);
            var nLength = Convert.ToInt32(fs.Length);

            // Read the contents of the file into the array.
            bytes = br.ReadBytes(nLength);
            // Allocate some unmanaged memory for those bytes.
            pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength);
            // Copy the managed byte array into the unmanaged array.
            Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength);
            // Send the unmanaged bytes to the printer.
            bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, nLength);
            // Free the unmanaged memory that you allocated earlier.
            Marshal.FreeCoTaskMem(pUnmanagedBytes);
            return bSuccess;
        }

        public static bool SendBytesToPrinter(string szPrinterName, byte[] data) {
            var pUnmanagedBytes = Marshal.AllocCoTaskMem(data.Length); // Allocate unmanaged memory
            Marshal.Copy(data, 0, pUnmanagedBytes, data.Length); // copy bytes into unmanaged memory
            var retval = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, data.Length);
            Marshal.FreeCoTaskMem(pUnmanagedBytes); // Free the allocated unmanaged memory

            return retval;
        }

        public static bool SendStringToPrinter(string szPrinterName, string szString) {
            // How many characters are in the string?
            var dwCount = szString.Length;

            // Assume that the printer is expecting ANSI text, and then convert
            // the string to ANSI text.
            var pBytes = Marshal.StringToCoTaskMemAnsi(szString);

            // Send the converted ANSI string to the printer.
            var result = SendBytesToPrinter(szPrinterName, pBytes, dwCount);
            Marshal.FreeCoTaskMem(pBytes);

            return result;
        }

        //if you want a wrapper function for you strings :
        public static bool SendAsciiToPrinter(string szPrinterName, string data) {
            var retval = false;

            //if  you are using UTF-8 and get wrong values in qrcode printing, you must use ASCII instead.
            //retval = SendBytesToPrinter(szPrinterName, Encoding.UTF8.GetBytes(data));
            retval = SendBytesToPrinter(szPrinterName, Encoding.ASCII.GetBytes(data));

            return retval;
        }

        #endregion
    }
}

This is basically mostly copied from that other project I mentioned, since it uses the same license we can at least talk with full license compatibility here.

I was researching the same thing. @sinni800 have you foked? Or made some personal implementation for your own?
As a fast solution i'm using both libraries, this one for Ethernet or Virtual COM printers, and the other one for USB printers.

They are though, you only need to instantiate WindowsPrinter with a printer Name as the parameter. To print to it, you can use the BasePrinter methods. It could probably be cleaned up a bit, but it already works like that with the current code

Yeah, i first used it at my project as Elgin I9 printers use this implementation at the sample code guide to C# printing
The Class Helper i9 has the base code:
Imports System.Text
Imports System.Runtime.InteropServices
Imports System.IO
Namespace HelperI9
Friend Class RawPrinterHelper
' Structure and API declarions:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)>
Public Class DOCINFOA
<MarshalAs(UnmanagedType.LPStr)>
Public pDocName As String
<MarshalAs(UnmanagedType.LPStr)>
Public pOutputFile As String
<MarshalAs(UnmanagedType.LPStr)>
Public pDataType As String
End Class
    <DllImport("winspool.Drv", EntryPoint:="OpenPrinterA", SetLastError:=True, CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function OpenPrinter(
    <MarshalAs(UnmanagedType.LPStr)> ByVal szPrinter As String, <Out> ByRef hPrinter As IntPtr, ByVal pd As IntPtr) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="ClosePrinter", SetLastError:=True, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function ClosePrinter(ByVal hPrinter As IntPtr) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="StartDocPrinterA", SetLastError:=True, CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function StartDocPrinter(ByVal hPrinter As IntPtr, ByVal level As Integer,
    <[In], MarshalAs(UnmanagedType.LPStruct)> ByVal di As DOCINFOA) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="EndDocPrinter", SetLastError:=True, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function EndDocPrinter(ByVal hPrinter As IntPtr) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="StartPagePrinter", SetLastError:=True, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function StartPagePrinter(ByVal hPrinter As IntPtr) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="EndPagePrinter", SetLastError:=True, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function EndPagePrinter(ByVal hPrinter As IntPtr) As Boolean
    End Function

    <DllImport("winspool.Drv", EntryPoint:="WritePrinter", SetLastError:=True, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)>
    Public Shared Function WritePrinter(ByVal hPrinter As IntPtr, ByVal pBytes As IntPtr, ByVal dwCount As Integer, <Out> ByRef dwWritten As Integer) As Boolean
    End Function

    ' SendBytesToPrinter()
    ' When the function is given a printer name and an unmanaged array
    ' of bytes, the function sends those bytes to the printer queue.
    ' Returns true on success, false on failure.
    Public Shared Function SendBytesToPrinter(ByVal szPrinterName As String, ByVal pBytes As IntPtr, ByVal dwCount As Integer) As Boolean
        Dim dwError = 0, dwWritten = 0
        Dim hPrinter As IntPtr = New IntPtr(0)
        Dim di As DOCINFOA = New DOCINFOA()
        Dim bSuccess = False ' Assume failure unless you specifically succeed.
        di.pDocName = "i9 RAW Document"
        di.pDataType = "RAW"

        ' Open the printer.
        If OpenPrinter(szPrinterName.Normalize(), hPrinter, IntPtr.Zero) Then
            ' Start a document.
            If StartDocPrinter(hPrinter, 1, di) Then
                ' Start a page.
                If StartPagePrinter(hPrinter) Then
                    ' Write your bytes.
                    bSuccess = WritePrinter(hPrinter, pBytes, dwCount, dwWritten)
                    EndPagePrinter(hPrinter)
                End If

                EndDocPrinter(hPrinter)
            End If

            ClosePrinter(hPrinter)
        End If
        ' If you did not succeed, GetLastError may give more information
        ' about why not.
        If bSuccess = False Then
            dwError = Marshal.GetLastWin32Error()
        End If

        Return bSuccess
    End Function

    Public Shared Function SendFileToPrinter(ByVal szPrinterName As String, ByVal szFileName As String) As Boolean
        ' Open the file.
        Dim fs As FileStream = New FileStream(szFileName, FileMode.Open)
        ' Create a BinaryReader on the file.
        Dim br As BinaryReader = New BinaryReader(fs)
        ' Dim an array of bytes big enough to hold the file's contents.
        Dim bytes = New Byte(fs.Length - 1) {}
        Dim bSuccess = False
        ' Your unmanaged pointer.
        Dim pUnmanagedBytes As IntPtr = New IntPtr(0)
        Dim nLength As Integer
        nLength = Convert.ToInt32(fs.Length)
        ' Read the contents of the file into the array.
        bytes = br.ReadBytes(nLength)
        ' Allocate some unmanaged memory for those bytes.
        pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength)
        ' Copy the managed byte array into the unmanaged array.
        Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength)
        ' Send the unmanaged bytes to the printer.
        bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, nLength)
        ' Free the unmanaged memory that you allocated earlier.
        Marshal.FreeCoTaskMem(pUnmanagedBytes)
        Return bSuccess
    End Function

    Public Shared Function SendBytesToPrinter(ByVal szPrinterName As String, ByVal data As Byte()) As Boolean
        Dim retval = False
        Dim pUnmanagedBytes = Marshal.AllocCoTaskMem(data.Length) ' Allocate unmanaged memory
        Marshal.Copy(data, 0, pUnmanagedBytes, data.Length) ' copy bytes into unmanaged memory
        retval = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, data.Length) 'Send bytes to printer
        Marshal.FreeCoTaskMem(pUnmanagedBytes) ' Free the allocated unmanaged memory
        Return retval
    End Function

    Public Shared Function SendStringToPrinter(ByVal szPrinterName As String, ByVal szString As String) As Boolean
        Dim pBytes As IntPtr
        Dim dwCount As Integer
        ' How many characters are in the string?
        dwCount = szString.Length
        ' Assume that the printer is expecting ANSI text, and then convert
        ' the string to ANSI text.
        pBytes = Marshal.StringToCoTaskMemAnsi(szString)
        ' Send the converted ANSI string to the printer.
        SendBytesToPrinter(szPrinterName, pBytes, dwCount)
        Marshal.FreeCoTaskMem(pBytes)
        Return True
    End Function

    'if you want a wrapper function for you strings :
    Public Shared Function SendASCiiToPrinter(ByVal szPrinterName As String, ByVal data As String) As Boolean
        Dim retval = False

        'if  you are using UTF-8 and get wrong values in qrcode printing, you must use ASCII instead.
        'retval = SendBytesToPrinter(szPrinterName, Encoding.UTF8.GetBytes(data));

        retval = SendBytesToPrinter(szPrinterName, Encoding.ASCII.GetBytes(data))
        Return retval
    End Function
End Class

End Namespace

I have searched a lot to find a compatible COM port emulation and for me the Epson TM Virtual Port Driver is the only one that works properly for every chinese POS printer.
The standard driver for the device is a POS-58 driver which will not create a virtual COM but only a USB001 for example which cannot be used.
So in fact if you use the Epson TM you can connect every printer.


fix dependabot alerts

https://github.com/omegaml/omegaml/releases/tag/0.16.3-dev1

closing as duplicate of #408


Re-order conversations?

The Web client lets you pin conversations to the top, order by who's currently logged in, etc. Can YakYak implement that? I'm on OSX, but that probably doesn't matter for this particular feature request.

Any help here? Is this even possible? I'd like to keep this issue alive if there's a chance of implementing conversation re-ordering/grouping in YakYak.

Pinning is available.  If you select a conversation, click the three dots, you can "Favorite" the conversation.
Allowing different sorting than alphabetical in favorites and timestamp in recent would be an amazing addition.

OK, that's helpful. But what I'd really like is to see a list of who's active/online, like I get in Adium. For YakYak, I guess the best way to get that is to allow ordering by status.

Humm kinda related to #733
Something like group offline contacts in bottom (of both pinned contacts and general) ?

Yes, offline at bottom would do this. It even seems that sometimes the green dot in YakYak isn't even accurate in telling me who's logged in and who isn't. I guess it might be something to do with the XMPP implementation when some contacts are logged in via Adium or other chat clients.


Can't connect to qmp/console's unix socket if created by shimv2

Description of problem
I want to debug the VM, and I follow the developer guide, to start a shell in the VM.
Now with container created by docker(via docker run  --runtime kata-runtime), I've successfully entered the VM, with command socat "stdin,raw,echo=0,escape=0x11" "unix-connect:${console}"
But for the container created by shimv2 (via ctr run --runtime io.containerd.run.kata.v2), the unix socket doesn't response, neither console.sock nor qmp.sock.
This looks like that other process is using these socket files. (I just observe that these unix socket files can only response to one client.) But I use fuser to search, there's only qemu process using the socket file.
I'm using the default kata configuration(debug is false), default containerd configuration.
kata version is 1.5.0 and containerd is 1.2.4.
Expected result
The qmp/console unix socket files can response.
Actual result
The socket files of container created by shimv2 can't response.

@sboeuf Any idea about this beheaviour?

@zhsj can you check if the QEMU process that has been started by containerd-shim-kata-v2 has a console.sock socket being created?
I'm not entirely sure in case of containerd-shim-kata-v2, if you're not using vsock, the runtime might be the one connecting to the console.sock, even if enable_debug=false (that would be a bug obviously). Or the other possibility would be that in this case the console.sock is not created (check by looking at qemu process ps -ef | grep qemu).

@lifupan @gnawux ptal?

I'm not entirely sure in case of containerd-shim-kata-v2, if you're not using vsock, the runtime might be the one connecting to the console.sock, even if enable_debug=false (that would be a bug obviously).

So I tried the vsock. Although I failed to run (not sure if #1319 is related), I can connect to the qmp and console socket.

Or the other possibility would be that in this case the console.sock is not created (check by looking at qemu process ps -ef | grep qemu).

It's created, I can see it's opened by qemu process.
$ sudo lsof -n -p 9765|grep sock
qemu-syst 9765 root   11u     sock                0,9      0t0 20218250 protocol: UNIX
qemu-syst 9765 root   12u     sock                0,9      0t0 20218252 protocol: UNIX
qemu-syst 9765 root   13u     sock                0,9      0t0 20218254 protocol: UNIX
qemu-syst 9765 root   18u     unix 0x00000000316096da      0t0 20219221 /run/vc/vm/test1/console.sock type=STREAM
qemu-syst 9765 root   19u     unix 0x00000000e37c7e77      0t0 20219222 /run/vc/vm/test1/kata.sock type=STREAM
qemu-syst 9765 root   91u     unix 0x0000000075d1a32f      0t0 20217508 /run/vc/vm/test1/qmp.sock type=STREAM

Hi @zhsj,
For console.sock, there is a difference between docker cli and shimv2, in shimv2 case, it ignored the proxy "debug" option and watched the console always, that's why you cannot reattach onto it using socat. I will fix it and make it keep align with docker cli case.
For qmp.sock, since kata runtime will exit once  kata container started using docker cli method, that's why you can dial into it; but for shimv2, it will run as a daemon and connected on qpm.sock, thus you cannot reattach onto it again.
BTW, what's your usecase for this sock connect? Is there any special demands to connect those sock files outside of kata?

@lifupan thanks for the clarification.
I was debuging the VM, as I've added a private device to it... My case when developing can be migrated to use the docker cli. But I'm not sure if it goes to the k8s cluster(it will use containerd and shimv2), how can I debug it.

@lifupan thanks for the clarification.
I was debuging the VM, as I've added a private device to it... My case when developing can be migrated to use the docker cli. But I'm not sure if it goes to the k8s cluster(it will use containerd and shimv2), how can I debug it.

shimv2 will forward the qemu's console output into containerd's logger, thus you can catch qemu's console output from containerd's log.

Is there's a strong demand for this debug in product env(using shimv2)?

I'm not sure, since there's no prod env yet...


SystemError or Compiler crash or errors in Code.py

With Gammapy, since a few days, our CI builds started to fail like this:
https://travis-ci.org/gammapy/gammapy/jobs/341491496#L1444
cythoning gammapy/detect/_test_statistics_cython.pyx to gammapy/detect/_test_statistics_cython.c
Traceback (most recent call last):
  File "setup.py", line 154, in <module>
    **package_info
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/travis/build/gammapy/gammapy/astropy_helpers/astropy_helpers/commands/build_sphinx.py", line 125, in run
    self.run_command('build')
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/travis/build/gammapy/gammapy/astropy_helpers/astropy_helpers/commands/build_ext.py", line 301, in run
    super(build_ext, self).run()
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/travis/miniconda/envs/test/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
    ext.sources = self.cython_sources(ext.sources, ext)
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 346, in cython_sources
    full_module_name=module_name)
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 693, in compile
    return compile_single(source, options, full_module_name)
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 643, in compile_single
    return run_pipeline(source, options, full_module_name)
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 460, in run_pipeline
    context = options.create_context()
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 590, in create_context
    self.cplus, self.language_level, options=self)
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 75, in __init__
    from . import Builtin, CythonScope
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/CythonScope.py", line 5, in <module>
    from .UtilityCode import CythonUtilityCode
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/UtilityCode.py", line 3, in <module>
    from .TreeFragment import parse_from_strings, StringParseContext
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 17, in <module>
    from .Visitor import VisitorTransform
  File "Cython/Compiler/Visitor.py", line 15, in init Cython.Compiler.Visitor
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 4561, in <module>
    class SliceIndexNode(ExprNode):
  File "/home/travis/miniconda/envs/test/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 4713, in SliceIndexNode
    "SliceObject", "ObjectHandling.c", context={'access': 'Get'})
  File "Cython/Compiler/Code.py", line 287, in Cython.Compiler.Code.UtilityCodeBase.load
  File "Cython/Compiler/Code.py", line 529, in Cython.Compiler.Code.TempitaUtilityCode.__init__
  File "Cython/Compiler/Code.py", line 521, in Cython.Compiler.Code.sub_tempita
SystemError: Objects/moduleobject.c:449: bad argument to internal function

or in other builds just segfault:
https://travis-ci.org/gammapy/gammapy/jobs/341491493#L1273
cythoning gammapy/detect/_test_statistics_cython.pyx to gammapy/detect/_test_statistics_cython.c
/home/travis/.travis/job_stages: line 57:  8942 Segmentation fault      (core dumped) $MAIN_CMD $SETUP_CMD

This is with the latest release Cython 0.27.3 from conda-forge.
I see a similar report #2039 by @pitrou but I don't know if it's the same issue, so I'm filing this separate issue.
I'm able to reproduce the crash locally, maybe someone from the Cython team could try this?
conda create -n cython-crash python=3.6 cython numpy astropy regions click -c conda-forge
git clone https://github.com/gammapy/gammapy.git
cd gammapy
python setup.py build_ext --inplace -vvv
# ---> segfault for me on latest macOS

The other ticket is unrelated.
I'd suggest trying it with a non-conda Cython installation first, to make sure it's not an issue on their side.

The only other thing I have readily available is Macports, and there I'm not seeing this issue. So yes, it could be something wrong with the conda Cython, not Cython itself.
Maybe @jakirkham as https://github.com/conda-forge/cython-feedstock/ maintainer, could you try this please?
conda create -n cython-crash python=3.6 cython numpy astropy regions click -c conda-forge
git clone https://github.com/gammapy/gammapy.git
cd gammapy
python setup.py build_ext --inplace -vvv
# ---> segfault for me on latest macOS

Assuming you can reproduce it: do you know if it's a Cython issue or only with the Cython binary from conda-forge?

If you think there’s an issue with the cython package at conda-forge, can you please raise an issue on the feedstock? Thanks.

@jakirkham - Like I said: I don't know if the issue is with Cython itself or with the package at conda-forge. I don't know how to debug it.
For now, I've opened another one at https://github.com/conda-forge/cython-feedstock/issues/28.
If you don't think it's an issue with your packaging or don't find the second issue helpful, feel free to close it of course.

Do you see the same issue if you use pip instead?

I see the same issue if I install Cython 0.27.3 with pip:
(cython-crash) eduroam-3-163:gammapy deil$ pip install cython --ignore-installed
Collecting cython
  Downloading Cython-0.27.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (4.7MB)
    100% |████████████████████████████████| 4.7MB 161kB/s
Installing collected packages: cython
Successfully installed cython-0.27.3
(cython-crash) eduroam-3-163:gammapy deil$ python setup.py build_ext --inplace -vvv
Initializing astropy_helpers submodule with: `git submodule update --init -- astropy_helpers`
Freezing version number to ./gammapy/version.py
running build_ext
building 'gammapy._compiler' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/gammapy
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include -arch x86_64 -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include -arch x86_64 -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include/python3.6m -c gammapy/_compiler.c -o build/temp.macosx-10.9-x86_64-3.6/gammapy/_compiler.o
gcc -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -headerpad_max_install_names -Wl,-rpath,/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.9-x86_64-3.6/gammapy/_compiler.o -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -o /Users/deil/temp/gammapy/gammapy/_compiler.cpython-36m-darwin.so
cythoning gammapy/detect/_test_statistics_cython.pyx to gammapy/detect/_test_statistics_cython.c
building 'gammapy.detect._test_statistics_cython' extension
creating build/temp.macosx-10.9-x86_64-3.6/gammapy/detect
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include -arch x86_64 -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include -arch x86_64 -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib/python3.6/site-packages/numpy/core/include -I/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/include/python3.6m -c gammapy/detect/_test_statistics_cython.c -o build/temp.macosx-10.9-x86_64-3.6/gammapy/detect/_test_statistics_cython.o -Wp,-w -Wno-unused-function
gcc -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -headerpad_max_install_names -Wl,-rpath,/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -headerpad_max_install_names -arch x86_64 build/temp.macosx-10.9-x86_64-3.6/gammapy/detect/_test_statistics_cython.o -L/Users/deil/software/anaconda3/anaconda3/envs/cython-crash/lib -o /Users/deil/temp/gammapy/gammapy/detect/_test_statistics_cython.cpython-36m-darwin.so
cythoning gammapy/maps/_sparse.pyx to gammapy/maps/_sparse.c
Segmentation fault: 11

So it doesn't seem to be an issue with the Cython package from conda-forge.
But I don't see the issue with the same Cython version 0.27.3 from Macports on the same machine.
So to me it's still not clear if this is an issue with Cython itself, Cython on conda-forge, or just some problem with my machine / install.
Did anyone try to reproduce the crash?
If you can't, then I would take this as a hint that there's a problem with my conda install, and just blow it away and do a re-install to see if that fixes the issue.

Ah wait, I forgot: the issue first appeared and is still present on our Linux and Mac CI builds: https://travis-ci.org/gammapy/gammapy/jobs/341491496#L1444
They all use conda, and they fail in slightly different ways, but all crash somehow.
This started a week ago, not sure why this appeared now, my guess is that something changed in conda or conda-forge.

Well if you are seeing the issue with pip, I don’t think it is a conda-forge packaging issue. Sounds like it’s an actual Cython issue.
Is MacPorts actually on the latest Cython? If not, it’s not an apples to apples comparison. If so, maybe you can track down how they build it. Perhaps they have a useful patch that should be included in Cython.

Yes, Macports is on the latest Cython 0.27.3 . They don't have any patches applied:
https://github.com/macports/macports-ports/blob/master/python/py-cython/Portfile

Well if you are seeing the issue with pip, I don’t think it is a conda-forge packaging issue. Sounds like it’s an actual Cython issue.

Yes, it seems like an actual Cython issue. But given that there's not many people complaining, it's one that only raises it's head in special circumstances, so far only in combination with conda.

Have you explored the core dumps? Maybe they will provide a better idea as to where things are going wrong.

I did obtain this corresponding crash report via the Mac Console app under "User Reports":
https://gist.github.com/cdeil/198fbf53c460745b94bfc6d78174bce3
@jakirkham - Is this useful? Or what else can / should I do?

@astrofrog  - Could you please try to reproduce the issue?
I now noticed that I get the crash with:
conda create -n cython-crash python=3.6 cython numpy astropy regions click -c conda-forge
source activate cython-crash
git clone https://github.com/gammapy/gammapy.git
cd gammapy
python setup.py build_ext --inplace -vvv
# ---> segfault for me on latest macOS

but then if I do this I don't get it any more:
git clean -fdx
python setup.py build_ext --inplace -vvv

Log: https://gist.github.com/cdeil/4ebf15a08adb9bc4241ecf793df6cbe0
@astrofrog - Could this be a weird bug where astropy-helpers is running Cython in a broken way (possibly picking up another Cython or dependency on my system or executing something in a sub-shell), only in the case where it's on the first execution?

@cdeil - can you send me the output of conda list? I can't reproduce this currently.

I can reproduce the issue, investigating

Just for the record, one of the times I ran it I got the following error instead of a segfault:
Traceback (most recent call last):
  File "setup.py", line 154, in <module>
    **package_info
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/Users/tom/tmp/gammapy.2/astropy_helpers/astropy_helpers/commands/build_ext.py", line 301, in run
    super(build_ext, self).run()
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
    ext.sources = self.cython_sources(ext.sources, ext)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 346, in cython_sources
    full_module_name=module_name)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 693, in compile
    return compile_single(source, options, full_module_name)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 643, in compile_single
    return run_pipeline(source, options, full_module_name)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 460, in run_pipeline
    context = options.create_context()
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 590, in create_context
    self.cplus, self.language_level, options=self)
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 75, in __init__
    from . import Builtin, CythonScope
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/CythonScope.py", line 5, in <module>
    from .UtilityCode import CythonUtilityCode
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/UtilityCode.py", line 3, in <module>
    from .TreeFragment import parse_from_strings, StringParseContext
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 17, in <module>
    from .Visitor import VisitorTransform
  File "Cython/Compiler/Visitor.py", line 15, in init Cython.Compiler.Visitor
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 4561, in <module>
    class SliceIndexNode(ExprNode):
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 4713, in SliceIndexNode
    "SliceObject", "ObjectHandling.c", context={'access': 'Get'})
  File "Cython/Compiler/Code.py", line 287, in Cython.Compiler.Code.UtilityCodeBase.load

  File "Cython/Compiler/Code.py", line 529, in Cython.Compiler.Code.TempitaUtilityCode.__init__
  File "Cython/Compiler/Code.py", line 521, in Cython.Compiler.Code.sub_tempita

@astrofrog - This is what I have at the moment for conda list:
https://gist.github.com/cdeil/ea50bed7dc2cf90632d5abdb0bace39b
If you read on you'll see that conda list report Cython 0.27 from pip, but then pip uninstall tries to remove Cython 0.26 from the conda root env.
@astrofrog - Any chance there is a mix of two Cython installs, also on your machine and our conda install on travis-ci?

@cdeil - I'm not sure yet, but btw the only difference between running it the first time and running after git clean -fxd is that the second time astropy-helpers is already initialized, so I'm wondering if there is something going on there.

@cdeil - interestingly this seems similar to https://github.com/astropy/astropy-helpers/issues/302

Findings so far:

To reproduce this without re-cloning, you can do:

git submodule deinit --all ; git clean -fxd ; python setup.py build_ext --inplace

This seems to be indeed related to the use of the submodule, though it may still indicate some kind of bug with setuptools or Cython.

With older versions of Cython, this raised an exception, and it was the commit 9262789c399291f1b84200281226e2e8bc71a52c in Cython that made it change to being a segmentation fault.

Just prior to this, the error was:

Traceback (most recent call last):
  File "setup.py", line 16, in <module>
    from astropy_helpers.setup_helpers import (
  File "/Users/tom/tmp/gammapy.8/astropy_helpers/astropy_helpers/setup_helpers.py", line 33, in <module>
    from .commands.build_ext import generate_build_ext_command
  File "/Users/tom/tmp/gammapy.8/astropy_helpers/astropy_helpers/commands/build_ext.py", line 13, in <module>
    from setuptools.command.build_ext import build_ext as SetuptoolsBuildExt
  File "/Users/tom/miniconda3/envs/cython-crash/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 20, in <module>
    __import__('Cython.Compiler.Main')
  File "/Users/tom/tmp/cython/Cython/Compiler/Main.py", line 28, in <module>
    from .Scanning import PyrexScanner, FileSourceDescriptor
  File "Cython/Compiler/Scanning.py", line 1, in init Cython.Compiler.Scanning
  File "/Users/tom/tmp/cython/Cython/Plex/__init__.py", line 35, in <module>
    from .Actions import TEXT, IGNORE, Begin
  File "Cython/Plex/Actions.py", line 9, in init Cython.Plex.Actions
AttributeError: type object 'Cython.Plex.Actions.Action' has no attribute '__reduce_cython__'

Another finding is that adding:
import Cython.Plex

at the top of the setup.py file gets rid of the segfault and proceeds to the following error:
  File "/Users/tom/tmp/cython/Cython/Compiler/ExprNodes.py", line 4706, in SliceIndexNode
    "SliceObject", "ObjectHandling.c", context={'access': 'Get'})
  File "Cython/Compiler/Code.py", line 287, in Cython.Compiler.Code.UtilityCodeBase.load

  File "Cython/Compiler/Code.py", line 529, in Cython.Compiler.Code.TempitaUtilityCode.__init__
  File "Cython/Compiler/Code.py", line 521, in Cython.Compiler.Code.sub_tempita
SystemError: Objects/moduleobject.c:449: bad argument to internal function

Further update - I can trigger the issue with this simple script:
import os

with open('test.pyx', 'w') as f:
    f.write('cimport cython\n')

with open('test.py', 'w') as f:
    f.write('from setuptools.command.build_ext import build_ext as SetuptoolsBuildExt\n')

from setuptools.sandbox import run_setup
run_setup(os.path.join(os.path.abspath('.'), 'test.py'), ['egg_info'])

from Cython.Build import cythonize
cythonize('test.pyx')

However this only happens in certain conda environments, so I'm trying to track down why.

Ok, I've finally narrowed it down - I think this may be an issue that appears only with setuptools 35, which is only available in conda-forge, not defaults. To show that this is not a conda issue though, I installed setuptools and Cython with pip:
$ conda create -n reproduce-issue python=3.6
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment /Users/tom/miniconda3/envs/reproduce-issue:

The following NEW packages will be INSTALLED:

    ca-certificates: 2017.08.26-ha1e5d58_0
    certifi:         2018.1.18-py36_0
    libcxx:          4.0.1-h579ed51_0
    libcxxabi:       4.0.1-hebd6815_0
    libedit:         3.1-hb4e282d_0
    libffi:          3.2.1-h475c297_4
    ncurses:         6.0-hd04f020_2
    openssl:         1.0.2n-hdbc3d79_0
    pip:             9.0.1-py36h1555ced_4
    python:          3.6.4-hc167b69_1
    readline:        7.0-hc1231fa_4
    setuptools:      38.4.0-py36_0
    sqlite:          3.22.0-h3efe00b_0
    tk:              8.6.7-h35a86e2_3
    wheel:           0.30.0-py36h5eb2c71_1
    xz:              5.2.3-h0278029_2
    zlib:            1.2.11-hf3cbc9b_2

Proceed ([y]/n)? y

#
# To activate this environment, use:
# > source activate reproduce-issue
#
# To deactivate an active environment, use:
# > source deactivate
#

$ source activate reproduce-issue
$ conda remove --force setuptools
Fetching package metadata .............

Package plan for package removal in environment /Users/tom/miniconda3/envs/reproduce-issue:

The following packages will be REMOVED:

    setuptools: 38.4.0-py36_0

Proceed ([y]/n)? y

$ pip install setuptools Cython
Collecting setuptools
  Using cached setuptools-38.5.1-py2.py3-none-any.whl
Collecting Cython
  Using cached Cython-0.27.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: setuptools, Cython
Successfully installed Cython-0.27.3 setuptools-38.5.1

With this environment, I then run the following script which has to be called setup.py:
```python
import os

with open('test.pyx', 'w') as f:
    f.write('cimport cython\n')

with open('test.py', 'w') as f:
    f.write('from setuptools.command.build_ext import build_ext as SetuptoolsBuildExt\n')

from setuptools.sandbox import run_setup
run_setup(os.path.join(os.path.abspath('.'), 'test.py'), ['egg_info'])

from Cython.Build import cythonize
cythonize('test.pyx')

and get:
$ python setup.py
Compiling test.pyx because it changed.
[1/1] Cythonizing test.pyx
Fatal Python error: deallocating None

Current thread 0x00007fffa87c2340 (most recent call first):
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 76 in parse_from_strings
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 236 in __init__
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 1561 in AnalyseDeclarationsTransform
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 1553 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 678 in exec_module
  File "<frozen importlib._bootstrap>", line 665 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 955 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 971 in _find_and_load
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/Pipeline.py", line 143 in create_pipeline
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/Pipeline.py", line 250 in create_pyx_pipeline
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 491 in run_pipeline
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 673 in compile_multiple
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 695 in compile
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1144 in cythonize_one
  File "/Users/tom/miniconda3/envs/reproduce-issue/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1039 in cythonize
  File "setup.py", line 13 in <module>
Abort trap: 6

or
$ python setup.py
Compiling test.pyx because it changed.
[1/1] Cythonizing test.pyx
Segmentation fault: 11

(it changes from run to run)
So at this point, I think this is either a setuptools or a Cython issue.

@scoder - I can also confirm that this happens with my default MacOS X Python 2.7 installation, so this is definitely not related to conda:
$ python setup.py
Compiling test.pyx because it changed.
[1/1] Cythonizing test.pyx
Segmentation fault: 11

Here is the setuptools commit that caused the error: ca71bc26f65f1eac9f26b5e5b0d7b4109186fe59
commit ca71bc26f65f1eac9f26b5e5b0d7b4109186fe59
Author: Jason R. Coombs<EMAIL_ADDRESS>Date:   Sun Feb 4 16:36:23 2018 -0500

    Import Cython.Compiler.Main as recommended by Cython project to improve Cython detection. Fixes #1229.

cc @jaraco @scoder

issue that appears only with setuptools 35

I think you mean 38.5.
Hard to believe that change has broken Cython support. All Setuptools wishes to do at that point is detect if Cython is installed and a compiler is available. That technique was the one recommended here - https://github.com/cython/cython/issues/2061#issuecomment-359071601. The whole point of #2061 was to get a (supported) routine to determine if Cython is available and viable. If importing Cython.Compiler.Main is sufficient to cause Cython to crash, that's certainly not good, and we may need to revisit #2061 to develop further the detection routine.
I don't have any insight on the crashes.

@jaraco

I think you mean 38.5.

Yes, that's correct
So to follow up on this, I modified the example to be:
import os

with open('test.pyx', 'w') as f:
    f.write('cimport cython\n')

with open('test.py', 'w') as f:
    f.write('import Cython.Compiler.Main')

from setuptools.sandbox import run_setup
run_setup(os.path.join(os.path.abspath('.'), 'test.py'), ['egg_info'])

from Cython.Build import cythonize
cythonize('test.pyx')

(notice the change in the content of test.py) and indeed this still crashes, even with an older version of setuptools. So I agree that the change in setuptools 38.5 is not directly responsible for this but rather exposing a bug that existed previousy but just wasn't triggered by default before.
@cdeil - for now the easiest workaround is to pin setuptools to 38.4.1

And just to confirm, this happens on Linux and MacOS X

@astrofrog - Thank you very much for all your work here, and in general on maintaining astropy-helpers and all things!!!

Thank you for the investigations. I added the reproducer script to the Cython test suite, but couldn't get it crash with the latest Cython master. Could you please also try that on your side?

Hmm, looks like travis managed to reproduce it. I'll give it another try.

Probably due to https://bugs.python.org/issue32973
I've committed a proposed fix in 71a8006 (which github picked up as final fix, sorry for the confusion).


Adds Allianz Ebike product

btw - just checked the webapp manifest. Didn't see reference to the portal_button_url anywhere. Is it used?


Support for multiple ORMs

Need to add support for multiple ORMs such as

Pony
Peevee
etc

It would be nice to have support for MongoEngine.


Rework how we store and handle libspotify data

Currently, there is just a bunch of void pointers being juggled about, which are casted appropriately depending on context. It works ok, but comes with a bunch of uncomfortable restrictions, such as not being able to update borrowed data client-side to reflect updates received from the server conveniently. Another issue is that the ownership of data is not clear. Currently this is dealt with by simply never freeing/deleting libspotify objects - an approach that is obviously flawed.

It might be worthwhile to look into adding another level of indirection on top of libspotifys opaque types (with our own ditto) and handling allocation and frees through that.
As a side gain, that would also be beneficial if libspotify is eventually replaced by some other library, since it would serve to achieve better decoupling  between the spotify code and the file system code.

Nothing has happened with this, I'm closing it due to lack of activity on my part, since that probably means it doesn't hurt enough to worry about just yet.


Circular Dependencies for Record?

I have something similar to this
record_a = record {
  value: list<record_b>;
}

record_b = record {
  value: record_a;
}

and the generated code failed to build for cpp and Objective-C because of the circular dependencies. Any ideas? for interface, Djinni uses forward declarations to break circular dependencies. Can we support this for record as well? Thanks

No, records contain their fields "by value", meaning that a circularly-defined type would be of infinite size.  If you need recursive types you need to implement them using custom interfaces, or come up with some other data format to pass them across the language boundary.


Support for Cognito or AWS_IAM auth

Any hints on how to use Cognito User Pools or AWS_IAM Auth instead?

I'm having the same issue.
It seems gatsby-source-graphql only supports token based authentication, or at least: documentation supporting how to auth using Cognito user pools isn't forthcoming.
I'm using AppSync and Amplify:
gatsby-wrap-provider.js
Amplify.configure({
  Auth: {
    region: CONFIG.Auth.region,
    userPoolId: CONFIG.Auth.userPoolId,
    userPoolWebClientId: CONFIG.Auth.userPoolWebClientId,
  },
});

const client = new AWSAppSyncClient({
  url: CONFIG.aws_appsync_graphqlEndpoint,
  region: CONFIG.Auth.region,
  auth: {
    type: AUTH_TYPE.AMAZON_COGNITO_USER_POOLS,
    jwtToken: async () => (await Auth.signIn(...CREDENTIALS).currentSession().getAccessToken().getJwtToken()),
  },
});

export default ({ element }) => (<ApolloProvider client={client}>{element}</ApolloProvider>)

...and the relevant plugins section of my gatsby-config.js:
{
  resolve: `gatsby-source-graphql`,
  options: {
    typeName: 'AppSync',
    fieldName: 'fieldsOfWheat',
    url: 'https://1234567890.appsync-api.eu-central-1.amazonaws.com/graphql'
  },
},

...and gatsby-source-graphql immediately returns a forbidden:
ServerError: Response not successful: Received status code 403

Am I missing something in headers? Would createLink somehow help?
Thanks in advanced.

...bump...

Gonna bump this too. AWS resets the API tokens every 7 days.

@LeslieOA @sdeby - I made a plugin that uses IAM to grab data out of DynamoDB. Hopefully this helps yall too: https://www.npmjs.com/package/gatsby-source-dynamodb


Glomap and Postshot

Hello everyone.
When i want to use the images and the sparse created by glomap to train gaussians within postshot it shows an accurate sparse point cloud but the gaussians itself are a complete mess. Does anyone figure out how to use glomap results with postshot?
I also tried different image sets (the original images and the distorted from glomap) and had no success.

Hello everyone.
When i want to use the images and the sparse created by glomap to train gaussians within postshot it shows an accurate sparse point cloud but the gaussians itself are a complete mess. Does anyone figure out how to use glomap results with postshot?
I also tried different image sets (the original images and the distorted from glomap) and had no success.

Hi
Did you manage to figure out how to fix it?


Feedback for v1.0.0

Is your feature request related to a problem? Please describe.
Version 1.0.0 has been released but due to some hurry, it misses some refinements.
Describe the solution you'd like

[x] Update PO;
[ ] Remove usage of "os" module in profit of "pathlib";
[x] Fix plugin form layouts #20;
[x] Fix missing right widget from SmartMedia fields in some plugin forms (Hero, Card,
Container) #20 ;
[ ] Continue to improve documentation #19 ;
[ ] There should be something to check about orphan features (when some have been
saved in blocks but then after removed from choices);

Locale catalog files have been update in 1.1.0-pre.2 along some other fixes

Finally done "os" module usage in 1.3.2-pre.2


fix(bugs): update format value and replace "kleveross-system" to "harbor-system"

What this PR does / why we need it:

修改格式字段的大小写问题
替换 kleveross-system 为 harbor-system

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #

Special notes for your reviewer:
/cc @your-reviewer

Release note:

NONE

/lgtm


Changed Server Implementation code

your server implementation  not able to serve some video file types
using in built video player see example for info
modify example as per your requirement i modified it to suit my needs

Thanks for the PR. Will go through this over the weekend.

Hello @canewsin! In your version it is possible to load a pre downloaded torrent? Or to tell download manager to use a session cookie so it could properly download the torrent? (my torrents are hosted behind a login form)
Thanks!

@cTatu it is custom implementation of request may encrypt the data or write your custom logic to do such things.

@cTatu Can you explain your requirement in much detail? If it is generic enough then I'll try to add it to the library as a feature

Sure. What I mean is to be able to use a torrent file from internal storage.
I attach some screenshots from the app WeTorrent where you can load any torrent file previously downloaded:

@cTatu Sounds good I will try to add this as a feature but will take sometime as I am right now occupied with other work


add .git dir to build container

builds on master.dockerproject.org has been broken since 2017-02-04 because of this PR https://github.com/docker/docker/pull/30290
build logs say
{"log":"time=\"2017-02-05T03:19:38Z\" level=debug msg=\"Container log: \\nerror: .git directory missing and DOCKER_GITCOMMIT not specified\\n  Please either build with the .git directory accessible, or specify the\\n  exact (--short) commit hash you are building using DOCKER_GITCOMMIT for\\n  future accountability in diagnosing build issues.  Thanks!\\n\" \n","stream":"stderr","time":"2017-02-05T03:19:38.476597093Z"}

need the .git dir in the build environment

/cc @mlaventure

ping @crosbymichael

LGTM


Improve CI

With this, we're now doing 2x8 (ESP8266 / ESP32 + the different IMUs) matrix builds, resulting in 16 builds.
Maybe we can split these up into parallel builds?

wouldn't this quickly consume our monthly actions quota?


[swift-4.0-branch][overlay] Rename scheduleOneShot and scheduleRepeating

Explanation: This change deprecates several methods of the DispatchSourceTimer struct, replacing them with methods that have more meaningful names. It also introduces the enumeration case DispatchTimeInterval.never, which can be used to specify that a timer should never fire or never repeat.
Scope of Issue: This is not a source-breaking change. The only effect on existing code is that uses of the deprecated methods will be flagged at compile time.
Risk: Since the existing methods remain and their code is almost unmodified, this is a very low-risk change.
Reviewed By: Daniel Steffen
Testing: There are tests in the Dispatch test suite that cover this code change.
Directions for QA: N/A
Radar: rdar://problem/32991313

Cherrypicked from https://github.com/apple/swift/pull/10598

@swift-ci Please test


[Bugfix] Couple of bug fixes to run TVM-gen code together with BYOC

This PR fixes couple of bugs identified with the test for the codegen pass of mix-using TVM and BYOC code.
List of fixes/changes

Enhance API regarding IRModule/BaseFunc attributes
Make passes preserve the IRModule/Function attributes
Support the deepcopy of IRModule with the presence of BYOC runtime::Module in the external_mod attribute.
Minor bug fix in LowerWithRelayOpStrategyPass to handle non-DNN operators like PackedFunc.
Format unification of input IRModule for TuneTIR and TuneIRModule - always use runtime::Registry::Get("tvm.meta_schedule.tune.parse_mod")
Bug fix in codegen pass: update the uses of old variable with the new variable.
Minor bug fix in Relax VM executable regarding print format of return and goto
Bug fix in Relax VM: update the caller return register every function invocation.
Bug fix in the recursion test in test_vm.py

Future PRs

will add more exhaustive test cases with the improvements in parser and operator set. See example

cc. @YuchenJin @yongwww

Thank you @sunggg for the series of improvements! 🎉


[PE-D][Tester A] Link provided in Help window directs to AB3 guide instead of RapidTracer guide

Steps to reproduce:

Run the help command

Expected:
A help window appears with a link to the user guide of RapidTracer.
Actual:
A help window appears with a link to the user guide of AB3.
Improvement suggestion:
Update the link to direct to the correct user guide.
Screenshot:

Labels: type.FeatureFlaw severity.Low
original: JonChong98/ped#3

closed by #167

closed by #167


bundle validation: check for bundle preset mismatch during setup

Fixes: Issue #3615
Added a check for bundle type mismatch with preset in function ValidateBundle.
https://github.com/crc-org/crc/blob/7b04ce547692b44e2f12c41ecd07639303473a8f/pkg/crc/validation/validation.go#L91-L107
The check is performed before checking for custom bundle (and potentially displaying a warning).
Function BundleMismatchWithPreset was moved from machine/start.go to validation/validation.go and is used during start as well.
Testing

Download bundle for a preset (i.e. microshift).
Change preset to some other value crc config set preset openshift
crc setup --bundle <path_to_bundle>
Output:
FATA Preset openshift is used but bundle is provided for microshift preset

Also, I think bundleMismatchWarning function name is kind of ambiguous. It is checking for and displaying a warning if there is a custom bundle being used, so what about renaming it to something like customBundleUsedWarning or userProvidedBundleWarning?

I'm surprised a custom bundle has a _232 suffix as in your example Anjan, I thought they were suffixed with only _custom

i think this got changed, now they don't contain _custom and are in the form of crc_libvirt_4.16.7_amd64_<unix_timestamp>.crcbundle as per: https://github.com/crc-org/crc/blob/main/pkg/crc/machine/bundle/metadata.go#L227

I'm surprised a custom bundle has a _232 suffix as in your example Anjan, I thought they were suffixed with only _custom

i think this got changed, now they don't contain _custom and are in the form of crc_libvirt_4.16.7_amd64_<unix_timestamp>.crcbundle as per: https://github.com/crc-org/crc/blob/main/pkg/crc/machine/bundle/metadata.go#L227

Ah ok, I was tricked by git grep _custom which still returns multiple results.

Thanks for the suggestion @cfergeau, I modified your regex a bit and it worked really well.


CDVFile.h file not found

..../Plugins/cordova-plugin-print-pdf/CDVPrintPDF.m:12:9: fatal error: 'CDVFile.h' file not found
import "CDVFile.h"
    ^

1 error generated.
I see the above error when I try to deploy an ios app with this plugin. The src folder does not have CDVFile.h. Am I missing something?

You also need to add this plugin "cordova-plugin-file"

I added cordova-plugin-file to the dependency configuration in the plugin.xml file. Sorry about that!

Hmm.... I have the cordova-plugin-file dependency and I'm still getting this error.

fatal error:
'CDVFile.h' file not found
#import "CDVFile.h"
^~~~~~~~~~~
1 error generated.