question

Hello, I ran your program, but found that the encrypted number cannot exceed 8192. What is the reason? I want to encrypt a number larger than 8192. Is there any solution? I look forward to your reply.

Hey! Could you paste the code that you are trying to execute? You can see here in the test that you are able to encrypt 8192 numbers up to 10000, generated by uniform_real_distribution. Generally, if you want to encrypt bigger numbers, you must decrease the scale. In the test, the scale is 2^40.

Hello, when I change 59 in this code to 55, Parameters parametersMKEval_me((1ULL << 59), 16384, PRIMES, SPECIAL_PRIMES);. I can successfully encrypt and decrypt large numbers and perform addition operations. However, when I multiply ciphertext and encoded plaintext, there are still problems. However, when I change 55 back to 59 again, the multiplication between the ciphertext with smaller numbers and the encoded plaintext can be successfully performed. This is rather troublesome. Do you have a solution to this problem?

The problem is that the scale is too big for those numbers. Try decreasing the scale to 1ULL << 40 or even 1ULL << 30. @sunshine-lh

Hello, when I changed 1ULL<<59 to 1ULL<<30, the addition homomorphic operation of multi key homomorphic encryption can get correct results, but the multiplication homomorphic operation gets wrong results. Do I need to modify other parameters after modifying the scale?

The problem is that when you decrease the scale you also need to decrease the primes in the first vector. In this test, you would need to redefine the PRIMES vector in the following way:

You can keep the first one as it is: this is used as a special prime and needs to be bigger than the scale
The other ones need to be very close to the scale: in this example, the scale is 2^59 and those primes are close to it. The reason is:

You encode a number and hence you 'store' it multiplied with a scale
You multiply two encoded numbers and hence the product is multiplied with a squared scale
Now, if you want to decode, the result would be invalid since you have num * scale^2 instead of num * scale
So you need to somehow divide by scale: to do this you eliminate the last prime from the RNS base. Therefore, you need to have close-to-scale primes in the RNS base so the end result would approximately be num * scale

With this in mind, you need to generate your primes, since SMKHE does not do this as other libraries do. You can use some of the default parameters from here, depending on you scale or you can generate your own primes.
I also recommend reading some papers about CKKS so you can understand how it works -- you can use the papers from the README of this repo.

Thank you very much. I have solved my problem.

@sunshine-lh Hello, I have encountered the same problem as you. Now we have adjusted the parameters according to the lattigo library, but the homomorphic operation on larger values still fails to get the correct result. May I ask how you solved this problem?


Confirmation for deleting project

I think it would be great, if we'll add confirmation for deleting project. Now it can be deleted by random click...

:+1: and i think can be a really easy fix!


Requests Not Reaching My Extension Anymore

Recently reinstalled the extension on latest Chrome and cannot get the wallet pop ups to prompt, I get stuck with the top right pop up letting me know it's taking too long. Resetting/cancelling has not helped. Wallet is useless until I can find a solution. Reinstalling etc has not helped.

Latest version on FF does not have the same issue.

Hi
seem like a problem with the Beacon connection.
could you try to Reset Connection and reconnect wallet to the Dapp


[Bug] Error notification when trying playing media from the addon

Something happend from version 0.1.10 to 0.1.11
Any movie or episode shows an error notification when pressing on it.
Kodi Log:
https://paste.ubuntu.com/p/tTKKVhcQdG
Your Environment
Elementum 0.1.11
Kodi 17.6
Windows 10, 64bit

Please try version 0.1.12

Thanks.
Checked with 0.1.12 and it's OK now.


CERTIFICATE_VERIFY_FAILED when connecting to Azure

I'm using Ansible with Azure SDK 2.0.0.rc5 to connect to Azure. Ansible is running in a CentOS7 VM via VMware player running on my laptop.
I set up the subscription_id, client_id, secret and tenant in the ${HOME}/.azure/credentials file.
When invoking ansible tasks to connect to Azure, I got:
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 447, in
main()
File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 444, in main
AzureRMStorageAccount()
File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 205, in init
supports_check_mode=True)
File "/tmp/ansible_AciD5f/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 186, in init
File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 419, in init
self.set_token()
File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 451, in set_token
raise_with_traceback(AuthenticationError, "", err)
File "/usr/lib/python2.7/site-packages/msrest/exceptions.py", line 50, in raise_with_traceback
raise error
msrest.exceptions.AuthenticationError: , SSLError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: //oauth2/token (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),))
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Traceback (most recent call last):\n  File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 447, in \n    main()\n  File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 444, in main\n    AzureRMStorageAccount()\n  File "/tmp/ansible_AciD5f/ansible_module_azure_rm_storageaccount.py", line 205, in init\n    supports_check_mode=True)\n  File "/tmp/ansible_AciD5f/ansible_modlib.zip/ansible/module_utils/azure_rm_common.py", line 186, in init\n  File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 419, in init\n    self.set_token()\n  File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 451, in set_token\n    raise_with_traceback(AuthenticationError, "", err)\n  File "/usr/lib/python2.7/site-packages/msrest/exceptions.py", line 50, in raise_with_traceback\n    raise error\nmsrest.exceptions.AuthenticationError: , SSLError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: //oauth2/token (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)'),))\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}
Any suggestion what the cause is and how to resolve it?
Thanks,
Forrest

Hi @delubi
Could you update or install the certifi package (pip install -U certifi) and tells if this makes a difference?
Thanks!

The certifi package appears to be already installed. Assume it's not a difference maker.
[root@localhost ansible]# pip install -U certifi --trusted-host pypi.python.org
Requirement already up-to-date: certifi in /usr/lib/python2.7/site-packages
Thanks,
Forrest

@yugangw-msft any idea?

Thanks for looking into it.
Just to let you know that the CERTIFICATE_VERIFY_FAILED error appears to be related to something in our Corp network.
When I worked in office all outbound/inbound traffic to/from Internet has to go through our Corp network. That’s where I encountered the error.
I’m working from home today. Tried the same playbook again from the same running VM environment. The connection to Azure passed without error. I was able to provision a VM on Azure.
So the only differentiator is I’m using home network to connect to Internet. Somehow, SSL handshaking seems to be interfered by our Corp network (the actual cause is yet to be figured out).
Thanks,
Forrest

Ok, corp net means proxies usually. In direct SDK, you would have been able to pass "verify=False" to bypass SSL from your corpnet. @tstringer do you know if this is available in the Ansible configuration?

@lmazuel This is currently not available from and Ansible standpoint. But this sounds like something that would be useful. I'll be sure to put this on our backlog.
@delubi I would think an appropriate workaround for the time being would be to perhaps stand up a VM in Azure to work as your Ansible host. Is that a possibility?

Probably duplicate https://github.com/Azure/azure-sdk-for-python/issues/1089

We only ever saw this intermittently with an explicit proxy. Never got to the bottom of it and we switched to an implicit proxy model instead. I suspected this was a requests issue but never managed to find the root cause.

@tstringer Standing up a VM in Azure and using it as Ansible host is feasible, although not desired. My desired use case is to have ansible run on-premise and be able to provision VMs either in VMware vCenter (on-premise) or in Cloud (i.e. Azure). It's not a showstopper at the moment but would like to see if there is a workaround that we can implement within the Corp boundary.
@awalker125 Is the explicit or implicit proxy something on the Azure side? Or something in the SDK?

On the azure side using user defined routes and a proxy device

Sounds like one of two things:

your company's got a MITM HTTPS proxy, so you need to add its CA root to the cert trust store on the Ansible host

or -

someone's removed the Microsoft CA root from the trust store on the Ansible host (it needs to be added back).

@lmazuel is the verify=False option exposed somewhere globally on msrestazure or elsewhere that we could set it? I'm not opposed to adding support for that in the Ansible modules if so, but in both of these cases it seems like just a configuration/cert trust issue on the Ansible host that should be easily resolved (and much more secure than just ignoring cert validation)

@nitzmahone Yes, there is even two solutions:

Add the keyword argument verify=False when creating UserPassCredentials or ServicePrincipalCredentials (only these twos).
Use a session callback:

def verify_false_callback(session, global_config, local_config, **kwargs):
    session.verify=False
client.config.session_configuration_callback = verify_false_callback

This last one is available everywhere, whatever the authentication class used.

@nitzmahone I have tried the first solution and this doesn't seem to work.
My scenario is slightly different in that I am using Azure Stack rather than Azure proper but I imagine there are a lot of similarities.
In my scenario we are querying the metadata endpoint which calls a method (_populate_from_metadata_endpoint) in msrestazure/azure_cloud.py. This appears to be hardcoded to not pass verify=False to retrieve the endpoints. Editing this to pass this verify=False gets Ansible running.

Thanks @charliejllewellyn ! That's an excellent point. I created an issue for msrestazure, and created an issue in the Azure CLI as well (since they don't know but they have the same issue as Ansible)

Could you try:

Update to msrestazure 0.4.18
Download the certificate: https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-cli-admin
Set the REQUESTS_CA_BUNDLE env variable to it: http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

@lmazuel Thanks for looking at this so quickly :) You cannot just specify only the self-signed cert as this overrides the OS CA bundle causing the auth request to login.microsoft.com to fail to verify as the official MS cert is not available. however adding this cert to the OS CA bundle and then referencing that works so thanks!

Hi @charliejllewellyn ! Thanks for the feedback. May I ask you to detail how you "adding this cert to the OS CA bundle", just to have clear answer to this thread? Especially, it's probably different on Windows/MacOSX/Ubuntu, and I'd be curious myself to see your exact scenario. Thanks!

np :)
I'm using Docker with a default Centos image "library/centos". The bit that does the cert is as follows:
 yum install ca-certificates -y
update-ca-trust force-enable
cp /path/to/azurestack.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust extract
export REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

Hi @charliejllewellyn . I am new to this. My use case is I am trying to connect to Azure from my CentOS linux machine. Getting SSL Certificate issue.
As part of your above comments can you please help me how to extract azurestack.pem certificate ?

Hi @mahaboob are you trying to connect to Azure or Azure Stack?
At any case, if you can access the URL to whichever portal you want to get your cert from. Export it from the browser.
Hoping you have access to some Windows PC... Import the exported cert to your Local Machine Certificates:

Then from PowerShell run:
Change SubjectNameOfYourCertificate

    cd cert:\localmachine\my
    dir | Where-Object {$_.subject -like "*<SubjectNameOfYourCertificate>*"} |export-Certificate -filepath "C:\Windows\Temp\azurestack.cer" -type CERT -NoClobber
    certutil -encode "C:\Windows\Temp\azurestack.cer" "C:\Windows\Temp\azurestack-physical.cer"
    openssl x509 -in "C:\Windows\Temp\azurestack-physical.cer" -out "C:\Windows\Temp\azurestack-physical.pem" -outform PEM

Then you can verify your pem:

or run from PowerShell:
openssl x509 -in "C:\Windows\Temp\azurestack-physical.pem" -text -noout

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            1f:cc:00:98:3b:6e:5d:a7:4f:f6:5d:29:3d:3c:0a:e2
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=AzureStackSelfSignedRootCert
        Validity
            Not Before: Jun 11 16:17:09 2018 GMT
            Not After : Jun 11 16:37:09 2019 GMT
        Subject: CN=AzureStackSelfSignedRootCert
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (4096 bit)
                Modulus:
                    00:8d:e7:f3:bf:a3:4e:99:a6:ce:d0:bc:8a:f9:c8:
                    d3:4c:e1:6a:0f:6c:ef:99:8e:ec:fd:a3:b2:66:0c:
                    6d:6f:e5:28:a2:aa:f4:14:a9:97:3e:28:d7:82:0f:
                    ec:6e:4c:7c:f2:91:68:ad:3e:25:75:fa:be:26:0a:
                    f9:eb:28:a9:16:c8:15:c7:8f:81:4e:ec:fb:17:97:
                    9a:8a:e7:f9:f8:17:02:e7:4d:18:ce:88:8e:98:8b:
                    e4:47:84:a8:8d:68:9e:af:a7:73:d0:f4:48:57:6e:
                    a4:a6:f0:83:07:fe:44:15:5d:c7:78:a7:7e:35:62:
                    74:17:2e:25:79:54:fe:98:77:ae:59:28:b4:43:a5:
                    52:74:f0:83:1b:dd:ed:4a:f3:ba:d4:64:94:88:d4:
                    65:13:78:42:87:2e:93:42:f4:c6:22:92:cd:13:7e:
                    c7:20:0f:25:40:bb:cf:3d:61:6f:a9:cd:f5:1e:25:
                    ac:2b:e8:31:6b:54:53:4b:3e:91:11:5e:84:f9:9d:
                    32:e6:05:23:fa:2e:a8:cf:76:69:a8:96:be:77:23:
                    2d:ad:48:8c:60:b5:14:c2:86:10:a8:8c:54:db:6d:
                    96:6c:9b:54:45:01:89:d0:d0:95:ed:76:e1:35:cc:
                    3f:b5:02:02:48:e8:68:8b:25:08:48:93:1b:89:29:
                    9c:ac:f9:2f:8a:ea:27:81:e7:f4:db:a2:58:a4:b8:
                    f5:bb:f1:97:b8:a6:eb:60:8f:da:76:fb:2d:bf:ca:
                    15:90:2a:89:79:09:b1:1a:80:54:38:33:84:82:36:
                    36:24:e7:72:26:e8:0e:f5:f3:26:57:14:ea:fc:41:
                    9f:01:59:61:b9:dc:3f:96:1e:63:cf:b6:19:72:5e:
                    78:d9:f4:74:ad:e2:be:dd:a9:a4:7e:6f:76:79:f6:
                    f0:b1:98:25:72:4d:19:21:19:fb:2f:01:a5:a1:ba:
                    2b:5f:30:6b:4c:d9:ef:94:eb:ac:78:bc:01:7f:5e:
                    dd:6f:de:bd:ad:e8:96:de:2d:77:6a:79:3d:f3:5f:
                    64:b6:62:8c:67:a9:14:62:f9:23:55:f1:5a:4e:58:
                    c2:6c:2c:15:51:01:9a:73:fa:b6:65:3b:76:1f:a1:
                    db:c0:41:af:e9:0c:57:9f:ad:0f:06:df:b5:77:5d:
                    19:5a:7c:55:9f:39:d4:0d:9e:03:30:75:70:79:8a:
                    eb:b8:5c:6c:c2:45:c2:89:f8:38:12:d6:65:68:51:
                    26:99:e0:58:39:47:4c:a3:82:51:d0:5e:ad:95:fd:
                    cc:ab:df:f8:b9:71:9e:68:7b:00:0c:64:ed:da:6d:
                    84:21:89:d4:a9:e6:9d:ac:a0:8c:44:b8:3e:fd:46:
                    28:db:cb
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment, Certificate Sign
            X509v3 Extended Key Usage:
                TLS Web Client Authentication, TLS Web Server Authentication
            X509v3 Subject Alternative Name:
                DNS:local.azurestack.external
            X509v3 Basic Constraints: critical
                CA:TRUE, pathlen:3
            X509v3 Subject Key Identifier:
                89:38:E1:B0:61:47:FC:4D:A9:F9:8B:C5:49:F0:72:E8:85:7F:11:C9
    Signature Algorithm: sha256WithRSAEncryption
         73:53:7e:51:cd:33:8d:bf:58:af:d4:59:76:b3:e8:0d:bf:8e:
         0a:c7:1b:1d:21:4f:2d:e0:58:3d:c9:c7:9a:a2:58:e0:65:92:
         04:71:ac:5f:3c:b2:fa:01:cf:1a:90:d0:2d:0a:04:be:ac:28:
         9c:f6:80:3a:a6:b7:fe:a0:54:5f:e5:98:15:ae:dd:0b:6e:ae:
         85:9e:80:c0:7b:2e:3c:31:39:b8:32:ce:c4:81:50:49:d0:ac:
         87:fd:aa:9f:d2:58:29:3f:26:d1:e7:bb:62:7d:77:f0:02:f7:
         34:dd:b5:f2:34:09:13:49:84:1a:5b:40:08:58:95:98:17:1d:
         4a:3f:2d:09:cf:60:be:69:74:ca:5f:53:60:13:60:45:5f:8e:
         d4:05:84:ca:22:b1:6b:f9:68:44:21:26:53:2d:0d:7f:4c:a3:
         6e:6d:f9:da:5f:73:23:a5:4b:1c:c0:3c:aa:70:e8:f5:93:9c:
         b5:df:41:b9:ad:b1:c6:2b:34:34:3e:63:62:c5:c2:7b:7d:82:
         22:4a:c2:8e:e4:34:ba:fb:8a:17:ad:5e:67:84:c9:8e:44:fe:
         8b:b5:d7:6e:2e:28:85:39:e8:6a:d0:1d:f2:bb:26:f1:3e:a3:
         51:cd:3d:07:80:e5:3f:9c:00:01:ea:37:79:1f:b8:65:db:51:
         68:3d:ff:ee:99:d5:db:22:0e:41:fa:fa:79:16:ab:63:6c:74:
         8d:2e:c2:fa:10:e5:38:ed:13:fd:bb:5d:a7:83:d4:ee:c9:df:
         65:66:d7:83:2c:c8:35:2a:68:22:e6:da:e5:fd:f0:f2:a1:7e:
         ab:c5:03:89:75:0c:59:cc:40:45:8f:37:23:7c:f0:aa:a8:c0:
         d7:87:c4:d1:c1:48:69:d1:0d:93:e3:69:a9:db:6d:9e:0e:31:
         92:e6:c2:b7:e1:fb:c0:8b:08:e4:e8:36:5f:3c:1e:b2:5c:ce:
         56:98:07:6e:10:88:b9:46:18:3c:7b:bb:05:7a:74:ab:0a:b2:
         4d:b7:c1:55:90:2f:13:bb:67:4c:61:61:6c:c0:ea:e9:c9:18:
         a4:10:0c:60:4b:0f:a4:ab:17:79:1a:f6:c0:c4:bb:66:1c:72:
         8a:49:ee:98:11:c5:b8:2a:a5:82:b3:a7:81:08:2c:fe:8d:eb:
         d7:d5:41:61:3f:c4:1d:6c:72:a7:ba:cd:6b:ae:b1:f2:f9:aa:
         67:c2:6d:d8:eb:47:2e:d6:4e:a6:bb:28:26:ad:e3:06:36:08:
         94:18:4c:a7:d0:74:48:2c:86:4e:8e:6f:b0:39:ce:8b:8b:0d:
         c2:5d:13:2e:c4:0a:ed:aa:f6:10:32:58:7c:6a:9a:37:dc:4d:
         94:14:b9:32:c6:54:2e:21

Does that help?

Could you try:

Update to msrestazure 0.4.18
Download the certificate: https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-cli-admin
Set the REQUESTS_CA_BUNDLE env variable to it: http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

Any hints how to get the certificate on CentOS?

Same here. Following this tutorial on Centos 7.5 x64
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ansible-install-configure
Error:
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "From cffi callback <function _verify_callback at 0x7f2e72f77320>:\nTraceback (most recent call last):\n  File "/usr/lib/python2.7/site-packages/OpenSSL/SSL.py", line 309, in wrapper\n    _lib.X509_up_ref(x509)\nAttributeError: 'module' object has no attribute 'X509_up_ref'\nTraceback (most recent call last):\n  File "", line 113, in \n  File "", line 105, in _ansiballz_main\n  File "", line 48, in invoke_module\n  File "/tmp/ansible_azure_rm_resourcegroup_payload_Z3f5cW/main.py", line 256, in \n  File "/tmp/ansible_azure_rm_resourcegroup_payload_Z3f5cW/main.py", line 252, in main\n  File "/tmp/ansible_azure_rm_resourcegroup_payload_Z3f5cW/main.py", line 136, in init\n  File "/tmp/ansible_azure_rm_resourcegroup_payload_Z3f5cW/ansible_azure_rm_resourcegroup_payload.zip/ansible/module_utils/azure_rm_common.py", line 301, in init\n  File "/tmp/ansible_azure_rm_resourcegroup_payload_Z3f5cW/ansible_azure_rm_resourcegroup_payload.zip/ansible/module_utils/azure_rm_common.py", line 1021, in init\n  File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 453, in init\n    self.set_token()\n  File "/usr/lib/python2.7/site-packages/msrestazure/azure_active_directory.py", line 480, in set_token\n    raise_with_traceback(AuthenticationError, "", err)\n  File "/usr/lib/python2.7/site-packages/msrest/exceptions.py", line 48, in raise_with_traceback\n    raise error\nmsrest.exceptions.AuthenticationError: , SSLError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/oauth2/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Output of:
sudo pip install ansible[azure]
Requirement already satisfied: ansible[azure] in /usr/lib/python2.7/site-packages (2.7.1)
Requirement already satisfied: jinja2 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.7.2)
Requirement already satisfied: PyYAML in /usr/lib64/python2.7/site-packages (from ansible[azure]) (3.10)
Requirement already satisfied: paramiko in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.16.1)
Requirement already satisfied: cryptography in /usr/lib64/python2.7/site-packages (from ansible[azure]) (2.2.2)
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.9.8)
Requirement already satisfied: packaging in /usr/lib/python2.7/site-packages (from ansible[azure]) (18.0)
Requirement already satisfied: requests[security] in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.18.4)
Requirement already satisfied: azure-cli-core==2.0.35 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.0.35)
Requirement already satisfied: azure-cli-nspkg==3.0.2 in /usr/lib/python2.7/site-packages (from ansible[azure]) (3.0.2)
Requirement already satisfied: azure-common==1.1.11 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.1.11)
Requirement already satisfied: azure-mgmt-batch==4.1.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (4.1.0)
Requirement already satisfied: azure-mgmt-compute==2.1.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.1.0)
Requirement already satisfied: azure-mgmt-containerinstance==0.4.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.4.0)
Requirement already satisfied: azure-mgmt-containerregistry==2.0.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.0.0)
Requirement already satisfied: azure-mgmt-containerservice==3.0.1 in /usr/lib/python2.7/site-packages (from ansible[azure]) (3.0.1)
Requirement already satisfied: azure-mgmt-dns==1.2.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.2.0)
Requirement already satisfied: azure-mgmt-keyvault==0.40.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.40.0)
Requirement already satisfied: azure-mgmt-marketplaceordering==0.1.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.1.0)
Requirement already satisfied: azure-mgmt-monitor==0.5.2 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.5.2)
Requirement already satisfied: azure-mgmt-network==1.7.1 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.7.1)
Requirement already satisfied: azure-mgmt-nspkg==2.0.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.0.0)
Requirement already satisfied: azure-mgmt-rdbms==1.2.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.2.0)
Requirement already satisfied: azure-mgmt-resource==1.2.2 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.2.2)
Requirement already satisfied: azure-mgmt-sql==0.7.1 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.7.1)
Requirement already satisfied: azure-mgmt-storage==1.5.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.5.0)
Requirement already satisfied: azure-mgmt-trafficmanager==0.50.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.50.0)
Requirement already satisfied: azure-mgmt-web==0.32.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.32.0)
Requirement already satisfied: azure-nspkg==2.0.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (2.0.0)
Requirement already satisfied: azure-storage==0.35.1 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.35.1)
Requirement already satisfied: msrest==0.4.29 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.4.29)
Requirement already satisfied: msrestazure==0.4.31 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.4.31)
Requirement already satisfied: azure-keyvault==1.0.0a1 in /usr/lib/python2.7/site-packages (from ansible[azure]) (1.0.0a1)
Requirement already satisfied: azure-graphrbac==0.40.0 in /usr/lib/python2.7/site-packages (from ansible[azure]) (0.40.0)
Requirement already satisfied: markupsafe in /usr/lib64/python2.7/site-packages (from jinja2->ansible[azure]) (0.11)
Requirement already satisfied: pycrypto!=2.4,>=2.1 in /usr/lib64/python2.7/site-packages (from paramiko->ansible[azure]) (2.6.1)
Requirement already satisfied: ecdsa>=0.11 in /usr/lib/python2.7/site-packages (from paramiko->ansible[azure]) (0.13)
Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible[azure]) (2.6)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /usr/lib64/python2.7/site-packages (from cryptography->ansible[azure]) (1.11.5)
Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography->ansible[azure]) (1.1.6)
Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible[azure]) (1.9.0)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography->ansible[azure]) (0.24.0)
Requirement already satisfied: ipaddress; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography->ansible[azure]) (1.0.22)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python2.7/site-packages (from packaging->ansible[azure]) (2.3.0)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests[security]->ansible[azure]) (1.22)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests[security]->ansible[azure]) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests[security]->ansible[azure]) (2018.4.16)
Requirement already satisfied: pyOpenSSL>=0.14; extra == "security" in /usr/lib/python2.7/site-packages (from requests[security]->ansible[azure]) (18.0.0)
Requirement already satisfied: argcomplete>=1.8.0 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (1.9.4)
Requirement already satisfied: colorama>=0.3.9 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.4.0)
Requirement already satisfied: knack==0.3.3 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.3.3)
Requirement already satisfied: tabulate<=0.8.2,>=0.7.7 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.8.2)
Requirement already satisfied: wheel==0.30.0 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.30.0)
Requirement already satisfied: pygments in /usr/lib64/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (2.2.0)
Requirement already satisfied: PyJWT in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (1.6.4)
Requirement already satisfied: jmespath in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.9.0)
Requirement already satisfied: applicationinsights>=0.11.1 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (0.11.7)
Requirement already satisfied: humanfriendly>=4.7 in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (4.17)
Requirement already satisfied: pip in /usr/lib/python2.7/site-packages (from azure-cli-core==2.0.35->ansible[azure]) (18.1)
Requirement already satisfied: python-dateutil in /usr/lib/python2.7/site-packages (from azure-storage==0.35.1->ansible[azure]) (2.7.5)
Requirement already satisfied: isodate>=0.6.0 in /usr/lib/python2.7/site-packages (from msrest==0.4.29->ansible[azure]) (0.6.0)
Requirement already satisfied: requests-oauthlib>=0.5.0 in /usr/lib/python2.7/site-packages (from msrest==0.4.29->ansible[azure]) (1.0.0)
Requirement already satisfied: adal<2.0.0,>=0.5.0 in /usr/lib/python2.7/site-packages (from msrestazure==0.4.31->ansible[azure]) (1.2.0)
Requirement already satisfied: keyring>=12.0.2 in /usr/lib/python2.7/site-packages (from msrestazure==0.4.31->ansible[azure]) (16.0.0)
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible[azure]) (2.18)
Requirement already satisfied: monotonic; python_version == "2.6" or python_version == "2.7" or python_version == "3.0" or python_version == "3.1" or python_version == "3.2" in /usr/lib/python2.7/site-packages (from humanfriendly>=4.7->azure-cli-core==2.0.35->ansible[azure]) (1.5)
Requirement already satisfied: oauthlib>=0.6.2 in /usr/lib/python2.7/site-packages (from requests-oauthlib>=0.5.0->msrest==0.4.29->ansible[azure]) (2.1.0)
Requirement already satisfied: entrypoints in /usr/lib/python2.7/site-packages (from keyring>=12.0.2->msrestazure==0.4.31->ansible[azure]) (0.2.3)
Requirement already satisfied: secretstorage<3; (sys_platform == "linux2" or sys_platform == "linux") and python_version < "3.5" in /usr/lib/python2.7/site-packages (from keyring>=12.0.2->msrestazure==0.4.31->ansible[azure]) (2.3.1)
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /usr/lib/python2.7/site-packages (from entrypoints->keyring>=12.0.2->msrestazure==0.4.31->ansible[azure]) (3.5.0)


[RHCLOUD-28457] - Fix bucket issue

The problem here is that secrets that were being "considered" as useful were able to set the hostname, so I made two tweaks to this.

I moved the logic for setting the hostname so that it happens during the step where we validate the hostname. It's still not great because it means that you could get one or other of two hostnames, assuming that there are multiple secrets with differing endpoints.
As part of this, I needed a way to send the endpoint through to that stage of the process, so I now added the ability for the endpoint to be exposed at the bucket level too. This means that buckets can have their own configuration of differing endpoints. It will be on applications to change to adopt this and I expect us to put out an ADR to deprecate the old approach very soon.

I also got rid of providers.StrPtr as we have that function in the rhc-osdk-utils now


Feature Request: Add rule for new_line_at_end_of_file similar to yamllint

Here's the new_line_at_end_of_file rule in yamllint: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.new_line_at_end_of_file
the following code snippet would fail:
/path/to/file1:
  file.managed:
    - contents: This is line 1

the following code snippet would pass:
/path/to/file1:
  file.managed:
    - contents: This is line 1

Thanks for your suggestion @dawidmalina. Salt does not provide any coding style or best practices regarding newlines at the end of sls files. We therefore believe it is up to developers/sysadmins themselves to decide upon their coding style and whether or not to make newlines at the end of files mandatory.

@jbouter agree but we could still have that rule implemented but disabled by default so the developers/sysadmins could decide (as you suggested) on your own. Closing this topic means that developers/sysadmins which decided to fallow that coding style must find another tool :(


CUDA error: no kernel image is available for execution on the device

Hi, thanks for the wonderful job!
However, I have met the error when I run the demo:
python demo.py --imagedir=data/abandonedfactory --calib=calib/tartan.txt --stride=2
The error happens after the first image is shown which is:

1it [00:07,  7.25s/it]
Traceback (most recent call last):
File "demo.py", line 102, in
droid.track(t, image, intrinsics=intrinsics)
File "droid_slam/droid.py", line 66, in track
self.filterx.track(tstamp, image, depth, intrinsics)
File "/home/.conda/envs/py37/lib/python3.7/site-packages/torch/autocast_mode.py", line 198, in decorate_autocast
return func(*args, **kwargs)
File "/home/.conda/envs/py37/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, kwargs)
File "droid_slam/motion_filter.py", line 69, in track
corr = CorrBlock(self.fmap[None,[0]], gmap[None,[0]])(coords0)
File "droid_slam/modules/corr.py", line 47, in call
corr = CorrSampler.apply(self.corr_pyramid[i], coords/2i, self.radius)
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Traceback (most recent call last):
File "", line 1, in
File "/home/.conda/envs/py37/lib/python3.7/multiprocessing/spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "/home/.conda/envs/py37/lib/python3.7/multiprocessing/spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "/home/.conda/envs/py37/lib/python3.7/multiprocessing/synchronize.py", line 110, in setstate
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory

Could you help me figure it out?

It seems like a CUDA / Pytorch mismatch, perhaps try reinstalling CUDA or updating Pytorch to match CUDA's version.

It seems like a CUDA / Pytorch mismatch, perhaps try reinstalling CUDA or updating Pytorch to match CUDA's version.

What should be the least versions of CUDA and PyTorch .....plz help me out


Duplicate word in tooltip on localized page.

Describe the bug
When browsing localized docs page, english text tooltips has certain words duplicated. These are words added into document via [!INCLUDE...] statement. For example, in https://docs.microsoft.com/ru-ru/dotnet/framework/wpf/graphics-multimedia/wpf-graphics-rendering-overview the word "WPF" is duplicated.
To Reproduce
Steps to reproduce the behavior:

Open localized docs page (like https://docs.microsoft.com/ru-ru/dotnet/framework/wpf/graphics-multimedia/wpf-graphics-rendering-overview)
If english tooltips are off, click on 'Enable' button at the top of the page.
Hover mouse over sentence with "WPF" word.
Appearing english tooltip has the described issue.

Expected behavior
"WPF" word should be shown just one time in tooltip.
Screenshots

Desktop (please complete the following information):

OS: Windows 10 version 1803 build 17134.590
Browser Microsoft Edge
Version 42.17134.1.0

No longer relevant, because tooltips are now not shown at all. Closing.


Dialog Management Training Online

Rasa Core version:0.9.0a2
Python version: 3.6
Operating system (windows, osx, ...): Linux
Issue:
Not specifically an issue. Want to get better understanding .
I want a employee to train the Dialog Management model , but I doesn't want to provide them my SSH login . I want to do it through a web page , where they can train the bot.
I wrote the training method with the input channel as HttpInputChannel , it accepts the input whenever the bot waits or the next user input. But it doesn't send response back to the user so they can approve the intent and action etc. It is still printing them on console
How I can make  it to send the whole response back so the user can enter the choices and train the bot.
Here is the code snippet I am using:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import logging
from rasa_core.channels import HttpInputChannel
from rasa_core.agent import Agent
from rasa_core.interpreter import RegexInterpreter
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.channels.rest import HttpInputComponent
from rasa_core.channels.direct import CollectingOutputChannel
from flask import Blueprint, request, jsonify, Response
from rasa_core.channels.channel import UserMessage

logger = logging.getLogger(__name__)

class TrainMyBot(HttpInputComponent):

    def blueprint(self, on_new_message):
        custom_webhook = Blueprint('custom_webhook', __name__)

        @custom_webhook.route("/", methods=['POST'])
        def receive():
            payload = request.json
            sender_id = payload.get("sender", None)
            text = payload.get("message", None)
            out = CollectingOutputChannel()
            on_new_message(UserMessage(text, out, sender_id))
            responses = [out.messages]
            return jsonify(responses)

        return custom_webhook

def run(input_channel, interpreter,
                          domain_file="./domains/data1/domain.yml",
                          training_data_file='./data/stories/data1/stories.md'):
    agent = Agent(domain_file,
                  policies=[MemoizationPolicy(), KerasPolicy()],
                  interpreter=interpreter)

    agent.train_online(training_data_file,
                       input_channel=input_channel,
                       max_history=2,
                       batch_size=50,
                       epochs=200,
                       max_training_samples=300)

    return agent

if __name__ == '__main__':
    logging.basicConfig(level="INFO")
    input_channel =  TrainMyBot()
    nlu_interpreter = RasaNLUInterpreter('./models/nlu/data1/default/data1')
    run(HttpInputChannel(5004, '/', input_channel), nlu_interpreter)

You can send something like this to the bot:
$ curl -XPOST http://localhost:5005/conversations/default/continue -d \
    '{"executed_action": "utter_call", "events": []}'

So basically, parse and continue tell you which actions you should execute. You are still free to execute any other action you want. '{"executed_action": "utter_call", "events": []}' defines what the bot stores and remembers as being executed. Does that make sense?

@tmbo  Thank you, for replying. So this will basically eliminate the need of sitting on the Console and training the bot, we can do this from the web form. Thanks I will try and post any issues.


Fix typo e mac address detection

Please merge those patches that prevent the upload of mac addresses, ips, ipv6s address to device42

Hi @claudyus, please use the *Nix/BSD/Mac Inventory script as an alternative, which should have this issue resolved.. Thanks for the input and let us know if you have questions!


Caddy instead of ingress

I like ingress, but it doesn't feel like production ready yet. GCP's ingress controllers have quotas, nginx controller still beta and have issues.
What do you think about adding Caddy as a proxy server?
It has easy https supports, automatic certificate update from letsencrypt and more.

Shouldn't really matter. Psykube doesn't know of ingress controllers. It just knows to create the ingress records. You could create your own controller using caddy no?

You're right. What I was thinking is creating a psykube DSL that creates Caddy load-balancer.
Example
name: test-app
registry_user: commercial-tribe
ports:
  http: 80
proxy: # creates caddy load-balancer
  tls: true
  address: "<IP_ADDRESS>"

That would have to be a completely independent resource it would create then right? Not something in the default functionality of kubernetes?

It might just generate one replica set and one service with type LoadBalancer. As an image to use preconfigured Caddy image file.


README.md typo: react-promise, not react-async

thanks! it was how I wanted it named, but it was taken on npm


Create bowtie index on demand

Rather than storing the bowtie2 index, create the index on demand and store within the project directory
Will require new 'bowtie2 index rule'. to include:

download the index files to /lscratch/
run the make_index script
move the necessary files from /lscratch/ to the /workdir/

Not enough variabiity between runs and index types needed to complete - will store locally


Log Side Panel: exceptions ui improvements

Show Trace tab for exceptions by default
Add fetch and navigation info to breadcrumb columns

ooo great suggestions, def there's a lot to improve still. i'll do it in a separate PR

@MikeShi42 made improvements here https://github.com/hyperdxio/hyperdx/pull/122


Added RCTLog.h import for clarity

Explicitly show import statements in example implementation file.  Xcode build fails unless RCTLog is imported.  Adding this clarifies this, as it is not stated anywhere else.

By analyzing the blame information on this pull request, we identified @joshyhargreaves and @arian to be potential reviewers.

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at<EMAIL_ADDRESS>Thanks!

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot shipit


Call history table updates

Issue #618

added "more" button

created 'readMore' boolean (set default to false)
added "more" button
created v-if="readMore" <span> element to hide text
added @click="readMore = !readMore" function to toggle the boolean on button
created two <span> v-if & v-else statements so button text switches from "...More" to "Less" when clicked
made button text color blue
fixed sizing of button
used regular <button> as <base-button> didn't function properly
rearranged button below hidden text, but within <base-text> block

fixed left margins on both CallSummary.vue and CallHistory.vue
removed unnecessary code/comments

Finished Call History Table

Finished Call History Table


TOKENS - links needs to be updated

Get more TFT - links to wiki staging (also, need to update "How to Buy/Sell TFT", issue: https://github.com/threefoldfoundation/info_foundation/issues/242)
TFT simulator - 404 error

Removed Simulator button for now.
Links updated to production wiki:  https://wiki.threefold.io/#/how_to_buy_and_sell


Remove reference to "class Channel" from gen. code

The generated code doesn't use this, and forward references are a bad thing. That said, I bet there are hundreds of IWYU and Hyrum's Law violations that will break from this.
Cc @apolcyn

Looks like we have no IWYU violations of this sort in our test codebase, but users might....

I have run this through internal tests and I believe that this does not expose any IWYU violations in any codebase that we know about.


RareLink Grant Application

Grant Application Checklist

[x] The application-template.md has been copied, renamed ( "project_name.md") and updated.
[x] A BTC address for the payment of the milestones is provided inside the application.
[x] The software of the project will be released under the Apache license version 2.0 as specified in the terms and conditions.
[x] The total funding amount of the project is below CHF 30k at the time of submission.

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

@Noc2 Thank you for kind suggestions! We had received your email. Our team will work on revision of our application and update it for your further review. I really appreciate your insights!

Thanks for the update. I just have two additional follow-up questions:

Will the web ui be the standard polkadot.js interface or do you try to create your own UI on top of it? Do you already have some mockups or something similar for it?
Regarding milestone 1, are you aware of the following implementations https://github.com/danforbes/pallet-nft and https://github.com/w3f-community/nft_parachain  and could you potentially reuse them instead of creating your own solution?

Thanks for the comments. Please find our response in the below.

Thanks for the update. I just have two additional follow-up questions:
* Will the web ui be the standard polkadot.js interface or do you try to create your own UI on top of it? Do you already have some mockups or something similar for it?

We will create own UI on top of polkadot.js because user needs to setup the dynamic behavior of their dynamic NFTs in our UI. We will build it in our milestone 3.

* Regarding milestone 1, are you aware of the following implementations https://github.com/danforbes/pallet-nft and https://github.com/w3f-community/nft_parachain  and could you potentially reuse them instead of creating your own solution?

Thank you for the reference! We had noticed there are some existing work of nft pallet, which are great references to our project. We will investigate them and potentially add needed functionalities for dynamic NFTs on top of them. Since NFT pallet is a core component in our project, we include it in our milestone 1 to make our plan more self-contained.

Could you integrate in milestone 1 that you will potentially reuse and update existing solutions? And could you integrate the following into the application.

create own UI on top of polkadot.js

@Noc2 Thank you for kind suggestions! We had updated our application (milestone 1 and milestone 3) and included both points. Indeed, they help clarify scope of our work. We really appreciate your insights!

Looks good!

@mmagician Thanks for approving our application!

I presume that you will be including this Chainlink pallet? I had worked on it for fun in the past, I think when Substrate was still on version rc5 or rc6 - see my PR.

Yes, we will use the Chainlink pallet. thanks for sharing the link with us. :)

As far as I know, the current code in that repo is not compatible anymore with v2.0.0. I might have a go at fixing this in my spare time, but if you reach it first, feel free to contact me in case you have any questions! (matrix: @marcin:web3.foundation)

We are glad to contribute to the work. We will reach out to you when we are working on milestone 2. Look forward to collaborating with you in the near future!

@0x522359 care to share a quick update on your progress on the grant, together with an ETA if possible? We usually provide plenty of leniency on delivery dates given how fast the space moves, but your first milestone is 6 months overdue at this point. If you're no longer actively working on the project, we will terminate this grant in the following days.

This grant is being terminated due to inactivity. Feel free to apply again if you're still interested.


iTerm2 printer is wrong aspect ratio due to manually passing in width and height

I posted this issue initially at: https://github.com/atanunq/viu/issues/65
Comparing this source with imgcat's source makes it clear that the issue is viuer is attempting to manually calculate image size, which does not take into account iTerm2s specific line height/etc settings.
A simple fix to this is to simply not print width={};height={} when no width and height are specified, and allow iTerm2 to instead automatically calculate those.
I'm working on a PR right now for this.

So I started working on the PR here (https://github.com/thorlucas/viuer), but I've ran into a bit of an issue: if we let iTerm2 do the calculations on best fit itself (which produces more accurate results than viu's find_best_fit), then we don't have a width and height to return as a ViuResult.
As you can see in my fork, I currently just hacked it together to return "fake" results. I get w, h from find_best_fit but then just ignore those and don't use them in the actual printing. If I had to guess, I would assume that find_best_fit is just sort of trying to calculate assuming that a terminal cell has a specific dimension, which produces the wrong result.
There are two options here as I see it:

Fix find_best_fit by taking this into account. This seems unnecessarily hard (if it's even possible?) and also does computation that is not required (since iTerm2 does this for us).
Update the Result to return ViuResult<(Option<u32>, Option<u32>)> instead, returning only the values we know (which would be the user provided w and h values).

What is ViuResult<(u32, u32)> even used for, anyway? Is there a reason that it is important to return the used width and height?

Thank you for raising the issue and the detailed write up. It's great to be able to follow your chain of thought.
Across the project I have always assumed a terminal cell has a width to height ratio of 1:2. Unfortunately, it seems that this is not the case.
The ViuResult<(u32, u32)> is used by viu here to know how many rows to go back up when printing GIFs. This may be possible through other means, such as saving & restoring the cursor, for example. Even if doable, though, I think it is important to be aware of the size of the printed image. Having this information will be crucial when trying to place an image only in a particular part of the screen. I think this should remain the default viuer behaviour.
However, a fix for this would be nice to have. It can be put behind a configuration flag, unset by default, and set in viu. Maybe a flag that makes iTerm printer's print_buffer return a fallback value, e.g Ok((0, 0)) and not use width={};height={}. This is fine because for GIFs viu doesn't need to know the printed image's height - it sends the whole GIF to iTerm anyway and lets it handle the looping.
Do you think that makes sense? Would like to hear your thoughts on this

Any update on this one? I'd rather not implement it unless someone finds it useful


Utils refactor

Refactorization of utilities for components: io, embeddins, word_mappings

Added first mixins: word_mappings

Added second transformation: list_to_tensor

VQA_MED: three pipelines for question categorization working

Several additional fixes (batch reordering in SentenceEmbeddins, Config Registry - None)

This pull request introduces 5 alerts when merging c7401055dcf949428c9d9440ef70ad12c9c4b764 into 742e5ce528449db2724582df0086582f5feb3628 - view on LGTM.com
new alerts:

3 for Unused import
1 for Multiple calls to __init__ during object initialization
1 for Testing equality to None

Comment posted by LGTM.com


fix #242: startWith not working

fixed this issue #242

Current coverage is 40.66%

Merging #252 into master will decrease coverage by -0.08% as of 0e2d609

@@            master    #252   diff @@
======================================
  Files           48      48
  Stmts         1566    1569     +3
  Branches         0       0
  Methods
======================================
  Hit            638     638
  Partial          0       0
- Missed         928     931     +3

Review entire Coverage Diff as of 0e2d609

Powered by Codecov. Updated on successful CI builds.

It looks Travis CI failed to load coverage everytime.

It looks only os/x test coverage is working..


ListView Sliding abnormal flashing

Steps to Reproduce

Execute flutter run on the code sample
Slide up from the bottom

Expected results: normal upward
Actual results:  slide up from 19 and flash (bounce back) to 18

Code sample

import 'package:flutter/material.dart';

void main() {
  runApp(const MyWidget());
}

class MyWidget extends StatefulWidget {
  const MyWidget({super.key});

  @override
  State<StatefulWidget> createState() => MyWidgetState();
}

class MyWidgetState extends State<StatefulWidget> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ListView.builder(
          itemBuilder: (context, index) {
            return Container(
              height: index * 30,
              color: Colors.primaries[index % Colors.primaries.length],
              child: Center(
                child: Text(
                  index.toString(),
                  style: const TextStyle(fontSize: 40),
                ),
              ),
            );
          },
          itemCount: 20,
        ),
      ),
    );
  }
}

Logs
Null

 flutter doctor -v logs

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel master, 3.1.0-0.0.pre.2486, on Microsoft Windows [版本 10.0.22000.856], locale zh-CN)
    • Flutter version 3.1.0-0.0.pre.2486 on channel master at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f477c8b184 (20 hours ago), 2022-08-25 10:28:08 -0700
    • Engine revision bd7a1e0b2b
    • Dart version 2.19.0 (build 2.19.0-138.0.dev)
    • DevTools version 2.16.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at D:\AndroidSDK
    • Platform android-33, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
    • Visual Studio at D:\VSSDK\IDE
    • Visual Studio Community 2022 version 17.1.32421.90
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.70.2)
    • VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[√] VS Code (version 1.71.0-insider)
    • VS Code at C:\Users\autop\AppData\Local\Programs\Microsoft VS Code Insiders
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (5 available)
    • DBY W09 (mobile)  • DXQBB21C02222514   • android-arm64  • Android 10 (API 29)
    • DBY W09 (mobile)  • <IP_ADDRESS>:5555 • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows            • windows-x64    • Microsoft Windows [版本 10.0.22000.856]
    • Chrome (web)      • chrome             • web-javascript • Google Chrome 104.0.5112.102
    • Edge (web)        • edge               • web-javascript • Microsoft Edge 104.0.1293.54

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

https://user-images.githubusercontent.com/44134842/186911542-2167a4bc-881e-4c1d-9482-b019343e1acf.mp4

@au-top are you running it in debug mode?
what's the result with flutter run --release?
also this could be useful
 return MaterialApp(
      showPerformanceOverlay: true,
      home: Scaffold(

I'm sorry
I don't understand why it looks like a bug. Why should I open  showperformanceoverlay
I tried 'showperformanceoverlay', which is not valid for the problem

Hi @au-top, thanks for filing the issue. I can reproduce this issue on master channel 3.1.0-0.0.pre.2552 with provided sample code. On stable channel 3.0.5, it works normally.
There are no exception logs/special logs from the console.

Android: ❌
iOS: ❌
MacOS: ❌
Web (Chrome/Safari): ✅

✅: No Issue ❌: Issue reproduced

Demo

Android/iOS:

Stable
Master

MacOS:

https://user-images.githubusercontent.com/104349824/187126816-0f178a60-3bf9-4f8d-b070-8bef95015a3e.mp4

Demo (showPerformanceOverlay and Observatory debugger in profile mode)
https://user-images.githubusercontent.com/104349824/187125445-72750cd9-7e1f-41e2-9263-ddfbf4293d09.mp4

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
    • Flutter version 3.0.5 at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (9 hours ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.69.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.44.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel master, 3.1.0-0.0.pre.2552, on macOS 12.5 21G72 darwin-x64, locale en-EE)
    • Flutter version 3.1.0-0.0.pre.2552 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f66a097919 (2 hours ago), 2022-08-28 20:20:36 -0400
    • Engine revision 4e36ebc1f3
    • Dart version 2.19.0 (build 2.19.0-146.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13E113
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.46.0

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 2526BC1A-435D-4B08-B99C-44B928F2517B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 12.5 21G72 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 104.0.5112.101

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Providing Timeline trace from Devtools when running on Android device in profile mode:
dart_devtools_2022-08-29_11_47_52.852.json.zip

This started at  https://github.com/flutter/flutter/commit/b6f7289b187ad032c700ad8541dc2f131a33f2b7
@Piinks

Thanks @jason-simmons
FYI @mxsoul - I think you mentioned you had a fork of this change in production
also cc @grouma we may need to revert this change again. This looks like a different regression from the last one. 😞

I am going to revert this change. There is an additional issue internally, b/245621581


Loss function for help

Can you give this Loss function. Many thanks@Kenton Lee

I'm not sure I understand the question. Please feel free to reopen this issue with more specifics.


Windows 10 - Doesn't "flake" the code.

atom v1.0.7
linter v1.3.4
linter-flake8 v1.6.0
python v3.5b2

flake8-2.4.1
pyflakes-0.8.1
mccabe-0.3.1
pep8-1.5.7

Tried open a clean new Django App, which should shout on unused imported module. But it doesn't. When I run flake8.exe views.py it spits out proper error message:

.\views.py:1:1: F401 'render' imported but unused

Shout if you need more information.

It's working perfectly fine on Win10 with a similar setup except for the Python version. Since linter-flake8 simply parses the output of running flake8 though that shouldn't be an issue.
Has it ever worked for you before?
Can you go into the Developer Tools and put a breakpoint at line 76 of main.coffee and make sure there is actually output from running flake8?

@jkw  I dont have windows 10, but on windows 8.1 it works properly. Please work with @Arcanemagus to resolve issue.

Line 76 of main.coffee:
var col, line, match, regex, toReturn;
No errors whatsoever in dev tools.
Rolled back to Python 3.4.3, same here nothing happens. I don't know what I'm doing wrong. :-/

Looks like a release was pushed out just as you posted that last comment that enables lintOnFly for this plugin.

@jkw can you close this issue as it's working for you?


[BUG] My bloxstrap stays capped at 60FPS when i set it to 9999.

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.

What problem did you encounter?
When i put the FPS to infinite in Bloxstrap, the FPS stays capped at 60. Is there something i can do to fix it?

Have you read through https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-is-still-capped-to-60-FPS-after-raising-the-limiter?

Yeah i did, and i could already fix it, sorry for givin ya trouble.


Add unit tests for RequestStatus class

Unit tests for RequestStatus class
Fix: The CopyFrom(ICopyable) method in RequestStatus class never copied the value for the parameter object for ExtraData property.

The changes are affecting both the v2 and .NET Core projects.

First off: looks good, thank you.
Second: I don't think the [TestFixture] attribute is required anymore? That could just be ReSharper being smart -- maybe other test runners require it; I don't know.
Third: Are you familiar with TestCaseSource? It will let you reuse a lot of the code, which will make your test cases smaller, and allows you to give them real names. Here's a short example:

[Test, TestCaseSource(nameof(ConstructorTestCases))]
public void ConstructorTests(RequestStatus incoming, string expectedDescription, string expectedStatusCode, string expectedExtraData)
{
    Assert.AreEqual(incoming.StatusCode, expectedStatusCode);
    Assert.AreEqual(incoming.Description, expectedDescription);
    Assert.AreEqual(incoming.ExtraData, expectedExtraData);
}

public static IEnumerable<ITestCaseData> ConstructorTestCases()
{
    var emptyRequestStatus = new RequestStatus();
    yield return new TestCaseData(emptyRequestStatus, null, null, null)
        .SetName("Empty request status has null properties")

    var invalidSerializedValue = new RequestStatus("ABC");
    yield return new TestCaseData(invalidSerializedValue, null, null, null)
        .SetName("Constructor with invalid text has null properties");
}

You can also return values from a [Test], and check them in the TestCaseSource. That syntax looks like this:
[Test, TestCaseSource(nameof(IdentityTestCases))]
public int IdentityTests(int i) => return i;

public static IEnumerable<ITestCaseData>(IdentityTestCases)
{
    foreach (var integer in Enumerable.Range(0, 10))
    {
        yield return new TestCaseData(i)
            .Returns(i)
            .SetName($"{i} returns {i}");
    }
}

It allows you to be more expressive while being less verbose.

I never worked with nunit before but from what I can see it is the same as MemberData and Theory in xUnit.
Thanks for the examples. I will have a look.

Rian you are absolutely right about the [TestFixture]. It is not required anymore except in specific cases,

Beginning with NUnit 2.5, the TestFixture attribute is optional for non-parameterized, non-generic fixtures, so long as the class contains at least one method marked with the Test, TestCase or TestCaseSource attribute. (http://www.nunit.org/index.php?p=testFixture&r=2.5)

@rianjs: Would you like to keep the CopyFrom tests or you would rather remove them until you validate the functionality?
At the moment, the ToString() is expected to return null for an empty RequestStatus. As iCalendar is mostly about strings I would propose to return string.Empty instead as it is makes chaining cleaner in my opinion.
It really does not matter which one you decide to be used as long as we keep it consistent across throughout the library.


Refresh project

Hi.
I wonder if you can add a message to the Console whever a project is refreshed!
Thanks

You mean after you clicked the "Refresh Project" option from the menu and it is done?

Exactly
Enviado con Aquamail para Android
http://www.aqua-mail.com
El 23 de octubre de 2016 17:21:29 Peter<EMAIL_ADDRESS>escribio:

You mean after you clicked the "Refresh Project" option from the menu and
it is done?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/jbaron/cats/issues/161#issuecomment-255594497

I still miss this feature in CATS 2

I think you only need to add one line at project.ts file (line 224) and you're done!


Bazarr Development

the bazarr new version is not themed
thanks for your awesome work btw

Let me know when you find any bugs


[ContainerRegistary] Remove ingore attribute and fix the recording file after containerregistray release

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
API changes are not detected in this pull request.


Cannot access a disposed object in ASP.NET Core when injecting DbContext

On an ASP.NET Core project I have the following on Startup:
      services.AddDbContext<Context>(x => x.UseSqlServer(connectionString));

      services.AddScoped<IValidationService, ValidationService>();

      services.AddScoped<IValidator<Model>, ModelValidator>();

The ValidationService is as follows:
    public interface IValidationService {
      Task<List<Error>> ValidateAsync<T>(T model);
    }

  public class ValidationService : IValidationService {

    private readonly IServiceProvider _provider;

    public ValidationService(IServiceProvider provider) {
      _provider = provider;
    }

    public async Task<List<Error>> ValidateAsync<T>(T model) {

      IValidator<T> validator = _provider.GetRequiredService<IValidator<T>>();

      return await validator.ValidateAsync(model);

    }
  }

And the ModelValidator is as follows:
    public class ModelValidator : AbstractValidator<Model> {
      public ModelValidator(Context context) {
        // Some code using context
      }
    }

When I inject a IValidationService in a controller and use it as:
    List<Error> errors = await _validator.ValidateAsync(order);

I get the error:
System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application.
This may occur is you are calling Dispose() on the context, or wrapping the context in a using statement.
If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'Context'.

Any idea why I am having this error when using Context inside ModelValidator?

@javiercn can you take a look to see what's going on here?

I can't reproduce this. @mdmoura can you provide a small repro project? Here is what I tried.
public class Startup
{
    // This method gets called by the runtime. Use this method to add services to the container.
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMvc();

        var connectionString = @"Data Source = (localdb)\v11.0; Initial Catalog = PeopleContext; Integrated Security = True; Connect Timeout = 30; Encrypt = False; TrustServerCertificate = True; ApplicationIntent = ReadWrite; MultiSubnetFailover = False";
        services.AddDbContext<Context>(c => c.UseSqlServer(connectionString));

        services.AddScoped<IValidationService, ValidationService>();
        services.AddScoped<IValidator<Person>, ModelValidator>();
    }

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, Context ctx)
    {
        ctx.Database.EnsureCreated();
        app.UseDeveloperExceptionPage();
        app.UseStaticFiles();
        loggerFactory.AddConsole();
        app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");
        });
    }

    public static void Main(string[] args)
    {
        var host = new WebHostBuilder()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseIISIntegration()
            .UseKestrel()
            .UseStartup<Startup>()
            .Build();

        host.Run();
    }
}

public class HomeController : Controller
{
    private readonly IValidationService _validationService;

    public HomeController(IValidationService validationService)
    {
        _validationService = validationService;
    }

    public IActionResult Index()
    {
        return View();
    }

    [HttpPost("/Person")]
    public async Task<IActionResult> Post([FromBody] Person person)
    {
        var errors = await _validationService.ValidateAsync(person);
        if (errors.Count > 0)
        {
            return BadRequest(errors);
        }
        else
        {
            return Ok(person);
        }
    }
}

public class Context : DbContext
{
    public Context(DbContextOptions<Context> options) : base(options)
    {
    }

    public DbSet<Person> People { get; set; }
}

public class Person
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public interface IValidationService
{
    Task<IList<Error>> ValidateAsync<T>(T model);
}

public class ValidationService : IValidationService
{
    private readonly IServiceProvider _provider;

    public ValidationService(IServiceProvider provider)
    {
        _provider = provider;
    }

    public async Task<IList<Error>> ValidateAsync<T>(T model)
    {
        var validator = _provider.GetRequiredService<IValidator<T>>();
        return await validator.ValidateAsync(model);
    }
}

public class ModelValidator : IValidator<Person>
{
    private readonly Context _ctx;

    public ModelValidator(Context context)
    {
        _ctx = context;
    }

    public async Task<IList<Error>> ValidateAsync(Person model)
    {
        var person = await _ctx.People.FirstOrDefaultAsync(p => p.Id == model.Id);
        return person != null ? new List<Error> { new Error("Person already exists") } : Enumerable.Empty<Error>().ToList();
    }
}

public interface IValidator<T>
{
    Task<IList<Error>> ValidateAsync(T model);
}

public class Error
{
    public Error(string description)
    {
        Description = description;
    }

    public string Description { get; set; }
}

@javiercn I found the problem. On Startup I was seeding data to the database as follows:
if (hostingEnvironment.IsDevelopment())
  applicationBuilder.SeedData();

Where the extension method SeedData is:
public static class DataSeedExtensions {
  private static IServiceProvider _provider;
  public static void SeedData(this IApplicationBuilder builder) {
    _provider = builder.ApplicationServices;
     using (Context context = (Context)_provider.GetService<Context>()) {
        await context.Database.MigrateAsync();
        // Insert data in database
      }
  }
}

Then I changed it to (added the IServiceScope):
public static class DataSeedExtensions {
  private static IServiceProvider _provider;
  public static void SeedData(this IApplicationBuilder builder) {
    _provider = builder.ApplicationServices;
    using (IServiceScope scope = _provider.GetRequiredService<IServiceScopeFactory>().CreateScope()) {
      Context context = _provider.GetService<Context>();
      // Insert data in database
    }
  }
}

Now I do not get the error anymore when injecting Context into a Validator ...
Should the 'using (Context ...)' affect the application when running afterwards?
This is not something obvious to find ...

Hmm. Looks like the issue is that you're resolving a "scoped" instance from the top-level provider, which effectively makes it a singleton.
Since you've wrapped it in a using block, it's disposed, but left in the provider. When you resolve this service the next time, you get the same, disposed instance, hence the ObjectDisposedException.
I think this has been solved with #430, where the provider will throw if a scoped services is resolved from the application provider.

Aparently this error is caused by the readonly property where you store the Context or the Service you injected.

I have this problem when I make multiple requests at the same time, does anyone have an idea of what it might be?
`        public DbContext DbContext { get; }
    protected DbSet<Item> Table => DbContext .Item;

    public ItemReader(DbContext dbContext)
    {
        DbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
    }

    public async Task<Maybe<Item>> Read(Guid itemId)
    {
        var items= await Table
                                .Include(t => t.TableName)
                                .ThenInclude(m => m.TableName)
                                .Include(t => t.TableName)
                                .ThenInclude(m => m.TableName)
                                .Include(t => t.TableName)
                                .ThenInclude(sp => sp.TableName)
                                .Include(t => t.TableName)
                                .ThenInclude(sp => sp.TableName)
                                .ThenInclude(ss => ss.TableName)
                                .Include(t => t.TableName)
                                .ThenInclude(sp => sp.TableName)
                                .ThenInclude(ss => ss.TableName)
                                .AsNoTracking()
                                .FirstOrDefaultAsync(t => t.Id == itemId);

        if (item.IsNull())
            return Maybe<Item>.None;

        return item;
    }

`

@tiagorosendo And where/how are you getting the ItemReader?

@khellang

    public class ItemReaderWithExceptionHandler: ItemReader
    {
        public IItemReader ItemReader { get; }
        public ILogger Logger { get; }

        public ItemReaderWithExceptionHandler(
            IItemReader itemReader,
            ILogger logger )
        {
            ItemReader  = itemReader ?? throw new ArgumentNullException(nameof(itemReader ));
            Logger = logger ?? throw new ArgumentNullException(nameof(logger));

        }

        public async Task<Item> Read(Guid itemId){
            try
            {
                return await ItemReader.Read(itemId)
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Error..."));
                throw;
            }

}

@tiagorosendo And where/how are you getting the ItemReaderWithExceptionHandler? 😝 What I'm really after is "what scope is the DbContext resolved in"?

In controller like this :
[Route("api/item")]
 public class ItemController : Controller
 {
     public IItemReader ItemReader{ get; }

     public ItemController (IItemReader itemReader)
     {
         IItemReader = itemReader?? throw new ArgumentNullException(nameof(itemReader));
     }

     [HttpPost]
     public async Task<IActionResult> GetItem(Guid itemId)
     {
                  var item= await ItemReader.Read(itemId);

                if(item.HasNoValue)
                    return NotFound()

                return Ok(item)
     }
 }

@tiagorosendo Can you show the registrations? By default, that dependency chain would throw a StackOverflowException, no? You have an IItemReader that depends on an IItemReader

The Error Message is: "Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'ApplicationDbContext'."

Hi,
I have the following piece of code:
var request = (from chatRoomUsers in chatRoomUsersRepo.GetAll()
                           join chatroom in chatRoomRepo.GetAll()
                           on chatRoomUsers.cru_ChatRoomId equals chatroom.cr_Pk
                           where chatRoomUsers.cru_UserId == userId
                           orderby chatroom.cr_CreatedAt descending
                           select new
                           {
                               ChatRoom = chatroom,
                               ChatRoomData = jsonService.Deserialize<ChatRoomData>(chatroom.cr_Data),
                               Users = (from users in userRepo.GetAll()
                                        join chatRoomUsers in chatRoomUsersRepo.GetAll()
                                        on users.usr_Pk equals chatRoomUsers.cru_UserId
                                        where chatRoomUsers.cru_ChatRoomId == chatroom.cr_Pk
                                        select users)
                           }).ToList().Select(x => new ChatRoom
                           {
                               Id = x.ChatRoom.cr_Pk,
                               Type = x.ChatRoom.cr_Type == 1 ? "P2P" : "Group Chat",
                               Data = new ChatRoomData()
                               {
                                   Name = x.ChatRoomData.Name != null ? x.ChatRoomData.Name : string.Join(", ", x.Users.Where(z => z.usr_Pk != userId).Select(y => $"{y.usr_Firstname} {y.usr_LastName}").FirstOrDefault()),
                                   ProfilePicURL = x.ChatRoom.cr_Type == 1 ? x.Users.Where(z => z.usr_Pk != userId).FirstOrDefault().usr_ImageProfileUrl : null,
                               },
                               Users = x.Users.Select(y => $"{y.usr_Firstname} {y.usr_LastName}").ToList(),
                               Guid = x.ChatRoom.cr_Guid,
                           }).ToList();

As you see the Users are being fetched by a sub query. The first time the server is called the query returns the list successfully. Subsequent queries will result in the following error:
{System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'ApplicationContext'.
   at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed()
   at Microsoft.EntityFrameworkCore.DbContext.get_Database()
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.OnFirstExecution()
   at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_InjectParameters>d__27`1.MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method(Closure , QueryContext )
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass17_1`1.<CompileQueryCore>b__0(QueryContext qc)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at.Services.App.ChatRoomService.<>c__DisplayClass19_0.<GetByUser>b__6(<>f__AnonymousType45`3 x) in /Users/kevin/Documents/Development///.Services/App/ChatRoomService.cs:line 281
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at .Services.App.ChatRoomService.GetByUser(Int32 userId) in /Users/kevin/Documents/Development///.Services/App/ChatRoomService.cs:line 258
   at .Web.Controllers.ChatRoomController.GetChatrooms(String UserEmail) in /Users/kevin/Documents/Development///.Web/Controllers/ChatRoomController.cs:line 289}

If I add .ToList() to the subquery everything works just fine.
Could you please shed some light on the following.
Much appreciated

In your code, I haven’t see you using “DependencyInjection”, the ApplicationDbContext has been
Cleared when you use it.
Hope my errors experience could help you.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: kevinvella<EMAIL_ADDRESS>Sent: Tuesday, June 26, 2018 6:07:40 PM
To: aspnet/DependencyInjection
Cc: DuanShaolong; Comment
Subject: Re: [aspnet/DependencyInjection] Cannot access a disposed object in ASP.NET Core when injecting DbContext (#440)
Hi,
I have the following piece of code:
var request = (from chatRoomUsers in chatRoomUsersRepo.GetAll()
join chatroom in chatRoomRepo.GetAll()
on chatRoomUsers.cru_ChatRoomId equals chatroom.cr_Pk
where chatRoomUsers.cru_UserId == userId
orderby chatroom.cr_CreatedAt descending
select new
{
ChatRoom = chatroom,
ChatRoomData = jsonService.Deserialize(chatroom.cr_Data),
Users = (from users in userRepo.GetAll()
join chatRoomUsers in chatRoomUsersRepo.GetAll()
on users.usr_Pk equals chatRoomUsers.cru_UserId
where chatRoomUsers.cru_ChatRoomId == chatroom.cr_Pk
select users)
}).ToList().Select(x => new ChatRoom
{
Id = x.ChatRoom.cr_Pk,
Type = x.ChatRoom.cr_Type == 1 ? "P2P" : "Group Chat",
Data = new ChatRoomData()
{
Name = x.ChatRoomData.Name != null ? x.ChatRoomData.Name : string.Join(", ", x.Users.Where(z => z.usr_Pk != userId).Select(y => $"{y.usr_Firstname} {y.usr_LastName}").FirstOrDefault()),
ProfilePicURL = x.ChatRoom.cr_Type == 1 ? x.Users.Where(z => z.usr_Pk != userId).FirstOrDefault().usr_ImageProfileUrl : null,
},
Users = x.Users.Select(y => $"{y.usr_Firstname} {y.usr_LastName}").ToList(),
Guid = x.ChatRoom.cr_Guid,
}).ToList();
As you see the Users are being fetched by a sub query. The first time the server is called the query returns the list successfully. Subsequent queries will result in the following error:
{System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'ApplicationContext'.
at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed()
at Microsoft.EntityFrameworkCore.DbContext.get_Database()
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.OnFirstExecution()
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.Enumerator.MoveNext()    at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_InjectParameters>d__271.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator2.MoveNext()    at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found)    at lambda_method(Closure , QueryContext )    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass17_11.b__0(QueryContext qc)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source)    at.Services.App.ChatRoomService.<>c__DisplayClass19_0.<GetByUser>b__6(<>f__AnonymousType453 x) in /Users/kevin/Documents/Development///.Services/App/ChatRoomService.cs:line 281
at System.Linq.Enumerable.SelectListIterator2.ToList()    at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at .Services.App.ChatRoomService.GetByUser(Int32 userId) in /Users/kevin/Documents/Development///.Services/App/ChatRoomService.cs:line 258
at .Web.Controllers.ChatRoomController.GetChatrooms(String UserEmail) in /Users/kevin/Documents/Development///.Web/Controllers/ChatRoomController.cs:line 289}
If I add .ToList() to the subquery everything works just fine.
Could you please shed some light on the following.
Much appreciated
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/aspnet/DependencyInjection/issues/440#issuecomment-400254367, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASxamuwZWrGHnE23iodaHpM2Y7UJRrnFks5uAgfsgaJpZM4JZyBo.


TSBBLOC-407 End dev + Test OK

Description
https://sandboxgame.atlassian.net/browse/TSBBLOC-407
Checklist:

[ ] Pull Request references Jira issue
[ ] Pull Request applies to a single purpose
[ ] I've added comments to my code where needed
[ ] I've updated any relevant docs
[ ] I've added tests to show that my changes achieve the desired results
[ ] I've reviewed my code
[ ] I've followed established naming conventions and formatting
[ ] I've generated a coverage report and included a screenshot
[ ] All tests are passing locally

@capedcrusader21 @adjisb I have to go back to my first design and emit one event per transfert for FT token because otherwise the contract's size exceeded the limit size.


Sidebar Collapse - Question

Hi,
Is it possible to collapse the left hand menu side bar?

Hi,
Sure, for the first load please follow these instructions;
1) We add ls-closed class to page body tag

2) js -> admin.js, delete or make comment these codes.

3) css -> style.css adding !important code

Thanks Mate. Worked like a charm !!

Hi,
$ not defined error when applying this theme.anyone plz tell the solution i cant use any jquery javascript functions .i am stuck in my project

thx mate this work!


Flow Usage Question

I am trying to implement BL using Flows. Is there any opinionated way to:

set input to a Flow
get output for a Flow
use an existing Dependency container (Microsoft.Extensions.DependencyInjection)

From what i see from the docs / src a flow does not have an extensibility point to replace the DI container. An option of setting input is to pass it when constructing the flow via TInput Ctor arg / Property and get the output after run from another Property IValue<TOutput> that is updated after the last activity is executed.
A few observations about the design:

Flows must be transient - downside the FlowDescriptor gets rebuilt at every run, container is reconfigured every time
No option for composing flows (eg: a Flow to be considered an activity on it's own) - not an issue actually, maybe not actually desired to allow flow composition

Sample for Flow with I/O (most probably not best way to do it):
public abstract class Flow<TInput, TOutput> : Flow
    {
        public override string Name => GetType().Name;

        protected TInput Input { get; set; }

        protected Variable<TOutput> Output { get; set; }

	// Sync example
        public TOutput Run(TInput input)
        {
            Input = input;

            Run().Wait();

            return Output.CurrentValue;
        }

        protected abstract void BuildCore(FlowBuilder builder);

        protected override void Build(FlowBuilder builder)
        {
            Output = builder.Variable<TOutput>();

            BuildCore(builder);

            builder.WithDefaultCancellationHandler<DefaultCancelationandler>()
                .WithDefaultFaultHandler<DefaultFaultHandler>();
        }
    }

public class XFlow : Flow<XInput, XOutput>
{
	protected override void BuildCore(FlowBuilder builder)
	{
		var activity = builder.Activity<XActivity>();
		activity.Bind(a => a.Input).To(Input);
		activity.OnCompletionUpdate(Output, activityOutput => new XOutput());

		builder.WithInitialNode(activity);
	}
}

Usage:
XOutput output = new XFlow().Run(new XInput());

Hi Doru!
Thanks for your feedback.
Yes, you correctly understood how to set input and output.
I'll work on supporing generic flows, using an existing DI container and other topics you mentioned.
Some of these features will be available soon, some a little bit later.
Stay tuned!
Thanks


An update is possible?

An update is possible?
LFS Stable Version 9.1 Release

Bruce Dubbs - 2020/03/01
http://linuxfromscratch.org/lfs/news.html

Development has be taken back to the subversion original repo (svn://svn.linuxromscratch.org/ALFS/jhalfs/trunk)

Development has be taken back to the subversion original repo (svn://svn.linuxromscratch.org/ALFS/jhalfs/trun)
svn://svn.linuxfromscratch.org/ALFS/jhalfs/trunk
Note the missing F in from. Also, seems you push more recently overhere on github. Im thankfull for your work and will try to see if I can make it work on my system.

Actually, now development occurs at git://git.linuxfromscratch.org/jhalfs.git. We also use trac for bugs at https://wiki.linuxfromscratch.org/alfs.


Timeout should match value in environment

Description
This change fixes the issue of the hard-coded timeout value. This fixes #9
I ran into this issue here: https://github.com/openfaas-incubator/of-watchdog/issues/50
This is not yet complete (must be duplicated 4x). This is what I needed to change to get my long running function to work and I am looking for feedback here.
How Has This Been Tested?

I have tested this in my environment. See https://github.com/openfaas-incubator/of-watchdog/issues/50#issuecomment-465430595
How are existing users impacted? What migration steps/scripts do we need?
Values set for "write_timeout" will be respected.
Checklist:
I have:

[ ] updated the documentation and/or roadmap (if required)
[x] read the CONTRIBUTION guide
[ ] signed-off my commits with git commit -s
[ ] added unit tests

Oops. PR opened against the original...


[FEATURE] remove infer-owner

What / Why
We would like this module to be a Promise-y wrapper around child_process.spawn and little else. The current features of buffering stdout/stderr streams and returning the final result (optionally as a string) make sense in this context, however the behavior of inferring a uid/gid to run a process as is outside of the scope of concerns of this module.

As this magic uid/gid inferring was re-introduced, can this issue be re-opened?

seemed reverted in #12, but README is not reverted.