Error "dict object' has no attribute 'ansible_hostname"

I tried to add new compute at my existing openstack+tungsten but it failed. My new IP for my new compute is <IP_ADDRESS>. Below are my instances.yaml

provider_config:
bms:
domainsuffix: local
ssh_user: root
ssh_pwd: P@ssw0rd
ntpserver: 1.id.pool.ntp.org

instances:
tungsten:
ip: <IP_ADDRESS>
provider: bms
roles:
config:
config_database:
control:
analytics_database:
analytics:
webui:
openstack:
ip: <IP_ADDRESS>
provider: bms
roles:
openstack:
compute:
ip: <IP_ADDRESS>
provider: bms
roles:
openstack_compute:
vrouter:
compute2:
ip: <IP_ADDRESS>
provider: bms
roles:
openstack_compute:
vrouter:
global_configuration:
CONTAINER_REGISTRY: opencontrailnightly
REGISTRY_PRIVATE_INSECURE: True
contrail_configuration:
UPGRADE_KERNEL: true
CONTRAIL_CONTAINER_TAG: latest
CONTRAIL_VERSION: latest
CLOUD_ORCHESTRATOR: openstack
CONFIG_NODEMGR__DEFAULTS__minimum_diskGB: 2
DATABASE_NODEMGR__DEFAULTS__minimum_diskGB: 2
CONFIG_DATABASE_NODEMGR__DEFAULTS__minimum_diskGB: 2
ENCAP_PRIORITY: "VXLAN,MPLSoUDP,MPLSoGRE"
kolla_config:
kolla_globals:
enable_haproxy: no
enable_ironic: no
enable_swift: no
kolla_passwords:
keystone_admin_password: c0ntrail123
when I execute the "ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/configure_instances.yml" I got error
TASK [instance : Build hosts file with domain suffix when provided] **************************************************************************************************************************
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
fatal: [<IP_ADDRESS>]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_hostname'\n\nThe error appears to have been in '/root/contrail-ansible-deployer/playbooks/roles/instance/tasks/install_software_Linux.yml': line 95, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: "Build hosts file with domain suffix when provided"\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'ansible_hostname'"}
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
fatal: [<IP_ADDRESS>]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_hostname'\n\nThe error appears to have been in '/root/contrail-ansible-deployer/playbooks/roles/instance/tasks/install_software_Linux.yml': line 95, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: "Build hosts file with domain suffix when provided"\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'ansible_hostname'"}
ok: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
fatal: [<IP_ADDRESS>]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_hostname'\n\nThe error appears to have been in '/root/contrail-ansible-deployer/playbooks/roles/instance/tasks/install_software_Linux.yml': line 95, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: "Build hosts file with domain suffix when provided"\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'ansible_hostname'"}
to retry, use: --limit @/root/contrail-ansible-deployer/playbooks/configure_instances.retry
PLAY RECAP ***********************************************************************************************************************************************************************************
<IP_ADDRESS>                : ok=24   changed=5    unreachable=0    failed=1
<IP_ADDRESS>                : ok=24   changed=6    unreachable=0    failed=1
<IP_ADDRESS>                : ok=0    changed=0    unreachable=1    failed=0
<IP_ADDRESS>                : ok=26   changed=5    unreachable=0    failed=1
localhost                  : ok=41   changed=4    unreachable=0    failed=0
for node <IP_ADDRESS> unreachable is because I shut it down in purpose.

same error for me when I execute the "ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/configure_instances.yml"

TASK [configure_instances : Build hosts file for rabbitmq with domain suffix] ***
skipping: [<IP_ADDRESS>]
TASK [configure_instances : Build hosts file for rabbitmq without domain suffix] ***
skipping: [<IP_ADDRESS>]
TASK [configure_instances : Build hosts file for rabbitmq without domain suffix] ***
skipping: [<IP_ADDRESS>]
TASK [configure_instances : Build hosts file with domain suffix when provided] ***
changed: [<IP_ADDRESS>] => (item=<IP_ADDRESS>)
fatal: [<IP_ADDRESS>]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ansible_hostname'\n\nThe error appears to have been in '/root/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 133, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: "Build hosts file with domain suffix when provided"\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'ansible_hostname'"}
to retry, use: --limit @/root/contrail-ansible-deployer/playbooks/configure_instances.retry
PLAY RECAP *********************************************************************
<IP_ADDRESS>              : ok=26   changed=5    unreachable=0    failed=1
<IP_ADDRESS>              : ok=0    changed=0    unreachable=1    failed=0
localhost                  : ok=10   changed=2    unreachable=0    failed=0
[root@kvm-r04-31 contrail-ansible-deployer]# ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=63 time=0.198 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=63 time=0.182 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=63 time=0.186 ms
^C
--- <IP_ADDRESS> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.182/0.188/0.198/0.017 ms
[root@kvm-r04-31 contrail-ansible-deployer]#
[root@kvm-r04-31 contrail-ansible-deployer]#  ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from <IP_ADDRESS>: icmp_seq=3 ttl=64 time=0.033 ms
^C
--- <IP_ADDRESS> ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.033/0.040/0.051/0.010 ms
[root@kvm-r04-31 contrail-ansible-deployer]#
[root@kvm-r04-31 contrail-ansible-deployer]#  cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@kvm-r04-31 contrail-ansible-deployer]# uname -r
3.10.0-862.14.4.el7.x86_64
[root@kvm-r04-31 contrail-ansible-deployer]#
[root@kvm-r04-31 contrail-ansible-deployer]# ansible --version
ansible <IP_ADDRESS>
config file = /root/contrail-ansible-deployer/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
[root@kvm-r04-31 contrail-ansible-deployer]#

We had the same issue. Seems like Ansible script expects all hosts to be up and reachable. In case one of the hosts can't be reached script fails for every host.


Amp Stories Error, Crashed My Site

Originally reported in https://github.com/ampproject/amphtml/issues/30310 by @DanielCryptoK

Please see below
This message was triggered by web-stories.
Call stack:
wp_die()
wp-includes/functions.php:4704
dead_db()
wp-includes/wp-db.php:1866
Yoast\W\L\ORM::execute()
wp-content/plugins/wordpress-seo/lib/orm.php:1945
Yoast\W\L\ORM->run()
wp-content/plugins/wordpress-seo/lib/orm.php:401
Yoast\W\L\ORM->find_many()
wp-content/plugins/wordpress-seo/src/repositories/indexable-repository.php:404
Yoast\W\S\R\Indexable_Repository->get_ancestors()
wp-content/plugins/wordpress-seo/src/generators/breadcrumbs-generator.php:137
Yoast\W\S\G\Breadcrumbs_Generator->generate()
wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php:613
Yoast\W\S\P\Indexable_Presentation->generate_breadcrumbs()
wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php:69
Yoast\W\S\P\Abstract_Presentation->__get()
wp-content/plugins/wordpress-seo/src/generators/schema/breadcrumb.php:46
Yoast\W\S\G\S\Breadcrumb->generate()
wp-content/plugins/wordpress-seo/src/generators/schema-generator.php:88
Yoast\W\S\G\Schema_Generator->generate()
wp-content/plugins/wordpress-seo/src/presentations/indexable-presentation.php:602
Yoast\W\S\P\Indexable_Presentation->generate_schema()
wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php:69
Yoast\W\S\P\Abstract_Presentation->__get()
wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php:58
Yoast\W\S\P\Schema_Presenter->get()
wp-content/plugins/wordpress-seo/src/presenters/schema-presenter.php:42
Yoast\W\S\P\Schema_Presenter->present()
wp-content/plugins/wordpress-seo/src/surfaces/values/meta.php:143
Yoast\W\S\S\V\Meta->get_head()
wp-content/plugins/wordpress-seo/src/actions/indexables/indexable-head-action.php:68
Yoast\W\S\A\I\Indexable_Head_Action->for_post()
wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php:105
Yoast\W\S\R\Yoast_Head_REST_Field->for_post()
wp-includes/rest-api/endpoints/class-wp-rest-controller.php:433
WP_REST_Controller->add_additional_fields_to_object()
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:1795
WP_REST_Posts_Controller->prepare_item_for_response()
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php:681
WP_REST_Attachments_Controller->prepare_item_for_response()
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:328
WP_REST_Posts_Controller->get_items()
wp-content/plugins/web-stories/includes/REST_API/Stories_Media_Controller.php:58
Google\W\R\Stories_Media_Controller->get_items()
wp-includes/rest-api/class-wp-rest-server.php:1050
WP_REST_Server->dispatch()
wp-includes/rest-api.php:464
rest_do_request()
wp-includes/rest-api.php:1984
rest_preload_api_request()
array_reduce()
wp-content/plugins/web-stories/includes/templates/admin/edit-story.php:63
Google\W\Story_Post_Type->replace_editor()
wp-includes/class-wp-hook.php:287
apply_filters('replace_editor')
wp-admin/post.php:182

closing since this was addressed in the originally reported issue.


"model.find" api may cause callback leak

I found the "model.find(condition,cb)" may cause cb can't be GC
the closure of cb will leak
Thanks,and forgive my poor English~ wish you understand me~
I will post the case code later~

function Clazz(){
}
function testCase() {
    var obj=new Clazz();
    Orm.connect({
        /*setting*/
        query    : {pool : true}
    }, function(err,db) {
        var Model = db.define('ht_country', {
            country_code : {type : 'text', key : true}
        });
        Model.find(function(err,data) {
            obj.data=data;
            db.close();
        })
    })
}
for(var i=0;i<4;i++){
    testCase();
    testCase();
    testCase();
    testCase();
}

result with heapdump

Something's not right: this is not "data" you're receiving.
It's instances of Model - something that makes references to Model, and also surely to
current db instance.
You should try the same test with a (deep) copy of each item own properties of data (something that could be achieved for the sake of the test by JSON.parse(JSON.stringify(data))).
Also nothing guarantees gc has been called and object has been released yet.
Try by calling global.gc() - you'll need some --expose-gc switch there.

sorry! please ignore the callback content .  because that's not the point,that just a example for build a closure。The key is this callback and its all closure variable will never release which may cause memory leak.
That's terrible!

I guess the leak may caused by ChainFind.js line 208 and line 218 (function createInstance and function eagerLoading)
beacuse when i remove these code (remain driver.find),the leak disappeared.

I tried commenting out everything from 208 to 250 (replaced with cb()), and ran the test from dresende/node-orm2#629 . Memory usage was unaffected by this change.
I also added Clazz as above, and it did not appear in chrome's memory profiler as in your picture.
Is there any other way in which I can reproduce this leak?

@dxg Some news about this? Did somebody solved it?
When I commenting everything between line 208 to 250 i became the message "undefined is not a function" after the second request after I restart the server with the new ChainFind.js file.
I think @exolution is wright. If I insert "cb({msg:"test"}, null)" to memory usage doesn't increase. After deleting it, the memory usage increases on every request although i call global.gc() on every request to find the memory leak! So the lazy garbage collector of V8 plays no role for this issue.

Nope, wasn't able to reproduce it.


background images are still sourced from webflow

Also can think about de-duplicating css file(s).

Fixed in https://github.com/SriSathyaSaiVidyaVahini/SSSVV-landing/commit/c287b8937b71214535beea5ea8809e3ba27c928c


Reload the test app when changes to the addon are detected

Something folks from v1 addons are used to: the test app reloading / re-building when changes to the addon are detected.
How to test:

invoke the blueprint
have two terminals:

start the app
start the addon in watch mode

make changes to the addon
notice those changes are reflected in the app

Related: https://github.com/embroider-build/embroider/issues/1184

Ah, I didn't see #31.
The difference isn't a huge one, but we do have a 'lot of things to think about' when working on v2 addons, and forgetting to add to this watchDependencies list is one of those things.
I don't feel too strongly about either approach atm. Happy with whichever

Went with the other PR, so closing this...


Update deprecated list type usage

Just came across this while referring the docs, so thought of making the change.

thanks @yorickvP !


fix: race condition in close #37

Because the close method does not lock and the read method does not check the closed value after locking, it's possible for a deadlock to occur under the following series of events:
Thread 1 (reader): read last element from the channel
Thread 1: call operator>>
Thread 1: check closed(), which is false
Thread 1: lock mutex
Thread 1: check the predicate in wait()
Thread 2 (writer): call close()
Thread 2: set closed=true
Thread 2: call cnd_.notify_all()
Thread 1: calls wait() without predicate (in the implementation of the wait with predicate method)
At this point, Thread 1 waits forever because the notify_all occurred before the actual call to wait().
I don't have a good minimal test case for the issue here, but I have run it for several hours in a loop an integration test that was deadlocking before, so I'm fairly confident the issue is fixed.

It's great when someone uses the library in the real world.
Thank you!


Hero image with image, heading and content margin

When using the Hero with image, heading, and content there is no bottom responsive margin below the Hero component, so any content placed within the page after this component is hidden behind the blue content section of the header.
Example (with h2 element hidden behind the hero image)

Example (with different content length and promo group component)

On the NHS.UK homepage, a responsive top margin is added to the content section to fix this. However, our spacing should always be in a single downwards direction and the spacing should be applied to the hero component instead. The margins might change depending on how much content you have in the blue section.

I've also tried adding padding to the section below the hero component

When using the Hero with image, heading, and content there is no bottom responsive margin below the Hero component, so any content placed within the page after this component is hidden behind the blue content section of the header.
Example (with h2 element hidden behind the hero image)

Example (with promo group component)

On the NHS.UK homepage, a responsive top margin is added to the content section to fix this. However, our spacing should always be in a single downwards direction and the spacing should be applied to the hero component instead. The margins might change depending on how much content you have in the blue section>

I've referenced this issue in the NHS.UK JIRA board to gauge interest in it being picked up (CITR-574). If someone picks this up, please mention here to avoid any duplicated effort.

Is this issue still a high priority? From what I've seen it looks resolved.


Add isChromeOS os-util

issue: https://github.com/yola/ws-editor/issues/4297
env: https://editor.hto-ya.env.yola.net/
How to test

Go to editor

Expected result

if OS is ChromeOS:

in the header you should see !!!!!CHROME OS!!!!! label (just for test purposes)

if OS is NOT ChromeOS:

in the header you should see !!!!!OTHER OS!!!!! label (just for test purposes)

:sparkles: No lint errors found. :sparkles:

:sparkles: No lint errors found. :sparkles:

:sparkles: No lint errors found. :sparkles:

Let's update README.md

:sparkles: No lint errors found. :sparkles:


adding test.env.example to build local CI testing

Description
Adding examples for setting up account to test integration tests locally, based on description from contributing.md being added. to each adapter repo.
Checklist

[x] I have signed the CLA
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] I have updated the CHANGELOG.md and added information about my change to the "dbt-snowflake next" section.

@McKnight-42 I like the direction you're headed with the examples. I am thinking what might be most instructive is providing some values that are more or less formatted to what a user might employ. Want to pair up to generate those values? Want to take it on yourself? Just me know either way

Sure would love to pair up @VersusFacit

Hey Matt, I've been reflecting on this. All this lives in Notion. Should we just tell people internally to consult instructions there where we can share secrets? I'd advocate we don't include this in contributing guides since we aren't handing out relevant DDL that defines these parameters for users. That makes these fields and this setup not all that helpful in pointing users in the right direction.
That's my gut reaction? What's yours? 😄  Let's hash this out in our call tomorrow.
cc: @leahwicz

I'm not opposed to being more descriptive here so it's easy to tell what you need to provide. Let's do this for all test.env.example files then

@jtcohen6 @leahwicz @runleonarun. @VersusFacit and I worked on getting this latest version pushed up and were wondering what you all think. Is this how we'd like to present the information as much as we can in the other adapters as well?

I advocate for embedded instructions and feel really good about the formatting instructions Leona offered.


Type-only imports and exports

TL;DR:

import type { A } from './mod', export type { A } from './mod'
Add flag to stop eliding import declarations from emit

To do:

[x] parsing
[x] checking: default import
[x] checking: named imports
[x] checking: named exports
[x] checking: namespace import
[x] update isolatedModules error message
[x] test with enums
[x] isolatedModules code fix
[x] auto imports behavior
[x] compiler flag, emit behavior
[x] checker API (getTypeAtLocation)
[x] grammar error for mixing default and named bindings
[x] code fix for splitting a default + named bindings into two import declarations
[x] error for usage in JS
[x] check/improve parsing diagnostics for common mistakes
[x] test more quick info, completions, rename, etc.
[x] TextMate grammar
[x] auto-import/codefix for name in value space that’s already type-only imported?
[x] code fix for --importsNotUsedAsValue=error error

Background
TypeScript elides import declarations from emit where, in the source, an import clause exists but all imports are used only in a type position [playground]. This sometimes creates confusion and frustration for users who write side-effects into their modules, as the side effects won’t be run if other modules import only types from the side-effect-containing module (#9191).
At the same time, users who transpile their code file by file (as in Babel, ts-loader in transpileOnly mode) sometimes have the opposite problem, where a re-export of a type should be elided, but the compiler can’t tell that the re-export is only a type during single-file transpilation (#34750, https://github.com/TypeStrong/ts-loader/issues/751) [playground].
Prior art
In early 2015, Flow introduced type-only imports which would not be emitted to JS. (Their default behavior, in contrast to TypeScript’s, was never to elide imports, so type-only imports for them were intended to help users cut down on bundle size by removing unused imports at runtime.)
Two months later, #2812 proposed a similar syntax and similar emit behavior for TypeScript: the compiler would stop eliding import declarations from emit unless those imports were explicitly marked as type-only. This would give users who needed their imports preserved for side effects exactly what they wanted, and also give single-file transpilation users a syntactic hint to indicate that a re-export was type-only and could be elided: export type { T } from './mod' would re-export the type T, but have no effect on the JavaScript emit.
#2812 was ultimately declined in favor of introducing the --isolatedModules flag, under which re-exporting a type is an error, allowing single-file transpilation users to catch ambiguities at compile time and write them a different way.
Since then
Over the last four years after #2812 was declined, TypeScript users wanting side effects have been consistently confused and/or frustrated. They have workarounds (read #9191 in full for tons of background and discussion), but they’re unappealing to most people.
For single-file transpilation users, though, two recent events have made their lives harder:

In TypeScript 3.7, we sort of took away --isolatedModules users’ best workaround for reexporting a type in #31231. Previously, you could replace export { JustAType } from './a' with
import { JustAType } from './a';
export type JustAType = JustAType;

But as of TypeScript 3.7, we disallow the name collision of the locally declared JustAType with the imported name JustAType.

If a Webpack user was left with an erroneous export { JustAType } from './a' in their output JavaScript, Webpack 4 would warn, but compilation would succeed. Many users simply ignored this warning (or even filtered it out of Webpack’s output). But in Webpack 5 beta, @sokra has expressed some desire to make these warnings errors.

Proposal

Add type-only imports and exports similar to #2812 and Flow
Change the default emit behavior of the compiler to stop eliding regular imports even if the imported names are only used in type positions
Always elide imports and re-exports explicitly marked as type-only
Add a (temporary?) compiler flag that restores the current behavior of eliding imports that are used only for types to help users with back-compat
Updated: Leave the default emit as-is, adding the flag --importsNotUsedAsValue <"remove" | "preserve" | "error"> to control the behavior

remove is default; maintains today’s behavior
preserve keeps imports used only for types in the emit as a side-effect import
error acts as preserve but also adds an error whenever an import could be written as an import type

Syntax
Supported forms are:
import type T from './mod';
import type { A, B } from './mod';
import type * as Types from './mod';

export type { T };
export type { T } from './mod';

Possible additions but I think not terribly important:
export type * from './mod';
export type * as Types from './mod'; // pending #4813

We notably do not plan to support at this time:

type modifier on import/export specifiers: import { type A } from './mod', export { A, type B }
Mixing a type-only default import with named or namespace imports: import type T, { A } from './mod', import type T, * as ns from './mod'

The forms in the former bullet will be syntax errors; the forms in the latter will be grammar errors. We want to start with productions that can be read unambiguously, and it’s not immediately clear (especially in the absence of Flow’s implementation), what the semantics of import type A, { B } from './mod' should be. Does type apply only to the default import A, or to the whole import clause? We prefer no one need wonder.
Type semantics
Any symbol with a type side may be imported or exported as type-only. If that symbol has no value side (i.e., is only a type), name resolution for that symbol is unaffected. If the symbol does have a value side, name resolution for that symbol will see only the type side. The typical example is a class:
// @Filename: /a.ts
export default class A {}

// @Filename: /b.ts
import type A from './a';
new A();
//  ^ 'A' only refers to a type, but is being used as a value here.

function f(obj: A) {} // ok

If the symbol is a namespace, resolution will see a mirror of that namespace recursively filtered down to just its types and namespaces:
// @Filename: /ns.ts
namespace ns {
  export type Type = string;
  export class Class {}
  export const Value = "";
  export namespace nested {
    export class NestedClass {}
  }
}
export default ns;

// @Filename: /index.ts
import type ns from './ns';
const x = ns.Value;
//        ^^ Cannot use namespace 'ns' as a value.

let c: ns.nested.NestedClass;

Emit
Updated: When the importsNotUsedAsValue flag is set to 'preserve', type-only import declarations will be elided. Regular imports where all imports are unused or used only for types will not be elided (only the import clause will be elided):
// @importsNotUsedAsValue: preserve

// @Filename: /a.ts
import { T } from './mod';
let x: T;

// @Filename: /a.js
import "./mod";
let x;

Back-compat flag
There’s a new flag removeUnusedImports. Its name is not perfect because it really means “remove imports that have imported names that never get used in a value position.” Open to suggestions.
Updated: this PR is backward-compatible by default.
Auto-imports behavior

Symbols without a value side will be imported as type-only if there’s not already a regular import from the containing module. If there’s an existing import from the containing module, it will be added to that import (as happens today).
There will be a configuration option to disable type-only auto imports entirely (since some people use VS Code’s TypeScript version for editor services but compile with an older version).

I’m not yet confident what other changes, if any, will the right move, but the main scenarios to consider are:

User auto imports a class, enum, or namespace in a type position. Should we do a type-only import?
User has a type-only import of a class, enum, or namespace, then later tries to use the same symbol in a value position. Do we convert the type-only import to a regular import? (Is that even possible with a completions code action?)

Successor of #2812
Closes #9191
Closes #34750
Would close if they were still open:

#20433
#16472
#18586
#30525
#28285

Meant to open this as a draft PR. Implementation is unfinished.

@andrewbranch what about imported values that are only used for their types via typeof in the file? Are these imports still elided?

@ajafff I think ideally the plan would be no, imports not marked with type are never elided. Flow has an import typeof form for this use case. I think that’s probably a reasonable follow-up feature. I had initially thought of import typeof as syntactic sugar for something already possible, but as you bring up, if you care about eliding imports that are unnecessary at runtime but you need the typeof a value, the original proposal doesn’t allow for that. /cc @DanielRosenwasser thoughts?

Updated the PR description with changes from the decisions made in the last two design meetings (#35806, #35807). Summary:

Problem: concern that a change to default emit behavior will break people’s apps in subtle, hard-to-diagnose ways. Solution: don’t change the default emit. Opt-in with a compiler flag.
Problem: if I want to opt into the new emit behavior and use a type-only import everywhere that I can, how do I track down my existing imports that should become import type? Solution: make the compiler flag have a setting where import declarations that only get used as types are errors, forcing you to use import type where possible.

Current status: 1 is done. The flag is now called importsNotUsedAsValue, and its value is currently of type "remove" | "preserve", with default "remove". Using a string value leaves room for a third option, "error", to fulfill Problem 2.

@typescript-bot pack this

Added a couple of changes to phrasing. I still am not a fan of the option name, but I think we'd like to at least get this in for the beta.

@SeaRyanC if I don't get the chance to in the next 30, feel free to merge this when the tests pass.

I just noticed this PR and I wanted to say I think this is a great addition!
I wanted to share a use case that's particularly close to my heart; you may be aware of fork-ts-checker-webpack-plugin. Amongst other things, it powers the TypeScript checking experience in create-react-app.
I worked on amending the plugin so that it could be shipped with create-react-app. Facebook had a hard requirement that the plugin not have a dependency upon TypeScript. We were able to support this by rewriting the plugin somewhat. However, we still needed a bunch of types at compile time. As a consequence there's a whole bunch of imports followed by // Imported for types alone comments:
https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/f07881e80e522c6233568e9f5f7b9574dbae750c/src/ApiIncrementalChecker.ts#L2
I got this wrong a bunch of times a created unwitting dependencies. As I understand this feature, I think "importsNotUsedAsValue": "error" would have made that journey easier and could prevent future regressions. Rejoice!

:heart::heart: from Babel for this PR!

Thank you sir

One more thought; related to this ts-loader issue: https://github.com/TypeStrong/ts-loader/issues/751
I wonder if we should consider changing the default ts-loader tsconfig compiler flag to:
--importsNotUsedAsValue "preserve"
For webpack 5 given that:

preserve keeps imports used only for types in the emit as a side-effect import

I think this might resolve the issue reported in the linked issue so most users just don't bump into it.
We'd look to do this as a breaking changes version if we did.
A little background: as policy we deliberately don't change the default compiler flags often in ts-loader. But this would seem to be a case which is very webpack specific and consequently appropriate.
I'd be interested in your thoughts @andrewbranch ?

This is an awesome and long awaited feature! :champagne:
@johnnyreilly and anyone else who needs this feature today without waiting for<EMAIL_ADDRESS>type only imports (albeit with a confusing and awkward syntax) have been part of the language since<EMAIL_ADDRESS>for almost two years now.
type SomeType = import('path-or-package').SomeExportedType
// or inline:
function(foo: import('path-or-package').SomeExportedType) { /* function body */ }

@elektronik2k5 I saw your thread on twitter! Thanks for sharing; somehow that had passed me by!

Is there a plan to support named type exports?
For example,
export type {A as B} from "./A";

currently results in a syntax error (typescript version 3.8.2).
This is particularly useful in situations where you are re-exporting types from multiple modules using the
export * from "./A";
export * from "./B";

syntax and both modules export types with the same name.

Maybe I'm missing something and I'm not sure where to post this remark, but should import type really make the importing ts file a module?
My use case: I implement a class in TypeScript as a module, but want to use its interface in a non-module script. Currently, I have to extract the interface into a non-module, and all its transitive dependencies, too, otherwise my non-module becomes a module just because it's importing a type.
Alternative workaround: use import(<module>).default in the non-module everywhere the type is used (I cannot use a local type declaration in global scope, as that would be visible everywhere).
I thought the definition of when a js file becomes a module is whenever it imports or exports anything. Type-only import/export, which is eliminated in JavaScript output, should not influence that behavior.

I think that’s a reasonable question, and I did think about it while writing this feature. I’ll try to explain my thought process.

I thought the definition of when a js file becomes a module is whenever it imports or exports anything. Type-only import/export, which is eliminated in JavaScript output, should not influence that behavior.

So first, just to clear up the background and definitions—it sounds like you probably know this, but just making sure the grounding for the rest of my argument is established. When we’re talking about JavaScript you’re correct: it is true that an import or export makes a file a module. However, the converse is not true. A file without an import or export is both a valid module and a valid script. But for the purposes of type checking, we have to make a decision about how to treat every file. So if we don’t see any imports or exports, we unequivocally treat the file as a script—it’s easy and harmless to add export {} if you don’t want the file to be a script.
Now, consider that we’ve always elided unused imports from our JS emit. (As of this PR, that’s configurable, but the default is still to elide unused imports.) If you write a TypeScript file that looks obviously module-like because you imported something, but then never used it in a value position, the output JS will look like a valid script. Does that mean we should treat the TypeScript file as a script? I don’t think so. The source file must be parsed as a module, and the output can be parsed as a module, so treating the file as a module seems like the best choice.
When you write an import type declaration, it’s essentially the same as writing an import declaration that you never use in an emitting position, except that it’s enforced that you never use it in an emitting position. Now, since import type is not standard ES grammar, I think you could reasonably argue that we could implement whatever rules we wanted; that it would not be inherently incorrect to say that import type does not constitute a module. But ultimately, given how similar it is to writing a regular import of a type, I think maintaining consistency that all import declarations are module markers was the correct choice.
That said, I 100% agree with you that referencing modules in scripts is painful—I’ve hit that exact problem before. But I don’t think import type would have been the best solution, even if we hadn’t already settled on the current behavior.

This wasn't my question, but I just wanted to give props to @andrewbranch for such a thoughtful and clear answer. Well done sir!

Well, it was my question, and although the outcome is maybe not what I wanted to hear, I must second that this is a very thoughtful and clear answer and I agree 100%. Thank you, much appreciated!

preserve keeps imports used only for types in the emit as a side-effect import

While it's a bit late, I still want to point out that the wording is a bit confusing.

I first read the source issue #2812, and by their "Proposed change 1. Do not elide module imports", I thought the word "imports" referred to individual names imported, e.g. AType in import { AType }, as the example code they provided.
This unfortunately caused a problem when I tried to understand the bolded "imports" quoted above. I believe it's not just me, as there is #43393. It took me some time to realize that "imports" means every import-statement for names without value-side usage. (and I indeed found the naming importsNotUsedAsValues precise and clean)

I hope this could help someone like me who is interested in the history of deprecated options covered by the new verbatimModuleSyntax option in the future.
All in all, I like TypeScript :)


GA import: missing Samsung browser again

See also #4742, #4602, #4331, #3664, #3452, #3320
When I import Google Analytics, I'm missing ~5% of users because Samsung Internet 10.2 and 11.0 are not recognised.
Blog on version 10.2 : https://medium.com/samsung-internet-dev/samsung-internet-10-2-beta-d741ea15906d
Version 11 : https://www.sammobile.com/news/samsung-internet-v11-chromium-75-ui-changes/

Should be fixed now. I made a change to the importer where it'll just compare the major version of samsung browsers since they seem pretty consistent in having only the major version tied to the engine.

Thanks!


Update readme to reflect user_for_draftsman in place of user_for_papertrail

The readme denotes user_for_papertrail - in checking the source that isn't currently true (I didn't review when it changed)
Both the Sinatra & Rails frameworks files are using user_for_draftsman instead. This is just a small update to fix that outdated reference.

Much appreciatd, @Tongboy!


post_process uses full correlation, fix filter_atoms

np.correlate(x, x, "full") otherwise we end up with correlations like so on the right, with the left being the output of the (forthcoming) online VAF calculation, see #285 for more details.
filter_atoms is changed since when I submit atom sequences like ((0, 2, 4, ...), (1, 3, 5, ...)) as is the case in the NaCl struct it converts it to (range(len(atoms)), (1, 3, 5, ...)) since 0 and 0 === False.

Can you add a very quick test for a VAF value, as presumably we don't currently if none of the tests broke? Maybe even just modify an existing test where we do post processing, so it could be very light weight?
Also could you clarify the difference between "same" and "full" in this context? Am I right in thinking we could recover "same" from "full", if we wanted? Would we ever want to?

Yes I'll ad a VAF test in there for the values.
On the same and full. Essentially it is due to how the signals are convolved. Full will perform a "full" convolution padding the edges of the array with 0's to do it. "same" will not. And so will be a subset, the "middle" of the full convolution.
Not sure if we'd want to use that for correlations honestly.
Also see the docs for np.convolve which np.correlate refers us to.

["full"] Note how the convolution operator flips the second array before “sliding” the two across one another:

["same"] Only return the middle values of the convolution. Contains boundary effects, where zeros are taken into account:

In detail, "full" will give you this (but twice over, symmetric about the middle value of the array)
$$ c_{n} = \sum_{i=0}^{N-n-1}x(i)\cdot y(i+n) $$
which is what the multi-tau correlator will also return  (there is a factor of $\frac{1}{N-n}$ to correctly account for the averaging).
Same will do the same, but only up to the input size. The result is not a "full" correlation. It is the middle of it.
import numpy as np

from typing import Iterable

def correlate(
    x: Iterable[float], y: Iterable[float]) -> Iterable[float]:
    """Direct correlation of x and y."""
    n = min(len(x), len(y))
    cor = np.zeros(n)
    for j in range(n):
        for i in range(n - j):
            cor[j] += x[i] * y[i + j]
    return cor

n = 5
a = [i for i in range(n)]

same = np.correlate(a, a, 'same')
full = np.correlate(a, a, 'full')[n-1:]
print("same", same)
print("full", full)
print("direct", correlate(a, a))
# same [11 20 30 20 11]
# full [ 0  4 11 20 30 20 11  4  0]
# direct [30. 20. 11.  4.  0.]


Alamofire doesn't seem to work when including just the Source directory.

I received 46 errors trying to include the Alamofire Source directory directly in my project.

Hi @danwalkowski,
Instead of creating a support issue in Github, please open a question on Stack Overflow and tag Alamofire. The Alamofire community is very helpful and supportive. Stack Overflow is the best place to get your question answered quickly and correctly.
Best of luck.

From our Contribution Guidelines
Asking Questions
We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.

In Xcode 7 beta 6 i receive an runtime exception:
dyld: Symbol not found: __TMPdVSs12MapGenerator
Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/APPNAME-aoiewmfcyfwtfhfjuskrtwemhqsr/Build/Products/Debug-iphonesimulator/Alamofire.framework/Alamofire
Expected in: /Users/USER/Library/Developer/CoreSimulator/Devices/AC2BD.../data/Containers/Bundle/Application/2B....509F/APPNAME.app/Frameworks/libswiftCore.dylib
in /Users/USER/Library/Developer/Xcode/DerivedData/APPNAME-aoie...emhqsr/Build/Products/Debug-iphonesimulator/Alamofire.framework/Alamofire
This occurs on the first call I make with alamofire.
Then I re-read the install instructions, I drag and dropped it in my project, I didn't add it to the Binaries, after doing that, my app doesn't build at all without errors. One thing I'm not succeeding on is setting the build target to 8.3.
Without adding it to the binaries I don't get any syntax errors, nor did I get any runtime errors at beta 5 or earlier.

Both of you need to be on the Alamofire 2.0.0-beta.2 release with Xcode 7 beta 6.


add ui examples

Signed-off-by: zilin.zxl<EMAIL_ADDRESS>

感谢提交 Pull Requests！
Thanks for submitting a pull request.

Security Check : 07b88cfadbc1ad79fc1800351d734274cd5739b4

auto build success,number:235

autotest fail,number:1740


Bugfix - Unable to update myChatMessageContainer style in MessageThread (#2257)

What

Fixed the inability to change the style of myChatMessageContainer for the MessageThread component.

Added failedMyChatMessageContainer to the MessageThreadStyles interface.
Updated the myChatMessageStyle constant according to failedMyChatMessageContainer.

Why

The MessageThread component has a "styles" prop allowing us to change the style of the following elements:

myChatMessageContainer
chatMessageContainer

If we add style for both elements we can see that the style is applied for chatMessageContainer and not for myChatMessageContainer.
Link of the issue: #2257
How Tested

We can check the behaviour in the storybook:

Go to the storybook
Go to the "Messages with Customized Message Container" section of the MessageThread component.

The MessageThread will apply the style of myChatMessageContainer (fontStyle and boxShadow) instead of applying the style of FailedMyChatMessageContainer (red background).
Process & policy checklist

[ ] I have updated the project documentation to reflect my changes if necessary.
[x] I have read the CONTRIBUTING documentation.

Is this a breaking change?

[ ] This change causes current functionality to break.

Thank you @JamesBurnside for checking the PR.
For information, I did not get any changes after running rush changelog.
Below is the result:

Could it be because I have synchronized the Azure:main branch with my branch?

Thank you @JamesBurnside James Burnside FTE for checking the PR. For information, I did not get any changes after running rush changelog.

It appears we have a bug in our changefile configuration when accepting contributions from a forked repo - we will look into fixing this asap and I will update this thread once we have a fix in

Thanks for your pateience, the rush changelog command has now been fixed so you should be good to run and push the changefile to this PR.
Can you also run rush build:all-flavors one more time? I would expect updates to review/stable/react-components.api.md and review/stable/communication-react.api.md files also.

@JamesBurnside Thanks for fixing the rush changelog command, I ran the command and pushed the changefile. Next, I ran the rush build:all-flavors command and unfortunately I got no change.

We're unsure why this is happening for you locally. I tried cloning your fork and building locally and it is updating the stable API file. As we are doing a new npm release very soon I'd like to include this change in the release so we've created a clone of this PR #2449 and included you as coauthor.


TikTok Trending page

I tried crawling https://www.tiktok.com/en/trending Am having problems with the signature.
i used "5" (which is the type parameter) as the value for user_id in self .generateSignature( str (user_id)) i also used the same ua for both request and encryption.
The _signature generated is always wrong!!. please help

hey, did you ever find a solution for this? I got the same issue.

Having the same issue

the _signature is str(user_id + type) right now.

I am still facing the same issue. I cannot generate the signature.
how do you generate it?
for the following profile
https://www.tiktok.com/@leaelui
would it be self.generateSignature(str("MS4wLjABAAAAi7VjI-nbgKPRfTRc8qFmDuPyK3baTWHNsfeb0nIIuURBfvA8aBUt6fZeOntgR1_z" + "1"))
here (assuming) userid is
MS4wLjABAAAAi7VjI-nbgKPRfTRc8qFmDuPyK3baTWHNsfeb0nIIuURBfvA8aBUt6fZeOntgR1_z
and type is 1
or
userid is
16631823
I have tried both and could not get them to work.
Please any help will be appreciated


Table Solutions

All table solutions aligned to the new spacings.
https://zalando.invisionapp.com/d/main#/console/10454474/222686891/preview

The border for selected lines is 1px inset on the bottom.

@myueksel @tonysaad Please check whether padding-right of XL adds too much space on wide tables

is checked... we'll give the XL space just, if possible.

New font style for (column) labels in table headers. (You can find all font styles here: https://zalando.invisionapp.com/d/main#/console/10454474/227049636/preview)
https://zalando.invisionapp.com/d/main#/console/10454474/227051076/preview

I did already most of the table related stuff.
https://wholesale-design-system.github.io/styleguide/#/elements/tables
Missing is:

Cell editing -> Inline edit with correct styling (icons, spacing, ...), borders for error/success/edit and inline edit with select/dropdown
Rows with additional collapsible content
Selectable rows (checkbox for multiple or simple selection)

Awesome!!!
2017-05-16 11:30 GMT+02:00 Thomas Schlage<EMAIL_ADDRESS>
I did already most of the table related stuff.
https://wholesale-design-system.github.io/styleguide/#/elements/tables
Missing is:

Cell editing -> Inline edit with correct styling (icons, spacing,
...), borders for error/success/edit and inline edit with select/dropdown
Rows with additional collapsible content
Selectable rows (checkbox for multiple or simple selection)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/wholesale-design-system/components/issues/19#issuecomment-301727380,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYs4-_J8B-GtsK78GAFBUthSOjpJDO6Bks5r6WyygaJpZM4McfXZ
.

--
Mehmet Yüksel
UX - Visual UI Design
Team Wholesales
Zalando SE
POSTAL ADDRESS
Zalando SE
11501 Berlin
OFFICE
Zalando SE
Neue Bahnhofstr. 11-17
10245 Berlin
Germany
Mobile: +49 (0)152 567 723 29
Email<EMAIL_ADDRESS>Web: corporate.zalando.com
Jobs: jobs.zalando.de https://jobs.zalando.de/en/
Zalando SE, Tamara-Danz-Straße 1, 10243 Berlin
Company registration: Amtsgericht Charlottenburg, HRB 158855 B
VAT registration number: DE 260543043
Management Board: Robert Gentz, David Schneider, Rubin Ritter
Chairperson of the Supervisory Board: Lothar Lanz
Registered office: Berlin


I found a little problem in log migration logic

Hi,
My  log component config information is:
'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['error', 'warning'],
                    'categories' => ['yii\*'],
                    'except' => [
                        'yii\web\HttpException:404',
                    ],
                ],

                [
                    'class' => 'yii\log\DbTarget',
                    'levels' => ['error', 'warning','info'],
                    'logVars' => [],
                    'categories' => ['frontend.*','backend.*'],
                ],
                            ],
        ],

I found a problem that  when I run log migration command ./yii migrate --migrationPath=@yii/log/migrations/,I got error that It alert me the log table already  exist.
In the  up method of log migration file ,It's foreach loop process $targets then insert $target->logTable table into database.
public function up()
    {
        $targets = $this->getDbTargets();
        foreach ($targets as $target) {
            $this->db = $target->db;

            $tableOptions = null;
            if ($this->db->driverName === 'mysql') {
                // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
                $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
            }
            $this->createTable($target->logTable, [
                'id' => $this->bigPrimaryKey(),
                'level' => $this->integer(),
                'category' => $this->string(),
                'log_time' => $this->double(),
                'prefix' => $this->text(),
                'message' => $this->text(),
            ], $tableOptions);

            $this->createIndex('idx_log_level', $target->logTable, 'level');
            $this->createIndex('idx_log_category', $target->logTable, 'category');
        }
    }

but in log config I'm not configure the logTable so each time It insert the same table into database, and then it cause  the table exist.
My solution is to  insert the code in before create table：
if($this->db->schema->getTableSchema($target->logTable,true)!==null){
                continue;
            }

@mojifan would you like to fix it and pull request?

@samdark  yeah ,i will

I fixed this problem by getting the unique dbTarget through temp array in getDbTargets method.
My code is
protected function getDbTargets()
    {
        if ($this->dbTargets === []) {
            $log = Yii::$app->getLog();

            $tempTargets=[];
            foreach ($log->targets as $target) {
                if ($target instanceof DbTarget) {
                    $tempTarget=['db'=>$target->db,'logTable'=>$target->logTable];
                    if(!in_array($tempTarget,$tempTargets)){
                        $dbTargets[] = $target;
                        $tempTargets[]=$tempTarget;
                    }
                }
            }

            if ($this->dbTargets === []) {
                throw new InvalidConfigException('You should configure "log" component to use one or more database targets before executing this migration.');
            }
        }
        return $this->dbTargets;
    }

What do you think about it?
Do you have any better way?

And how do I to configure dbTarget? The documentation never mentions it and anyone can get an error on run migration:
You should configure "log" component to use one or more database targets before executing this migration.

https://www.yiiframework.com/doc/guide/2.0/en/runtime-logging#log-targets


V4 use of queries outside of setup

Can the functions in vue Apollo V4 be used outside the setup function/a vue component?
It seems like the composition API was designed in part to allow features to be split off into different files, but I can't find a way to do that currently. It throws a VM error if I write a standard query, or an inject error if I try to import the Apollo client for local state management.

You can use the functions from another file inside a component's setup. Outside of setup, it won't work.

Similar request (I'm using Vue2 though), could we make it possible to instantiate DollarApollo outside the plugin's install function? Can we have it re-export it? I don't use vue-apollo components, but just need addSmartQuery in my vue-oop. I use a workaround by retrieving $apollo from the vm, but this is not the best thing, as I run into race conditions sometimes when the plugin is npm-linked.


Use altinn cdn for font hosting

Use
https://github.com/Altinn/altinn-cdn/tree/master/fonts/....
instead of google.

[x] Upload font from https://github.com/rsms/inter to altinn cdn
[x] Use this reference instead of google

https://github.com/Altinn/altinn-cdn/pull/131


MethodTimer.dll required for Sitecore 8.2

[FileNotFoundException: Could not load file or assembly 'MethodTimer, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=cb1364609f40a1dc' or one of its dependencies. The system cannot find the file specified.]    System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0    System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +191    System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +162    System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +148    System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +604    System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) +212    Synthesis.Utility.TypeCollectionUtility.WithAttribute(IEnumerable1 types) in C:\Web\Synthesis\Source\Synthesis\Utility\TypeCollectionUtility.cs:23
Synthesis.Synchronization.SynchronizationEngine.get_ModelDictionary() in C:\Web\Synthesis\Source\Synthesis\Synchronization\SynchronizationEngine.cs:119
Synthesis.Synchronization.SynchronizationEngine.AreTemplatesSynchronized() in C:\Web\Synthesis\Source\Synthesis\Synchronization\SynchronizationEngine.cs:90
Synthesis.<>c__DisplayClass1_0.b__0(IProviderConfiguration configuration, TemplateGenerationMetadata metadata) in C:\Web\Synthesis\Source\Synthesis\SynthesisHelper.cs:36
Synthesis.SynthesisHelper.ExecMetadataWithAutoFriending(IEnumerable1 configurations, Action2 processAction) in C:\Web\Synthesis\Source\Synthesis\SynthesisHelper.cs:63`

I am having the same issue. Anyone find a fix for this yet?

Are you using Sitecore.Glimpse? https://github.com/kevinobee/Sitecore.Glimpse/issues/37

This appears to be looking for https://github.com/Fody/MethodTimer? Certainly not something referenced by Synthesis, but if you were using Fody, it could be wrapping calls to time them.

@kevinobee is a big fan of Fody. Hasn't seen it in Ship so you are probably spot on suspecting Glimpse :)
Sent from my iPhone

On Sep 20, 2016, at 8:00 PM, Kam Figy<EMAIL_ADDRESS>wrote:
This appears to be looking for https://github.com/Fody/MethodTimer? Certainly not something referenced by Synthesis, but if you were using Fody, it could be wrapping calls to time them.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I suspect Sitecore.Glimpse too, I will look into it for you, my apologies.

We are not using Sitecore.Glimpse but received this same error after upgrading to Sitecore 8.2. I had to download the Synthesis source code and add a try catch around the foreach on line 23 of Synthesis.Utility.TypeCollectionUtility to get past the error. We are able to regenerate the model now, but it always says it's out of sync even after regenerating and compiling.

@mrickmann it sounds like you have something else that has a Fody dependency, direct or otherwise. If something is using Fody to wrap your methods in a timer then that could certainly explain having your models fail to display as synced - if the types that would make the sync complete are those throwing the error.
I am using Synthesis on a couple of 8.2 projects and so far I haven't had any issues. I did just commit some changes to the source to have it build against framework 4.5.2, which may well help the issue as well (several modules such as Unicorn and SPE have seen weird errors until that change with 8.2 - but nothing related to Fody)

We have several other modules installed, including WFFM, so there very well could be a reference to it in one of those, but nothing direct. And odd that we didn't have this problem until after upgrading, that's why I was assuming it had something to do with Sitecore 8.2. I will get latest and build again and see if that helps. Thanks!

Hey All,
I just stumbled upon this trying to solve the same issue, but without actually using Synthesis.
Turns out, this is an issue in Sitecore.  The type "Sitecore.Mvc.Pipelines.Loader.InitializeDependencyResolver" has been annotated with the [Time] attribute from MethodTimer in Fody, and because Sitecore doesn't ship that assembly, it's failing to load at runtime during resolution of the type's custom attributes.
I'm opening up a ticket with Sitecore support, but I thought I'd mention it here since you all seem to be running into it too.

Thanks for the note @smithc :)

I'm also running into same issue with Sitecore 8.2. @smithc does it make sense to just drop that dll in the /bin for now?

Yes, dropping the MethodTimer dll into the bin folder should suffice as a temporary workaround until Sitecore fixes the issue in a subsequent update.

Is this by any chance github.com/Fody/MethodTimer? If so, there is a NuGet available for that.

Yes it is that. And as @smithc says, dropping the NuGet or dll in the bin should provide a temporary workaround until Sitecore issues a fix. Right @kevinobee? 😀

anyone else using Sitecore 8.2 with their own implementation of DI (like Autofac)? I referenced this article: http://structuredcode.com/replacing-default-di-container-sitecore-8-2/ but still running into issues: 'Recursive upgradeable lock acquisitions not allowed in this mode.'
`Server Error in '/' Application.
Recursive upgradeable lock acquisitions not allowed in this mode.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Threading.LockRecursionException: Recursive upgradeable lock acquisitions not allowed in this mode.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[LockRecursionException: Recursive upgradeable lock acquisitions not allowed in this mode.]
System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLockCore(TimeoutTracker timeout) +3839391
System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLock(TimeoutTracker timeout) +45
Sitecore.Threading.Locks.UpgradeableReadScope..ctor(ReaderWriterLockSlim mutex) +107
Sitecore.DependencyInjection.ServiceLocator.get_ServiceProvider() +85
Sitecore.Sites.SiteContextFactory.<.cctor>b__0() +9
System.Lazy1.CreateValue() +244    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31    System.Lazy1.get_Value() +14360453
Sitecore.Sites.SiteContextFactory.GetSiteContext(String hostName, String fullPath, Int32 portNumber) +78
Sitecore.Pipelines.HttpRequest.SiteResolver.ResolveSiteContext(HttpRequestArgs args) +430
Sitecore.Pipelines.HttpRequest.SiteResolver.Process(HttpRequestArgs args) +50
(Object , Object[] ) +74
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.(Object , EventArgs ) +532
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92`

Yes, it's funny you mention that.  We can take this off this thread if you like, but I've actually run into that integrating Autofac with Sitecore 8.2.  The issue is that the ServiceProviderBuilder must be fully initialized before you do anything else.  Now that most/many of the Sitecore services are requested from the ServiceProvider, you'll run into a chicken & the egg problem if you attempt to use Sitecore services within your ServiceProviderBuilder code.
I can't quite tell from the stacktrace you provided if you're the one doing it, but this includes running things like Sitecore pipelines.
If you're interested, I'm actually going to be presenting on some of this stuff during the Sitecore User Group meeting in November.

Yep you can't use factory.createobject, for example, until the whole thing
is initialized.
On Tue, Oct 18, 2016 at 1:44 PM smithc<EMAIL_ADDRESS>wrote:

Yes, it's funny you mention that. We can take this off this thread if you
like, but I've actually run into that integrating Autofac with Sitecore
8.2. The issue is that the ServiceProviderBuilder must be fully initialized
before you do anything else. Now that most/many of the Sitecore services
are requested from the ServiceProvider, you'll run into a chicken & the egg
problem if you attempt to use Sitecore services within your
ServiceProviderBuilder code.
I can't quite tell from the stacktrace you provided if you're the one
doing it, but this includes running things like Sitecore pipelines.
If you're interested, I'm actually going to be presenting on some of this
stuff during the Sitecore User Group meeting in November
https://www.meetup.com/Sitecore-User-Group-New-England/events/234482940/
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kamsar/Synthesis/issues/33#issuecomment-254633887,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGU_YCz6SEdOqZeM1HdEoNcgMvvAZMYks5q1S_GgaJpZM4J0Xcv
.

@smithc it would be great if you can provide some insight on this. I wish I can come to the Nov meetup, but I will be on vaca and out of the country :(
Here is my IoCBuilder looks like: https://codeshare.io/57oTR and running into Line 10.
The type or namespace ServicesModule could not be found error.

Closing this one. Not a bug in Synthesis.

This has been fixed in 8.2 Update-1:

The following error appears in the log file during an upgrade: "...Could not load file or assembly 'MethodTimer, Version=<IP_ADDRESS>..".

Thanks for update.


infer_schema! fail to find .env in local project if it is inside a workspace

Setup
Versions

Rust: 1.26
Diesel: 1.2.2, diesel_infer_schema: 1.2.0
Database: Sqlite
Operating System Fedora 27

Feature Flags: ["sqlite"]
Problem Description
What are you trying to accomplish?
I have a workspace like this:
workspace\
    |---- Cargo.toml
    |---- .env (.env at workspace root)
    |---- projects\
            |---- project1\
                    |---- Cargo.toml
                    |---- .env (.env at project root)
                    |---- src\...

If I put DATABASE_URL in .env at project root

::std::env::var("DATABASE_URL") found it :+1: , but
infer_schema("dotenv:DATABASE_URL") give error :-1: :

1 | infer_schema!("dotenv:DATABASE_URL");
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: message: called `Result::unwrap()` on an `Err` value:
    "Failed to load environment variable DATABASE_URL:
    environment variable not found"

If DATABASE_URL is in .env at workspace root: infer_schema works
What is the expected output?
infer_schema should works with .env inside project folder
Checklist

I have already looked over the issue tracker for similar issues.

We are relaying on the dotenv crate for handling .env files. So this should probably be reported there.

I reported this to dotenv. It is not an issue in diesel itself, but I think it is useful to leave this open, because infer_schema does not actually work as expected.
We will update the version of dotenv in [dependencies] and close this when the issue in dotenv get fixed.

I believe this is an issue in diesel - it uses dotenv, but the error is in how diesel is using dotenv.
The method it's using, dotenv(), uses the current working directory to find .env files. However, it's being used here inside a procedural macro (in infer_schema_macros), and procedural macros are always run in the workspace root, rather than the crate root.
If this is deemed a real issue, the only way to fix this will be to have diesel change the working directory or use a different function from dotenv to load the file.

@weiznich, @sgrif, what do you think?
I actually can put the DATABASE_URL into .env at the workspace root. But it is very nice if we can put it into .env at the crate/project root, because it is only use for that specific crate.


OP_REQUIRES for dtype check in AssignAddVariableOp

Fixes https://github.com/tensorflow/tensorflow/issues/58318

Hi @rohan100jain Can you please review this PR ? Thank you!


UI considerations

Some suggestions on Telegram:

when I got "create new wallet" it just opens program with that ugly shit on right side with icon

I was like "huh what is this... did it create new wallet... did it not... what hapened"

maybe that part of the screen should be reserved for wallet adress with qr code and "you have successfully created a wallet. your adress is: BLA BLA BLA"

Also:

also, if it says "wallet of out sync", as a user I dont wanna spend time to find that sync button, it should be right next to

Edin (the Telegram user) sent a mock-up of a proposed new main screen for the wallet:


Option to combine completion.list.selection = "auto_insert" and "preselect"

Feature Description
Citation from default config:

-- 'preselect' will automatically select the first item in the completion list
-- 'auto_insert' will not select any item by default, and insert the completion items automatically when selecting them

I would like to the see another option that combines them both.
The documentation could be described as:

-- 'preselect_auto_insert' will automatically select the first item in the completion list, and insert the completion items automatically when selecting them

The default preselect action though should not trigger auto_insert as this would be annoying.
So to accept the first solution one still has to press the keyboard shortcut for accept or select_and_accept.
But after selecting with select_prev and select_next, auto_insert should trigger and accepting would no longer be necessary.

After migrating from nvim-cmp, I kept the same behavior by using the following code.
  local list = require "blink.cmp.completion.list"
  local select = list.select
  list.select = function(idx, o)
    select(idx, o)
    local item = list.items[idx]
    require("blink.cmp.completion.trigger").suppress_events_for_callback(function()
      if idx and idx > 1 and item and list.config.selection == "preselect" then
        list.apply_preview(item)
      end
    end)
  end

it would be better if there is an option to combine "auto_inesrt " and "preselect".

I don't want to create a separate issue, but it would be great to also allow overriding select behavior per keymap in case I want to use both.
Reference :h cmp.select_next_item
opts = {
  keymap = {
    preset = 'none',

    ['<C-n>'] = { 'select_next', 'fallback' },
    ['<C-p>'] = { 'select_prev', 'fallback' },

    ['<C-j>'] = {
      function(cmp)
        cmp.select_next { selection = 'auto_insert' } -- NEW!
      end,
    },
    ['<C-k>'] = {
      function(cmp)
        cmp.select_prev { selection = 'auto_insert' }
      end,
    },
  },
},

It should also support setting the insertion mode by keymap, as per #826, cmp.select_next({ selection = 'auto_insert' })


Uņiver͢sal҉ Ędi͞t̡o̡r̡

Inspired by #113, I was thinking to myself: "Isn't it difficult to create a new class every time you want to add custom editor functionality?".  Now with the new Leap̨Ưńiv̢ers҉a̸l̸Ed̛i͞t́o̸r҉, you won't have to!  The Le͜ap͢Ùnivers̴alEdit҉or҉ (Or L҉̨UE̸͢͡ for short) supports all of the functionality that you could comprehend of!  Now instead of needing to create a new class, you won't need to do anything at all because the LU̶̸E̵ will already be doing it for you!
To Test:

[ ] Verify that Unity actually is able to load the project files.
[ ] Examine scripts to ensure that their inspector interface is at least 200% as good as before.
[ ] Verify that deep ǹe͝st͡i͡n͟ǵ of properties now fails to open a r̴if̡ţ to a̡̛ͩ͐ͩ̑̒̈́̂n̡ͦͨ̄͂ͪ͐o͊͂̍͒̑ͦ͊́҉t̷ͫ̋̔hͦ̇̐͢͞eͮ̒̀҉r̴͌̅̇ͭ̾́ d̷̷̨̝̺̠͔̯͓̦̥͈̮̞͕̹͕͈̟͑̔̌͑͘̕ȋ̶̸͉͍̜̼̫̲̟͔̜͎ͫͥͪ́ͬͦ͒ͤ̆ͦͦ͜͜m̶͇͙̠͓̬̹̬̝̩̺̯͈̦̼̹̼̞̊̊̆͌̽̇͠͡e̶̡̧̞̱̝̩̥̤͎͗ͥ̃̓ͣͨ͗̍͠ͅn̨̢̹̫̙̯̯͕͈͉̯̠̥͚̆̓͂̌͑̀ͪ̈͑ͪͤ͑͌͛ͣ̍̋ͤͅs̷̼̮̹͙̠̖͚̻̘̪̝̹̖ͯ̃̑͗ͬͫͬ̓̏́̕i̛̦͙͈̙̯̝͙̪̜̗̹̟͈̜͇̦͕̭̠͗͑̓͂ͤͤ̆ͤ̉ͬ̓̊̎͋͐̊̍͜ȏ̶̴͍̥͖̼͔̦̟͇̩̠͎̝͚̙̜̲͋͒̄̔ͮͣ̅͊̔ͧ͡nͩͬ̏͂ͧ̌͐ͫ̃͋̿̓ͣ͌͝҉̨̩̫͍͇͔̪̼̼͍͕.

Wow, now I can edit N-dimensional objects using my fingers.


Windows_pagefile resource needs some clear documentation

Describe the Enhancement:
Windows_pagefile resource needs some clear documentation
Describe the Need:
windows_pagefile resource have some linux examples , we need those to be removed , and we can't use this resource without
'automatic managed false' option in the resource . instead of doing that why can't we enable it by default
Current Alternative
use 'automatic_managed false' in every time we use this resource
Can We Help You Implement This?:
please help me to make this possible

@thirumoorthir Are you having issues with the examples here? https://docs.chef.io/resources/windows_pagefile#examples


❓ Question: Can I re-upload a svg logo in https://custom-icon-badges.demolab.com/

Description
I upload a flawed svg logo named "openupm" to https://custom-icon-badges.demolab.com/ and submit it.
I forgot to combine the outline of path when I was making svg, it will make the logoColor weird.
Could you delete it? I'll upload the correct version.
Sorry for my carelessness!

openupm is now available again
Let me know if there's anything else I can with

openupm is now available again
Let me know if there's anything else I can with

Thanks for your work!


A11y_AzureToolsStorageExplorer_Upload_UploadFiles_ScreenReader: NVDA reads same title for the "Upload Folder" and "Upload files" dialog.

" Check out Accessibility Insights! Identify accessibility bugs before check-in and make bug fixing faster and easier.”
GitHubTags: #A11y_AzureToolsStorageExplorer; #A11yMAS; #A11YTCS; #DesktopApp; #MAS1.3.1;#MAS2.4.2 #Voiceover;
Environment Details:
Application Name: Azure Tools Storage Explorer
Application Version: 1.10.0
NVDA Version:2019.2
Repro Steps:
1)Launch Storage Explorer
2)Navigate to "Open Connect dialog" pane and Sign in to Azure.
3)Go to "Manage Accounts" pane and Select the subscriptions you will use. Once selected, click on "Apply" button.
4)Navigate to "Blob Containers" of the selected subscription, right click and hit enter on "Create Blob container" to Create a new Blob container.
5)Once completed, Navigate to "Upload" button and hit enter on "Upload Files" control.
6)Start NVDA and using Tab key and check whether the Voiceover reads the title of the dialog correctly when opened.

Actual:
NVDA reads same title for the "Upload Folder" and "Upload files" dialog.
NVDA reads the title as Upload to Blob container for both of the screen.
Same issue is observed for the screen name "Upload folder".
Expected:
NVDA should read the title as different for "Upload Folder" and "Upload files" dialog.
User Impact:
Screen reader users unable to know the which dialog opened if it will not read the title.
Recommendation:
https://microsoft.sharepoint.com/teams/msenable/mas/Pages/browse-fixes.aspx
MAS Reference:
MAS1.3.1:
https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={54f28d1f-a2d1-4dcd-84e1-5c9b87e8aba4}
MAS2.4.2:
https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={c74ff881-82b6-4401-92cf-8919f9bffaf2}
Attachment for Reference:
1984_A11y_AzureToolsStorageExplorer_Upload_UploadFiles_ScreenReader.pptx

Jason merged a fix for this into master.

Verified this issue on:Azure Tools Storage Explorer (Version: 1.12.0)
The issue is no longer to reproduces, Hence closing this bug.

GithubTags:#Closed;

GitHubTags:#BM-TCS-StorageExplorer-Win32-Sep2019;


Gh 1686 since annotations

Codecov Report

Merging #1712 into develop will increase coverage by <.01%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##             develop    #1712      +/-   ##
=============================================
+ Coverage      66.02%   66.03%   +<.01%
+ Complexity      1973     1972       -1
=============================================
  Files            810      810
  Lines          26124    26116       -8
  Branches        3356     3352       -4
=============================================
- Hits           17249    17245       -4
+ Misses          7524     7520       -4
  Partials        1351     1351

Impacted Files
Coverage Δ
Complexity Δ

...fer/data/graph/function/walk/ExtractWalkEdges.java
50% <ø> (ø)
0 <0> (ø)
:arrow_down:

...ardinality/binaryoperator/HllSketchAggregator.java
100% <ø> (ø)
2 <0> (ø)
:arrow_down:

...cessor/processor/ElementDedupeFilterProcessor.java
94.44% <ø> (ø)
0 <0> (ø)
:arrow_down:

...chq/gaffer/rest/example/ExampleFilterFunction.java
50% <ø> (ø)
0 <0> (ø)
:arrow_down:

...raph/function/walk/ExtractWalkEntitiesFromHop.java
36.36% <ø> (ø)
0 <0> (ø)
:arrow_down:

...essor/processor/PreAggregationFilterProcessor.java
100% <ø> (ø)
0 <0> (ø)
:arrow_down:

...cardinality/binaryoperator/HllUnionAggregator.java
100% <ø> (ø)
2 <0> (ø)
:arrow_down:

...ore/coprocessor/processor/ValidationProcessor.java
100% <ø> (ø)
0 <0> (ø)
:arrow_down:

.../data/graph/function/walk/ExtractWalkEntities.java
50% <ø> (ø)
0 <0> (ø)
:arrow_down:

...encies/binaryoperator/StringsSketchAggregator.java
100% <ø> (ø)
2 <0> (ø)
:arrow_down:

... and 35 more

Continue to review full report at Codecov.

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


NACs (and forces) for SS-CASSCF

We are interested in obtaining NACs and forces for a set of SS-CASSCF states.
@matthew-hennefarth and @MatthewRHermes, I know you have recently implemented this in pyscf for SA-CASSCF (many thanks!), but I just wanted to get your thoughts on whether you think this can be straightforwardly hacked for the equivalent quantities for given SS-CASSCF states? Any advice on this (or where it might fall down) before embarking on this ourselves would be very much appreciated.

I have 3 comments:

Your MOs are no longer going to be orthonormal to one another. So when you get the transition density matrix elements, you will have to consider the entire orbital space since inactive, active, and virtual subspaces likely won't coincide with one another. Make sure to use the overlap matrix appropriately. Also, you will have to consider elsewhere in the derivation/equations where the assumption that orthonormal MOs is used. As far as I am aware, though, PySCF doesn't have a function to compute these TDM between states of different orbitals (but I may be wrong!).
I have a feeling that the standard derivation for SA-CASSCF NACs requires that the 2 states of interest are eigenstates of the projected model-space Hamiltonian. You will have to rationalize from the beginning what exactly the derivation should be and see if the equations align.
Along with point 2 above, SA-CASSCF states are not variational. Hence, one uses a Lagrangian technique to achieve derivatives. SS-CASSCF states are variational and hence one doesn't need to use Lagrangian techniques to achieve derivatives. I am not sure about NACs if one can get away with not using the Lagrangian method, so care should be taken here.

I have the strange feeling like I've seen SS-CASSCF NACs before, but I can't find the article. Anyway based on my playing in my notebook for about an hour, you're going to want to take a right turn in the derivation pretty quickly because of @matthew-hennefarth's point 2 above. In SA-CASSCF, the chain-rule term involving the derivative of the CI eigenvectors is obtained by differentiating both sides of the CASCI active-space-projected Schrödinger equation and rearranging. However, this involves a resolution of the identity over a complete CASCI eigenstate basis. This is OK for SA-CASSCF because the bra is itself a CASCI eigenstate in the same orbitals, which contributes a delta function so you end up with a nice, simple expression involving the derivative of the Hamiltonian element between the two states. But this does not happen so cleanly if your bra is defined in a different set of orbitals. You would end up having to invert the entire active-space Hamiltonian matrix, which would only be practical for very small active spaces.
However, you can always change strategies and use Lagrange multipliers instead. Define
$$
\langle\tilde{\Psi}_J|\frac{d}{d\lambda}\Psi_I\rangle \equiv \frac{d}{d\lambda}\mathcal{F}
$$
and then
$$
\mathcal{L}\equiv\mathcal{F}+\nabla_{\textrm{orb}} E_{\textrm{CAS}}\cdot\vec{\kappa}+\nabla_{\textrm{CI}} E_{\textrm{CAS}}\cdot\vec{P}
$$
Differentiating this with respect to orbital and CI rotations again gives the usual CASSCF Hessian on the right-hand side, plus driving terms (wfn_response in the nomenclature of the SA-CASSCF NACs implementation). The driving terms work out to 1-body transition density matrices and the projection of the bra into the basis of the ket's active-space determinants.
So overall, I'd say you can probably reuse some of the structure, but you have to rederive the content of the individual functions, as well as implement some new (to PySCF) technology for transition density matrices and overlaps involving different orbital bases.

Many thanks both for your thoughts here - very helpful. We already have code for computing transition 1 and 2-body DMs between these states, so think that if we get the derivation right and can plug into the right pyscf functionality this shouldn't be too painful. Really appreciate you taking the time.
I'll close this issue, since it has turned into a theory rather than pyscf chat, and I'll perhaps reach out to you through a different channel to discuss further.


How to create sample_data.json?

Firstly thanks for making this open-source! I was looking through the example and was wondering how you get the sample_data.json file, as the DocVQA dataset task 1's ocr results .json files look very different. Thanks!

Hey,
Please check the Prepare dataset section of the README. The sample_data.json is just a dummy sample of how the preprocessed data would look like. Due to restrictions on sharing the docvqa dataset as specified on their website, I have only hosted the code for preprocessing.
You can first get the dataset (train_v1.0.json and ocr trsnacripts) from the docvqa website and then continue to the preprocessing step. Hope this helps.


Dogecoin Full Moon Transaction Fee 'quickmode'

Feature Request
I propose that on specific days of the month (specifically when the moon is full), that the dogecoin transaction fee be temporarily cut in half. (Approximately 3 days per month).
Why ?

It's fun. Dogecoin was created to honor the meme of the dog, and the meme of 'TO THE MOON'. Dogs are reported to 'bark at the moon'

WOW -  Dogecoin currently stands out, though it shares quite a bit of commonality with bitcoin, it stands out based on its meme and its devotion to 'giving back'. Dogecoin Full Moon 'quick mode' would be just another way it stands out and would be unique to Dogecoin, yet another quirk that keeps the cyrpto special

It could help better understand the user base (including) miners re-action to transaction fee updates in a 'safe' way.  By monitoring how people's buying behavior changes with the full moon, might give some insight into how they might re-act to a full transaction fee change (up or down)...or it might tell you nothing at all..who knows?

Describe Preferred Solution
In txmempool -> GetMinFee, prior to returning a non-zero fee, check to see if the current date/time phase of the moon is 'full'. If so return the GetMin Fee / 2
Describe Alternatives

The calculation of the moon phase need only be preformed once per day, not everytime per transaction. Could hook into utiltime.h or similar to 'cache' the date to save on processing.

Rather then 'halving'. The routine could instead have a 'proposed next tx fee', that devs would push out that would apply during the full moon, and the 'regular rate' during the rest of the month.  Then if fee rate becomes adopted, the 'regular' becomes the proposed, and a new proposed is rolled into code base for next testing cycle.

Related Code
GitHub Moonphase example

Additional Context
I had this idea the other day, and researched on r/dogecoindev how  to  submit an idea to Dogecoin developers (consensus method?) - If I did not follow property project protocol I apologize.
Moon phase calculation routine I used can be found here => http://www.voidware.com/moon_phase.htm
I would be interested in developing, creating the unit tests and submitting the unittest part myself, if someone would like to assign the issue to me that would be WOW. Tks

I love it!  But knowing how the code works right now for fee, there isn't an easy way to automate changing it.  But something we could do is just change it with a minor release for a couple months per year, maybe like an "event" if you play mmo's.  It is a little tough though because then some wallets might have different fee requirements than others, and then if you keep that special event wallet for longer than it is supported, your transactions might not go through.
Anyway in terms of issues, If this gets TOO much discussion going, Patrick might close it because he doesn't know how to turn off his github notifications for certain issues he doesn't want to hear about!

    It's not a terrible idea, it's just that the default minrelayfee is going to be decreased in the next minor release anyways.

@bernTOAST This wouldn't be a fork, it's just changing how the default works for the p2p tx relay code.  It's not a terrible idea, it's just that the default minrelayfee is going to be decreased in the next minor release anyways.

Thing is each node would need to recompile their code in order to change the effective min transaction relay fee.  However like I said if we never go below mintxrelayfee, then the wallet can do whatever it wants to estimate a fee.  But you are still overpaying.

Great idea. I like it..

How will you manage to get the real time to take as reference for the full moon method?

How will you manage to get the real time to take as reference for the full moon method?

excellent point!

i would start here
https://www.aerisweather.com/support/docs/api/reference/endpoints/sunmoon-moonphases/
You can make an API call to get this data then process the Function. maybe have a timer that kicks in once at the start of the month to call the API get the dates and then call a function or stored proc(I'm new to block chain so i guess no centralized DB), but yeah that is a start.... let me know helpful?

i would start here
https://www.aerisweather.com/support/docs/api/reference/endpoints/sunmoon-moonphases/
You can make an API call to get this data then process the Function. maybe have a timer that kicks in once at the start of the month to call the API get the dates and then call a function or stored proc(I'm new to block chain so i guess no centralized DB), but yeah that is a start.... let me know helpful?

It's centralized like you said and it can be easily hijacked. Let's say the API service is situated on: https://dogecoin.com/API, we will get our time from this link.
An attacker can modify local dns to point dogecoin.com domain name to a malicious IP and then he can modify the TIME returned at his will. Also another CON, we don't know if the server can handle all the calls and what if it crash each time ... this will make this trategy worthless unfortunately.

@aminbadshah @KabDeveloper Come on man.  Setting aside if the OP is a good or bad idea, the Mayans built a calendar to predict the solar and lunar cycles hundreds of years before we had APIs to grab it.  You can do the calculation purely mathematically, and you can use the block time as a time oracle as most distributed systems do.

@delbonis Nice yeah you can do it mathematically. I found a link to calculate the formula as well.
https://www.subsystems.us/uploads/9/8/9/4/98948044/moonphase.pdf
Will this work? if you enter a start date of when the last full moon happened and then apply the formulae assuming this pdf has the correct formulae will work, without any API's..

Sweet! This is exactly how the moon_phase.c code I referenced in the example works. Nice find

@delbonis I was talking about grabbing actual date to take as reference, not about the formula that the OP already submitted on the original post (Talking about the args to pass to that method).
On the PR he uses:
int64_t time = GetTime();

Which returns the system time in seconds, which can be modified by users at their wills.
It's a good idea, I am not saying the opposite, just trying to solve this point ... I can't see why my post is down voted -_-"

seems to me this concept is highly exploitable 🙃

If you mean in the sense that the user could simply change their clock? I think using the timestamp of the transaction solves that. And if the discount is in the wallet only where users can already customize their value then it would add nothing really new exploitable
If you have a particular use case in mind please elaborate  thanks

If you mean in the sense that the user could simply change their clock? I think using the timestamp of the transaction solves that. And if the discount is in the wallet GUI only where users can already customize their value then it would add nothing really new exploitable
If you have a particular use case in mind please elaborate thanks

IIRC the transaction timestamps are tamperable to a point and future timestamps which are invalid can become valid in the future and in blockchain technology in general not wise to rely on timestamps because they are not verifiable.

the timestamp of the transaction

...

IIRC the transaction timestamps are tamperable

https://github.com/dogecoin/dogecoin/blob/master/src/primitives/transaction.h
Please point us to the transaction timestamp you're discussing here?

Fair enough though i think this applies to using the timestamp as part of / during the tansaction.
I would hope that a node altering timestamps to "game" the system is kicked out but technically even without any code change all dogecoin users could simply choose to submit iess tx fee on full moons. So long as everyone participated. The code change simply helps the participation along 😀

My apologizes,  I used incorrect wording above. In the pull request comment (https://github.com/dogecoin/dogecoin/pull/1997) , their was a discussion around how to get an 'accurate' source of time in order to calculate the moon phase. Since user computers may not be exactly in sync.
One suggestion was to use the current time (plus the time offset, as reported in the wallet dogecoin-cli getinfo.  Which I believe is calculated as the median of all peers.
Another suggestion was to use the most recent block time (not transaction time). The block header includes a timestamp (AFAIK) as part of the merkle tree (https://raw.githubusercontent.com/dogecoin/dogecoin/master/src/primitives/block.h)
I incorrectly said transaction timestamp by mistake.

I incorrectly said transaction timestamp by mistake.

heh i just went with you. @michilumin also mentions issues with getting accurate time here: https://github.com/dogecoin/dogecoin/pull/1997#issuecomment-851765291

This is a fun proposal and one that merits discussion.  I will close this Issue and encourage folks to open a discussion (https://github.com/dogecoin/dogecoin/discussions)  to continue to hash out the details of this proposal should there be interest in continuing this conversation.


Body tracking sdk captured frame (color and depth image) is not same with the captured from sensor sdk

Hello, I'm trying to use multiple kinect sensors in single PC and Body tracking SDK.
Until now, I'm capturing the frame using [k4a_device_get_capture] function.
But, through some test, The frame (the color and depth image) captured from [k4a_device_get_capture] function and the frame that release the frame captured from [k4a_device_get_capture] and get re-capture(? this function may just get the older frame) using [k4abt_frame_get_capture] function is different.
It seems the frame from [k4a_device_get_capture] function is not latest frame (I print the 2D skeleton points in both frames and checked).
is there no problem?
I'm using [device_config.synchronized_images_only = true] parameter and there is no temporal smoothing in body tracking sdk (    k4abt_tracker_set_temporal_smoothing function is not used)
please help.
Thank you

@Ideal-H there seems to be two questions in this issue - 1) regarding accessing the RGB image associated with the pose estimation and 2) controlling temporal smoothing.
I am a little confused by the first one. It sounds like you are using k4a_device_get_capture to get the next capture in the AKDK stream and passing that to body tracking and then using k4abt_frame_get_capture to get the RGB image associated with the depth data used to generate the pose estimation. Correct? What is the issue that you are seeing?
Regarding temporal smoothing are you stating that you see no difference in the pose estimations in a movement sequence i.e. this factor impacts pose estimation over a sequence of captures?

Sorry for confusing you.
the capturing code in my program is like
capture = nullptr;
k4a_wait_result_t getCaptureResult = k4a_device_get_capture(device, &capture, -1);                        ---- first capture
color_image = k4a_capture_get_color_image(originalCapture);
depth_image = k4a_capture_get_depth_image(originalCapture);

if (getCaptureResult == K4A_WAIT_RESULT_SUCCEEDED)
{
    k4a_wait_result_t queueCaptureResult = k4abt_tracker_enqueue_capture(tracker, capture, 0);
    k4a_capture_release(capture);                                                                                ---- release the capture

    if (queueCaptureResult == K4A_WAIT_RESULT_FAILED)
        return;

    body_frame = nullptr;
    k4a_wait_result_t popFrameResult = k4abt_tracker_pop_result(tracker, &body_frame, 0);
    if (popFrameResult == K4A_WAIT_RESULT_SUCCEEDED)
    {
        k4a_capture_t originalCapture = k4abt_frame_get_capture(body_frame);                                  ----- get latest capture
        color_image = k4a_capture_get_color_image(originalCapture);
        depth_image = k4a_capture_get_depth_image(originalCapture);

my question is that
the two image data(color_iamge, depth_image) in [first capture] and [get latest capture] is different. The first capture image is not latest.
For the temporal smoothing, I just want to notice that I don't use it
Thanks


Add jenkins multiconfig pipeline support:

Fixes: RIPD-1514
Create a Jenkinsfile to build on rippled slaves. Modify
build_and_test.sh to support a few additional ENV settings.

Codecov Report

Merging #2206 into develop will increase coverage by 0.09%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2206      +/-   ##
===========================================
+ Coverage    70.05%   70.14%   +0.09%
===========================================
  Files          689      689
  Lines        50724    51230     +506
===========================================
+ Hits         35533    35934     +401
- Misses       15191    15296     +105

Impacted Files
Coverage Δ

src/ripple/basics/DecayingSample.h
77.77% <0%> (-8.34%)
:arrow_down:

src/ripple/beast/hash/xxhasher.h
66.66% <0%> (-6.07%)
:arrow_down:

src/ripple/rpc/impl/LegacyPathFind.cpp
85% <0%> (-4.48%)
:arrow_down:

src/ripple/app/tx/impl/BookTip.cpp
88% <0%> (-3.67%)
:arrow_down:

src/ripple/protocol/impl/BuildInfo.cpp
79.16% <0%> (-3.45%)
:arrow_down:

src/ripple/protocol/impl/STVar.cpp
85.71% <0%> (-2.6%)
:arrow_down:

src/ripple/app/paths/impl/Steps.h
81.63% <0%> (-1.71%)
:arrow_down:

src/ripple/conditions/impl/utils.h
68% <0%> (-1.45%)
:arrow_down:

src/ripple/beast/asio/io_latency_probe.h
95.77% <0%> (-1.25%)
:arrow_down:

src/ripple/core/impl/JobQueue.cpp
86.11% <0%> (-1.22%)
:arrow_down:

... and 202 more

Continue to review full report at Codecov.

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

Ironic that the Travis build is failing...

Given the problem of allowing arbitrary shell code to be executed, consider using Jenkins Freestyle projects, with chained shell commands and post-process steps. Is pipelining necessary here? Jenkins keeps a version record of each job's configuration, so the job configuration is in version control--just not the public git repo. And since having the job configuration is in the public repo and subject to anonymous modifications by way of pull requests, it's a pretty big security hole.
I think the groovy script can be re-used pretty much as-is within a freestyle project, right? In addition to just plain old shell.
Our ability to control this in house on our own servers gives a lot of flexibility here.

@mtrippled -- some of the current assets involved in doing a build:

Jenkinsfile (added in this PR)
build-and-test.sh (existing)
CMakeLists.txt (existing)

any of those assets can execute processes on the build host. So, in order to truly mitigate your concern of untrusted PRs executing arbitrary code on the build slave, we'd have to either not use those assets in our build process OR we'd need some way of preventing changes to them. As such I think we'd need to go beyond simply not having the Jenkinsfile under source control.
Alternatively, we can try to restrict the PRs that we will automatically build. There is a ticket that seems to be addressing that use case:
https://issues.jenkins-ci.org/browse/JENKINS-45502
And if we don't want to wait for that and/or don't like the implementation, we might consider implementing our own polling/trigger manager, but I have no idea where that would run....and it would be more code for us to maintain.
Another approach is to just make sure that our slaves our sufficiently sandboxed and sacrificial - if we need to quickly kill them, we should be able to do so. Perhaps even building within docker containers would help with isolation (I don't know enough about docker to know if that's the case).

Here's a shell command that can install a portscanner:
sudo apt install nmap -y
Then, it's a matter of running nmap to probe the entire internal network.
This is how to do a reverse ssh tunnel:
http://www.thegeekstuff.com/2013/11/reverse-ssh-tunnel/
It means running ssh from the jenkins host (behind the firewall) to some other host. Then, the people controlling that other host can simply execute commands just like they were logged in normally. Because they will be logged in.
No, absolutely no arbitrary shell access. This is easier than I thought, it just took 2 minutes of google search.

:+1: With the condition that the Jenkins plugin for github will be configured to only trust "Contributors" under "Discover pull requests from forks" and that the contributors list will be updated as team members come and go.
Without that, this PR will allow public users to execute arbitrary code on the Jenkins slave.

Jenkins Build Status

Build Type
Result
Status

clang.release.unity
959 cases, 0 failed, t: 420s
PASS :white_check_mark:

Jenkins Build Results

Build Type
Result
Status

clang.release.unity
959 cases, 0 failed, t: 425s
PASS :white_check_mark:

Jenkins Build Results

Build Type
Result
Status

clang.release.unity
959 cases, 0 failed, t: 420s
PASS :white_check_mark:

Jenkins Build Results

Build Type
Result
Status

Dummy Check
mellery451 and other test data
FAIL :red_circle:

@ximinez , @wilsonianb - please have a look at the two recent [FOLD] commits. These introduce (1) collaborator checks that forgo the build if it's not an approved submitter and (2) posts/updates of the build summary info to the PR comments. If there is additional info that you'd like to see in the build summary, let me know. Also, @ximinez - has your change request been addressed?

In 0.90.0-b1


Fixes using env var for login. Closes #6469

Fixes using env var for login. Closes #6469

ready to merge 🚀

ready to merge 🚀

Merged manually. Awesome work 👏. You Rock 🤩


The data volume of nodes is too different to display the image

Version
5.2.2
Link to Minimal Reproduction
No response
Steps to Reproduce
the example of offical site https://echarts.apache.org/examples/zh/editor.html?c=sankey-levels can be showed this problem that
just using big data to replace  the data, and one of the nodes' data should beyond 1biliion, the other nodes'data should be  several hundred
Current Behavior
Only node images with large amount of data are displayed
Expected Behavior
Small number of nodes can be displayed
Environment
- OS:any
- Browser:any
- Framework:react16.6.0

Any additional comments?
No response

Please provide the demo that doesn't work.


Adds some default ESLint configs

Needs more testing and I'd like to get some feedback before merging.

Coverage remained the same at 100.0% when pulling 5f7aff0f15dad02bbdbfd9cdb41fd34a356a8f59 on pmcelhaney:eslint-configs into d31f62f737a23164cd0be0359c67ed308fa3aaed on cht8687:master.

Coverage remained the same at 100.0% when pulling a6bd1885844ddb0073db7c3da5d312523b0fb467 on pmcelhaney:eslint-configs into d31f62f737a23164cd0be0359c67ed308fa3aaed on cht8687:master.