Initial Files Are Uploaded Again

Summary
Hi! I am currently building a form where users can enter information and upload related files. When the user opens an existing form record, I am setting initial files so that all previously uploaded files will be shown and files can be reordered, however loading initial files will make filepond upload them again so if the user refreshes the page or modify the form multiple times we end up having many duplicated files on the server.
Was this intended or is there a way to disable this feature?
Info about the app
Filepond version:  4.11.0
Web framework: Django 3.0 (unrelated to the question but that's why my JS code looks a bit different)
Filepond Config
FilePond.setOptions({
    files: [
        {% for file in userFiles reversed %}
            {
                source: '{{ file }}'
            },
        {% endfor %}
    ],
    acceptedFileTypes: [
        'application/pdf',
        'application/msword',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
        'image/tiff',
        'image/png',
    ],
    name: 'file',
    server: {
        headers: {
            'X-CSRFToken': getCookieValue('csrftoken')
        },
        process: {
            url: '/api/upload/',
            method: 'POST'
        },
        revert: null,
        fetch: null,
        load: null,
        restore: null,
        remove: null,
        patch: null,
    },
    labelIdle: 'Drag & Drop pdf/doc/tif files or Browse',
    required: true,
    allowMultiple: true,
    allowReorder: true,
    dropOnPage: true,
    dropOnElement: false,
    onactivatefile: (file => previewAttachment(file))
});

where userFiles is a list of urls such as
userFiles = [
    '/media/files/20200131/beb779a7187d438f/check_list.pdf',
    '/media/files/20200131/1sdf6fghw2d1g6bd/task_list.pdf'
]

Thank you!

You need to set the type of the files as well.
const pond = FilePond.create({
    files: [
        {
            // the server file reference
            source: '12345',

            // set type to local to indicate an already uploaded file
            options: {
                type: 'local'
            }
        }
    ]
});

https://pqina.nl/filepond/docs/patterns/api/filepond-object/#setting-initial-files

Hi @rikschennink Thanks for your reply! I have tried all three acceptable types for options but none of them worked. Please see the image for error. I have a function assigned to onactivatefile so that when I click on the uploaded file, another tab will be opened to preview it. When I am using the local type, I can still preview the image even it gives me the error, so I am pretty sure it's not the source issue.

Thanks!

It looks like you've not configured the server.load or server.restoreend points so FilePond can't load the file data.
I'll close this issue as it's most likely a configuration issue.


[bug][gui] Encoding problem in German version

Non-standard characters like German "Umlaute" not properly displayed.
Setup: Firefox, mvn package build.

which os are you using?

Windows

I can't debug this, as it does not happen on linux, someone else will have to look into it
I'd say it has something to do with the page encoding, but I can't be sure

I know that this happens on my machine as well, if you can tell me what I should look for on the webpage I could take a look into it

I'll check

That did the trick, working for me

I hate HTML

Works for me too

Then I will close this as it seems to be fixed


Face recognition in keras on flask server

Hi
I want to build an Face recognition app AI based on web.Firstly when user come to signup then webcam open and model train automatically of his image and his given name and then user goes to login then webcam open and they can verify that this user is exist means they recognize his face.so please please help me i want to build this app on keras  in only 4 to 5 days please please help me iam very beginner in keras help me.

Hi Hunnain
I think this question might be more suitable for StackOverflow generally.
To point you in the right direction, Keras.io has a blog post that relates to building a Flask REST API around a Keras model, which you can call from your website. That blog post will probably get you off to a good start.
Keras models can be saved and loaded in .h5 format, steps in the documentation here
Best of luck!
James


Added issue and PR templates

This PR fixes #8

Looks like a good starting point, we can tweak these as we go along


DATEADD() gives wrong output with DATETIMEOFFSET

###Problem description
DATEADD() gives wrong output with DATETIMEOFFSET
Postgres outputs datetimeoffset data by removing/subtracting input timezone value from it.
Fix includes, working on the engine output to include timezone and thereby retain the input timestamp as is.
1> declare @dt datetimeoffset(6)
2> set @dt = '1912-10-25 12:24:32 +10:0'
3> select dateadd(month,1,@dt)
4> go
dateadd
BABEL output: 1912-11-25 02:24:32.0000000 +10:00
SQL output: 1912-11-25 12:24:32.0000000 +10:00
###Upgrade
This commit includes adding changes to dateadd_internal_df() to reflect sql behavior.
Test scenarios covered
o Use case based: Original issue
o Null testcases: N/A
o Negative test scenarios: added negative timezone (Permissable range +14:00 to -14:00)
o Boundary conditions, Arbitrary inputs: Testcases including leap year dates, dates across years, dates having positive and negative timezones.
o Testcases calling dateadd function for datetimeoffset from procedures, views and functions
o Expected result correction on existing testcases
o Minor version upgrade tests, Major version upgrade tests : Done
o Performance tests, Tooling impact, Client tests: N/A
Task: BABEL-1625
Signed-off-by: Satarupa Biswas<EMAIL_ADDRESS>

Closing this branch because of some unresolved conflicts.
Please check: https://github.com/babelfish-for-postgresql/babelfish_extensions/pull/1340


EOF page showing up when I try to upload excel file

I am currently trying to upload an excel file with about 800k rows to my admin panel, but I keep getting a blank page that displays "EOF". When I upload a smaller amount of data (<100 rows), I don't get this issue. Is there something I can do to make this work?

Sounds like it is timing out due to the volume of data.  If you look at the network tab in your browser Dev Tools window it should confirm this.  You could try to enable bulk mode to speed it up, but large file uploads in the browser aren't really suitable.  The solution would be to upload using a celery job or similar.  Please refer to the docs.

Alright. Thank you.


add: examples

Add examples of usage

First example has been added: https://github.com/lanjoni/scylladb-crystal-driver/commit/4e98e204b7b6be60fa3fb9f6d95e95a6b7963e1e


[ZEPPELIN-1202] Documentation typo under writing interpreter docs

What is this PR for?
To correct typo found in documentation
What type of PR is it?
Documentation
Todos

[x] - Replace sentence with incorrect english docs with correction.

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-1202

How should this be tested?
Build docs and see correct docs on https://zeppelin.apache.org/docs/latest/development/writingzeppelininterpreter.html
Screenshots (if appropriate)
Questions:

Does the licenses files need update? no
Is there breaking changes for older versions? no
Does this needs documentation? no

Good catch! I found one more typo in here.
[
  {
    "group": "your-group",
    "name": "your-name",
    "className": "your.own.interpreter.class",
    "properties": {
      "propertiies1": {
        "envName": null,
        "propertyName": "property.1.name",
        "defaultValue": "propertyDefaultValue",
        "description": "Property description"
      },
      "properties2": {
        "envName": PROPERTIES_2,
        "propertyName": null,
        "defaultValue": "property2DefaultValue",
        "description": "Property 2 description"
      }, ...
    }
  },
  {
    ...
  }
]

If you don't mind, could you change propertiies1 -> properties1 as well?

Thank you. I believe all pending work on this is complete.

LGTM 👍

LGTM. CI failure is irrelevant, merge into branch-0.6 and master if there is no more discussion


certbot is not running as a container

Following Phillips' instruction, I got the nginx proxy working with encryption, but I don't see certbot running as a container, not even an exited container. Is this a normal situation?
Dalton

Have you modified the configuration in any way? What’s your docker-compose.yml?


fix(deisctl): fix how target names resolve

Addresses #4201
Ping @technosophos

@technosophos your last bit of feedback has been accounted for.

This looks good. Could there also be tests added for this behavior to unit_test.go?

@mboersma there could.  I'll add.

@mboersma unit test added.

Code LGTM.

Since we're just checking for the prefix, deisctl journal c would probably match against multiple containers, too, though I guess this is intentional for deisctl journal router.
Code LGTM

@krancour This looks good to :ship:!


irmin command not installed by default

The README says:

Irmin is packaged with opam:
opam install irmin
Irmin comes with a command-line tool called irmin. See irmin --help for further reading.

However, by default no irmin command is installed. Looking at the opam file, you need to install git too.

woops, well spotted, thanks!


Automatic Reconnect

Anyone know if it's possible to have chrome running somewhere with a method of auto reconnecting? I'm toying with the idea of an autoIT script.. but I'd like to avoid that route!

@LBegnaud Hi! Did you find a way to auto-connect in chrome? Or something similar?

I have not :(
I'm still very interested in it, but currently we have the first person who comes into the office in the morning reconnect all chromecasts (since streams will randomly die after 12-24 hours)

fyi @ApsOps i found this thread https://github.com/groupon/greenscreen/issues/33
i haven't tested it yet, but it might work for this purpose.

@LBegnaud Thanks, I'll try that.

we have the first person who comes into the office in the morning reconnect all chromecasts

Ditto!

@ApsOps fyi it works great!
Here's my little bash script in case anyone is interested. I wish I knew how to contribute to the readme, but perhaps someone else will see this and make that adjustment
`[greenscreen@Rader-GreenScreen ~]$ crontab -l | grep Chrome
0 5,8 * * * /opt/scripts/connectChromeCasts.sh
[greenscreen@Rader-GreenScreen ~]$ cat /opt/scripts/connectChromeCasts.sh
#!/bin/sh
while read -r i
do
startcast start "$i"
done <<< "startcast list | cut -f1 -d$'\t' | grep -Evi "(kitchen|break|jacob)""
`
The part at the end excludes chromecasts based on name. I have it run at 5am and 8am with the crontab definition above, but that of course can be customized


Improve the ValidationAdmissionPolicy docs

This is a Feature Request
What would you like to be added

End-to-end example: Add example of adding a label environment=test to one of the namespace
Add explanation to the examples
Add a note about how to enable the admissionregistration.k8s.io/v1alpha1 API or link to another doc that talks about runtimeConfig
remove all the example.com parts since it was mostly confusing
Link to API docs for the various objects mentioned in the doc
Move all examples to separate files and ensure they are tested, this would prevent issues like #38495 from occurring again, see comment from @tengqm below

comment from @tengqm:
Issues like this would be easy to detect if we make the manifest an example YAML.
For example:

move the YAML snippet into a separate file content/en/examples/policy/validating-admission-ex.yaml and,
reference it as {{< codenew file="policy/validating-admission-ex.yaml" >}} in the markdown page,
(optionally) amend content/en/examples/examples_test.go so that it can be validated against current and future k8s releases.

Why is this needed
Current docs was hard to follow for a new user like myself

So, more documentation about what the admission controller receives from the API would also be helpful. Is it the customary AdmissionReview object?

more documentation about what the admission controller receives from the API would also be helpful. Is it the customary AdmissionReview object?

We typically don't document internal details like that. Maybe that's something we could document within eg https://k8s.dev/docs/
Kubernetes is free to change its internal implementation and end users shouldn't need to know how that's done.

/sig api-machinery
Improvements are welcome
This is an alpha feature; we should aim to make the docs better before this graduates to beta.
/priority backlog

/language en
If we wanted to, we could add a new tutorial that shows how to do admission-time validation. First with a webhook and then with CEL.

@sftim The issue is that we need to what data is sent in the api server request to the ValidatingAdmissionPolicy.
If you look at the docs for Webhook Mode, you can see that the API server request is documented there: https://kubernetes.io/docs/reference/access-authn-authz/webhook/
The AdmissionReview object is also documented in the Dynamic Admission Control docs: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-request-and-response

PR #38522 is adding a reference to the admission config API where AdmissionReview, AdmissionRequest are documented. Is that what you want, @jimmyraywv ?

@tengqm I think that will work. However for UserInfo v1 authentication.k8s.io, for the groups []string, are those k8s RBAC groups or are those AuthN IDP groups, like group claims from OIDC?
What I am driving towards is that will this feature allow us to write policies with CEL that blur the lines between traditional validating admission webhooks, and the AuthZ Webhook Mode?

@tengqm I think that will work. However for UserInfo v1 authentication.k8s.io, for the groups []string, are those k8s RBAC groups or are those AuthN IDP groups, like group claims from OIDC?

AFAICT, k8s doesn't have an abstraction for users or an abstraction for groups. All those information are extracted from the authentication input.

What I am driving towards is that will this feature allow us to write policies with CEL that blur the lines between traditional validating admission webhooks, and the AuthZ Webhook Mode?

I believe CEL was not designed for authn or authz's purpose. It is a mechanism for you to leverage, to impose constraints that are difficult or impossible to express using OpenAPI schemas. You can mix these admission plugins in any way to meet your requirements.

AFAICT, k8s doesn't have an abstraction for users or an abstraction for groups. All those information are extracted from the authentication input.

You can extend Kubernetes to add those things - this isn't just theoretical, there's a User API in OpenShift 4.8 for example.
Core Kubernetes doesn't have User or Group APIs. If your container platform does have extension APIs for users and groups, this alpha feature lets you use CEL to validate changes at admission time.
 Here's what you might submit, as YAML, if you wanted to find out who the Kubernetes cluster thinks you are:
apiVersion: authentication.k8s.io/v1alpha1
kind: SelfSubjectReview

At HTTP level, the body of response might look like:
{
  "apiVersion": "authentication.k8s.io/v1alpha1",
  "kind": "SelfSubjectReview",
  "status": {
    "userInfo": {
      "username": "sftim",
      "uid": "71d99f8d-5b1b-4625-9149-037dc46fdc83",
      "groups": [
        "en-reviewers",
        "en-approvers",
        "system:authenticated"
      ],
      "extra": {
        "emoji": [
          "true"
        ]
      }
    }
  }
}

but a ValidatingAdmissionPolicy constrains what you send there, not what you get back.

In a couple of days, we'll have a blog article about this. I'm afraid it's not yet live. Please check back on the 20th of December.
We don't have anything to document here that I can see. Is there a page that needs to be more clear?

The issue is that we need to know what data is sent in the API server request to the ValidatingAdmissionPolicy, so that we can understand what capabilities this solution has.

As a model of its operation, the API server doesn't send any data to itself to implement and enforce a ValidatingAdmissionPolicy. Instead, the ValidatingAdmissionPolicy has access to:

the entire future object, were admission to succeed
its parameter data, it any

A ValidatingAdmissionPolicy doesn't have access to any context about the client, the current time, the phase of the moon, etc; if you want to take those into account, you'd need to use a validating admission webhook or some even more custom way to extend Kubernetes.
The docs don't explicitly say this; they explain what is possible and leave you to work the rest out by example. In a tutorial page, if we had one, we could make that point much more explicitly.

A new reference page would be good too: we could specify what version of CEL you can use, and the (short) list of available variables.
If we add one, that reference should cover CEL expressions for CRD validation and for ValidatingAdmissionPolicies, in one place. Would that help you @samos123?

/reopen
I think this is worth doing.
/sig api-machinery
/remove-lifecycle rotten
/priority backlog

/assign @mjlshen
/reopen
Hi @mjlshen , here is the old issue of suggestions on existing doc style. It would be great if it would squeeze into your doc PR :)
/triage accepted

/remove-lifecycle rotten


grok filter support

Hi,
I'll start to think to add grok support to Logagent and my attention is fall on node-grok. During evaluation  and starting coding  and  I saw that it depends from Oniguruma that is native library that may cause install issue on Windows as indicated on
I was wondering if that library can be used on Logagent or is necessary find other way ?
WDYT ?
Thank you in advance

I think we already faced a similar situation with the Kafka plugins, but in the end picked something in pure JS, right?  I think @megastef had dealt with this sort of situation before and may be able to suggest how to handle this here.

Right - we checked some option already. We used Node native regex because it is very fast and portable.
See e.g.

https://github.com/slevithan/xregexp/issues/140
https://github.com/rsyslog/liblognorm/issues/112  (liblognorm is very efficient and used in rsyslog)

The "new" plugin architecture might offer alternative ways to hook in alternative parsers (e.g. as input-filter plugin, which could emit JSON strings to LA processing chain after parsing text with an alternative parser). Windows is less a problem as long the native libraries are available as pre-compiled windows modules, which needs to be checked before we add new libraries to Logagent core.
From the architecture point of view, it would be interesting to have an option to support multiple regex/parsing rules based on different libraries. We will need some time to see the best way to broaden support for parser libraries.

thanks @megastef  for sharing

Hi @megastef ,
I thougth to a possible solution for a new input-filter-pluging.
When input publish data.raw instead to go directly in filter function like now, link
messages they might go in new function where is possible apply some logic or method present in the new module, in this case for example grok.
After message is "transform" is possible to publish it on emitter and so that it is captured by the old filter method.
Cutting messages logic and so on remains in the same place, in the yml file we can instruct logagent to load input-filter-module with that key input-filter-module
Am I on the right way or I've missing something ?

Are you referring to something like #43, @fbalicchia ?

Hi,
my idea was that, but for this issue after some check I thought that was out of scope.
In pr I have extends input filter function for manage directly if necessary event. In the same
commit I've refactor all input plugins to use LogEventEmitter that IMHO seems I thought for manage in one point all event definitions.
To avoid native dependency in logagent core I've created a plugin as usual.
https://github.com/fbalicchia/logagent-input-filter-grok
thanks for tips again


How to post HTML tag on content?

Hi,
Please let me know how to insert the html tag inside the post.content.
For example:
post.content = '
Hellow Word
'
Regards,

You will need to also set MIME Type for your post using the below line.
post.mime_type = "text\html";

I had also faced this issue before. Just ran dir(post) and saw this mime_type
property defined on post.
It worked. Nice.
Have a look at my sample code below, it will help you a lot.
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.users import GetUserInfo
from wordpress_xmlrpc.methods import posts

# url, username, password
client = Client('http://rishikesh67.pythonanywhere.com/xmlrpc.php', \
  'hygull', '^password@123$')

post = WordPressPost()

post.title = 'HTML5 - Intoduction'

# HTML content
content = """<!DOCTYPE html>

HTML Table

    Company
    Contact
    Country

    Alfreds Futterkiste
    Maria Anders
    Germany

    Centro comercial Moctezuma
    Francisco Chang
    Mexico

    Ernst Handel
    Roland Mendel
    Austria

    Island Trading
    Helen Bennett
    UK

    Laughing Bacchus Winecellars
    Yoshi Tannamuri
    Canada

    Magazzini Alimentari Riuniti
    Giovanni Rovelli
    Italy

"""

post.content = content
post.mime_type = "text/html"

post.terms_names = {
  'post_tag': ['html5', 'table'],
  'category': ['Introductions', 'HTML5']
}
post.post_status = "publish"
post_id = client.call(posts.NewPost(post))

print "Post with id ", post_id, "successfully published"

# Getting list of posts
published_posts = client.call(posts.GetPosts({'post_status': 'publish'}))
print published_posts


Update existing commands from v3.0.1 to v3.1.1

Running nosetests in the v3_rewrite branch at the rollback state using a oxd-server and Gluu Server at Version 3.1.1 produces the following result.
Ran 28 tests in 2.894s
FAILED (errors=6, failures=3)

Update the existing codebase to pass all the tests and ensure all existing commands are working.

Updated all the available commands to pass the tests.
============================= test session starts ==============================
platform darwin -- Python 2.7.11, pytest-3.2.5, py-1.5.2, pluggy-0.4.0
rootdir: /Users/tecoholic/work/oxd-python, inifile:
collected 24 items
test_client.py ................
test_configurer.py ...
test_messenger.py ....
test_package.py .

========================== 24 passed in 10.16 seconds ==========================


Rename Features::superset_of to is_superset_of, add is_superset_of to extensions

Changelog:
- **Breaking** `Features::superset_of` is renamed to `is_superset_of`.

- Added `is_superset_of` method to `DeviceExtensions` and `InstanceExtensions`.

This fixes a small inconsistency in the naming, and adds a new method to extensions.

@Rua Merged. Thank you for the improvement!


MetaMask detect connection does not detect my mobile MetaMask App

const detectProv = async () => {
        const provider = await detectEthereumProvider()
        let web3 = new Web3(provider)
        let chainID = await web3.eth.getChainId()
        window.alert(chainID)

        if (window.ethereum) {
            handleEthereum();
        } else {
            window.addEventListener('ethereum#initialized', handleEthereum, {
                once: true,
            });

            // If the event is not dispatched by the end of the timeout,
            // the user probably doesn't have MetaMask installed.
            setTimeout(handleEthereum, 3000); // 3 seconds
        }

        function handleEthereum() {
            const { ethereum } = window;
            if (ethereum && ethereum.isMetaMask) {
                console.log('Ethereum successfully detected!');
                window.alert("detected")
                // Access the decentralized web!
            } else {
                console.log('Please install MetaMask!');
            }
        }
    }

I try to detect my MetaMask application as the provider via a web-site using detect-provider library. In the desktop, it works fine but when I try to detect the provider using the same website and connect it to via my phone, it does not detect any provider. Where am I wrong?

Hi @mcmire, I want to detect the provider via the phone by connecting my dApp via browser yet I cannot detect it. I want to detect any disconnection or session ends dynamically even if the opened tab or browser is closed. Yet, I cannot detect it.

Hi! Same issue here.

Hi! Same issue here.

Could it be related to lib version? Since i have same issue

@Mysth When you say "browser", do you mean the browser inside of MetaMask, or is it outside?
@BiLosxD and @vildantursic When you say you have the "same issue", what issue do you mean exactly? Are you visiting your dapp within the browser inside of MetaMask or outside?

Hi @mcmire!
Visiting the MetaMask outside.

@BiLosxD Cool. The tl;dr here is that this won't work — you need to visit your dapp inside MetaMask. For a longer explanation, please read: https://github.com/MetaMask/detect-provider/issues/38#issuecomment-1215739459

Hello guys, I have the same problem with metamask app on mobile. I'm in the app, spent hours testing but nothing... window.ethereum still undefined.
the event is never called
window.addEventListener("ethereum#initialized", function(event) { alert('be or not 2 be'); },{once: true});
and the provider timeout at 30sec, nothing changes always undefined
 this.provider = await detectEthereumProvider({
        'timeout':30000
  })

I thought maybe metamask changed something?
I am with a local ip, in http, containing the sslip.io and port, I tested online with an ssl and https... still nothing undefined
Someone would have any idea? PLZZZ :)

Small supplement, I have version 1.2.0, I also tested directly in the body with a setTimeout to see outside of my environment something would happen but nothing always the same ... Undefined ...
Yet with the desktop version, perfect, detection, signature, events, everything is fine but the mobile side seems to me more Tricky ... :)

Hello guys, I have the same problem with metamask app on mobile. I'm in the app, spent hours testing but nothing... window.ethereum still undefined.
the event is never called
window.addEventListener("ethereum#initialized", function(event) { alert('be or not 2 be'); },{once: true});
and the provider timeout at 30sec, nothing changes always undefined
 this.provider = await detectEthereumProvider({
        'timeout':30000
  })

I thought maybe metamask changed something?
I am with a local ip, in http, containing the sslip.io and port, I tested online with an ssl and https... still nothing undefined
Someone would have any idea? PLZZZ :)

Small supplement, I have version 1.2.0, I also tested directly in the body with a setTimeout to see outside of my environment something would happen but nothing always the same ... Undefined ...
Yet with the desktop version, perfect, detection, signature, events, everything is fine but the mobile side seems to me more Tricky ... :)

@spellet If you go on CodeSandbox, reproduce this issue there, and give us a link to your sandbox so that we can try it out too, that would help us a lot. Otherwise it's hard to say exactly why you'd be getting this error.

Having the same problem, the detectEthereumProvider from '@metamask/detect-provider' doesn't work when using Mobile MetaMask (browser).
@mcmire here is minimal CodeSandbox to test it out https://codesandbox.io/s/clever-wave-z59g1u
It works on Firefox+Metamask extension. Doesn't work on MetaMask mobile

@toteto What happens when you go directly to that URL, https://z59g1u.csb.app? For me, I'm getting a "Connect to this site?" popup when I open that URL in MetaMask mobile.

I assume the solutions are either to continue to enhance the MetaMask Mobile Browser (which seems funny to me considering how many browsers already exists) and require that all Mobile dApps use that (a horrible UX) OR to find a way to detect and communicate to installed Mobile apps via Browser-based app logic, which is asking for quite a lot.

Well, we haven't been able to reproduce any example of not being to use this library from within the mobile app yet. If we can do that then we can focus on solutions! As I alluded to above a codesandbox is the best way for us to do that as it gives us a URL we can go to directly within the mobile app to test.

I have an HTML5 project that connects to MetaMask in Chrome on Desktop just fine, it does not connect to MetaMask on Android Mobile using Chrome (as expected) and the HTML5 project does not launch at all in the MetaMask Browser on Android (a fun surprise)

Here is a gif to use as metaphor of development of this entire logic flow

I have an HTML5 project that connects to MetaMask in Chrome on Desktop just fine, it does not connect to MetaMask on Android Mobile using Chrome (as expected) and the HTML5 project does not launch at all in the MetaMask Browser on Android (a fun surprise)
https://thumbs.gfycat.com/RipePoliticalDartfrog-size_restricted.gif
This gif is a metaphor of this apps development

I have an HTML5 project that connects to MetaMask in Chrome on Desktop just fine, it does not connect to MetaMask on Android Mobile using Chrome (as expected) and the HTML5 project does not launch at all in the MetaMask Browser on Android (a fun surprise)
(insert Scooby-Doo hallway chase gag as a metaphor for this apps development)

@PureNukage Gotcha. Are you able to recreate part of your app using CodeSandbox or some other service, or is your app opensource by chance so that I can run it locally and try it out? That would help a lot!

Hi. Using Metamask mobile v5.6.1 I am able to reproduce this issue (both building from source in emulator and on actual device). When within the metamask browser window.ethereum is undefined.

@toteto What happens when you go directly to that URL, https://z59g1u.csb.app? For me, for some reason, opening the CodeSandbox didn't work in MetaMask mobile, but when I went to the deployed URL directly I got a "Connect to this site?" popup.

Sorry for the delayed reply, this issue took a back-seat and missed the the notification.
You are correct, it works when accessed directly on the URL. Maybe you know why it doesn't work when accessed via the sandbox? Maybe this answer can point me in the direction on what I am doing wrong.
Will try to another minimal setup that that will reproduce this issue. Meanwhile, since the issue is live on our app on https://app.mailchain.com/, maybe you can gather more info there?

سلام @ mcmire, من می خواهم از طریق تلفن با اتصال dApp از طریق مرورگر، ارائه دهنده را شناسایی کنم، اما نمی توانم آن را تشخیص دهم. من می خواهم هر گونه قطع ارتباط را تشخیص دهم یا جلسه به صورت پویا به پایان می رسد حتی اگر برگه یا مرورگر باز شده بسته باشد. اما نمی توانم آن را تشخیص دهم.


wget2: 2.0.1 -> 2.1.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/wget/versions.
meta.description for wget2 is: successor of GNU Wget, a file and recursive website downloader.
meta.homepage for wget2 is: https://gitlab.com/gnuwget/wget2
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.1.0 with grep in /nix/store/mj6w878c4835z8d7lrk7109bz4apsrlh-wget2-2.1.0
found 2.1.0 in filename of file in /nix/store/mj6w878c4835z8d7lrk7109bz4apsrlh-wget2-2.1.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
wget2

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/mj6w878c4835z8d7lrk7109bz4apsrlh-wget2-2.1.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A wget2 https://github.com/r-ryantm/nixpkgs/archive/fae968ee4223e1b209c208dd8bb29e1f7f198e1b.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/fae968ee4223e1b209c208dd8bb29e1f7f198e1b#wget2

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/mj6w878c4835z8d7lrk7109bz4apsrlh-wget2-2.1.0
ls -la /nix/store/mj6w878c4835z8d7lrk7109bz4apsrlh-wget2-2.1.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

wget2

Maintainer pings
cc @SuperSandro2000 for testing.

@ofborg build wget2


Adds Python 2 flatten list example

Adds a Python 2 only example since the compiler.ast module was discontinued in Python 3.

Is the use of a built-in function really a trick?

No, but knowing about it is the trick i guess. And if it can be done shorter in Python 2 it's good to give an example.

Agree, would like to add yourself to the contributors?

Done

:+1:


Access Data via Single String Command

Is there a function built in to access data dynamically via a single string? For example, I am accessing the data below:
MsgBox jsonResult("features")(1)("attributes")("ASSET_ID")
But I want to be able to request the same data with a dynamic string, like:
MsgBox JsonString(jsonResult, "('features')(1)('attributes')('ASSET_ID')")
Does a function like this already exist?

I threw together a quick function that did what I need. But if there is an official function for this, I would be interested!
MsgBox JsonString(jsonResult, "('features')(1)('attributes')('ASSET_ID')")
Function JsonString(jsonTxt As Object, requestTxt As String) As String
Dim strEnd As Boolean, strVal As String
strEnd = False
Do While Not strEnd
If InStr(requestTxt, ")(") = 0 Then
strEnd = True
End If
    If InStr(requestTxt, "(") = InStr(requestTxt, "('") Then
        strVal = Mid(requestTxt, 3, InStr(requestTxt, ")") - 4)
        If strEnd Then
            JsonString = jsonTxt(strVal)
        Else
            Set jsonTxt = jsonTxt(strVal)
        End If
    Else
        strVal = Mid(requestTxt, 2, InStr(requestTxt, ")") - 2)
        If strEnd Then
            JsonString = jsonTxt(CInt(strVal))
        Else
            Set jsonTxt = jsonTxt(CInt(strVal))
        End If
    End If

    If Not strEnd Then requestTxt = Mid(requestTxt, InStr(requestTxt, ")") + 1)
Loop

End Function

In other words, you want an accessor with a "path" argument.
Something like XPath ?

In other words, you want an accessor with a "path" argument. Something like XPath ?

That might be exactly what I am looking for! Is there an example of using XPath (or something similar) with this project that I could reference? I originally was using another project that supported it natively in their project, but it had other compatibility issues: https://medium.com/swlh/excel-vba-parse-json-easily-c2213f4d8e7a

@sombies thanks for the pointer to that article. A nice simple implementation of a JSON parser in VBA. I would also like to point out for those people using Excel 2016 or later you can use Excel's built-in JSON parser, which is found in Power Query, and write a Power Query to produce a table in Excel. Using the example JSON from the article @sombies mentioned:
{
 "data" : {
   "receipt_time" : "2018-09-28T10:00:00.000Z",
   "site" : "Los Angeles",
   "measures" : [ {
      "test_id" : "C23_PV",
      "metrics" : [ {
          "val1" : [ 0.76, 0.75, 0.71 ],
          "temp" : [ 0, 2, 5 ],
          "TS" : [<PHONE_NUMBER>336,<PHONE_NUMBER>408,<PHONE_NUMBER>420 ]
        } ]
     },
  {
          "test_id" : "HBI2_XX",
          "metrics" : [ {
          "val1" : [ 0.65, 0.71 ],
          "temp" : [ 1, -7],
          "TS" : [<PHONE_NUMBER>433,<PHONE_NUMBER>541 ]
          } ]
     }]
  }
}

The following Power Query will transform that JSON into an Excel table:
let

    location = "U:\Workbooks\Examples\json-example.txt",
    contents = File.Contents( location ),
    document = Json.Document( contents, TextEncoding.Utf8 ),

    test = Table.FromRecords( { document[data] } ),

    measures = Table.ExpandListColumn( test, "measures" ),
    measurement = Table.ExpandRecordColumn( measures, "measures", { "test_id", "metrics" } ),

    metrics = Table.ExpandListColumn( measurement, "metrics" ),

    metric = Table.ExpandRecordColumn( metrics, "metrics", { "val1", "temp", "TS" } ),
    metric.val1 = Table.ExpandListColumn( metric, "val1" ),
    metric.temp = Table.ExpandListColumn( metric.val1, "temp" ),
    metric.TS   = Table.ExpandListColumn( metric.temp, "TS" ),

    chg.types = Table.TransformColumnTypes
    (
        metric.TS,
        {
            { "receipt_time", type datetimezone },
            { "site",         type text         },
            { "test_id",      type text         },
            { "val1",         type number       },
            { "temp",         type number       },
            { "TS",           type number       }
        }
    ),

    result = chg.types

in result

The Excel table will look like:

receipt_time
site
test_id
val1
temp
TS

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
0
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
0
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
0
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
2
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
2
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
2
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
5
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
5
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.76
5
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
0
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
0
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
0
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
2
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
2
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
2
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
5
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
5
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.75
5
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
0
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
0
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
0
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
2
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
2
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
2
1538128818420

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
5
1538128801336

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
5
1538128810408

09/28/2018 10:00:00
Los Angeles
C23_PV
0.71
5
1538128818420

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.65
1
1538128828433

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.65
1
1538128834541

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.65
-7
1538128828433

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.65
-7
1538128834541

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.71
1
1538128828433

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.71
1
1538128834541

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.71
-7
1538128828433

09/28/2018 10:00:00
Los Angeles
HBI2_XX
0.71
-7
1538128834541

@sombies, a comment on the function you wrote. You could use a VBA ParamArray instead of a string to specify the path elements to the value you want. Additionally, I would suggest returning a Variant so number values are returned as numbers and not strings. Lastly, I would consider renaming your function to JsonValue since it could return elements of a Json Array or properties of a Json Object. For example the proposed changes would look like:
MsgBox JsonValue(jsonResult, "features", 1, "attributes", "ASSET_ID")

Public Function JsonValue(json As Object, ParamArray path() As Variant) As Variant
End Function

Your implementation can also key off the fact that when the value of the path item is a string you are accessing a VBA Scripting.Dictionary object (Json Object) and when the value of the path item is a number you are accessing a VBA VBA.Collection object (Json Array).


Use BufWriter/BufReader for reading/writing files

It's being used here, so it should be used elsewhere. This should help with reading/writing CSVs/JSONs/etc that can be slower to serialise/deserialise.

LGTM! Thanks @joshuataylor!


Draft: Epson projector

This PR will:

Resolve #29

Having a quick read now. To provide some further reading on **options, that's a use of splatting.
TL;DR it can be used as a continent way to forward an arbitrary set of keyword arguments around. It was used a lot in the previous Ruby drivers, but would recommend avoiding it unless absolutely needed here as it can lead to some sloppy type signatures.

Hi @KimBurgess , upon going through this comment In Gab's PR I thought it'd be a good idea to implement Hash instead of splat. However, this is not allowed since splatting in drivers is mostly used in
queue(**({
      name: command,
    }.merge(options))) do
...
end

and queue's method is defined in placeos-driver/src/placeos-driver.cr as follows (line 114-117)
  # Queuing
  def queue(**opts, &block : Task -> Nil)
    @__queue__.add(**opts, &block)
  end

which disallows anything but splats and NamedTuple in the argument.

That options forwarding can stay out of these initial driver implementation, then can add this down the track when / where appropriate.
For some further info, you can't splat a hash in Crystal. You could in Ruby, but this breaks when we introduce types and the safety they provide. Within crystal you can think of a double splat as some syntactic sugar.
Say we have the following method:
def foo(a : String, b : Int32)
  # ...
end

We can call this via
foo a: "hello", b: 42

But if we also had those params ready to go somewhere else in a NameTuple, the following is equivalent.
x = {a: "hello", b: 42}
foo **x

The also works in the opposite direction
def bar(**kwargs)
  p! kwargs
end

bar a: "hello", b: 42
#=> {a: "hello", b: 42}

This is the same for *var, which expands or captures Tuples to/from positional params too.


support sliding panes

https://twitter.com/klaudioz/status/1523348237100339201?s=21&t=CsJWz2w7CqHoB-akOVzRBQ

tested with Excalidraw 1.6.30 and ExcaliBrain 0.0.11 seems to be resolved.


rake tasks for comparing Excel files

Comparing either two directories or two individual Excel files for differences. When comparing either way, any differences are outputted to FIRST-diffs and SECOND-diffs files which are best reviewed by an external diff tool.
Example usage:
bundle exec rake bonnie:compare_excel_files<EMAIL_ADDRESS><EMAIL_ADDRESS>
Compare two directories:
bundle exec rake bonnie:compare_excel_exports FIRST=frontend/ SECOND=backend/

Pull requests into Bonnie require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable ("N/A") and :white_check_mark:.
Submitter:

[X] This pull request describes why these changes were made.
[X] This PR is into the correct branch.
[X] JIRA ticket for this PR: https://jira.mitre.org/browse/BONNIE-1540
[x] JIRA ticket links to this PR
[X] Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
[X] If UI changes have been made, google WAVE plug-in has been executed to ensure no 508 issues were introduced.
[X] Tests are included and test edge cases N/A
[X] Tests have been run locally and pass (remember to update Gemfile when applicable)
[X] Test fixtures updated and documented as necessary ( see internal wiki )
[X] Code coverage has not gone down and all code touched or added is covered.

In rare situations, this may not be possible or applicable to a PR. In those situations:

Note why this could not be done or is not applicable here:
Add TODOs in the code noting that it requires a test
Add a JIRA task to add the test and link it here:

Branch
Back End Coverage
Front End Coverage

master
[Paste Output Here]
[Paste Screenshot Here]

[New Branch]
[Paste Output Here]
[Paste Screenshot Here]

[X] Automated regression test(s) pass

If JIRA tests were used to supplement or replace automated tests:

[X] JIRA test links: N/A
[X] Justification for using JIRA tests: N/A
[X] JIRA tests have been added to sprint N/A

Reviewer 1:
Name: @losborne

[x] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[x] The tests appropriately test the new code, including edge cases
[x] You have tried to break the code

Reviewer 2:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

This is failing rubocop and tests.


Revert "Add handling for no ref being provided"

Reverts jupyter/repo2docker#128
It looks like shallow clones are a lot more hairy than we realized.
We discovered the following:

We currently have no way to figure out if a clone is shallow or not.
An option has been added to rev-parse (why rev-parse?!) but that's
too new and not in any packaged git.
If your repo has under 50 commits, it will not be shallow!
If you try to run git fetch --unshallow on a non-shallow repo it is a fatal error

Second part of the revert will be part of https://github.com/jupyter/repo2docker/pull/120


cargo-fmt cleans up /// cargo-doc-tables

Describe the problem you are trying to solve
cargo-fmt leaves doc tables with whatever bizarre spacing was typed in.
Describe the solution you'd like
max and center contents within the typed table when cargo-fmt is run
Notes
cargo-doc supports tables: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#tables

Thanks for the report, would you mind moving it to https://github.com/rust-lang/rustfmt/issues?  rustfmt is the tool that drives the formatting.

Done


Forward SubmitOrderErrors from app to coordinator

Fixes https://github.com/get10101/meta/issues/269.
It's just a start, but we should be able to build on this.
Example
User runs into this error twice:

Database looks like this:
orderbook=# select * from reported_errors;
 id |                           trader_pubkey                            |                            error
----+--------------------------------------------------------------------+-------------------------------------------------------------
  1 | 0315bb4b3561fc219c2ace72018600049a556ad788db430318cdeedd76a4281634 | DLC channel not yet confirmed: has 0 confirmations, needs 1
  2 | 0315bb4b3561fc219c2ace72018600049a556ad788db430318cdeedd76a4281634 | DLC channel not yet confirmed: has 0 confirmations, needs 1
(2 rows)

🤔 That's pretty cool, but do we really need this for errors that are returned by the coordinator? Couldn't we just report the error already on the coordinator side, before having a round trip over the app? Note, most errors are anyways returned via the OrderbookMessage::TraderMessage > TradeError. We could simply subscribe to that message on the coordinator as well and store it to the database when thrown.
More interesting would be the errors that are produced on the app that are not known to the coordinator.

Hmm, but only the Orderbook error variant comes from the coordinator. The rest are local to the app.
We can filter out those variants if you prefer.
In any case, this PR is just a start. I agree that there are more interesting errors that are not yet captured by this PR.


batch_update_presentation suddenly throwing errors when passing replace_all_shapes_with_image requests

Background
I have an application which, very similar to this guide, creates presentations based on a template. Up until a few days ago, it's been working swimmingly.
Problem
On Dec 15, my app started failing with errors like:
Google::Apis::ClientError: badRequest: Invalid requests[8].replaceAllShapesWithImage: The operation is not allowed on notes page element g12bc5ef721_2_5

After some debugging, I determined that this error only occurs if I am trying to merge images by setting replace_all_shapes_with_image. If I remove that bit, the error disappears.
Normally, I would assume this is a bug in my code. But, oddly, I don't seem to have changed anything during the time frame when the issue arose.
Also, if it's helpful, I've been using the latest version 0.9.20 the entire time

This appears to be an issue or change with the Slides API itself, not the client. Recommend using the support options at https://developers.google.com/slides/support instead.
My hunch though is whatever text you're searching for appears in the speaker notes and it's trying to do the shape replacement on the notes, which isn't allowed.

Thanks for the advice!
For future reference, this problem resolved itself after upgrading from version  0.9.20 to 0.12.0. Must have been a short-lived bug in the Slides API.


feat: make cognito userpool id optional for headless mode

Description of changes
Makes the Cognito Userpool Id optional for headless API commands. Enables you to setup both Auth and API both from the CI/CD pipelines.
If no Auth has been added to the project yet it will kick back with a proper error by default.
Issue #, if available

Description of how you validated changes

Ran yarn test
Ran a CI/CD pipeline w/ and w/o Auth added

Checklist

[x] PR description included
[x] yarn test passes
[x] Tests are changed or added
[x] Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #7820 (eadea6f) into master (af66811) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #7820   +/-   ##
=======================================
  Coverage   52.71%   52.71%
=======================================
  Files         550      550
  Lines       27702    27702
  Branches     5361     5361
=======================================
  Hits        14604    14604
  Misses      12115    12115
  Partials      983      983

Continue to review full report at Codecov.

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


Update sbt-docker to 1.10.0

Updates se.marcuslonnberg:sbt-docker from 1.9.0 to 1.10.0.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "se.marcuslonnberg", artifactId = "sbt-docker" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "se.marcuslonnberg", artifactId = "sbt-docker" }
}]

labels: sbt-plugin-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #266.


refractor service worker

When we open view-source:https://webpack.js.org/guides/, we expect dist/guides/index.html that generated by webpack with webpack.ssg.js to be returned. But /app-shell/index.html is returned at the moment, which means we're not taking full advantage of those static html files.
The problem here is because/guides/ path was not precached hence it falls back to /app-shell/index.html  according to https://github.com/webpack/webpack.js.org/blob/master/webpack.prod.js#L65 (EDIT, seems I'm not the only one misunderstood navigateFallback https://github.com/GoogleChrome/workbox/issues/1988).
It's a bug introduced here https://github.com/webpack/webpack.js.org/pull/3963 when replacing offline-plugin with workbox-webpack-plugin. And I have to agree with @montogeek here https://github.com/webpack/webpack.js.org/pull/3000#issuecomment-490403726:

Services Workers are hard.

This pull request tries to fix the problem with InjectManifest, and hope I can make it right this time.

Got a weird issue in CI https://travis-ci.org/github/webpack/webpack.js.org/jobs/741364115#L283:
setup compilation HtmlWebpackPluginTypeError: Cannot read property 'Compilation' of undefined
    at compiler.hooks.thisCompilation.tap (/home/travis/build/webpack/webpack.js.org/node_modules/html-webpack-plugin/index.js:210:26)
    at Hook.eval [as call] (eval at create (/home/travis/build/webpack/webpack.js.org/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:64:1)
    at Hook.CALL_DELEGATE [as _call] (/home/travis/build/webpack/webpack.js.org/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/home/travis/build/webpack/webpack.js.org/node_modules/webpack/lib/Compiler.js:915:30)
    at hooks.beforeCompile.callAsync.err (/home/travis/build/webpack/webpack.js.org/node_modules/webpack/lib/Compiler.js:957:29)
    at Hook.eval [as callAsync] (eval at create (/home/travis/build/webpack/webpack.js.org/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:40:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/travis/build/webpack/webpack.js.org/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/home/travis/build/webpack/webpack.js.org/node_modules/webpack/lib/Compiler.js:952:28)
    at compiler.hooks.watchRun.callAsync.err (/home/travis/build/webpack/webpack.js.org/node_modules/webpack/lib/Watching.js:113:19)
    at Hook.eval [as callAsync] (eval at create (/home/travis/build/webpack/webpack.js.org/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)

Oops, we have a problem https://github.com/GoogleChrome/workbox/issues/2493 now:

Uncaught ReferenceError: regeneratorRuntime is not defined


Refactor Approvers-Storage

Refactor approvers storage to use new Message-Hashes
Store approvers in the TX processor.

Renamed Approvers to Children


Use standardized advantages in trpo.

The TRPO implementation calculates standardized advantages but then it doesn't use them. This fixes it.

I suggest this change be pulled in. The current TRPO results with the baseline code as is, are unsatisfactory. I think more work needs to be done to fix them, but this is at least one thing needed to align with the TRPO code.

Wow, good catch. D'oh.


Maximum policy size of 10240 bytes exceeded for role

Describe the bug
I am getting the following error when trying to push:
Maximum policy size of 10240 bytes exceeded for role sussd-20190224131557-authRole (Service: AmazonIdentityManagement; Status Code: 409; Error Code: LimitExceeded; Request ID: 5137ecee-941e-11e9-8ab3-8d65e5cd294e)

I have manually added permissions to allow me access to the VPC that has my Aurora Serverless database on it as follows (VpcConfig & ec2 actions) everything else is generated by amplify:
{
  ...
  "Resources": {
    "LambdaFunction": {
      ...
      "Properties": {
        ...
        "VpcConfig": {
          "SecurityGroupIds": [
            "sg-xxxxxxxx"
          ],
          "SubnetIds": [
            "subnet-xxxxxxxx",
            "subnet-xxxxxxxx",
            "subnet-xxxxxxxx"
          ]
        },
        ...
      }
    },
    "LambdaExecutionRole": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        ...
        "Policies": [
          {
            "PolicyName": {
              "Fn::Join": [
                "-",
                [
                  {
                    "Ref": "AWS::StackName"
                  },
                  "UseDBPolicy"
                ]
              ]
            },
            "PolicyDocument": {
              "Version": "2012-10-17",
              "Statement": [
                {
                  "Effect": "Allow",
                  "Action": [
                    "ec2:CreateNetworkInterface",
                    "ec2:DescribeNetworkInterfaces",
                    "ec2:DetachNetworkInterface",
                    "ec2:DeleteNetworkInterface"
                  ],
                  "Resource": "*"
                }
              ]
            }
          }
        ]
      }
    },
    ...
  },
  ...
}

I currently have 21 functions on the go, 12 of which have these permissions added. I can get away with ~13 functions before the policy limit is exceeded. I have the functions split over 5 API Gateways reasonably evenly (3 - 4 endpoints on each).
Expected behavior
Be able to push to AWS without exceeding policy character limits.
Desktop:

OS: Mac
Version: 10.14

Thoughts:
After a quick read I see that a few people had this issue with serverless, and serverless implemented this: https://github.com/serverless/serverless/pull/6212, is there anyway to do something similar?

@RickCraig The policy limit seems to be from the IAM and yeah the solution you mentioned isn't ideal. I would opening up a support ticket with IAM out here - https://forums.aws.amazon.com/forum.jspa?forumID=76

Hi guys. Check out my blog post which explains this issue and how to work around it by modifying your amplify cloud formation templates. https://ziggy6792.github.io/posts/amplify-lambda-dynamodb/#potential-maximum-policy-size-issue-when-running-amplify-push


Use MemCache (instead of GCS)

If #325 is implemented, then the payload will transit via GAE first, before reaching GCS.
We may save a few hundreds of ms (to be benchmarked against alternative) by :

putting it in MemCache
dispatching the GAE GET resource URL
putting it in Datastore or GCS, for safety fallback in case of cache miss.

For such short-lived resource (<10mn), it is not mandatory to leverage GCS.

Will need to reimplement Content-disposition filename, expiring URLs logic, etc., in GAE instead of GCS.

We must make sure that writing to MemCache is faster that writing to GCS, otherwise it is not worth it.

A memcache data value cannot be larger than 1MB.
For larger resources, the GAE logic will need to chunk into many memcache entries and recombine them at retrieval.

Memcache is not really an option anymore in App Engine 2nd gen runtimes. Would need a replacement.


How to avoid "CUDA out of memory"

Hi,
Thank you for your great work! Now when I run train.py using the example data(creature I get the following error and I want to know if this script can be run using a single RTX3090 with 24G VRAM?
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 320.00 MiB (GPU 0; 23.70 GiB total capacity; 22.26 GiB already allocated; 89.44 MiB free; 22.32 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Look forward to your reply! Thnaks!

Hi,
I did not try it on RTX myself, but, can you please try to use xformers by adding --enable_xformers_memory_efficient_attention flag when executing the training script?
You may need to install the package first first via pip install xformers.

Hi ,
Eventually I solved it by (1) using 8-bit Adam, (2) set none grads, not it works, thank you!

Great. Thanks for the update.

Hello @Lilyo
Could you please share what hardware are you training on? I am trying on a machine with 48GB VRAM, generating class images of size 768 x 968 and I get the same error as you even with the suggested optimisation flags.
Works fine if I use 512 x 512 sized images

Hi , Eventually I solved it by (1) using 8-bit Adam, (2) set none grads, now it works, thank you!

Hello, I use the same GPU as you, and still have memory overflow according to your configuration. Can you help me?


Compute license compatibility

Did you consider adding a check that all the licenses are compatible?

Same question here.

See https://github.com/rust-lang/rfcs/issues/1396

a blacklist would be neat nonetheless


make_index_dict（）

“For mapping between phoneme and index, you need to add , , ”
I do not know how to do it. Does anyone know?

this comment:  For mapping between phoneme and index, you need to add , ,


Remove SpecialPlace model

Looks like we're not using it at all.

There's a handful of other models that look like might not be used (e.g. Quote or Hotel) - the following command ran from a django shell will list all tables that have no rows:
from django.db import connection

with connection.cursor() as cursor:
    cursor.execute("select name from sqlite_master where type = 'table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE 'django_%' AND name NOT LIKE 'auth_%' and name NOT LIKE 'cms_%'");
    tables = cursor.fetchall()
    for table in tables:
        tablename = table[0]
        cursor.execute("select count(1) from {}".format(tablename))
        row_count = cursor.fetchone()[0]
        if row_count == 0:
            print tablename

Recording project tables currently returned by the query:
conference_presence
conference_attendeelink
conference_mediapartner
conference_mediapartnerconference
conference_eventbooking
conference_specialplace
conference_quote
conference_captchaquestion
p3_ticketsim
p3_ticketroom
p3_hotelroom
assopy_useridentity
assopy_creditnote
assopy_refundorderitem
assopy_refund

Having had a look at some of them, they seem to be used in quite a few views or dataaccess caching functions, so if those aren't used, that would allow to retire a big chunk of code. @artcz is there any way to query production logs to confirm particular used have not been used?
There's also a handful that at first glance don't seem to belong to any application:
microblog_post
microblog_spam
microblog_postcontent
microblog_trackback


featuremerge proj-proj in post process

Proposed changes
this pr guarantees that the physical plan does not contains consecutive physical projects.
Like rewrite rule "merge projects", it works on physical plan, not logical plan.
@morrySnow @sohardforaname PTAL
@sohardforaname I am not sure this pr breaks your previous pr on merge-projects
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.73 seconds
load time: 435 seconds
storage size:<PHONE_NUMBER>5 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221201101613_clickbench_pr_56172.html

It seems OK if ut and p0, p1 pass. Take it easy and change it as your idea.


Shipments cost

Hi,
Thanks for your work, it's very helpful.
I have some issues with the Shipments cost... because it's "calculated directly" into a variable shipment_total...
shipment_total is calculated into Spree::OrderUpdated::update_shipment_total method:
order.shipment_total = shipments.sum(:cost)

The problem is that the cost is calculated into the current order currency...
so if I want to change the shipment_total I have to add define the cost into "all supported currency"?
In fact I don't know how to "solve" this problem...
How shipments are created? When? just after the user enter is shipping address?
What's shipping_rate?
How all this stuff work together?
Really, this time, I'm lost. Thanks for your help.

Hi Matthieu,
I was facing similar problems, namely while changing currency during delivery. Before transitioning to delivery the cost per shipment is already calculated, so when we change currency, shipping cost has to be recalculated.
I added a small snippet in set method of currency controller namely,
update_totals if current_order.state.eql? 'delivery'
and I defined a private method
def update_totals       current_order.create_proposed_shipments       current_order.set_shipments_cost  end
this solved my shipping cost problem, I guess this method only works for flat rate.
For shipping calculator, i defined a new type of calculator called CustomFlatRate, where in i did the conversion based on what exchange rates did the admin set.
eg: 1 EUR = 1.5 USD
then during shipping cost calculation i basically did  n(USD) * exchange_rate .
hope this helps and you come up with better approach.

Hi,
Thanks for your answer, in fact... your snippet doesn't change anything...
After few researches on why and how... I see that:
It seems that some calculators use Spree::Config[:currency] by default...
class Calculator::FlatRate < Calculator
    preference :amount, :decimal, default: 0
    preference :currency, :string, default: ->{ Spree::Config[:currency] }

I thought that when the calculator is used, it will use the "order/shipment currency"... but seems not.
Cause if I change the Spree::Config[:currency] into the CurrencyController::set method, it's working well.
Now I need to know how to change it to uses the session[:currency], into the calculator? how?...
Thanks again, investigations continue...

Glad you are able to figure it yourself. :)
If you are planning to create a new Calculator, i suggest you edit
compute_package for the calculator
in this definition, you will be able to get the currency of the order through
 package.order.currency
Assuming your default currency is USD, now you need to basically get the shipping cost  in USD and apply relevant exchange rates, which you can define in your general settings through preferences  or install a gem that would give you the current exchange rates..

For shipment methods with calculators such as flat rate that take amount, we should have prices for each currency.

@priyank-gupta @damianlegawiec @Mafi88 What are your thoughts? Thank you.

@aishmita-aggarwal i agree with you. I am facing same problem. We can't define right now different value for each currency on calculator. We need it same as we have with products etc. so this feature is missing in this extension.

we can override like this perhaps.
`module Spree
module Calculator::Shipping
class FlatRate < ShippingCalculator
  preference :currency_USD_amount, :decimal, default: 0
  preference :currency_AED_amount, :decimal, default: 0

  def self.description
    Spree.t(:shipping_flat_rate_per_order)
  end

  def compute_package(_package)
    self.send("preferred_currency_#{Spree::Config[:currency]}_amount")
  end
end

end
end`


feat: Add SkipDelay to delay skipping a segment

Hi there! Thanks for this awesome project. This is actually my first encounter with SponsorBlock, and I actually like it a lot!
However, I found the sponsor segment timing to be very agressive, to the extent that I'd get thrown off guard when it skips. I don't mind watching the first few seconds of a segue, as it actually even helps me mentally prepare for the skip.
Therefore, I added the --skip-delay flag to delay skipping at the start of a segment. Let me know what you think!

Thank you, this is a great idea! PR looks good, but could you update the flag documentation by running:
go run ./internal/generate/docs

Also, this doesn't block a merge, but maybe change the shell completion values to something smaller like "500ms", "1s", "2s"?

Done, and done!

Amazing. Thank you!


Search bar: capacity dashboard

The search bar on top of facilities table in capacity dashboard does not work.
Try searching "Aster"

@aparnacoronasafe
can you give some clear example with screenshot ?
i am unable to reproduce the bug 😅

Uploading Capacity Dashboard Bug.mov…
@abhinandanarya06


Nominatim NULL address

Hi all,
I have successfully installed Nominatim in my own server and it worked perfectly in my country "Tunisia".
For example when I made a request for a reverse geocoding like this one :
("http://xxxxxxxxxxxxxxxxxx/html/nominatim/reverse.php?format=json&lat=35.693050401732215&lon=9.749336242675781")
It gives me this result :
{"place_id":"118105","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"way","osm_id":"34340131","lat":"35.6580777","lon":"9.7777964","display_name":"RN 12 طو, Ain Zena, Kairouan, Tunisia","address":{"road":"RN 12 طو","village":"Ain Zena","state":"Kairouan","country":"Tunisia","country_code":"tn"}}
The problem is that the address is empty with Traccar 3.3 using the following configuration :
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>http://xxxxxxxxxxxxxxxxxx/html/nominatim/reverse</entry>

I dont know if traccar support the arabic language ?
Do you have any idea ?
Thanks.

Why did you remove ".php" at the end? It should be part of the URL.

I get NULL address also when I used reverse.php, I tried also to disable the firewall but nothing changed ! I think that I have to check the log file.

I think the only option would be to debug the code.


Allow uppercase Latin letters in database names

Closes https://github.com/FerretDB/FerretDB/issues/2451.
As uppercase letters are allowed, we should remove a diff test for it.

I need to look into this.

@rumyantseva CI should be fixed soon so we can merge this.


Mouse Mode

It would be nice if some users could point and click to navigate, select, and open files similar to a regular GUI file browser. Keyboard bindings are the ideal to learn, but I feel this would lower the barrier to using the terminal to a lot of people, and hopefully they would start learning keyboard bindings over time (especially since some keyboard usage to e.g. delete/move selected files would still be necessary).
It would also be nice if this didn't conflict with tmux mouse mode.

It probably won't be done for a while, but it's a really good idea. It's just that implementing this feature would require a lot of code changes :(

I'm just adding support to the original comment, as I would also find this useful.
Awesome work so far, I really like how it looks.


Commit buffer opened by vim-fugitive causes lazygit to open

Description

With both vim-fugitive and lazy git installed, when trying to commit using vim-fugitive, lazy git is opened as well, even when I hadn't triggered it at all.
To Reproduce
Here are the steps to reproduce the behavior using MINRC:

Install fugitive and lazygit plugin
Open a fugitive git commit buffer using :Gcommit

Expected behavior
What is expected to happen:
If committing with vim fugitive it shouldn't also open a lazygit buffer if the commit wasn't initiated by lazygit.
I think this issue occurs because of this line. I think if there was a check here to see if lazygit was opened maybe by setting a variable to check in that autocommand before opening lazygit again. So when lazygit is opened you can set a let g:lazygit_open=1 and when it is closed set it to 0 and check that
Screenshots

Desktop (please complete the following information):

nvim --version:

Thanks for the detailed report! I didn't think about that. I'll open a PR now.

I haven't tested the branch yet, I'll check it I'm at a computer again in a few hours.


CB-18702 Fix cdp-freeipa-healthagent IndexError by creating the missing file on RHEL8

It is a workaround as cdp-freeipa-healthagent should not depend on a file what might missing (and it is missing on RHEL8). Final solution should be a fix in the healthagen. Instead of a string magic on top of the filename it should consume the service name form a different source in a failsafe way.

@lacikaaa As I wrote, I'm going to create a ticket for the owner team to have a proper solution instead of a string magic on top of a file name what might missing so we will revert this workaround.

@lacikaaa https://jira.cloudera.com/browse/CB-18754


Auto-sync failing in Staging

Auto-sync appears to be failing while synching accounts in the staging app.

Combining accounts from different networks(test-main) while doing collective sync is leading to this issue. In order to resolve it we've abandoned auto-sync for the test account.

Verified this issue on staging app v1.9.5(330)


Integration with homebridge

Hi,
I use homebridge https://github.com/nfarina/homebridge to control my Nest thermostat and also have the homebridge-yamaha https://github.com/neonightmare/homebridge-yamaha plugin working.
The problem is that the homebridge-yamaha plugin only supports basic commands (on/off and source on zone1) but I need it to support multi-zone, volume and source and it needs to work with homekit.
I'm not sure what I can do to help (i'm not a developer) but I think the options are:

further development of homebridge-yamaha to implement some of the functionality of yamaha-nodejs
development of yamaha-nodejs to interact with homebridge

I would like to know if there are other options and to understand the best (and easiest) way to progress this.
Any help or advice greatly appreciated.

yamaha-nodejs supports multiple zones. homebridge-yamaha is a wrapper around yamaha-nodejs to add support for homebridge, so option 1 is the way to go.
You can wait until someone resolves the issue or try it yourself ;)
https://github.com/neonightmare/homebridge-yamaha/issues/4

thanks for the link/info.
Good to know that homebridge-yamaha already uses yamaha-nodejs but i'll have no chance of being able to do this myself. I'm amazed I even managed to get homebridge working at all. haha
My brother is a developer so he might be able to help me.


doc(ci): clarify containerfile

Our single container file has many steps, and very few comments right now. It would be good to have more clarity into what is happening and why for when future changes and improvements can be made.

This issue is stale because it has been open 45 days with no activity. Remove stale label or this issue
be closed in 7 days.

This issue was closed because it was stale


Is it any easy way to create a form at center of the page (horizontally and vertically) ? Tried workaround and that worked. But not concrete solution.

Steps
<Grid verticalAlign="middle" centered style={{height: '100%'}}>
<Grid.Column style={{backgroundColor:'red'}}>
 Center at page
</Grid.Column>

Expected Result
Actual Result
Version
x.y.z
Testcase

This is a question best served by stackoverflow

Could you refer any stackoverflow thread for this purpose

https://stackoverflow.com/questions/tagged/semantic-ui-react?sort=votes

@riteshnus I answered your question over on SO. Additionally, for anyone else who might land here, all of the same layout examples that appear on SUI are also replicated in our docs here for SUIR under Layouts.


UP-4727 : Managing uPortal running on several servername with CAS

Checklist

[*] the individual contributor license agreement is signed
[*] commit message follows commit guidelines
[*] tests are included
[ ] documentation is changed or added
[ ] message properties have been updated with new phrases
[ ] view conforms with WCAG 2.0 AA

Description of change

Upgrade from the previous Pull Request: https://github.com/Jasig/uPortal/pull/689
This PR is needed when you are deploying a multi-tenant uPortal instance working on several server name. In that case the connexion URL should be adapted to the serverName accessed. As example when the user access to https://servername.edu/uPortal the cas auth url is like https://cas.servername.edu/cas/login?service=https://servername.edu/uPortal/login.
But on an other servername like https://othername.edu/uPortal the service should change to https://cas.servername.edu/cas/login?service=https://othername.edu/uPortal/login.
So this PR:

Provide a configurable way to set the current uPortal serverName to cas service URL:
Providing also a decorator to be able to set WAYF parameters depending on condition like current serverName. I'm using a such decorator on some serverName where we need to bypass the WAYF. or to add a generated token (this token generator is not provided as internal, but could be added by bean configuration)

I have to watch on how to get processed the login url into oidc issuer. Any idea ? I would need the curent request or maybe registering into auth session object the URL.

I'm not sure I quite understand the use case you are going for.
My best guess that you want the url access the front end code, for that including the Url as a user attribute and custom claim would work.

The problem with my commit is that issuer have the default url from uPortal.properties, the URL isn't processed by my Customizer and so the url isn't good into oidc attributes like the issuer (which is set from uPortal.properties)

I've updated the commit informations about the use case.


Is there a way to reset the motion controller 's position when
I turn on this flag UnityEngine.XR.InputTracking.disablePositionalTracking = true; ?

Duplicate of #1376. Closing this in favor of that one with more discussion and a bug report.


Use as a ShapeBorder directly

How can I use your plugin in the shape property of a showModalBottomSheet ?
More globally, how can we use your shapes directly as ShapeBorder ?
For know it looks like with HAVE to use a ShapeOfView Widget, with is not always wanted...
Thanks !

Sorry, I missed the ShapeOfViewBorder !
Perfect :)


olfaction tile revamp via backend logic

okay! so, i discovered while finishing up my version push to catch up to TES' personal tourguide that TES added a new olfaction/turtlesex tile that is technically superior to what ezan has in recent runs, but i like the way ezan made her more large-scale logic, and i want to figure out a way to get to TES' tile by using the olfaction task generator that ezan already made. the tile TES has is:
//Olfaction
RegisterResourceGenerationFunction("OlfactionGenerateResource");
void OlfactionGenerateResource(ChecklistEntry [int] resource_entries)
{
	if (!lookupSkill("Transcendent Olfaction").have_skill()) return;
    // Title
        string main_title = "Olfaction sniffing";
		string [int] description;

		// Entries
		int olfactionSniffs = clampi(3 - get_property_int("_olfactionsUsed"), 0, 3);
		monster olfactionMonster = get_property_monster("olfactedMonster");
		monster turtleSexMonster = get_property_monster("_gallapagosMonster");

		description.listAppend(HTMLGenerateSpanFont("oh yes my dear....sssnnnnnnnnnnnniiiiiiiiffffffff....quite pungent indeed...", "green"));
		description.listAppend("Day 1: Writing desk, dirty old lihc, smut orc screwer?");
		description.listAppend("Day 2: Bob, grop, idk something else.");
		description.listAppend(HTMLGenerateSpanFont(olfactionMonster, "green") + " is currently being tracked.");
		if (turtleSexMonster != $monster[none]) {
			description.listAppend(HTMLGenerateSpanFont(turtleSexMonster, "purple") + " is currently being turtlesexed.");
		}
		resource_entries.listAppend(ChecklistEntryMake("__skill Transcendent Olfaction", "", ChecklistSubentryMake(olfactionSniffs + " Olfaction sniffs available", "", description)).ChecklistEntrySetCombinationTag("olfaction").ChecklistEntrySetIDTag("Olfaction queue manipulation"));
}

whereas the ezandora olfaction task generator that includes lots of good logic (that we can add to!) is within sets, in Olfaction.ash (located here). this is really just used to remind users to use sgeeas if on the trail is active, which obviously is useless now, but i think the overarching targeted monster structure can be implemented into a tile like TES built. any thoughts fellow devfolks?

tes has added a great list of queue manip sources to the wiki. we can use this to help guide tile dev here
https://kol.coldfront.net/thekolwiki/index.php/Adventure_Queue#Queue_Manipulation_sources


How to get guidance.pt

https://github.com/neulab/guided_summarization/blob/a8956dfe5e77650aae9015bc3c569ef03d224dac/bert/example_add_guidance.py#L13

Hi, as in README, this is an example of how to add guidance signals into the dataset, and you can extract any guidance signals you want. In the repo, highligted_sentence_data.py shows how we create the highlighted sentence data from the preprocessed data.

Hi, as in README, this is an example of how to add guidance signals into the dataset, and you can extract any guidance signals you want. In the repo, highligted_sentence_data.py shows how we create the highlighted sentence data from the preprocessed data.


Failed to open cropped image pickImageResult.jpeg

Hi,
First I like to thank you for creating this library. However I have an issue using this lib in my app.
I have some images in RAW folder of my app and I can load them to CropImage using following code.
Resources res = getResources();
Uri resUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE +
                        "://" + res.getResourcePackageName(resId)
                        + '/' + res.getResourceTypeName(resId)
                        + '/' + res.getResourceEntryName(resId)
                );
CropImage.activity(resUri)
.setGuidelines(CropImageView.Guidelines.ON)
.start(TestActivity.this);

After cropping on onActivityResult method, I use an InputStream to read cropped image using following code.
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == AppCompatActivity.RESULT_OK) {
            Uri imageUri = CropImage.getPickImageResultUri(this, data);
            Log.i(TAG, "onActivityResult: " + imageUri);
            try {
                inStream = getContentResolver().openInputStream(imageUri);
            } catch (Exception e) {
                Log.i(TAG, "onActivityResult: EX " + e.getMessage());
                finish();
            }
        }

but it gives me following error.
/mnt/sdcard/Android/data/com.my.app/cache/pickImageResult.jpeg: open failed: ENOENT (No such file or directory)
I checked this file path and there is no file called pickImageResult.jpeg there either.
Yes I have both WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE permission in manifest file.
Tried on Android 4.1.1 and 6.0 but both time same error.
Any idea why this is happening?
Thanks.

Thx.
CropImage.getPickImageResultUri is for selecting image for cropping, not for the resulted cropped image, you need to call CropImage.getActivityResult like it described in step 3:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
       CropImage.ActivityResult result = CropImage.getActivityResult(data);
       if (resultCode == RESULT_OK) {
           Uri resultUri = result.getUri();
       } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
           Exception error = result.getError();
       }
   }
}

Awesome. Working just fine. Thank you for quick response.


Parameters for dependent bundles aren't passed

Describe the bug
Originally described on a related issue.
I'm unable to pass parameters to dependent bundles as demonstrated in the wordpress examples. Passing parameters works as expected when passing directly to a local or tag-based top-level bundle, just not when piping those through to the child bundles. This repro repo gives more detail.
To Reproduce
Repo with the test case is here. Steps to reproduce the behavior:

create a simple child bundle that accepts parameters and publish it:

name: cnab-exec-component
version: 0.3.0
invocationImage: ***/cnab-exec-component:v0.3.0
tag: ***/cnab-exec-component:v0.3.0
dockerfile: Dockerfile.tmpl

parameters:
  - name: environment
    type: string
    default: dev
  - name: somearg
    type: string
    default: foo
...

Create a parent bundle that passes parameters to that child, calling the child bundle by tag:

name: cnab-parent-component
version: 0.1.0
invocationImage: ***/cnab-parent-component:v0.1.0
tag: ***/cnab-parent-component:v0.1.0

parameters:
  - name: somearg
    type: string
    default: baz
  - name: environment
    type: string
    default: qa

dependencies:
  exec-child:
    tag: brandoconnor/cnab-exec-component:v0.3.0
    parameters:
      somearg: "{{ bundle.parameters.somearg }}"
      environment: "{{ bundle.parameters.environment }}"
...

Install the parent bundle:
$ cd cnab-parent-component
# executing the bundle with environment=prod
$ porter install --param environment=prod
Executing dependency exec-child...
executing install action from cnab-exec-component (bundle instance: cnab-parent-component-exec-child)
Testing variable IO within dependency
{
  "action": "install",
  "environment": "dev",
  "somearg": "foo"
}

Expected behavior
I expect the parent to pass parameters to dependent bundles as declared. As it stands, only the defaults on the child bundle are ever passed. If a required variable is on the child bundle, I believe it's impossible to pass.
Version
porter version
porter v0.23.0-beta.1-8-g2eb38e9 (2eb38e9)

Thanks for the bug report. This was something that we had to deliberately break a while back and haven't gone back and fixed (not because we don't care! Just lack of time/people)
Here's the issue to watch for updates: https://github.com/deislabs/porter/issues/800

Following the latest changes, it looks like #976 solves one part of the issue here. I tested this out in my repro repo, and indeed, outputs from dependency bundle installs can be passed to root bundles now 🙌  nice on! Big thanks!
What remains? It turns out there's more than one feature request/bug wrapped up in this issue. Let me know if either of these should be split out to independent issues:

passing dependency outputs to the root bundle as an input. - this is done and working in the latest releases
passing dependency outputs to other dependencies as inputs - demonstrated here.
passing parameter inputs to dependencies - repro on this line

Looking at the level of involvement to fix the previous issue, I don't think I stand a chance at a PR for either of the above, but if you think either of those are simple additions, share your vision on how it could look.

Thanks, for the confirmation! I have created https://github.com/deislabs/porter/issues/1002 to track opening up templating to the dependencies section.
As you say, transitive dependencies would be cool but we aren't ready to commit to that yet so let's look at these other solutions first.

I'm going to close this issue since the original reported problem has been resolved and we will track the other concerns in separate issues. Please feel free to open up new issues or leave comments so that everything is captured!


Guide on exporting scene from COLMAP

Hi! I have some troubles exporting point cloud from COLMAP to compatible with ADOP format.
Here is what I did:

Autoreconstruction in COLMAP (both sparse and dense)
File > Export As > as .ply
preprocessed it with colmap2adop tool
started training
got an error that my point cloud file does not contain normal data
I checked that your .ply files have normal data in headers, but I struggle to make COLMAP include it in mine

So the .ply point cloud from COLMAP does not have normals?

It doesn't

This is weird. The dense point cloud from COLMAP does usually have normals. Do you run an old version maybe? Or did you export the sparse point cloud by accident?

I opened fused.ply and it contains nx, ny, nz values it looks like normals, but previous time I tried to set point_cloud_file in comap2adop to fusion result it went to endless loop

Yes fused.ply is the correct file you should use. What do you mean by endless loop? At which point does it get stuck? For large point clouds colmap2adop converter can take a few minutes to complete.

At removing duplicate points
https://github.com/darglein/ADOP/blob/51fbf9e1e0acbe2fc051ad353a45480181c3e394/src/lib/data/SceneData.cpp#L80
I waited for more than 30 mins... I tried to run it on some of example scenes and it really took minute or so. So I thought I use wrong file.

I found this in output of colmap2adop:
Num Point3D 68762
Num         = [116]
Min,Max     = [-nan,-nan]
Mean,Median,Rms = [-nan,-nan,-nan]
sdev,var    = [-nan,-nan]
dynamic range: -nan

Is it ok?
And it is still executing..

So, now the problem is that for some reason RemoveDoubles function takes a lot more time than on example scenes.
It also worth noting that my scene is 5 times smaller than yours.

I would like to take a look at your fused.ply point cloud and see why preprocessing it takes so long. Can you upload it somewhere and send me the link?

UPD: fixed it by passing path to original images directory to --image_dir.
I found this in output of colmap2adop:
Num Point3D 68762
Num         = [116]
Min,Max     = [-nan,-nan]
Mean,Median,Rms = [-nan,-nan,-nan]
sdev,var    = [-nan,-nan]
dynamic range: -nan

Is it ok?

Thanks for pointing that out. This was a bug and is now fixed in the latest commit.

Link to my .ply
In meantime, in UnifiedMesh.cpp, in RemoveDoubles function I printed the size of vector, returned from RadiusSearch.
It is equal to 272339 sometimes, so I guess it causes O(n^2) complexity.
https://github.com/darglein/saiga/blob/0d6d033bf88a01ca674c15fb5907d6f5346fa12e/src/saiga/core/model/UnifiedMesh.cpp#L439-L484

I made a work-around for this issue. I'd ask you to check that I haven't broken anything :eyes:
std::vector<int> to_merge(NumVertices());
    std::vector<bool> processed(NumVertices(), false);

    std::vector<int> to_erase;
    std::vector<int> valid(NumVertices(), 0);

    KDTree<3, vec3> tree(position);
    for (int i = 0; i < position.size(); ++i)
    {
        if (processed[i]) {
            continue;
        }

        auto ps     = tree.RadiusSearch(position[i], distance);
        bool found  = false;
        to_merge[i] = i;
        for (auto pi : ps)
        {
            if (valid[pi])
            {
                to_erase.push_back(i);
                to_merge[i] = pi;
                found       = true;
                break;
            }
        }
        if (!found)
        {
            valid[i] = true;
            for (auto pi : ps)
            {
                if (!processed[pi]) {
                    to_erase.push_back(pi);
                    to_merge[pi] = i;
                    processed[pi] = true;
                }
            }
        }
        processed[i] = true;
    }

It is quite strange that from 1955964 points I get 23659, but there really might be a lot of duplicates

It looks like remove doubles is not broken.
The problem is that Assimp is not able to load your point cloud correctly. A simple workaround for now is to open the pointcloud with meshlab and select File -> export mesh -> Select Color, Normal, Binary Encoding -> Ok
After that Assimp is able to lead it correctly.

Great thanks! It finally works, I managed to start training :sunglasses:

So, for those who have similar questions, footage processing pipeline:

Create new project in COLMAP

Start autoreconstruction ~and go watch film or something~

run colmap2adop tool:
./build/bin/colmap2adop --sparse_dir <sparse/0 in your project folder> --image_dir <your original footage dir> --point_cloud_file <find fused.ply in your project folder> --scale_intrinsics 1 --render_scale 1 --output_path <ADOP dir>/scenes/<your scene name>

Note, that you want to set render_scale to <1 to fit images to gpu memory, but value depends on initial images scale and your gpu

@darglein can you explain what scale_intrinsics does, please

you can train ADOP on your data now!

@DenShlk Thanks for the instructions. I will add this those to the readme once all bugs are fixed.
I have just updated to use the latest saiga+assimp version a1f02196dd48e3a51a0f0eda21924f27fa0f690f. @DenShlk could you please check if colmap2adop can process the raw COLMAP point cloud now?
(make sure to do a recursive submodule update after the pull)
scale_intrinsics is another way to increase training speed and reduce memory consumption. Let's say COLMAP was run on 2000x1000 images then the intrinsic parameters from colmap fit to this image size. If you set scale_intrinsics=0.5 then the intrinsic parameters will be scaled to fit images of 1000x500.  In some cases this is better than render_scale because the DataLoader has to read less bytes from disk and needs to do less processing.

Hi! Sorry for delay.

@DenShlk could you please check if colmap2adop can process the raw COLMAP point cloud now?

I checked it, it works perfectly. Thanks!
I'd also asked you to consider using optimization for RemoveDuplicates function I suggested above, because at the moment computing time of it depends on how close are points relatively to distance parameter. (e.g. if you pass distance=1000 so almost all points should be deleted, it will do  number_of_points^2 steps.

Hi! I try to build my scenes with COLMAP,but when i run colmap2adop,it said "Assertion 'std::filesystem::exists(img_file)' failed!"
but i check the path,the image files are existence，and the path is also correct，how can i solve this problem?

The converter did not find images.bin in the sparse directory. Please check if this file exists on your provided path.

the images.bin is exsist in the sparse directory,but i copy the image directory and sparse directory from another computer,does this matter ?

I find it was caused by a Wrong file organization，thank you ！


rename foreach to foreachRS to avoid conflict with QT foreach macro

QT defines a macro called foreach that causes a compile error when trying to build librealsense in a QT application.
issue captured here on the librealsense wiki page:
https://github.com/IntelRealSense/librealsense/issues/1059
@dorodnic please take a look.

The build fails because python.cpp in relying on the free-function.
If you prefer I can fix it myself.

For anyone working with QT, up-to-date merged and compiling version of this PR is available here:
github.com/dorodnic/librealsense/tree/cgpadwick-foreach_rename
I'm not merging it yet, because this is technically an API change, thus will be merged into 2.19 rather then upcoming 2.18.1

Hi,
I'm still having this problem but I have V2.22 and it was supposed to be resolved in the 2.19. There is an update about solving this issue in a permanent way @dorodnic ?


Fix handle_legacy_interface when passing strings

Hopefully fixes https://github.com/pytorch/vision/issues/5058. This does remove the warning but @pmeier please double check that this doesn't have undesired side effect!

Good catch, thanks. Since this seems to be the only case where pretrained can be a string, I hardcoded it in the check.
Now both of these raise a warning (instead of failing before the last commit)
keypointrcnn_resnet50_fpn("legacy")
keypointrcnn_resnet50_fpn(pretrained="legacy")