Fetch Business templates

Hello,
I'm using https://github.com/joelbutcher/laravel-facebook-graph:
composer require joelbutcher/laravel-facebook-graph

use JoelButcher\Facebook\Facebook;

        $facebook = new Facebook([
            'app_id' => config('app.app_id'), // App Id
            'app_secret' => config('app.app_secret'), // App secret
            'default_graph_version' => config('app.graph_version'), // Your graph version
            'default_access_token' => config('app.w_token'), // Your system account access token
        ]);

        $w_buss_id = config('app.w_buss_id'); // WhatsApp business ID

        // fields that we are going to request from Meta API.
        $fields = [
            'id',
            'name',
            'status',
            'language',
            'category',
            'rejected_reason',
            'quality_score',
            'components',
            'health_status',
        ];
        $fields = implode(',', $fields);

        $feed = $facebook->get("$w_buss_id/message_templates?fields=$fields&limit=10");
        $feed = $feed->getGraphEdge();

        // loop over the feed and save the data to your model
        while ($feed != null) {
            foreach ($feed->asArray() as $data) {
                WhatsAppTemplate::query()->create([
                    'template_id' => $data['id'],
                    'name' => $data['name'],
                    'category' => $data['category'],
                    'status' => $data['status'],
                    'language' => $data['language'],
                    'rejected_reason' => $data['rejected_reason'],
                    'quality_score' => $data['quality_score']['score'],
                    'quality_score_date' => $data['quality_score']['date'],
                    'components' => $data['components'],
                    'health_status_payload' => [$data['health_status']], // include it inside an array as other components
                ]);
            }

            $feed = $facebook->next($feed);
        }

Regards,

Hi @aindot wich bug are you reporting?

Hello, @aalbarca
I'm just dropping a tip, and If I have some other tips were should I put them.

Please, open a PR with the changes.
Tips are also welcome but in the Discussion forum not in this channel because is just to report bugs.
Thanks.


Ensures that rolling back can be quiet

This is in regards to #976 We should also be able to pass quiet when rolling back

:heart:

:+1:


Game crash

My game crashes
latest.log
1.18.1, latest version of fabric loader and fabric api

Can confirm. Crashes on Fabric Loader 0.13.3 with the latest Fabric API update 0.46.6

will fix tommorow

kinda delayed, but seems to work on latest fabric api version and 1.18.2

kinda delayed, but seems to work on latest fabric api version and 1.18.2

becuz that version is for 1.18.2 bruh, there was too big update between 1.18.1 and 1.18.2 to mods work

Try 1.4.4 for 1.17, 1.17.1, 1.18 and 1.18.1


Documenting TypeScript

I'm having issues documenting TypeScript.
As you probably know, TypeScript is compiled to JavaScript (like CoffeeScript). The main difference between the two is that TypeScript syntax is based on ECMAScript 6, so issues with documenting TypeScript now will likely be issues with documenting JavaScript in the near future.
In order to get the default JSDoc template to generate docs correctly, here's how I have to comment a simple TypeScript class:
/**
    Description of the namespace.
    @namespace My.Namespace
*/
module My.Namespace {

    export class SomeClass {

        /**
            Description of the field.
            @member My.Namespace.SomeClass#_someField
            @private
            @type {string}
        */
        private _someField: string = null;

        /**
            Description of the constructor.
            @class My.Namespace.SomeClass
            @classdesc Description of the class.
            @param {boolean} value Description of the constructor argument.
        */
        constructor (value: bool) {
            // omitted
        }

        /**
            Description of the method.
            @method My.Namespace.SomeClass#_someMethod
            @private
        */
        private _someMethod() {
            // omitted
        }

    }

}

To get the default JSDoc template to generate the docs correctly, here's what I had to do, but didn't want to do:

Explicitly name everything. For example:

@namespace My.Namespace
@class My.Namespace.SomeClass
@constructor My.Namespace.SomeClass
@member My.Namespace.SomeClass#_someField
@method My.Namespace.SomeClass#_someMethod

The is the biggest issue, since it forces me to maintain the names of things in the comments, which kills one of the nicest things about TypeScript (automatic refactoring). I tried using @lends everywhere I could think of, but this didn't fix it.

Apply class/constructor comments only to the constructor function, not on the actual class block

I want to be able to comment the class and constructor separately, since 1) not all TypeScript classes have a constructor, and 2) intuitively, it makes more sense to have class comments on the class block and constructor comments directly on the constructor function. If I add @class comments to the class and also add @constructor or @constructs comments to the constructor, then I end up with duplicate documentation in the generated docs. Perhaps this is an issue with the default template?

Apply namespace comments once in a separate .ts file, not on the actual namespace blocks

I want to be able to document my namespaces where they are defined. However, since multiple TypeScript classes in the same namespace can be split across files, this ends up with duplicate documentation in the generated docs. Perhaps this is an issue with the default template?
Here's how I want to be able to comment this class:
/**
    Description of the namespace.
    @namespace
*/
module My.Namespace {

    /**
        Description of the class.
        @class
    */
    export class SomeClass {

        /**
            Description of the field.
            @member
            @private
            @type {string}
        */
        private _someField: string = null;

        /**
            Description of the constructor.
            @constructor
            @param {boolean} value Description of the constructor argument.
        */
        constructor (value: bool) {
            // omitted
        }

        /**
            Description of the method.
            @method
            @private
        */
        private _someMethod() {
            // omitted
        }

    }

}

As you can see, this is much more concise, intuitive, and maintainable.
If it helps, here's what the generated JavaScript looks like for the two TypeScript classes above. I've tried manipulating the comments in the generated JS, but haven't figured out a solution yet that works for the default JSDoc template.
Any ideas how I can achieve what I want? Or do you think TypeScript is to blame and it should generate its JavaScript differently? I have also posted this issue on the TypeScript repo.

var My;
(function (My) {
    (function (Namespace) {
        var SomeClass = (function () {
            /**
            Description of the constructor.
            @class My.Namespace.SomeClass
            @classdesc Description of the class.
            @param {boolean} value Description of the constructor argument.
            */
            function SomeClass(value) {
                /**
                Description of the field.
                @member My.Namespace.SomeClass#_someField
                @private
                @type {string}
                */
                this._someField = null;
                // omitted
                            }
            /**
            Description of the method.
            @method My.Namespace.SomeClass#_someMethod
            @private
            */
                        SomeClass.prototype._someMethod = function () {
                // omitted
                            };
            return SomeClass;
        })();
        Namespace.SomeClass = SomeClass;
    })(My.Namespace || (My.Namespace = {}));
    var Namespace = My.Namespace;
})(My || (My = {}));

/**
Description of the namespace.
@namespace
*/
var My;
(function (My) {
    (function (Namespace) {
        /**
        Description of the class.
        @class
        */
        var SomeOtherClass = (function () {
            /**
            Description of the constructor.
            @constructor
            @param {boolean} value Description of the constructor argument.
            */
            function SomeOtherClass(value) {
                /**
                Description of the field.
                @member
                @private
                @type {string}
                */
                this._someField = null;
                // omitted
                            }
            /**
            Description of the method.
            @method
            @private
            */
                        SomeOtherClass.prototype._someMethod = function () {
                // omitted
                            };
            return SomeOtherClass;
        })();
        Namespace.SomeOtherClass = SomeOtherClass;
    })(My.Namespace || (My.Namespace = {}));
    var Namespace = My.Namespace;
})(My || (My = {}));

+1 JSDoc being able to parse TypeScript. I've JSDoc plugins that I'd love to be able to use when documenting my TypeScript projects.

https://github.com/TypeStrong/typedoc

@taye As far as I can tell, and I'm sure I remember I actually read it somewhere yesterday while researching something related, the Babel Typescript plugin does not use tsconfig.json. I confirmed it by putting lots of stuff in mine that was okay for other purposes, such as generating .d.ts files, and which were being used by the language service process for my IDE. Running Babel didn't care one bit what I put into tsconfig.json.
I think that all that the Typescript plugin does is to remove the types, nothing else! That is why those features that Typescript has that are not in Javascript, such as enums, are not supported.
The entire transpilation stage is good old Babel, because once the Typescript type annotations are removed, when there is no Typescript specific feature (const enum, import=/export=, namespace) what is left is regular ES2018.
See "Caveats" at https://babeljs.io/docs/en/babel-plugin-transform-typescript


1 Click Setup Fails

Created a new 4.5 ROKS cluster and the the CP4I and demos failed to install because of a download error. Full log is below:
The error received is ERROR: Failed to download master.zip from https://github.com/IBM/cp4i-deployment-samples/archive
2020/12/10 16:06:58 -----  New Workspace Action  -----
2020/12/10 16:06:58 Request: activitId=ec15c7fe1faeaa515e26bba9590e0741, account=f477a2b0b0fe55f4095c29bcd7852376<EMAIL_ADDRESS>requestID=4c23a5dc-e3f3-4294-8d78-f3852d2d0e20
2020/12/10 16:06:58 Related Activity: action=CLOUDPAK_WORKSPACE_CREATE, workspaceID=cp4i-card-ddd-41d3e450-5747-4b, processedBy=orchestrator-ff8bd9dc7-6slzk
2020/12/10 16:06:58 Related Workspace: name=cp4i-card-ddd, sourcerelease=(not specified), sourceurl=https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-cp-integration-2.0.15.tgz
2020/12/10 16:07:01  --- Ready to execute the CloudpakTemplateCmd command ---
2020/12/10 16:07:06 -----  New Action  -----
2020/12/10 16:07:06 Request: RepoURL=https://github.com/IBM/cloud-pak/blob/master/repo/case/ibm-cp-integration-2.0.15.tgz, WorkspaceSource=Schematics, Branch=, Release=, Folder=
2020/12/10 16:07:06 Related Activity: action=Cloudpak_CREATE_WORKSPACE,processedBy=sandbox-86fd8d5fd-8v627_3216
2020/12/10 16:07:06 Getting tar download command
2020/12/10 16:07:09 No README file is found for the template
2020/12/10 16:07:09 Done with the Activity
2020/12/10 16:07:09  --- Ready to execute GeneratePlan command ---
2020/12/10 16:07:14  --- Ready to execute GeneratePlan command ---
2020/12/10 16:07:14 workspace.template.EnvFile: ee286118-8ae4-4174-b649-7e1e4282878b
2020/12/10 16:07:14 -----  New Action  -----
2020/12/10 16:07:14 Request: requestID=4c23a5dc-e3f3-4294-8d78-f3852d2d0e20
2020/12/10 16:07:15 Related Activity: action=Apply, workspaceID=cp4i-card-ddd-41d3e450-5747-4b, processedByOrchestrator=ID:"4c23a5dc-e3f3-4294-8d78-f3852d2d0e20_ec15c7fe1faeaa515e26bba9590e0741" , processedByJob=cloudpak-job12-ddbcb955c-jhnw4
2020/12/10 16:07:20 -----  Terraform INIT  -----
2020/12/10 16:07:20 Starting command: terraform init -input=false -no-color
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | Initializing the backend...
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | Initializing provider plugins...
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | The following providers do not have any version constraints in configuration,
2020/12/10 16:07:20 Terraform init | so the latest version was installed.
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | To prevent automatic upgrades to new major versions that may contain breaking
2020/12/10 16:07:20 Terraform init | changes, it is recommended to add version = "..." constraints to the
2020/12/10 16:07:20 Terraform init | corresponding provider blocks in configuration, with the constraint strings
2020/12/10 16:07:20 Terraform init | suggested below.
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | * provider.ibm: version = "~> 1.16"
2020/12/10 16:07:20 Terraform init | * provider.null: version = "~> 3.0"
2020/12/10 16:07:20 Terraform init |
2020/12/10 16:07:20 Terraform init | Terraform has been successfully initialized!
2020/12/10 16:07:20 Command finished successfully.
2020/12/10 16:07:20 -----  Terraform SHOW  -----
2020/12/10 16:07:20 Starting command: terraform show -no-color
2020/12/10 16:07:23 Terraform show | No state.
2020/12/10 16:07:23 Command finished successfully.
2020/12/10 16:07:23 -----  Terraform APPLY  -----
2020/12/10 16:07:23 Starting command: terraform apply -state=terraform.tfstate -auto-approve -no-color -parallelism=1
2020/12/10 16:07:30 Terraform apply | data.ibm_container_cluster_config.clusterConfig: Refreshing state...
2020/12/10 16:07:45 Terraform apply | null_resource.uninstall_script: Creating...
2020/12/10 16:07:45 Terraform apply | null_resource.uninstall_script: Creation complete after 0s [id=4570420991580513806]
2020/12/10 16:07:45 Terraform apply | null_resource.script: Creating...
2020/12/10 16:07:45 Terraform apply | null_resource.script: Provisioning with 'local-exec'...
2020/12/10 16:07:45 Terraform apply | null_resource.script (local-exec): Executing: ["/bin/sh" "-c" "chmod +x ./ibm-cp-integration/inventory/ibmcloudEnablement/files/install/install.sh && ./ibm-cp-integration/inventory/ibmcloudEnablement/files/install/install.sh"]
2020/12/10 16:07:45 Terraform apply | null_resource.script (local-exec): ℹ INFO: The installation will take approximately 30 minutes to 1.5 hour to complete.
2020/12/10 16:07:45 Terraform apply |
2020/12/10 16:07:45 Terraform apply |
2020/12/10 16:07:45 Terraform apply | null_resource.script (local-exec): ℹ INFO: Cleaning up pem file contents
2020/12/10 16:07:45 Terraform apply |
2020/12/10 16:07:45 Terraform apply | null_resource.script (local-exec): -------------------------------------------------------------------------------------------------------------------
2020/12/10 16:07:45 Terraform apply |
2020/12/10 16:07:46 Terraform apply | null_resource.script (local-exec): ❌ ERROR: Failed to download master.zip from https://github.com/IBM/cp4i-deployment-samples/archive
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | null_resource.script (local-exec): -------------------------------------------------------------------------------------------------------------------
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | Warning: External references from destroy provisioners are deprecated
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |   on main.tf line 58, in resource "null_resource" "uninstall_script":
2020/12/10 16:07:46 Terraform apply |   58: 							environment = {
2020/12/10 16:07:46 Terraform apply |   59: 								KUBECONFIG = "${data.ibm_container_cluster_config.clusterConfig.config_file_path}"
2020/12/10 16:07:46 Terraform apply |   60: 							}
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | Destroy-time provisioners and their connection configurations may only
2020/12/10 16:07:46 Terraform apply | reference attributes of the related resource, via 'self', 'count.index', or
2020/12/10 16:07:46 Terraform apply | 'each.key'.
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | References to other resources during the destroy phase can cause dependency
2020/12/10 16:07:46 Terraform apply | cycles and interact poorly with create_before_destroy.
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | Error: Error running command 'chmod +x ./ibm-cp-integration/inventory/ibmcloudEnablement/files/install/install.sh && ./ibm-cp-integration/inventory/ibmcloudEnablement/files/install/install.sh': exit status 1. Output: ℹ INFO: The installation will take approximately 30 minutes to 1.5 hour to complete.
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | ℹ INFO: Cleaning up pem file contents
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | -------------------------------------------------------------------------------------------------------------------
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | ❌ ERROR: Failed to download master.zip from https://github.com/IBM/cp4i-deployment-samples/archive
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply | -------------------------------------------------------------------------------------------------------------------
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform apply |
2020/12/10 16:07:46 Terraform APPLY error: Terraform APPLY errorexit status 1
2020/12/10 16:07:46 Could not execute action

Hey @drewdouglass1, opened this for you at: https://github.ibm.com/cp4i/icip-issues/issues/2053


Tree styles are updated to be RTL-friendly

This one can be tested at https://examples9x.wicket.apache.org/tree by setting dir="rtl" attribute for <html> tag
I'll create JIRA if this PR will be considered useful :)

@solomax Maybe create a second example page with dir="rtl"

I'm not sure what would be the best way in this case :(
It might be some sort of dropdown (so every page can be checked in RTL), but this might be useless due to all contents is in English ....

@solomax Should this be ported to master ?

@solomax Should this be ported to master ?

Unfortunately while cherry-picking and testing I found minified CSS is broken :(
please see https://github.com/apache/wicket/pull/602
This one should be additionally fixed by merging #602 or reverted .... :((


fix: use transaction in a transaction

This PR fixes a bug where account creation will face due to not having the user created prior to linking. This happened because the user was created in a transaction but the account was created withoutusing the transaction connection inside the transaction.

Current dependencies on/for this PR:

main

PR #261   👈

This stack of pull requests is managed by Graphite.


small grammar fixes, reporting fixes

Description
Grammar fixes & reporting fixes
Issues Resolved

grammar fixes for nested RETURN in UDFs
grammar fixes for ALTER PARITION
ABORT can be a keyword
small reporting fixes
fixed lookup of identifiers with embedded special chars
in xref, add list of object names with/without issues

Check List

[ x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Hm. I think that debugging code should not be commented out, but be conditional on a debugging flag.
But reality is not always perfect, so I'll let it go.


stats count() is displayed as multiple series in Grafana

Hi, when use Grafana to build dashboard, it display multiple series in Grafana, but it is normal in VMUI.

This is due to Grafana seeing each series/stream as a separate frame in tables. To make it appear the same as it does in VMUI, add a series to row transform

Thanks @tiny-pangolin, so it is not a issue right?

Correct this is the expected behavior


Add the ability to detect references to elements that are not marked "mustSupport"

When logic is written against data models that include a "mustSupport" indicator, it would be useful to be able to issue warnings when that logic references elements of the model that are not marked "mustSupport". This would be a flag to consumers of an artifact using the logic to be sure that the behavior is not negatively impacted if the data is not present as expected.

Deferring to CQL 1.2 at least.


Add support for date type

closes #15

Nice implementation, didn't know about ciso8601, will have to add that to my JSON lib.  Any idea how date64 would work, or does it just use int64 instead of int32?

I assume it just uses 64-bit int.  If that's the case, wouldn't be that hard to modify this implementation.  That said -- Python date has a max year of 9999, so if you actually have dates far into the future this implementation will not work.


Add helper for (:=) monomorphized to Text

:= is polymorphic for any ToJSON a, which is annoying for defining Text with string literals:
"owner" := ("my-org" :: Text)

Maybe add a helper
(:=*) :: Text -> Text -> ...
(:=*) = (:=)

for setting the type of RHS to Text?

or perhaps even just a small helper like
txt :: Text -> Text
txt = id

"owner" := txt "my-org"


Can i train your code with rgb features (no audio) only?

Can i train your code with rgb features  only(no audio)? At the same time, using rgb features only(no audio)  test the trained model. If need to modify code, and how to modify, thank you.

Pls refer to FLAGS parameter setting, set "feature_names" to "mean_rgb" (frame_feature=False) or "rgb" (frame_feature=True) will let model use rgb feature only.
If you need to use audio, set "feature_names" to "mean_rgb,mean_audio" or "rgb,audio", respectively.


[Fix #595] Add ERB pre-processing for configuration files

A typical use case for this new feature would be excluding files that are ignored by Git.

Thank you!


iris landmark coordinate

Hi, May ask how would you get the iris landmarks coordinate in the cropped eye region image??

You can take a look at the inference notebook for an example.


Request Content

Thank you for making this it looks great so far.  One thing I can't figure out based on the repo or the docs is whether this solution provides logging the actual contents of requests and responses, not just counts and aggregate numbers.  It's the one thing that all Azure OpenAI monitoring solutions don't seem to cover is logging the actual prompts and conversation.  I have worked out a custom solution but continue to be on the lookout for something fully integrated that allows us to monitor how people are using our AI applications, what kinds of things they typically ask, and what kinds of responses they are getting.

Prompts and any other applicative information are not logged by the platform. This is by design.


Update index.html with Form Accessibility (Revised PL) - Issue #23

🛠 Fixes Issue #23 - Accessibility Issues on Form
Fixes a form control issue. For accessibility, the label element should describe the purpose of the form control.
The labels' for attributes were updated to match each corresponding input id.

[X] My code follows the code style of this project.
[X] This PR does not contain plagiarized content.
[X] The title of my pull request is a short description of the requested changes.
[X] I am a participant of Hacktoberfest 2023.

📄 Note to reviewers
This pull request is a revised version of a previous (and now closed) pull request.
📷 Screenshots
The form accessibility issues, per the WAVE web accessibility tool, have been fixed.

Closes #23

Thank you for the contribution✨


Fix a grammar issue

Fix a grammar issue in graph-introduction.md

@zhiliangxu : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Looks good; thanks.


Display on iOS if not Safari.

Fixes #34

👍

Could you just remove smart-app-banner.js from the PR?

Updated.

Does it fix the duplicate banner?

@renanmonteiros

Code looks fine. I did not personally reproduce #34 tho. On my side, I the native banner doesn't show up at all. We should definitely use some tools to confirm this. BrowserStack is free for open source projects. I would be very happy to have some kind of verification for these problems. I suppose we can get screenshots of multiple devices to confirm this.
Having two banners is definitely annoying and should not happen.


fix: fix bug, fail test on any deploy error

Description

Release required?

[ ] No release
[x] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

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


Doesn't work with server-sider rendering

I'm trying to use redux-optimistic-ui with server-side rendering. The issue is that redux-optimistic-ui thinks that the state is already initialized when it in fact isn't.
Redux performs two passes to initialize the reducer and test to ensure that your reducer doesn't listen for @@redux actions. What this means is the the isReady flag is set before the state is initialized.
Since I'm rehydrating my data from the server, the initial state is already set (it's NOT undefined), and so it doesn't get wrapped by redux-optimistic-ui since the isReady flag is also set from the redux initialization passes.

i'm not quite sure i understand.
Here's an example of it using SSR though: https://github.com/mattkrick/meatier

You're not making the reducer optimistic when the app starts. You're doing it asynchronously after you've already loaded the reducer and gone through the initialization.
Additionally, you're making the entire reducer optimistic, not one of the sub-reducers which I am, so there's no easy way to add it after you've already configured the reducer.
When I bootstrap my app, I wire up all of the reducers in one file, making one of the sub-reducers optimistic. The initialization actions in redux are firing and passing in undefined for the state and setting the isReady flag to true. When the @@init action finally comes through, the initial state is already set from the server, however it hasn't been made optimistic yet. Since the isReady flag is already true though and the state is not undefined, redux-optimistic-ui is not running the lines to set up the state.
We could fix this issue by adding a property to the optimistic state for isReady. Rather than checking flag outside of the closure for isReady we check a property on the state itself.
const isInitialized  = (state, readyValue) => (
  state === undefined ||
  !(state instanceof Map) ||
  state.get('isReady') !== readyValue
)

export const optimistic = (reducer, rawConfig = {}) => {
  const config = Object.assign({
    maxHistory: 100
  }, rawConfig);
  const readyValue = Math.random()

  return (state, action) => {
    if (isInitialized(state, readyValue)) {
      // don't count @@redux actions as initializing the store,
      // otherwise we can't use server-side rendering
      isReady = !action.startsWith('@@redux');
      state = Map({
        history: List(),
        current: reducer(ensureState(state), {}),
        beforeState: undefined,
        isReady: readyValue
      });
    }
    const historySize = state.get('history').size;
    const {type, id} = (action.meta && action.meta.optimistic) || {};

    // a historySize means there is at least 1 outstanding fetch
    if (historySize) {
      if (type !== COMMIT && type !== REVERT) {
        if (historySize > config.maxHistory) {
          console.error(`@@optimist: Possible memory leak detected.
                  Verify all actions result in a commit or revert and
                  don't use optimistic-UI for long-running server fetches`);
        }
        // if it's a BEGIN but we already have a historySize, treat it like a non-opt
        return state.withMutations(mutState => {
          mutState
            .set('history', state.get('history').push(action))
            .set('current', reducer(state.get('current'), action))
        });
      }
      // for resolutions, remove the id so it's not treated like an optimistic action
      action.meta.optimistic.id = undefined;

      // include the resolution in the history & current state
      const nextState = state.withMutations(mutState => {
        mutState
          .set('history', state.get('history').push(action))
          .set('current', reducer(state.get('current'), action))
      });

      const applyFunc = type === COMMIT ? applyCommit : applyRevert;
      return applyFunc(nextState, id, reducer);
    }
    // create a beforeState since one doesn't already exist
    if (type === BEGIN) {
      return state.withMutations(mutState => {
        mutState
          .set('history', state.get('history').push(action))
          .set('current', reducer(state.get('current'), action))
          .set('beforeState', state.get('current'))
      });
    }

    // standard action escape
    return state.set('current', reducer(state.get('current'), action));
  };
};

Hi @mattkrick, I'm not using SSR or async routes/reducers but is anything special needed when using a sub-reducer like this? When wrapped in optimistic its initial state comes back undefined, though everything works when I wrap combineReducers itself.

@bhj i'd need to see some code. if you're loading up some existing state, you'll wanna use preloadState

@mattkrick I forgot to ensureState(state.subreducer) instead of just ensureState(state). Of course ensureState isn't magic. 🤓🌴 Thanks for the help and your work!


2 ways to upload file to blob storage (using DeviceClient and BlockBlobClient)

I have noticed that there are 2 ways to upload a file to blob storage:

Using device client object (as mentioned in this page)
client.uploadToBlobAsync(fileName, inputStream, streamLength, new FileUploadStatusCallBack(), null);
Using BloblBlobClient (as mentioned in https://docs.microsoft.com/en-us/java/api/overview/azure/storage-blob-readme?view=azure-java-stable#upload-a-blob-from-a-stream)
BlockBlobClient blockBlobClient =
blobContainerClient.getBlobClient("myblockblob").getBlockBlobClient();
String dataSample = "samples";
try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBytes()))
{
blockBlobClient.upload(dataStream, dataSample.length());
} catch (IOException e) {
e.printStackTrace();
}

What is the difference between the two?

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

ID: 61399113-7dce-0b71-5990-0fb1d544dc2d
Version Independent ID: 0dbf316e-b526-0b88-7a2d-ead95b82b4bf
Content: Upload files from devices to Azure IoT Hub with Java
Content Source: articles/iot-hub/iot-hub-java-java-file-upload.md
Service: iot-hub
GitHub Login: @wesmc7777
Microsoft Alias: wesmc

@DeveloperBeginner Thanks for the feedback! We are currently investigating and will update you shortly.

@DeveloperBeginner Please find the below answers to to your questions.
You are referring two different documents. First approach uses Async method to upload a file and second approach uses Block Blobs.

The method uploadToBlobAsync Asynchronously upload a stream to the IoT Hub.  The method takes in the file name and stream source of the file to be uploaded and handles the upload to storage.

Reference: https://docs.microsoft.com/en-us/java/api/com.microsoft.azure.sdk.iot.device.deviceclient.uploadtoblobasync?view=azure-java-stable

Upload from an InputStream to a blob using a BlockBlobClient generated from a BlobContainerClient

The BlockBlobClient allows you to manipulate Azure Storage block blobs.
Block blobs let you upload large blobs efficiently. Block blobs are comprised of blocks, each of which is identified by a block ID. You create or modify a block blob by writing a set of blocks and committing them by their block IDs. Each block can be a different size, up to a maximum of 100 MB (4 MB for requests using REST versions before 2016-05-31), and a block blob can include up to 50,000 blocks. The maximum size of a block blob is therefore slightly more than 4.75 TB (100 MB X 50,000 blocks).
Reference: https://docs.microsoft.com/en-us/dotnet/api/azure.storage.blobs.specialized.blockblobclient?view=azure-dotnet
Hope this helps.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Thanks for the response


Why had this project died?

I have just discovered this project reading this stackoverflow answer and I'm curious about the fate of this project.

maybe because it works ok on local but what about CI ?

🦗🦗


Installer doesn't configure local git

The installer currently writes out a cluster config, but it has diverged from cluster add and doesn't do the git configuration step.

@titanous I think we're better off with someone else working on this.

@titanous good stuff, thanks agai!


Add fragment-like components

I'll explain it with example. Let's say you have Button component that accepts ng-content, and want to have FilterButton, ShareButton components that use Button and just push svg icon inside. Currently it is not possible to use FilterButton in place of Button because each component in Angular adds another dom node. I would like to have ability to create components in such way so no extra root is created, but root node from component's template is considered as this component's root. As in older versions of React, you can require that each of those "fragment" components have only one root element in it's template.
Possible API:
@Component(
  selector: 'kit-filter-button',
  template: '<kit-button>Icon</kit-button>,
  directives: const [Button],
  fragment: true
)
class FilterButton {}

In this case no dom node with tag kit-filter-button is created.

Connected to https://github.com/dart-lang/angular/issues/494. If it was possible to create fragment component with input as root node issue would be solved.

Thanks for filing this! We've been talking about similar concepts at the office.
One idea was shifting template semantics to the template file (or string literal) itself:
@Component(
  template: '<kit-button>Icon</kit-button>',
  directives: const [KitButton],
)
class FilterButton {}

So, if you used this, as such:
<FilterButton></FilterButton>

... it would emit in the DOM:
<kit-button>Icon</kit-button>

... with no overhead or concept of a root ("host") component.
On the other hand, if you wanted a host component, you could continue to use selector, but also you could use a new syntax for the host in the template file. For example:
// filter_button.html
<Host tag="filter-button">
  <!-- View Content -->
</Host>

Anyway, this is a little bike-sheddy. I will keep this filed for now!

/cc @TedSander @nshahan for angular_components input.
(Out of scope for next quarter, but we could talk about after that)

We're all a fan of this, but there isn't a compelling way to implement this yet.
We will revisit sometime next year.


[BUG]: iframes will not load when you have COEP / COOP set on your site

What happened?
When setting increased security settings on your site the resources loaded from stripe are being blocked

Set the following headers on your server to reproduce this error
         Cross-Origin-Embedder-Policy "credentialless";
         Cross-Origin-Opener-Policy "same-origin";

Is there any way we can ensure either the iframe files are hosted with a CORP header 'cross-origin' or a way to configure the iframe directly before embedding it (less ideal solution), maybe an init parameter for stripe.js? ?
The credentialless attribute is not widely supported, (i.e. safari and firefox do not support it), so it would be best if the header was appended correctly from the server response Cross-Origin-Resource-Policy: 'cross-origin'
There is a lot more reports of developers with this same issue here

Closing as duplicate of #417


bigwig and bed support?

Does this version still support outputting bigwigs and BED files? Epic did this with -b but in SICER2 -b is bin size instead. Thanks!

Thanks for bothering to open an issue btw :) Keeping it open, since I am sure it will come up again.

Ah, fair enough. For BED output, is there an argument to output a dedicated BED file, or should one just grab the first three columns of the output file? Not a big deal to do so, just want to make sure I'm not missing the "--output-bed" argument. Good luck with review! -Kathleen

I think I might actually add bw support thinking more about it. Dunno when that will be.
The first six columns of bed files are
Chromosome Start End Name Score Strand
like in the output SICER2 writes.

Ah - duh. Clearly a brain lapse. Thanks!

I would recommend you dl the newest version from PyPI (pip install epic2 == 0.0.3) and redo your analyses. I have implemented several bugfixes :) Sorry for the inconvenience.

I am contemplating adding bigwig-support like that of epic in epic2. I will make another script, epic2-bw to avoid hurting the performance of epic2 (creating bigwigs requires you to store more data than needed for the epic2 algorithm itself).
The script should be able to store both raw (i.e. non-binned, displaying the data exactly like it is) and binned (like in epic) bigwigs.
The raw-option will be especially helpful for those using another ChIP-Seq peak caller than epic2, but still want to create bigwigs.
parser.add_argument(
    '--bigwig',
    '-bw',
    required=False,
    type=str,
    help=
    '''For each file, store a bigwig of both enriched and non-enriched regions to folder <BIGWIG>. Requires different basenames for each file.''')

parser.add_argument(
    '--individual-log2fc-bigwigs',
    '-i2bw',
    required=False,
    type=str,
    help=
    '''For each file, store a bigwig of the log2fc of ChIP/(Sum Input) to folder <INDIVIDUAL-LOG2FC-BIGWIGS>. Requires different basenames for each file.''')

parser.add_argument(
    '--chip-bigwig',
    '-cbw',
    required=False,
    type=str,
    help=
    '''Store an RPKM-normalized summed bigwig for all ChIP files in file <CHIP-BIGWIG>.''')

parser.add_argument(
    '--input-bigwig',
    '-ibw',
    required=False,
    type=str,
    help=
    '''Store an RPKM-normalized summed bigwig for all Input files in file <INPUT-BIGWIG>.''')

parser.add_argument(
    '--log2fc-bigwig',
    '-2bw',
    required=False,
    type=str,
    help=
    '''Store an log2(ChIP/Input) bigwig in file <LOG2FC-BIGWIG>. (Both ChIP and
Input are RPKM-normalized before dividing.)''')

epic2-bw is out in 0.0.36. It can create bigwigs like epic2 views the data, but also bigwigs of the data as they are with the --raw flag. Comments appreciated.
usage: epic2-bw [-h] --treatment TREATMENT [TREATMENT ...]
                [--control CONTROL [CONTROL ...]] [--raw] [--bigwig BIGWIG]
                [--individual-log2fc-bigwigs INDIVIDUAL_LOG2FC_BIGWIGS]
                [--chip-bigwig CHIP_BIGWIG] [--input-bigwig INPUT_BIGWIG]
                [--log2fc-bigwig LOG2FC_BIGWIG] [--genome GENOME]
                [--keep-duplicates] [--bin-size BIN_SIZE]
                [--fragment-size FRAGMENT_SIZE] [--chromsizes CHROMSIZES]
                [--example] [--version]

epic2-bw, version: 0.0.36 (Visit github.com/endrebak/epic2 for examples and
help. Run epic2-bw --example for a simple example command.)

optional arguments:
  -h, --help            show this help message and exit
  --treatment TREATMENT [TREATMENT ...], -t TREATMENT [TREATMENT ...]
                        Treatment (pull-down) file(s) in one of these formats:
                        bed, bedpe, bed.gz, bedpe.gz or (single-end) bam, sam.
                        Mixing file formats is allowed.
  --control CONTROL [CONTROL ...], -c CONTROL [CONTROL ...]
                        Control (input) file(s) in one of these formats: bed,
                        bedpe, bed.gz, bedpe.gz or (single-end) bam, sam.
                        Mixing file formats is allowed.
  --raw, -r             Create bigwigs at nucleotide resolution (it still
                        respects the drop-duplicates flag.)
  --bigwig BIGWIG, -bw BIGWIG
                        For each file, store a bigwig of both enriched and
                        non-enriched regions to folder <BIGWIG>. Requires
                        different basenames for each file.
  --individual-log2fc-bigwigs INDIVIDUAL_LOG2FC_BIGWIGS, -i2bw INDIVIDUAL_LOG2FC_BIGWIGS
                        For each file, store a bigwig of the log2fc of
                        ChIP/(Sum Input) to folder <INDIVIDUAL-LOG2FC-
                        BIGWIGS>. Requires different basenames for each file.
  --chip-bigwig CHIP_BIGWIG, -cbw CHIP_BIGWIG
                        Store an RPKM-normalized summed bigwig for all ChIP
                        files in file <CHIP-BIGWIG>.
  --input-bigwig INPUT_BIGWIG, -ibw INPUT_BIGWIG
                        Store an RPKM-normalized summed bigwig for all Input
                        files in file <INPUT-BIGWIG>.
  --log2fc-bigwig LOG2FC_BIGWIG, -2bw LOG2FC_BIGWIG
                        Store an log2(ChIP/Input) bigwig in file <LOG2FC-
                        BIGWIG>. (Both ChIP and Input are RPKM-normalized
                        before dividing.)
  --genome GENOME, -gn GENOME
                        Which genome to analyze. Default: hg19. If
                        --chromsizes and --egf flag is given, --genome is not
                        required.
  --keep-duplicates, -kd
                        Keep reads mapping to the same position on the same
                        strand within a library. Default: False.
  --bin-size BIN_SIZE, -bin BIN_SIZE
                        Size of the windows to scan the genome. BIN-SIZE is
                        the smallest possible island. Default 200.
  --fragment-size FRAGMENT_SIZE, -fs FRAGMENT_SIZE
                        (Single end reads only) Size of the sequenced
                        fragment. Each read is extended half the fragment size
                        from the 5' end. Default 150 (i.e. extend by 75).
  --chromsizes CHROMSIZES, -cs CHROMSIZES
                        Set the chromosome lengths yourself in a file with two
                        columns: chromosome names and sizes. Useful to analyze
                        custom genomes, assemblies or simulated data. Only
                        chromosomes included in the file will be analyzed.
  --example, -ex        Show the paths of the example data and an example
                        command.
  --version, -v         show program's version number and exit
`
``


[Loc] update to schema-compare

This PR fixes #

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 41.634%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
27875

Relevant Lines:
62380

💛  - Coveralls


Resource IDs cannot be used within the resource itself

For example, Azure Front Door has many Resource IDs referring to Azure Front Door itself. This is used to link frontend pools, backend pools, and rules. E.g.:
            "properties": {
                "resourceState": "Enabled",
                "backendPools": [
                    {
                        "id": "[concat(resourceId('Microsoft.Network/frontdoors', 'MyFrontDoorNameHere'), '/BackendPools/www')]",
                        "name": "www",
                        "properties": {

When decompiling this with Bicep, you get something like:
    backendPools: [
      {
        id: '${afd.id}/BackendPools/www'
        name: 'WebApp'
        properties: {

However, the 'afd' resource cannot use 'afd.id' within its own definition, so the decompiled Bicep won't compile.
I feel that such self-references should work, because they're necessarily specified in the Bicep file! The name, id, and location should be usable in such a manner.

I think in this case the ID should just not be generated in the decompilation. Written in bicep a working FD definition looks like this:
resource frontdoor 'Microsoft.Network/frontDoors@2020-05-01' = {
  name: frontDoorName
  location: 'Global'
  properties: {
    backendPools: [
      {
        name: 'BackendAPIMs'
        properties: {
          backends: [
            {
              address: 'a.contoso.com'

This is related to #724. I definitely think there's scope for special-casing the 'deploy-time' properties (.id, .type, .name & .apiVersion) so that a resource can self-reference them.

I notice the examples area has no examples for either loadbalancer loadbalancingRules or inboundNatRules. Is it because of this self-referencing problem? Is there a workaround?

Yeah I agree that we should allow self-referencing for the properties mentioned above since they don't generate a true dependency.
The workaround would be to construct the resource id manually via the *resourceId() functions.

@majastrz the problem is that with inboundNat rules it is a lower-level item (the frontend configuration) you need to fetch. Is it possible to fetch this with resourceId? I thought it only worked for "top level" items and not sub items.

@JustinGrote I just built an LB. Didn't have time yet to post this as a proper example but maybe this helps you
resource loadBalancerInbound 'Microsoft.Network/loadBalancers@2020-06-01' = {
  name: name_loadBalancerInbound
  location: location
  sku: {
    name: 'Standard'
  }
  properties: {
    frontendIPConfigurations: [
      {
        name: loadBalancerFrontEndName
        properties: {
          subnet: {
            id: '${vnet.id}/subnets/${name_subnetPgbouncerLb}'
          }
          privateIPAllocationMethod: 'Static'
          privateIPAddress: '<IP_ADDRESS>'
          privateIPAddressVersion: 'IPv4'
        }
      }
    ]
    backendAddressPools: [
      {
        name: loadBalancerBackEndName
      }
    ]
    loadBalancingRules: [
      {
        name: 'roundRobinLBRule'
        properties: {
          frontendIPConfiguration: {
            id: resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', name_loadBalancerInbound, loadBalancerFrontEndName)
          }
          backendAddressPool: {
            id: resourceId('Microsoft.Network/loadBalancers/backendAddressPools', name_loadBalancerInbound, loadBalancerBackEndName)
          }
          protocol: 'Tcp'
          frontendPort: 5432
          backendPort: 5432
          enableFloatingIP: false
          loadDistribution: 'Default'
          idleTimeoutInMinutes: 5
          probe: {
            id: resourceId('Microsoft.Network/loadBalancers/probes', name_loadBalancerInbound, loadBalancerProbeName)
          }
        }
      }
    ]
    probes: [
      {
        name: loadBalancerProbeName
        properties: {
          protocol: 'Tcp'
          port: 5432
          intervalInSeconds: 5
          numberOfProbes: 2
        }
      }
    ]
  }
}

@sebader thanks for posting the workaround.

@sebader this worked for me too. Thanks.

Closing as dup of #1852

Thanks @sebader
I did as your guide, it's working fine.

@sebader solution works for me also. Thanks. Maybe problem is not entirely in bicep. Maybe az bicep decompile should generate working bicep i.e. using @sebader solution. Although I'm not sure if you have used it and ended up here that way.


Clear all occurrences of the typo: 'ouput -> output'

fix #9390
Fixes #9390
Status
not-tested
Description
Fixing some typos
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
NO
External dependencies / deployment changes
Does it require deployment changes? -  Requires test deployment for CRAB{Server/TW}
Does it rely on third-party libraries? - NO

@todor-ivanov did you manage to run a quick test for this (patch your WMAgent and run a couple of workflows, just to be on the safe side)?

test this please

test this please

@amaltaro I managed to run few test workflows and they were successful. I think we may go now and merge this.


Vueify.Next: vue.config.js not loaded

In the current 'next' version, vue.config.js is ignored (in my case used for a custom compiler).
It seems that loading the file has been removed in this commit:
https://github.com/vuejs/vueify/commit/98ec0b2e2db1a05c83ef79a2378053bcd5185530#diff-168726dbe96b3ce427e7fedce31bb0bcL4
Is this a regression or is there a new mechanism for vue.config.js?

i think i'm having the same issue. i can't get autoprefixer to run at all.

As a workaround, I suggest the use of a dedicated browserify transform, defined in the package.json browserify entry, that inherit from vueify.
(nb: Anyway, the previous resolver for vue.config.js was buggy as it was based on process.cwd() instead of the package's root as it would be expected for a browserified package).
package.json
//...
  "browserify": {
    "transform": [
      "./vue-transform.js",
      [ "babelify", { "presets": [ "es2015"  ] } ]
    ]
  },
//...

./vue-transform.js
const PassThrough = require('stream').PassThrough
const vueify = require('vueify')

// Define options (or use require('./vue.config.js') to define options)
const localOptions = {
  // ... any vue.config.js options...
  postcss: [require('postcss-import')()],
}

// Export a browserify transform for vueify, binded with your options
module.exports = function (file, options) {
  if (!/.vue$/.test(file)) {
    return new PassThrough()
  }
  options = Object.assign({}, localOptions, options)
  return vueify(file, options)
}

@nopnop Thanks for the workaround tip!
I'll leave this open as a reminder to adapt the README or the code.


Automatically scrolling on lines that go past the end of the window

Issue Type: Bug
Today, VSCode started scrolling strangely when a line is longer than the width of the editor.
Steps to reproduce:

Type a line that is longer than the width of the editor
Attempt to scroll right

When the mouse is in the editor, it will automatically scroll left. When the mouse is outside the editor it stops. However, it is basically impossible to look at the end of a line.

VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
Remote OS version: Linux x64 4.18.0-305.el8.x86_64

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz (8 x 1896)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.88GB (5.70GB free)

Process Argv
--crash-reporter-id 11265485-e23d-4f5a-b75b-ed9aa0dd293e

Screen Reader
no

VM
29%

Item
Value

Remote
SSH: vm-mreisner

OS
Linux x64 4.18.0-305.el8.x86_64

CPUs
Intel(R) Xeon(R) Platinum 8268 CPU @ 2.90GHz (2 x 2893)

Memory (System)
1.93GB (0.64GB free)

VM
100%

Extensions (7)

Extension
Author (truncated)
Version

gitlens
eam
11.5.1

remote-containers
ms-
0.183.0

remote-ssh
ms-
0.65.7

remote-ssh-edit
ms-
0.65.7

remote-wsl
ms-
0.56.5

vscode-remote-extensionpack
ms-
0.21.0

vim
vsc
1.21.4

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt678:30270856
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30311712
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255cf:30323309
vscorehov:30309549
vscod805:30301674
pythonvspyt200cf:30331938
vscextlang:30333561
binariesv615:30325510
vsccppwt:30329788
aatestflight:30331711
bridge0702cf:30333156

Hmm...this seems to happen in Notepad too. So perhaps it's my computer.

A reboot seems to have fixed this. Strange.


Examples for DEX 038 and 039

I really can't find any apps using Dalvik 038 or 039 format. Even 036 and 037 are very rare.
@androguard/external-contributors Does anyone can provide some examples?
Out of curiosity: there are rumors about older version than 035. I mean official versions from the pre Android 1.0 era not malware try to do crazy stuff. Anyone has such samples by chance?

btw open source apps would be appreciated in order to write better testcases.

I've found the library https://github.com/square/okhttp which is Dalvik 038 when compiled with dx

@Neakxs thanks for the hint! I'll try that!
@eighthave I also scanning fdroid right now - our favorite datamining set :D - looks like there are also a few samples having 037 and 038. No 039 so far... I'll keep you posted!

@eighthave thats reallt interesting: out of 22k files, only 4 have a different dex version than 035... the new versions are really not that common,

I know little about the updated DEX formats.  Perhaps they've only added
extensions since 035, so most apps don't need them.

@eighthave yes, the new stuff is only required if you use new java features. AFAIK it is used when using lambda expressions or other dynamic stuff... But it is also quite hard to find an example which will compile with the new opcodes. I have one example where dx would use them but d8 does not.
I found out that setting the minimal API level for dx or d8 has an effect on the DEX version. Thus, only apps with very high minimal API levels will actually compile to a new DEX version, hence the rare versions.

Ah right, yeah, minSdkVersion will for sure enforce the DEX version,
since new DEX updates would not be shipped to older Android versions.

@reox  i use  androguard (3.3.5) to static analysis  android system app. The Android 9 (Pie) release has introduced a new type of Dex file, the Compact Dex (Cdex).
i use  the "compact_dex_converter" tool   to convert a Cdex file back to standard Dex, the dex version is dex.039.
classes.zip.tar.gz

@FloatingGuy thanks for the APK!
What I would also really need is an APK which contains the invoke-polymorphic and invoke-polymorphic/range opcodes...

@reox here is a apk with dex.039
com.miui.securitycore.zip

VirusTotal Livehunt rule is another resource to conduct a survey about DEX file Dalvik versions


cancel or save the edit profil return 404

canceling the edit profil ( https://django-crm.micropyramid.com/users/1/edit/ ) return 404 , i don't get it why ?!! the save too

@Yacin92 We have fixed the issue. You can update the profile now.


TypeError: Argument 'angle' can not be treated as a double

I'm sorry for asking so many questions.
I'm trying to get to the "train" stage.
I am trying to "CUDA_VISIBLE_DEVICES=0 python train/train_refinenet.py --arch pose_resnet_refine --checkpoint . /checkpoint/all/syn_refinenet --animal all --solver adam --dataset synthetic_animal_sp_all --dataset_real real_animal_all --train_on_all_ cat" was successfully executed.
Then run "CUDA_VISIBLE_DEVICES=0 python train/train_refinenet_mt.py --arch pose_resnet_refine_mt_multida --checkpoint ./checkpoint/all/syn2real_refinenet_mt --dual_branch --mixup_dual --dataset_real_crop real_animal_crop_all --occlusion_aug --pretrained ./checkpoint/all/syn_refinenet_re/model_best.pth.tar --animal all --dataset_real real_animal_all --dataset synthetic_animal_sp_all --train_on_all_cat --generate_pseudol
", the following error occurred.
Please let me know the solution.
Epoch: 1 | LR: 0.000250 | Trg_weight: 15.000000 | C2rcons_weight: 0.606415
==> real_animal_all
Animal:horse, number of frames:13545, train: 8380, valid: 1772
Total number of frames:13545, train: 8380, valid 1772
load from mean file: ./data/synthetic_animal/all_combineds5r5_texture/mean.pth.tar
Real animal mean: 0.3999, 0.3909, 0.3871
Real animal std: 0.2589, 0.2431, 0.2291
Traceback (most recent call last):
File "train/train_refinenet_mt.py", line 547, in
main(parser.parse_args())
File "train/train_refinenet_mt.py", line 182, in main
score_map, generated_kpts = prediction_check(previous_img, previous_kpts, trg_img[i], model, real_dataset_train, device, num_transform=5)
File "C:\Users\kana\Desktop\Synthetic-Animals2\UDA-Animal-Pose-main\train..\CCSSL\scripts\consistency.py", line 59, in prediction_check
M = cv2.getRotationMatrix2D((32,32),-rot,1)
TypeError: Argument 'angle' can not be treated as a double

Hi @Kana-alt, you are welcome to ask questions. I could not reproduce you error currently. May I know your python version?

I use
Python 3.6.13

Can you try python 3.7 and opencv-python <IP_ADDRESS>, and see whether the error still occurs?

Thanks for the reply!
I changed the environment and tried again.
Next time I got this error.
==> creating model 'pose_resnet_refine'
Init Network from model zoo
Total params: 29.48M
init all synthetic animal super augmentation
Animal: horse, training samples: 8000, valid samples: 2000
Traceback (most recent call last):
File "train/train_refinenet.py", line 439, in
main(parser.parse_args())
File "train/train_refinenet.py", line 112, in main
train_dataset = datasets.dict[args.dataset](is_train=True, **vars(args))
File "C:\Users\kana\Desktop\UDA-Animal-Pose-main\train..\pose\datasets\synthetic_animal_sp_all.py", line 248, in synthetic_animal_sp_all
return Synthetic_Animal_SP_All(**kwargs)
File "C:\Users\kana\Desktop\UDA-Animal-Pose-main\train..\pose\datasets\synthetic_animal_sp_all.py", line 90, in init
self.load_animal()
File "C:\Users\kana\Desktop\UDA-Animal-Pose-main\train..\pose\datasets\synthetic_animal_sp_all.py", line 128, in load_animal
self.train_set.append(imgpath[train_idxs[idx]])
IndexError: list index out of range

Do you generate the keypoints_18.json file by yourself? If so, can you check the length of the imgpath by print(len(imgpath)) to check whether you write the data properly?

I've got it figured out! Thank you.


nixos/nano: add option defaultEditor to automatically set $EDITOR

Other editors like vim and emacs provide an option defaultEditor, which automatically sets the environment variable $EDITOR to use that editor by default. This brings similar functionality to nano.

Things done

Built on platform(s)

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.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.

Add a :+1: reaction to pull requests you find important.


Move state_root from StateTransitionRunner to Storage and update STF rollup interface accordingly

TBD

This breaks rollup security. Needs to be tracked outside of the storage


Domain activation is Failed - [BRIEF DESCRIPTION]

App Id: d2hwqisn1lqyc8
Region: eu-west-2
Step: Domain activation
Status: Failed

Note: Do not include information that is sensitive in nature such as your domain name, company etc.

Issue/question
A clear and concise description of what the issue/question is.
Error message
One or more of the CNAMEs you provided are already associated with a different resource.
Additional information
Please add any other relevant information. Please feel free to include screenshots.

Our records indicate that the domain associated with this is app is now available : ******.fi


Upload request stats before inserting elements

It should fix #5969 , though it was not tested yet.
I basically moved the block where stats are updated to couch so that if it fails, the request will have to wait until the next cycle.
@ticoann I also removed the block updating to wmstats, as we discussed. If you can take a quick look, that would be great. Just don't merge yet, it needs to be tested (though reproducing the failure will be very hard...)

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/291/ for details

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/293/ for details

retest this please

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/295/ for details

No pylint warnings for pull request 6144:

Pre-python 2.6 idioms found in changed files. Please consider updating the code. Suggested patch follows:
--- src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py (original)
+++ src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py (refactored)
@@ -307,9 +307,8 @@

     def getMostRecentOutputForPrepID(self, prepID):
         """Return the datasets produced by the most recently submitted request with this prep ID"""
-        requestIDs = GetRequest.getRequestByPrepID(prepID)
+        requestIDs = sorted(GetRequest.getRequestByPrepID(prepID))
         # most recent will have the largest ID
-        requestIDs.sort()
         requestIDs.reverse()

         request = None

Unit test changes for pull request 6144:

WMCore_t.WebTools_t.REST_t.RESTTest:testBadMethodEcho changed from success to error
WMCore_t.RequestManager_t.Admin_t.AdminTest:testA_SoftwareManagement changed from success to error
WMCore_t.Database_t.RotatingDatabase_t.RotatingDatabaseTest:testArchive changed from failure to success
WMCore_t.WebTools_t.RESTFormat_t.RESTFormatTest:testReturnFormat changed from error to success

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/298/ for details

Summary of pylint changes for pull request 6144:

Score for src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py decreased from 9.09 to 9.08

src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py got worse in pylint. Report follows:

Line 289 W0511 TODO this could me combined with getRequest
Line 486 W0511 TODO problem not to expose logs to the client
Line 214 W0301 Unnecessary semicolon
Line 56 in ReqMgrRESTModel R0901 Too many ancestors (8/7)
Line 195 in ReqMgrRESTModel.initThread W0613 Unused argument 'thread_index'
Line 202 in ReqMgrRESTModel.isalnum R0201 Method could be a function
Line 216 in ReqMgrRESTModel.getDataset R0201 Method could be a function
Line 227 in ReqMgrRESTModel.intpriority R0201 Method could be a function
Line 255 in ReqMgrRESTModel.validateUser R0201 Method could be a function
Line 263 in ReqMgrRESTModel.validateVersion R0201 Method could be a function
Line 279 in ReqMgrRESTModel.getRequest W0702 No exception type(s) specified
Line 269 in ReqMgrRESTModel.getRequest R0201 Method could be a function
Line 285 in ReqMgrRESTModel.getRequestNames R0201 Method could be a function
Line 293 in ReqMgrRESTModel.getOutputForRequest R0201 Method could be a function
Line 297 in ReqMgrRESTModel.getOutputForPrepID R0201 Method could be a function
Line 308 in ReqMgrRESTModel.getMostRecentOutputForPrepID R0201 Method could be a function
Line 330 in ReqMgrRESTModel.getAssignment R0201 Method could be a function
Line 350 in ReqMgrRESTModel.getRequestsByStatusAndTeam R0201 Method could be a function
Line 356 in ReqMgrRESTModel.getUser R0201 Method could be a function
Line 374 in ReqMgrRESTModel.getGroup R0201 Method could be a function
Line 385 in ReqMgrRESTModel.getVersion R0201 Method could be a function
Line 395 in ReqMgrRESTModel.getTeam R0201 Method could be a function
Line 399 in ReqMgrRESTModel.getWorkQueue R0201 Method could be a function
Line 409 in ReqMgrRESTModel.getMessage R0201 Method could be a function
Line 427 in ReqMgrRESTModel.getCampaign R0201 Method could be a function
Line 440 in ReqMgrRESTModel.validatePutWorkQueue R0201 Method could be a function
Line 447 in ReqMgrRESTModel.putRequest E1101 Instance of 'Toolbox' has no 'secmodv2' member
Line 453 in ReqMgrRESTModel.putRequest W0703 Catching too general exception Exception
Line 448 in ReqMgrRESTModel.putRequest R0912 Too many branches (18/12)
Line 578 in ReqMgrRESTModel.cloneRequest E1101 Instance of 'ReqMgrRESTModel' has no 'warn' member
Line 582 in ReqMgrRESTModel.putAssignment R0201 Method could be a function
Line 597 in ReqMgrRESTModel.putUser E1111 Assigning to function call which doesn't return
Line 597 in ReqMgrRESTModel.putUser W0612 Unused variable 'result'
Line 593 in ReqMgrRESTModel.putUser R0201 Method could be a function
Line 599 in ReqMgrRESTModel.putGroup R0201 Method could be a function
Line 608 in ReqMgrRESTModel.putVersion R0201 Method could be a function
Line 612 in ReqMgrRESTModel.putTeam R0201 Method could be a function
Line 619 in ReqMgrRESTModel.putMessage E1111 Assigning to function call which doesn't return
Line 616 in ReqMgrRESTModel.putMessage R0201 Method could be a function
Line 641 in ReqMgrRESTModel.postRequest R0201 Method could be a function
Line 690 in ReqMgrRESTModel.validateUpdates R0201 Method could be a function
Line 701 in ReqMgrRESTModel.validateStats R0201 Method could be a function
Line 714 in ReqMgrRESTModel.deleteRequest E1101 Instance of 'Toolbox' has no 'secmodv2' member
Line 732 in ReqMgrRESTModel.deleteRequest E1111 Assigning to function call which doesn't return
Line 747 in ReqMgrRESTModel.deleteGroup R0201 Method could be a function
Line 754 in ReqMgrRESTModel.deleteVersion R0201 Method could be a function
Line 758 in ReqMgrRESTModel.deleteTeam R0201 Method could be a function
Line 762 in ReqMgrRESTModel.deleteCampaign R0201 Method could be a function
Line 56 in ReqMgrRESTModel R0904 Too many public methods (79/20)
plus 188 comments on code style

Unit test changes for pull request 6144:

WMCore_t.WebTools_t.REST_t.RESTTest:testList changed from failure to error
WMCore_t.WebTools_t.REST_t.RESTTest:testGoodEcho changed from success to error
WMCore_t.WebTools_t.REST_t.RESTTest:testSanitisePassHTTP changed from failure to error
WMCore_t.WebTools_t.REST_t.RESTTest:testDAOBased changed from success to error
WMCore_t.Database_t.RotatingDatabase_t.RotatingDatabaseTest:testArchive changed from failure to success
WMCore_t.WebTools_t.NestedModel_t.NestedModelTest:testOuterFooPass changed from success to error
WMCore_t.Services_t.Requests_t.testRepeatCalls:test10Calls_with_pycurl changed from success to error

@amaltaro, patch looks good to me. Should I merge this?

Not yet please :(
Normal tests were ok, but when I forced an exception in the try block, WQ elements were not created and they are not created even in the coming cycles... I'm still debugging it

Thanks for the help Seangchan! Just updated the patch and seems to be working fine now.
The update call is already inside a try block, that's why I removed the inner one. Moreover, exceptions there will get propagated to queueNewRequests() which creates an error log entry in couch.

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/305/ for details

retest this please

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/307/ for details

retest this please

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/309/ for details

ok, I don't know what's going on... unittests are unstable, there were 23 failures in the last 2 runs and 170 in the last one. I don't find any info that tells me this PR is breaking tests.

I tried something yesterday to speed up the builds and rerun the parts that fail (more robust). I made a small typo though. Let's try again

retest this please

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/310/ for details

Beginning pylint and unit tests.
See https://cmssdt.cern.ch/jenkins/job/DMWM-PR-test/316/ for details

Summary of pylint changes for pull request 6144:

Score for src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py decreased from 9.09 to 9.08

src/python/WMCore/HTTPFrontEnd/RequestManager/ReqMgrRESTModel.py got worse in pylint. Report follows:

Line 289 W0511 TODO this could me combined with getRequest
Line 486 W0511 TODO problem not to expose logs to the client
Line 214 W0301 Unnecessary semicolon
Line 56 in ReqMgrRESTModel R0901 Too many ancestors (8/7)
Line 195 in ReqMgrRESTModel.initThread W0613 Unused argument 'thread_index'
Line 202 in ReqMgrRESTModel.isalnum R0201 Method could be a function
Line 216 in ReqMgrRESTModel.getDataset R0201 Method could be a function
Line 227 in ReqMgrRESTModel.intpriority R0201 Method could be a function
Line 255 in ReqMgrRESTModel.validateUser R0201 Method could be a function
Line 263 in ReqMgrRESTModel.validateVersion R0201 Method could be a function
Line 279 in ReqMgrRESTModel.getRequest W0702 No exception type(s) specified
Line 269 in ReqMgrRESTModel.getRequest R0201 Method could be a function
Line 285 in ReqMgrRESTModel.getRequestNames R0201 Method could be a function
Line 293 in ReqMgrRESTModel.getOutputForRequest R0201 Method could be a function
Line 297 in ReqMgrRESTModel.getOutputForPrepID R0201 Method could be a function
Line 308 in ReqMgrRESTModel.getMostRecentOutputForPrepID R0201 Method could be a function
Line 330 in ReqMgrRESTModel.getAssignment R0201 Method could be a function
Line 350 in ReqMgrRESTModel.getRequestsByStatusAndTeam R0201 Method could be a function
Line 356 in ReqMgrRESTModel.getUser R0201 Method could be a function
Line 374 in ReqMgrRESTModel.getGroup R0201 Method could be a function
Line 385 in ReqMgrRESTModel.getVersion R0201 Method could be a function
Line 395 in ReqMgrRESTModel.getTeam R0201 Method could be a function
Line 399 in ReqMgrRESTModel.getWorkQueue R0201 Method could be a function
Line 409 in ReqMgrRESTModel.getMessage R0201 Method could be a function
Line 427 in ReqMgrRESTModel.getCampaign R0201 Method could be a function
Line 440 in ReqMgrRESTModel.validatePutWorkQueue R0201 Method could be a function
Line 447 in ReqMgrRESTModel.putRequest E1101 Instance of 'Toolbox' has no 'secmodv2' member
Line 453 in ReqMgrRESTModel.putRequest W0703 Catching too general exception Exception
Line 448 in ReqMgrRESTModel.putRequest R0912 Too many branches (18/12)
Line 578 in ReqMgrRESTModel.cloneRequest E1101 Instance of 'ReqMgrRESTModel' has no 'warn' member
Line 582 in ReqMgrRESTModel.putAssignment R0201 Method could be a function
Line 597 in ReqMgrRESTModel.putUser E1111 Assigning to function call which doesn't return
Line 597 in ReqMgrRESTModel.putUser W0612 Unused variable 'result'
Line 593 in ReqMgrRESTModel.putUser R0201 Method could be a function
Line 599 in ReqMgrRESTModel.putGroup R0201 Method could be a function
Line 608 in ReqMgrRESTModel.putVersion R0201 Method could be a function
Line 612 in ReqMgrRESTModel.putTeam R0201 Method could be a function
Line 619 in ReqMgrRESTModel.putMessage E1111 Assigning to function call which doesn't return
Line 616 in ReqMgrRESTModel.putMessage R0201 Method could be a function
Line 641 in ReqMgrRESTModel.postRequest R0201 Method could be a function
Line 690 in ReqMgrRESTModel.validateUpdates R0201 Method could be a function
Line 701 in ReqMgrRESTModel.validateStats R0201 Method could be a function
Line 714 in ReqMgrRESTModel.deleteRequest E1101 Instance of 'Toolbox' has no 'secmodv2' member
Line 732 in ReqMgrRESTModel.deleteRequest E1111 Assigning to function call which doesn't return
Line 747 in ReqMgrRESTModel.deleteGroup R0201 Method could be a function
Line 754 in ReqMgrRESTModel.deleteVersion R0201 Method could be a function
Line 758 in ReqMgrRESTModel.deleteTeam R0201 Method could be a function
Line 762 in ReqMgrRESTModel.deleteCampaign R0201 Method could be a function
Line 56 in ReqMgrRESTModel R0904 Too many public methods (79/20)
plus 188 comments on code style

Unit test changes for pull request 6144:

WMCore_t.WebTools_t.REST_t.RESTTest:testBadMethodEcho changed from error to success
WMCore_t.RequestManager_t.Admin_t.AdminTest:testA_SoftwareManagement changed from error to success
WMCore_t.WebTools_t.NestedModel_t.NestedModelTest:testOuterFooError changed from error to success
WMCore_t.WebTools_t.REST_t.RESTTest:testSanitiseFailHTTP changed from error to success
WMCore_t.ReqMgr_t.Service_t.Auxiliary_t.AuxiliaryTest:test_A_HelloWorld_get changed from error to success
WMCore_t.WorkQueue_t.Policy_t.Start_t.Dataset_t.DatasetTestCase:testInvalidSpecs changed from success to error
WMCore_t.WebTools_t.RESTFormat_t.RESTFormatTest:testReturnFormat was deleted. Prior status was error
WMCore_t.Database_t.RotatingDatabase_t.RotatingDatabaseTest:testArchive changed from failure to success

Yaya, tests succeeded. Seangchan, feel free to merge :)


How do I get the DeviceVersionName in swift

Hello @sebyddd
This issue is closed once in https://github.com/sebyddd/SDVersion/issues/47
Although, I have same problem for now and that closed issue looks not resolved yet.
The following is the interface looks from Swift generated by Xcode.
DeviceVersionNames is a tuple in Swift, so I can't get user friendly name from DeviceVersion.
Did you support usage from Swift? Let me know if you so, and write down usage to README.
Thanks.
import UIKit

//
//  SDiOSVersion.h
//  SDVersion
//
//  Copyright (c) 2016 Sebastian Dobrincu. All rights reserved.
//

public enum DeviceVersion : Int {

    case iPhone4
    case iPhone4S
    case iPhone5
    case iPhone5C
    case iPhone5S
    case iPhone6
    case iPhone6Plus
    case iPhone6S
    case iPhone6SPlus
    case iPhone7
    case iPhone7Plus
    case iPhoneSE

    case iPad1
    case iPad2
    case iPadMini
    case iPad3
    case iPad4
    case iPadAir
    case iPadMini2
    case iPadAir2
    case iPadMini3
    case iPadMini4
    case iPadPro12Dot9Inch
    case iPadPro9Dot7Inch

    case iPodTouch1Gen
    case iPodTouch2Gen
    case iPodTouch3Gen
    case iPodTouch4Gen
    case iPodTouch5Gen
    case iPodTouch6Gen

    case Simulator
}

public var DeviceVersionNames: (NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?, NSString?)

public enum DeviceSize : Int {

    case UnknownSize
    case Screen3Dot5inch
    case Screen4inch
    case Screen4Dot7inch
    case Screen5Dot5inch
}

public var DeviceSizeNames: (NSString?, NSString?, NSString?, NSString?, NSString?)

public class SDiOSVersion : NSObject {

    public class func deviceVersion() -> DeviceVersion
    public class func resolutionSize() -> DeviceSize
    public class func deviceSize() -> DeviceSize
    public class func deviceName() -> String!
    public class func isZoomed() -> Bool
}

Fixed. You can now use:
let deviceSizeName = SDiOSVersion.deviceSizeName(SDiOSVersion.deviceSize())
let deviceVersionName = SDiOSVersion.deviceVersionName(SDiOSVersion.deviceVersion())

@sebyddd @itlijunjie Thanks for awesome work!
I can delete my forked repo :wink:


[Enhancement] Connect to Database only when required

Description:
Currently, server establishes a connection to the MongoDB database as soon as the server starts. This means that the database connection is always active, even when no requests are being made to the server. This can lead to unnecessary resource usage and potential performance issues.
Requirements:

Modify the existing code to connect to the MongoDB database only when a request is received that requires database access.
Ensure that the database connection is closed when it is no longer needed to conserve resources.
Implement a mechanism to handle errors that may occur when connecting to the database lazily.

Technical Details:

Server is built using Node.js and Express.js as the backend framework.
This project is using MongoDB as our database.
The current implementation establishes a connection to the MongoDB database using the mongoose library in the server startup code.

Example Scenario:

When the server starts, no database connection is established.
When a request is received to create a new shortened URL, the database connection is established, the URL is saved to the database, and the connection is closed.
When a request is received to retrieve a shortened URL, the database connection is established, the URL is retrieved from the database, and the connection is closed.

Acceptance Criteria:

The database connection is not established when the server starts.
The database connection is established only when a request is received that requires database access.
The database connection is closed when it is no longer needed.
Errors that occur during lazy loading of the database connection are handled correctly.

Estimated Time:
This issue is estimated to take around 1-2 days to complete, depending on the contributor's experience.

Hey I want to work on this!! Can U assign this to me ??

Hey!! Assign this issue to me i want to work on this?

Hey @surendar-05, This issue is already assigned to @Sarthak027.
If the issue is not resolved then i will assign it to you.
Try to work on different issues, Good luck.

Could you please assign this issue to me? I'd like to work on implementing the changes using middleware and updating the existing code to connect to the MongoDB database lazily.

Could you please assign this issue to me? I'd like to work on implementing the changes using middleware and updating the existing code to connect to the MongoDB database lazily.

Hey @shubhammjha22, I already merged this issue. If you have any thoughts or idea to optimize this process let me know.


Document that tailscale_acl overrides the whole ACL file

Updates #182.
Signed-off-by: Anton Tolchanov<EMAIL_ADDRESS>

This repository requires commits be signed, using either GPG or SSH.


How to load GLTFLoader in this project?

Please share a more detailed reproduction of the issue please 🙏


Using custom initialization values

It would be nice if we could specify values to initialize with. I'm using the BayesianOptimization method to optimize the hyperparameters for a machine learning model on a very large dataset. As a result, each probe of the function takes a really long time. If something happens that causes training to fail, the entire optimization fails. I'm saving the parameter combinations and evaluation scores as optimization goes on. It would be nice if I could restart optimization and initialize with the saved parameter and eval results from the previous attempts.
For example, suppose I have two parameters P_1 and P_2. Let's say I get through two experiments (i.e. sample f twice with two combinations of values for the parameters and get back two respective values, call them V_1 and V_2). Then something happens on the third experiment that causes it to crash. I would like to be able to restart BayesianOptimization and pass it the results from the first two experiments as initial values so that I can pick up where I left off.

Is this currently possible?
If not, could we add it as a feature?

This is absolutely possible. Top level API takes in arrays X and Y, that are supposed to be initial values. By default they are both set to None, but you can give it any number of values you have already collected.

Just to elaborate how you'd start a BayesianOptimization from initial values, or from a custom design of experiments...
When you initialize your optimization object, set initial_design_numdata=0
myBopt = BayesianOptimization(my_obj, domain=bounds, model_type='GP',
                              initial_design_numdata=0)

Then you can use the API to set the X and Y arrays. X is the 2D array of your previous design points, while Y is the 2D array of your previous objective function values.
myBopt.X = my_prev_X
myBopt.Y = my_prev_Y

And then you can run the optimization
myBopt.run_optimization(max_iter=max_iter)

Hi, cjekel
Thanks for your explation, but I still have problem on doing this.
I did what you said, but error happened.
Here is the simple code
import numpy as np
import GPy
import GPyOpt

def myf(x1,x2):
    y = x1-1 + x2 ** 2
    return y

bounds = [{'name': 'var_1', 'type': 'continuous', 'domain': (-1,1)},
          {'name': 'var_2', 'type': 'continuous', 'domain': (-1,2)}]

myProblem = GPyOpt.methods.BayesianOptimization(myf,bounds,initial_design_numdata=0,acquisition_type='EI')

array_x = np.array([1,0])
array_y = np.array([0])

print(array_x)
myProblem.X = array_x
myProblem.Y = array_y

max_iter = 15

myProblem.run_optimization(max_iter)

myProblem.x_opt

The error said that  IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
Is it something wrong in the 2d array?
Thank you

@Seal-o-O you are very close, you just need to make sure that .X is a 2d array. This array is of shape number_of_function_evaluations by number_of_dimensions. So in your case the shape of .X should be (1, 2).
Also .Y must be a 2darray. I put the reshape command in the following because we may generally store this as a 1D array.
So here is a working version of your code.
import numpy as np
import GPy
import GPyOpt

def myf(x1,x2):
    y = x1-1 + x2 ** 2
    return y

def f(x):
    for _x in x:
        y = myf(x1 = _x[0],x2=_x[1])
    return y

bounds = [{'name': 'var_1', 'type': 'continuous', 'domain': (-1,1)},
          {'name': 'var_2', 'type': 'continuous', 'domain': (-1,2)}]

myProblem = GPyOpt.methods.BayesianOptimization(f,bounds,initial_design_numdata=0,acquisition_type='EI')

array_x = np.array([[1,0]])
array_y = np.array([0]).reshape(-1, 1)

print(array_x)
myProblem.X = array_x
myProblem.Y = array_y

max_iter = 15

myProblem.run_optimization(max_iter)

myProblem.x_opt

PS. Don't expect magic results when you only pass 1 function evaluation into the optimization problem. What's going to happen, is the first few evaluations will basically be maximizing the minimum distance from your existing points. Not too much different than using the Latin-hypercube sampling.

@cjekel
Thanks! It helps a lot!
your explanation always makes me suddenly feel refreshed


SMT old node support

fixed issue with SMT node created with previous SDK version that contains the hash inside a Json object {"data":"hash"} instead of be a pure String

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 21.15%. Comparing base (6db1319) to head (4da900a).

Files with missing lines
Patch %
Lines

lib/identity/domain/entities/hash_entity.dart
0.00%
6 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #438      +/-   ##
===========================================
- Coverage    21.16%   21.15%   -0.01%
===========================================
  Files          296      296
  Lines         9132     9136       +4
===========================================
  Hits          1933     1933
- Misses        7199     7203       +4

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


Write guide for deploying in AWS without containers

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/626
Originally created by @bencodezen on 2019-04-30 21:25:27

Problem to solve
Currently most of our solutions for deployment involve using containers (i.e., Docker), this is great for some users but not for others who might find containers daunting.
Target audience
Users who are not used to using Docker in their current workflow
Proposal

[ ] Figure out a path with AWS services to deploy Meltano
[ ] Document solution in the guide

What does success look like, and how can we measure that?

User can deploy a Meltano project on AWS without Docker

Regression test
(Ensure the feature doesn't cause any regressions)

[ ] Write adequate test cases and submit test results
[ ] Test results should be reviewed by a person from the team

Links / references
Please note that this was taken from GitLab, to be changed accordingly

View 2 previous comments from the original issue on GitLab


New release

Hi @mcrumm!
We are shipping a new Broadway release today. Shall we release a new cloud_pubsub too? Do you want to merge #39 before?
Thanks! <3

Hi @josevalim!  #39 is merged, release at will! :D


updated brew uninstall instructions for macos

Thank you. I guess the same applies to the second snippet at https://espanso.org/docs/migration/uninstalling_legacy/#uninstalling-on-macos, and also the item in https://espanso.org/docs/migration/uninstalling_legacy/#uninstalling-on-linux.
I haven't spent much time on that page!
Would you like to amend those too?

This change is not needed for the version 0.7.3. link to the explanation up here


Update README.md

updated the troubleshooting section only, so that the title for the Uninstallation procedure is not the same bold and big as the troubleshooting header

Thank you!


Documentation is abysmal, please improve soon (or now)

Issue / Feature - Horrible Documentation/Commentary
FolioReader version -  5.13
FolioReader appears to be the most comprehensive, professionally built ePub reader source code currently available for free. I appreciate this project very much, clearly much thought and effort has been invested into its creation, and the chief contributors deserve much credit.
Unfortunately, the project cannot reach its full potential, given that the documentation and code commentary are perhaps the worst I have ever seen.
I would very much like to further contribute to this repo, but the lack of necessary commentary increases coding time exponentially, causing me to give up on most of my efforts.
The issue can be broken down as follows:

[ ] Little and Ineffective Code Commentary - Almost all the project source files are poorly commented on, or lack comments entirely. This creates a massive, unnecessary learning curve. Essentially everybody who intends to use this repo will attempt to modify/add to the code, and this problem alone will deter many from trying or lead to failure

[ ] Lack of Useful Documentation - While I can appreciate the effort invested in the Readme and Wiki, they are clearly insufficient. Both are too short, and lack information needed to implement the software correctly. I just now noticed recent additions to the Wiki concerning new features, which gives me some hope.

[x] No Latest Version/Update Notes - There is apparently no Latest Release page with past version histories. I literally have no idea what the newest version of the software is. This is particularly disappointing, given how simple it could be to resolve this issue. A release page should be created, showing past and latest versions of the software.

I believe these three areas should be given top priority. Improving on these issues will result in:

Substantial increase in contributions and contributors
Significant decrease in number of 'issues' opened (ridiculous number now)
Vast developments in project features and scope
Increased implementation of FolioReader
Increase in credit and recognition to creators and contributors
Many 100's of man-hours saved

Of course continually ignoring this issue simply makes it worse.
Sadly, I believe that only a select few contributors currently have the knowledge required to address these problems. I request of you to reconsider your priorities with this project, and to reinvest your efforts into resolving this situation instead of furthering feature development.

I notice new change log now that is better

I agree.


What is a suitable licence for this Project?

It doesn't really matter, but I think I still want to add one to this Project.
It should be free to use and distribute for everyone, as long as they credit this Project.
Maybe GLP or MIT would be right. But I don't know much about licences... Well I gonna do that later

Figured out the licences of the dependencies:

glew: BSD / MIT
glm: MIT
SDL2: zLib
Json (Nohleman): MIT

MIT and zLib should be both fine since these dependencies are not modified in the project.
zLib might be safer though, because it seems to be a bit more strict.
https://opensource.stackexchange.com/questions/12492/can-i-put-my-opensource-project-under-mit-license-if-i-used-zlib-library?newreg=6d4dfee184ac4eb5be21bc366dd76a27


Remove resize-observer-polyfill

ResizeObserver is quite well supported, so we can remove resize-observer-polyfill package.

@ogonkov  Can you open a PR to the next branch?


Feat:Adding Home page button on Login/Register Page

Describe the feature
Adding a Home button to the login page will enhance the site's interactivity.
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@Its-Aman-Yadav pls assign me this issue

@Kalivarapubindusree pls assign me this issue

I have created a pull request added the login button, please consider that.

Hi! I would like to work on this issue. Can you please assign it to me?


When I save files, Atom makes duplicate copies of those files and folders arbitrarily on my hard drive.

Why is this happening and how do I prevent it?
This also occurs when I rename a folder. When I'm in a file in the newly renamed folder and save, the old folder re-creates itself in the same directory.

What version of Atom are you using?
What OS are you using?
Can you reproduce this after quitting Atom completely in safe mode? (atom --safe)
If you can, what are the exact steps you used to reproduce this behavior?

Also, please take a look at the Contributing guide for a guide on reporting bugs.

I'm using:
• Version 1.4.0 is the latest version
• OSX 10.8.5
But I think I just identified what's happening. I'm using the Remote FTP package and when I double click to open a file on the remote server, that file and folders get copied to my system User folder. However, I have not activated any settings to allow that sync or behavior.

I should address this with the Package developer I presume.

Yes please!


Make Azure Pipelines use document scope

Hi. I'm a PM on Azure Pipelines. One of the features we've just shipped is an extension for VS Code to make it easier to author in our YAML-based format. For some reason, the same document parsed as YAML shows the right amount of GitLens entries, but when I switch over to treat it as Azure Pipelines, way too many entries get injected.
If there's a different way to solve this, I'm all for it! But this seemed to fix it properly in my local workspace settings, and I think it should be the default for GitLens users.
Thanks!

@vtbassmatt Thanks for the contribution! This will make it into the GitLens 9 release coming very soon.


modules: mbedtls: remove the default enabling of features

In an effort to shave off code size, remove out-of-the-box enabling of crypto features (except SHA-256).
Configurations are adjusted to enable what they need.
Bonuses:

When enabled, AES now defaults to using a smaller version (CONFIG_MBEDTLS_AES_ROM_TABLES isn't default enabled anymore, and if enabled, CONFIG_MBEDTLS_AES_FEWER_TABLES defaults to y).
Conditions around Mbed TLS Kconfig options have been improved to reflect the reality of the dependencies.

This is CI-ready and ready for reviews.

I don’t know if the changes are correct wrt mbedtls. It overall looks good to me so if it’s compiles & run I’m happy :)

I checked also that part and, to the best of my knowledge, this PR looks correct.

@tomi-font can you please rebase?

@tomi-font can you please rebase?

Done, fixed the conflict by moving the addition originally in tests/crypto/crypto_hash/prj.conf to tests/crypto/crypto_hash/prj_mtls_shim.conf (due to https://github.com/zephyrproject-rtos/zephyr/pull/72956).


wishlist item: add --prefix to network

Hi.
I was wondering what do you guys say about adding an additional option named --prefix to the network creation so that networks segments assigned automatically from global to be smaller and hence to be able to have more than 30ish networks.
I do have the --subnet option, the problem is that it would mean to hardcode a specific subnet and therefore encounter possible conflicts.
Ideas?
Thanks!

(I am referring strictly to the default bridge driver for now)

I think you are asking for the same feature requested in https://github.com/docker/docker/issues/21776#issuecomment-206133109

indeed, @aboch ! Sorry for not finding it.

@teodorescuserban I was not actually suggesting to close your issue though, just wanted to understand if it was the same request
Maybe we should ask the linked issue's submitter to change the description to reflect the feature request.

Thank you, I understood.
I closed it because indeed it looks the same.
Basically, I am happy with the autoselect algorithm, I didn't encountered network conflicts so far (but a bit worried) and I need more networks than the autoselect algorithm can provide with the default prefix (/16).


Setup Update - MIOpen Default - 2.5.0

MIOpen Version upgrade - 2.5.0 to accommodate 3.6 ROCm changes.

@LakshmiKumar23  @paveltc we need to run the NN test with the new setup --reinstall

@kiritigowda @paveltc I see this when I run NN test.
fatal error: vx_amd_nn.h: No such file or directory
 #include <vx_amd_nn.h>

@kiritigowda @paveltc I see this when I run NN test.
fatal error: vx_amd_nn.h: No such file or directory
 #include <vx_amd_nn.h>

@LakshmiKumar23 looks like the include file is not exported to /opt/rocm/mivisionx/include during install. Can you reinstall and try this.

@kiritigowda @paveltc I see this when I run NN test.
fatal error: vx_amd_nn.h: No such file or directory
 #include <vx_amd_nn.h>

@LakshmiKumar23 looks like the include file is not exported to /opt/rocm/mivisionx/include during install. Can you reinstall and try this.

@kiritigowda I was running it on a docker with old rocm and there were some install issues. Tried with latest docker. Anntest runs successfully.