istio-ctl proxy-status  constantly shows diffs

Describe the bug
istioctl proxy-status shows Envoy instance as fully synced:
$ istioctl proxy-status
PROXY                                      CDS        LDS        EDS               RDS        PILOT                            VERSION

monkeynetes-69f85c5749-rbw9c.monkeynetes   SYNCED     SYNCED     SYNCED (100%)     SYNCED     istio-pilot-5c8c66d8ff-r2m4n     1.0.2

istioctl proxy-status monkeynetes-69f85c5749-rbw9c.monkeynetes constantly displays diffs (for a hanful of different routes each time) between itself and Pilot. The diff as shown below is actually the same config however ordering of items in requestHeadersToAdd is different:
                         "route": {
                            "cluster": "outbound|80||app.e2e-381-deploy-dont-purge-existing-rels.svc.cluster.local",
                            "timeout": "10.000s",
                            "requestHeadersToAdd": [
                               {
                                  "header": {
+                                    "key": "x-envoy-max-retries",
+                                    "value": "10"
+                                 }
+                              },
+                              {
+                                 "header": {
                                     "key": "x-envoy-retry-on",
                                     "value": "gateway-error,connect-failure,refused-stream"
-                                 }
-                              },
-                              {
-                                 "header": {
-                                    "key": "x-envoy-max-retries",
-                                    "value": "10"
                                  }
                               }
                            ],
                            "maxGrpcTimeout": "10.000s"
                         },

Expected behavior
Routes should be identified as matching.
Steps to reproduce the bug

Pilot with PILOT_DIRECT_EDS enabled
Have Istio enabled pod
Have another service w/ a matching VirtualService:apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: app
  namespace: e2e-381-deploy-dont-purge-existing-rels
spec:
  hosts:
  - app
  http:
  - appendHeaders:
      x-envoy-max-retries: "10"
      x-envoy-retry-on: gateway-error,connect-failure,refused-stream
    route:
    - destination:
        host: app
      weight: 100
    timeout: 10s

istioctl proxy-status <pod> incorrectly shows diffs
Possibly related? https://github.com/istio/istio/pull/10177

Version
Istio:
Version: 1.0.4
GitRevision: d5cb99f479ad9da88eebb8bb3637b17c323bc50b
User: root@8c2feba0b568
Hub: docker.io/istio
GolangVersion: go1.10.4
BuildStatus: Clean

Kubernetes:
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.7-gke.11", GitCommit:"fa90543563c9cfafca69128ce8cd9ecd5941940f", GitTreeState:"clean", BuildDate:"2018-11-08T20:22:21Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}

Installation
via Helm, context: #3720
Environment
GKE, cos
Cluster state
Can provide if needed.

cc @ericvn

Not sure whether this fits here, but I'm defining the following VirtualService in 1.1-rc.0 for httpbin:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: httpbin
  namespace: default
spec:
  gateways:
  - httpbin-gateway
  hosts:
  - httpbin.org
  http:
   - appendHeaders:
      x-envoy-max-retries: "10"
      x-envoy-retry-on: gateway-error,connect-failure,refused-stream
    match:
    - uri:
        prefix: /
    retries:
      attempts: 5
      retryOn: 5xx
    route:
    - destination:
        host: httpbin
        port:
          number: 8000

But when I check the config_dump endpoint for the istio-proxy deployed with httpbin, I cannot find any of either the headers or the retries in such config:
# kubectl exec -ti httpbin-54f5bb4957-m7v7r -c istio-proxy -- curl localhost:15000/config_dump

    {
     "version_info": "2019-02-27T09:34:40Z/91",
     "cluster": {
      "name": "inbound|8000||httpbin.default.svc.cluster.local",
      "connect_timeout": "1s",
      "circuit_breakers": {
       "thresholds": [
        {}
       ]
      },
      "load_assignment": {
       "cluster_name": "inbound|8000||httpbin.default.svc.cluster.local",
       "endpoints": [
        {
         "lb_endpoints": [
          {
           "endpoint": {
            "address": {
             "socket_address": {
              "address": "<IP_ADDRESS>",
              "port_value": 80
             }
            }
           }
          }
         ]
        }
       ]
      }
     },
     "last_updated": "2019-02-27T09:35:43.959Z"
    },

But maybe I'm missing something here.

@emedina your problem is not related to this issue.
You should check the config_dump not of httpbin (the target), but of the istio-ingressgateway pod in the istio-system namespace.  It is that pod which appends the headers as it invokes httpbin.  The implementation of appendHeaders is to have them done by the outbound proxy, rather than the inbound proxy.

@esnible Thanks for the advice. And sorry about the noise.

is this still an issue for 1.1 @ericvn @Evesy ?

I tested again using the master branch my scenario above. I also tested it with more headers (more headers should yield more permutations which would differ causing a diff to appear). I did not see any diffs displayed. I did look through the code to see if I could find anywhere changes where made so the strings would be serialized in a sorted order, instead of random (the problem @esnible mentioned above). I didn't see a specific change although a change could have been made in the libraries we vendor.
For now, I think the problem is resolved (and was probably resolved in 1.1 as well) and will close this issue. It can be re-opened if the problem re-appears.


Add tenant switching test to Key Vault

Relates to #35086 and depends on #35086

[ ] Get #35087 merged.
[ ] Rebase on main after the merge.
[ ] Wait until Azure.Core package is released.
[ ] Restore PackageReference to Azure.Core (back out change to .csproj).

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

https://www.nuget.org/packages/Azure.Core/1.32.0 has shipped.


Support .editorconfig settings

Using hackfest build.
My .editorconfig settings specified:
Change these settings to your own preference
indent_style = space
indent_size = 2
However, when writing code it used the regular VS defaults (4 spaces).
[from codeplex https://nodejstools.codeplex.com/workitem/1878]

Closing this issue. Turns out we get it for free with the Editor Config extension!
https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328


Setting the source HTML in editor

I have been able to add a custom 'Add HTML' button in the toolboar where users can click and a modal window opens where the user can directly enter the HTML string which I then assign to the ReactQuill editor using value property. However when I try to assign the string value as:

It strips out the div tags and replaces them with  tags and then the style which is applied on  tag is also removed. I wanted to have the exact same text rendered inside the editor.

@zeeshanjan82 This is more of a question on how to use Quill. Quill is a text editor, not an HTML editor, so it may not behave exactly as you like when passing inline styles. It does, however, allow you to create custom formats that behave as you want. See https://quilljs.com for docs.

Do it like this,
This demo will show you how to fix ql align class to HTML inline-styles:
  parseToDOM(str) {
    let div = document.createElement('div');
    div.innerHTML = str;
    return div.childNodes;
  }
  handleChange(value, delta, source, editor) {
    let targetList = this.parseToDOM(value);
    let targetListString = '';
    for (let target of targetList) {
      target.classList.forEach((className) => {
        let hit = /^ql-align-(.*)$/.exec(className);
        if (hit) {
          target.style.textAlign = hit[1];
        }
      });
      targetListString += target.outerHTML;
    }
    this.props.onChange(targetListString);
  }


[BUG] no-custom-classname doesn't work with hyphenated group names

Describe the bug
The no-custom-classname hits a false-positive when group names have anything other than [a-zA-Z0-9]
To Reproduce
<element class="group/custom-name">...</element>

  1:16  warning  Classname 'group/custom-name' is not a Tailwind CSS class!  tailwindcss/no-custom-classname

Expected behavior
Should accept anything that is a valid css rule. From my investigation it looks like almost any character except space

Additional research: tailwind uses postcss-selector-parser to escape the section after the group/ and postcss-selector-parser in turn uses cssesc to do the dirty work. It might be an opportunity to use one of those libraries to validate the name section of the the group/ class name.

npm i<EMAIL_ADDRESS>should fix it

Thank you! 🚀

@Binero
this is normal, it follows the New opacity modifier syntax


Production release

Hello,
when do you think to release a version which is ready for production?
Edit:
We tried to install your plugin on my elastic cluster enviroment
when I changed the following option
[2016-08-24 11:49:18,731][INFO ][cluster.routing.allocation.decider] [$HOSTNAME] updating [cluster.routing.allocation.enable] from [NONE] to [ALL]
the node stopped responding and I was also not able to stop elasticsearch.
I could find these entries in the logfile
[2016-08-24 11:57:36,341][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -3.000000, skipping [2016-08-24 11:57:46,440][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -15.000000, skipping [2016-08-24 11:57:56,349][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -13.000000, skipping [2016-08-24 11:58:06,441][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -1.000000, skipping [2016-08-24 11:58:16,346][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -10.000000, skipping [2016-08-24 11:58:26,349][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -2.000000, skipping [2016-08-24 11:59:06,444][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -24.000000, skipping [2016-08-24 11:59:16,344][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -8.000000, skipping [2016-08-24 11:59:26,336][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -50.000000, skipping [2016-08-24 11:59:36,443][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -46.000000, skipping [2016-08-24 11:59:46,335][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -32.000000, skipping
Best

I have released version <IP_ADDRESS>.
It should solve the "Can not increment metric" issues.
Please say me if ES hangs again.

Okay, we tried it today in Docker containers on a test environment and now the ES is not hanging anymore.
Thank you for that. :)
But now we want to figure out, what the query "es_cluster_status" is used for, because it seems that its not working as expected. We tried to stop ES cluster and start again but the "es_cluster_status" always shows 0 as value.
Is there something we need to change?
Best

es_cluster_status depends of the "color" of your cluster
0 => Green, cluster OK all primary and replicas shards present
1 => Yellow, Some replicas shards are missing, but all data is available
2 => Red, Some data is missing :(
When you restarted your cluster, did you check at the same time the url ?
http://<address_of_cluster>:9200/_cluster/health


how generate a new project with angular 2

The latest version of angular-cli generates a new project with angular 4 by default. But I should use only angular 2 on the project.
Versions.
@angular/cli: 1.0.0
node: 6.10.0
npm: 3.10.10
os: Windows 10
Desired functionality.
How can I generate a new project with angular 2?

Hi @Yura13 ,
Currently the cli only supports creation of projects with the latest major release of Angular.

Would the latest cli support creation of projects with angular 2?

No, The last version to support creation of angular 2 projects was rc4.

Thank you


replace screenshots

Hi, I'm an engineer in Japan. Thanks nice app.
I replace screenshot in readme and fix typo. Thanks.

Welcome @senseiphoneX. Thanks for contribution.


Webview sometimes displays blank on launch, until scroll

I noticed this while testing https://github.com/flutter/engine/pull/52532 (with the repro sample from https://github.com/flutter/flutter/issues/146570) but it occurs on main.
Sometimes (not always), the webview just displays blank on launch. As soon as I scroll it it will display properly.

I write webview because I haven't tested with other platform views, but I suspect this would affect any platform view.

@matanlurey Once we figure out the root cause of these two rendering issues, this is probably a good candidate for an integration test.

I did some testing today, to see if some fixes for virtual display issues are included in 3.22 stable. (They are)
I had it show up invisible once, on first boot after app install. However another ~20 retries on the same device didn't reproduce it.
(Samsung S20FE Android 13)
This was using flutter_unity_widget, which is basically a just a platform view hosting a SurfaceView.
I did not catch any logs as I immediately tried to reproduce it. Will report back if I see it again and this issue isn't updated any further.

Do you think this might be related to the #66439?

I am not investigating this and am unlikely to do so.
Someone from the {engine|android} team will need to track down what's going on, and if an integration test or screenshot test could help, I certainly help.


Update READMEs

The main repo README is outdated
The individual tools have no READMEs

Closing this as we do have READMEs now. However, I do think this repo, as compared to other repos we produce, could use some additional context that is usually encapsulated in a CONTRIBUTED.md or a DEVELOPMENT.md, which I'll file separate, targeted issues for.


Add optional progress meters to resource_queue

This will hopefully help with the bug when exiting
a room while the resource_queue preloader is running.
Any touching the queue, even asking if it's ready, will
cause a deadlock or some other kind of stale mutex, so
events are (probably) required for anything to have a chance.

This is clean to go, but take the PR route in case someone wants to comment.


Date after dragging is not accurate

I've tried on both the master branch, and the code here:
https://github.com/frappe/gantt/pull/128/commits/51ea867a7183de2a3ffbafe8568257ad98a71e49
But after dragging a bar, the date (on click) and the date that gets sent back from on_date_change always ends up around 4 - 5 months behind, on the day view, week view, and month view.
Does anyone know what I can do?

I have the same issue, is there a fix for this?

I don't face this anymore - but many related bugs have been fixed in #382 and #387.
Closing this for now, if anything comes up please comment/open an issue.


clicking backdrop of ionicPopup on top of a modal closes modal instead of popup

If i open a modal and then open an ionicPopup, clicking on the backdrop closes the modal instead of the popup.
This is in beta 11

I agree with @rainboxx. This should be fixed.

+1, bitten by this today. backdropClickToClose is not the solution, I do want click-backdrop-to-close behavior with modals, but not when there's an alert or confirmation popup on top of it.

enableBackdropDismiss :boolean | Whether the alert should be dismissed by tapping the backdrop. Default true.


Optimize profile commenting flows

Based on feedback from @michaelsena

[ ] Disabled wall empty state / messaging + image
[ ] Enabled wall empty state - describing the feature "This is your profile wall, a place where to share updates and for others to leave messages"
[ ] Disabled on page but that state is saved in localstate not redux
[ ] If wall is disabled on public profile, just remove the wall option
[ ] API Products is bold when its not active, should just be full color
[ ] unify loading animations
[ ] wall is showing when it shouldnt
[ ] input ui profile picture needs a white background
[ ] Taking long time to fetch wall - see if its bc of the front end
[ ] Links not rendering like other text - make it blue also
[ ] Link unfurling on the wall?
[ ] Following section on mobile font is weird
[ ] Unify tab content on mobile
[ ] Mobile header is above hover on sqeezed dtw state
[ ] Mobile profile description should be centered


Add cortana voice command foreground activation

Allow Cortana to activate apps via voice command or protocol
Supports onActivated path for Voice Command and protocol activation with Objective C delegate handling.  Also adds mocking for Objective C++ classes.

Hi @aballway, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (AJ Ballway). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@Rajesh is added to the review. #Closed

@rajsesh is added to the review. #Closed

@bbowman is added to the review. #Closed

@mnithish is added to the review. #Closed

:clock1:

:clock1:

:clock1:

CI build is successful

The change is now merged to develop


Conflicts when merging with no code written

#2001
Why you no merge?
Halp Plis!

Contributing
You don't.


Promote Multipart to a top-level type with a nested builder.

This creates a model-like API in which individual parts can be read. It also offers the posibility of using this model to parse multipart in the future.
DO NOT MERGE (yet)
Refs #2064.

LGTM


a few issues in keyvault scenario

What happened:

I got following error when try to follow up with guide: https://github.com/csi-driver/blobfuse-csi-driver/blob/master/deploy/example/keyvault/README.md

kubelet, k8s-agentpool-32686255-0  MountVolume.SetUp failed for volume "pv-blobfuse" : kubernetes.io/csi: mounter.SetupAt failed: rpc error: code = Unknown desc = failed to use vaultURL(/subscriptions/b9d2281e-dcd5-4dfd-9a97-0d50377cdf76/resourcegroups/andy-mg1160alpha3/providers/Microsoft.KeyVault/vaults/andytestx), sercretName(sastoken), secretVersion() to get secret: keyvault.BaseClient#GetSecret: Failure preparing request: StatusCode=0 -- Original Error: autorest: No scheme detected in URL /subscriptions/xxx/resourcegroups/andy-mg1160alpha3/providers/Microsoft.KeyVault/vaults/andytestx

following secret config is not necessary in the config
https://github.com/csi-driver/blobfuse-csi-driver/blob/f554f91d2ed1c09de682e106565a99961067f11e/deploy/example/keyvault/pv-blobfuse-csi-keyvault.yaml#L21-L23

My config is like this:
piVersion: v1
kind: PersistentVolume
metadata:
  name: pv-blobfuse
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain #If set as "Delete" container would be removed after pvc deletion
  csi:
    driver: blobfuse.csi.azure.com
    readOnly: false
    volumeHandle: arbitrary-volumeid
    volumeAttributes:
      containerName: public
      storageAccountName: fde1626e2ba5e11e999ae36
      keyVaultURL: /subscriptions/xxx/resourcegroups/andy-mg1160alpha3/providers/Microsoft.KeyVault/vaults/andytestx
      keyVaultSecretName: sastoken

What you expected to happen:
How to reproduce it:
Anything else we need to know?:
Environment:

CSI Driver version:
Kubernetes version (use kubectl version):
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

/assign @ZeroMagic

@andyzhangx
You used the wrong keyVaultURL. What you used was Resource ID. The correct value is DNS Name like https://xxx.vault.azure.net/.

o, let me check and then update the doc, thanks.

verified keyVaultURL should be DNS Name like https://xxx.vault.azure.net/.

btw, pls confirm following config is not necessary:
https://github.com/csi-driver/blobfuse-csi-driver/blob/f554f91d2ed1c09de682e106565a99961067f11e/deploy/example/keyvault/pv-blobfuse-csi-keyvault.yaml#L21-L23
@ZeroMagic

It is unnecessary when using KeyVault.


Update readme

New installation instructions
Expand prose
Move example instructions to readme in example directory.

Looks good; ready to merge after minor fixes above.


Unable to download half of the images from URL given in TextDiffuser

I followed instruction give in readme, however, when I trying to run cmd: img2dataset --url_list=url.txt --output_folder=laion_ocr --thread_count=64  --resize_mode=no
and wait for a while, I got:
worker  - success: 0.548 - failed to download: 0.440 - failed to resize: 0.012 - images per sec: 17 - count: 10000
total   - success: 0.553 - failed to download: 0.435 - failed to resize: 0.012 - images per sec: 16 - count: 4460000
It says about 0.44 images failed. Is there a way to get those images? Thanks for help :)

thanks for your interest in TextDiffuser. Please refer to this dataset download link:
https://huggingface.co/datasets/JingyeChen22/TextDiffuser-MARIO-10M


Jquery error

trying to load it inside document ready but there seems to be an issue.
$(document).ready(function() {

  // Place JavaScript code here...

  var options = {
  valueNames: [ 'name', 'city' ]
};

	var hackerList = new List('hacker-list', options);
});

jquery-3.1.1.min.js:2 jQuery.Deferred exception: Cannot read property 'childNodes' of undefined TypeError: Cannot read property 'childNodes' of undefined
    at Templater.getItemSource (http://localhost:8080/js/lib/list.js:1338:29)
    at init (http://localhost:8080/js/lib/list.js:1307:28)
    at new Templater (http://localhost:8080/js/lib/list.js:1470:3)
    at module.exports (http://localhost:8080/js/lib/list.js:1474:10)
    at Object.start (http://localhost:8080/js/lib/list.js:696:50)
    at new module.exports (http://localhost:8080/js/lib/list.js:904:8)
    at HTMLDocument.<anonymous> (http://localhost:8080/js/main.js:9:19)
    at j (http://localhost:8080/js/lib/jquery-3.1.1.min.js:2:29948)
    at k (http://localhost:8080/js/lib/jquery-3.1.1.min.js:2:30262) undefined
r.Deferred.exceptionHook @ jquery-3.1.1.min.js:2
jquery-3.1.1.min.js:2 Uncaught TypeError: Cannot read property 'childNodes' of undefined
    at Templater.getItemSource (list.js:1338)
    at init (list.js:1307)
    at new Templater (list.js:1470)
    at module.exports (list.js:1474)
    at Object.start (list.js:696)
    at new module.exports (list.js:904)
    at HTMLDocument.<anonymous> (main.js:9)
    at j (jquery-3.1.1.min.js:2)
    at k (jquery-3.1.1.min.js:2)

Hey @mrtinkz what does your HTML for the list look like? IF the error is at Templater.getItemSource, my guess is that there isn't any
 for the list to reference - the List needs to know what each of the list items should look like and can take that in a number of ways (i.e. an example
 in the list, as an a string in the options)

Took the example from the list.js.com

  <input class="search" />
  Sort by name
  Sort by city

Jonny

Stockholm

Jonas

Berlin

Hm, that's odd. I just tested this (albeit with jQuery 3.2.1 instead of 3.1.1, because that's the version that their CDN is currently hosting), and it works fine. Please check this Codepen and let me know if you're able to find any differences.

Gosh it was the jade/pug that wasn't properly formatted which caused all this mess, It's working now, thank you for helping me out.


Adding a detailed json-schema

I saw that you just removed the json-schema, but I believe this schema is a good representation of JSON API and concisely explains the format.

Thanks for this @eneuhauser! I'm going to hold off on merging until we have marked 1.0.

With 1.0 released, will this be considered for merging? This would help when documenting APIs with RAML.

Yes! Can you squash this to a single commit please?

I've been using this schema and updated my version of it now to pass with 1.0 (including your comments @ethanresnick).
Since you did most of the work feel free to update this PR with my gist: https://gist.github.com/slaskis/f4f32beeea0080320e00

@tkellen I've updated the schema to match the new 1.0 format and squashed into a single commit. I validated the schema complies with the example on the homepage using JSON Schema Lint.
@slaskis, thanks for your help. I used your changes to start out, but I did make some modifications based on the current format of the spec. Please let me know if you see any issues.

@eneuhauser happy to help!
I was a bit lazy with the descriptions but I see you took care of that :+1:

@tkellen, I've updated the FAQ with the spirit of the schema definition. I also cleaned up some whitespace issues with the schema if you notice differences there. Please review and let me know if it is sufficient. Thanks!

thanks @eneuhauser!
cc @dgeb @ethanresnick @steveklabnik

I haven't reviewed the schema definition in detail, but it looks like a great start.
I suggest we merge and allow for refinement (if needed).
Thanks so much for your work here @eneuhauser!

Just want to confirm, unless I'm not seeing it, that this schema was manually generated and is not as authoritative as the /format page? e.g. it includes info which isn't there.

Just want to confirm, unless I'm not seeing it, that this schema was manually generated and is not as authoritative as the /format page

Correct. The current schema is non-normative and has a few known issues (see #867)

ref multiple schemas PR for discussion https://github.com/json-api/json-api/pull/1127


wrong in pricing

I got a wrong pricing for ETHUSDT: 150$

I thought that testnet also considers the real price. thanks

There is an easy fix for this, create a client2 with the live APIs when you setup the testnet connection. Then in get_prices query client2 if testnet=true

The testnet has a very limited selection of coins, so testing parameters by pulling the prices from the live net would take a long time as you will not get many trades.


fix: move dependabot file location

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

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

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
6559

Relevant Lines:
7136

💛  - Coveralls


Netlify's rewrite rule doesn't work with fallback pages

Describe the bug
Netlify's rewrite rule doesn't work with fallback pages. It returns 404.
To Reproduce
Steps to reproduce the behavior:

Create next.js app with path like: /posts/:id with fallback: true
Set rewrite rule in _redirects file /posts/:id/:slug         /posts/:id      200
Deploy to netlify
Go to: /posts/1 -> page is rendered
Go to: /posts/1/seo-friendly-name -> page is NOT rendered and we get 404

Expected behavior
The fallback page is rendered correctly for rewrite rules.
Versions

Next.js: 10.1.3
plugin: 3.4.2

If you're using file-based installation

netlify.toml:

[build]
  command = "next build"
  publish = "out"

[[plugins]]
  package = "@netlify/plugin-nextjs"

[context.production.environment]
  NEXT_SERVERLESS = "true"
  NODE_ENV = "production"

@tciesek hey! apologies you're running into this! so unfortunately there's a reason why this doesn't work, and i'll do my best to explain it:
for a page that uses fallback: true, this plugin generates a few necessary redirects, including:
/getStaticProps/withFallback/:id  /.netlify/functions/next_getStaticProps_withFallback_id  200
this redirect is what guarantees that a fallback page gets SSR'd (now served by an ODB so the first response is cached). in your case, we'd generate something like /posts/:id  /.netlify/functions/next_posts_id  200.
worth mentioning that a user's _redirects will always come before the plugin's redirects, but that's not related to the issue here. the issue is that a redirect like /posts/:id/:slug /posts/:id 200 on netlify.toml would depend on the existence of static files at /posts/:id; we'd never hit the serverless function because netlify only processes one 200 redirect at a time and we'd nver get to the plugin-generated redirect that takes us to the required serverless function.
all that said, what you can try is to change your redirect to /posts/:id/:slug /posts/:id 301! which would allow passage to the plugin-generated redirect, but this would drop :slug from the url. if you need :slug let me know and we can figure something else out.
lmk if that works and also lmk if we can document any of this clearer for people in the future who may try to add similar redirects/rewrites of their own!

Have similar issue redirecting / to /home discussed here: https://answers.netlify.com/t/next-js-rewrites-not-working/40017
And can you explain why third party link works (eg: the same copy hosted outside netlify - http://samesite.com/home) but not local path /home
Can't netlify treat this as third party and return what that page returns?

hey @surjithctly! just read that whole thread; sorry for the struggles :'(. i know it's confusing so like i said to @tciesek, i'm totally open to feedback about how we can better document/improve this.
the reason why / can't be rewritten to /home is because, like our support eng wrote, there is no home.html. for 200s, netlify only processes one redirect at a time. so it tries to process that, sees there is no home(.html) and fails, instead of what one might expect, which would be to go look for a /home redirect or another matching redirect, which in your case is /:slug (per https://aws1.discourse-cdn.com/netlify/original/3X/5/d/5d42287db865c69854cd80e4a5f9eac344527c93.png).
did you try /  /home 301!? i understand that's not what you want (you just want a rewrite) but that should at least take you to home.
unfortunately i think the ease of behavior you're looking for just can't be supported with next on netlify, when routes have to be rewritten to /.netlify/functions/whatever. to get your desired outcome, you could try adding /  /.netlify/functions/next_slug  200 and try to check for that slug === / case within your page. not sure if slug would even come in as anything in that case (maybe undefined?) but id play around with it.
lmk if anything doesnt make sense!

Thanks, @lindsaylevine. Adding a redirect is not an option - I need a full slug for SEO and readable link, but I managed to find another solution. I've set up a catch-all route like /posts/[id]/[[...slug]]. This way I'm prerendering the paths with full slug and I got a fallback function for changed slugs or new resources.

lmk if that works and also lmk if we can document any of this clearer for people in the future who may try to add similar redirects/rewrites of their own!

Maybe you could add a warning when rewrite paths overlap in the build message?

@tciesek got it, makes sense. i'm glad you were able to come up with that solution!! 🙏
re: a warning, that's a great idea! i'll def run it by the team. i'm also thinking that, if a user has any custom rewrites/redirects of their own, that we could log something that warns about how certain page types require redirects to their corresponding serverless function and how that could conflict with their custom redirects, maybe link to docs or something. appreciate the feedback!!! 🙏

@lindsaylevine You said its because home is not available. But in my code I have given getStaticProps & getStaticPaths which includes /home So it says next to pre-render all pages. In that case page should be available after build.
But I guess this plugin does not prerender getStaticProps. Why? That is one big benefit of using Next.js.
Another option is to consider /home as third-party and render it. So in the background this rediect would call external site with /home and returns the data. Is that possible?
Thanks so much for your help. really appreciate it.

@surjithctly can you share your getStaticPaths function with us? if you could provide a repo that'd be even better so i can see exactly what's going on in your case. if what you're saying is true, that home.html does exist, then i'm not sure what the issue is.

I have did a test using netlify build and yarn build, both using target serverless, and also fallback:false.
But netlify build does not contain static HTML files, where as yarn build has every files in the serverless option.
My assumption is that once next build is able to generate static HTML, it would work. ie SSG

@surjithctly can you share your repo with me? i'd love to see for myself what's going on

Here's the static paths:
export async function getStaticPaths() {
  const allPages = await client.fetch(pagequery);
  return {
    paths:
      allPages?.map(page => ({
        params: {
          slug: page.slug
        }
      })) || [],
    fallback: false
  };
}

Netlify Out Folder

next Build: .next/serverless/pages

Given access to the repo. @lindsaylevine

@surjithctly can you try commenting out the revalidate setting?

Thanks, that worked. So I guess the issue is with the ISR? I can see the ISR issue is open.
Is this going to fix this rewrite issue once ISR is supported?

@surjithctly yes, the issue is with the revalidate setting. https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/caveats.md#incremental-static-regeneration currently we SSR all revalidate pages, which is why you weren't seeing your prerendered files in your publish dir at first. unfortunately it's unclear at the moment how netlify plans to address revalidate, so i would just continue to follow there. our hope would be that, yes, the rewrite issue gets resolved whenever we  add more/better support for revalidate, but as you can see on this issue, even for fallback pages, this issue can sometimes be unavoidable.

per your report, we will log a warning to users who set revalidate in any of their pages to try to explain some of this so there are less invisible consequences to using revalidate on netlify. @surjithctly


Animated Material Icons

It would be great to enable this as a possible addition to the lib:
https://github.com/balysv/material-menu
The biggest hindrance is that when Titanium properly supports the new AppCompat libs and moves to the arguably better ToolBar widget, this module would break.

The lib seems to support toolbar too, so that shouldn't be a problem.
I just need to think about how this could work together with DrawerLayout.... but theoretically it should be absolutely possible. I'll have a look as soon as I have some time

Speaking of drawer layout, I use this in my native Android apps:
https://github.com/mikepenz/MaterialDrawer
Mike has done an incredible job of making a super great drawer library. If someone wanted to wrap this as a module, it would be super. Alas, I don't have the time myself :(   Perhaps the link will inspire someone though.

omg @Brian-McBride that's awesome! Seems to be impossible do this with Titanium =/

@Brian-McBride I think I'm not going to implement this because:

the lib is old (seems not up-to-date)
trying to avoid another 3rd-party dependency
it's a very special use-case


CLI - generating component with long name results in error

Bug Report or Feature Request (mark with an x)
- [ x] bug report -> please search issues before submitting
- [ ] feature request

When trying to generate a component with a long name, the client simply produces the result undefined. Any attempt to generate components or modules after this point result in the cli outputting undefined. In order to generate modules or components, I need to
rm -r node_modules
npm clear cache --force
npm install

After this point I can create new modules and components in my project, attempting to generate a component with the same name results in the same error.
Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ x ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node --version
v8.11.3

npm --version
6.2.0

ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 6.0.8
Node: 8.11.3
OS: linux x64
Angular: 6.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.6.8
@angular/cdk                      6.4.2
@angular/cli                      6.0.8
@angular/material                 6.4.2
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.8
@schematics/update                0.6.8
rxjs                              6.2.2
typescript                        2.7.2
webpack                           4.8.3

OS: Ubuntu
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 17.04
Release:	17.04
Codename:	zesty

Repro steps
ng g m monitoring

cd monitoring

npm g c monitoring-production-ratio-help-dialog
undefined

The log given by the failure
undefined
Desired functionality
The component should be generated. CLI should continue to work even if the component is not generated.
Mention any other details that might be useful

I had a template in another folder called monitoring-production-ratio-help-dialog.html. After removing this file everything worked as expected.


disable animation on setView, fix #1254

Removes animation from map centering when new layers are added, as a work around to a suspected Leaflet bug in https://github.com/Leaflet/Leaflet/blob/v0.7.3/src/map/anim/Map.ZoomAnimation.js that was causing maps to stall when adding certain data layers, uncovered by @rclark.
Replaces https://github.com/mapbox/mapbox-studio/pull/1269

@samanpwbb @rclark - did you also file a bug report upstream for leaflet?

I couldn't really pin it down, nor did I try to recreate the problem in Leaflet master, where it was clear that some changes had been made to the animation code.

okay, sounds good. I'm going to integrate the animation disabling into the latest update of the mapnik-om upgrade (https://github.com/mapbox/mapbox-studio/pull/1199#issuecomment-86812524)


Fails download of SVT Play video (Traden Berattar S01E05)

Please follow the guide below

You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your issue (like that [x])
Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.16. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

[x ] I've verified and I assure that I'm running youtube-dl 2016.06.16

Before submitting an issue make sure you have:

[ x] At least skimmed through README and most notably FAQ and BUGS sections
[ x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

[ x] Bug report (encountered problems with youtube-dl)
[ ] Site support request (request for adding support for a new site)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):
c:\temp>youtube-dl.exe -v http://www.svtplay.se/video/9170389/traden-berattar/traden-berattar-sasong-1-avsnitt-5/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.svtplay.se/video/9170389/traden-berattar/traden-berattar-sasong-1-avsnitt-5/']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2016.06.16
[debug] Python version 3.4.4 - Windows-10-10.0.14366
[debug] exe versions: none
[debug] Proxy map: {}
[SVTPlay] 9170389: Downloading JSON metadata
ERROR: 9170389: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 544, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 544, in _parse_json
  File "C:\Python\Python34\lib\json\__init__.py", line 318, in loads
  File "C:\Python\Python34\lib\json\decoder.py", line 343, in decode
  File "C:\Python\Python34\lib\json\decoder.py", line 361, in raw_decode
ValueError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\YoutubeDL.py", line 676, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 342, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\svt.py", line 124, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\svt.py", line 14, in _extract_video
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 538, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpxzf4ix2_\build\youtube_dl\extractor\common.py", line 548, in _parse_json
youtube_dl.utils.ExtractorError: 9170389: Failed to parse JSON  (caused by ValueError('Expecting value: line 1 column 1 (char 0)',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Single video:  http://www.svtplay.se/video/9170389/traden-berattar/traden-berattar-sasong-1-avsnitt-5/
Single video: http://www.svtplay.se/video/9026535/traden-berattar/traden-berattar-sasong-1-avsnitt-4 (this URL week ago)

Description of your issue, suggested solution and other information
Failed to parse JSON

I have exactly the same issue. Not able to download anything from SVTPlay. Used to work just fine.

It's also not a geo-restricted issue, since the worldwide-viewable videos also fail. For example, I was still able to fetch the following video on Wednesday, whereas it now fails:
http://www.svtplay.se/video/9184233/rapport/rapport-14-jun-19-30-textat
(These particular videos go offline after 7 days, though, so checking this particular link after Tuesday won't work in any case)
The issue appears that the URL that is used to fetch the JSON (in _real_extract of svt.py) now returns a regular HTML page, rather than only the JSON object. (Similar-looking information seems to be now imbedded in the root["__svtplay"] element in the page's javascript, though)

Hi again, as far as I have tested NONE of the SVT streams are downloadable via youtube-dl.
Executing:
% youtube-dl -v -k -i http://www.svtplay.se/video/8169480/bron/bron-sasong-1-avsnitt-1
give the json_string contains the HTML attached.
json_string.zip

Hi,
Created a patch, attached, that at least handles
% youtube-dl -v http://www.svtplay.se/video/8169480/bron/bron-sasong-1-avsnitt-1.
Regards,
Johan W
svt.patch.zip

Thanks @johan-westin-private I've adapted your patch and SVTPlay should be fixed in the next version.


[textanalytics] fix for 429

The language service returns 429 when there are too many requests. We have our strange response hook policy which returns information on the response, but need to let the request get retried and return a 200 before we should call the user-passed callback.

API change check for azure-ai-textanalytics
API changes are not detected in this pull request for azure-ai-textanalytics


pysonofflan discover: Caught Exception: can't start new thread

pySonoffLAN version: 0.2.1
Python version: Python 3.5.3
Operating System: Raspbian GNU/Linux 9.9 (stretch)

Description
After fresh install, I get an exception: Caught Exception: can't start new thread
Any ideas howto troubleshoot?
What I Did
pip3 install pysonofflan
pi@dj-raspberry3b:~ $ pysonofflan discover
2019-05-01 19:49:38,804 - info: Attempting to discover Sonoff LAN Mode devices on the local network, please wait...
2019-05-01 19:49:38,954 - error: Caught Exception: can't start new thread

No idea what would cause this - are you running in an environment which doesn't allow threading or something?
Additionally, please can you try with the latest version (0.3.0) which has just been released? The async code has been recently improved.

Hi
I installed pysonofflan 0.3.0 on ubuntu 18.04
Python version
/usr/bin/python -> /usr/bin/python3.6
$pip install pysonofflan
$pysonofflan discovery
bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory
Next
add /usr/bin/python3 -> /usr/bin/python3.6
$pysonofflan discovery
pysonofflan: command not found
Next
$unlink /usr/bin/python3.6
$pip3 install pysonofflan
$pysonofflan discovery
pysonofflan: command not found

Fixed by PR https://github.com/beveradb/pysonofflan/pull/95


GAN example cleanup

→ Description 📝
Just a little clean-up of the comments and also I added hiding the button until the model is loaded since it takes a little while and hitting the button beforehand produces an error. @viztopia, does ml5.DCGAN() support preload()?

I will add these to development as well! Thanks Dan!

@shiffman I just checked the src/index.js, and DCGAN hasn't been put into withPreload. Should I go ahead and add a PR for it?

@viztopia thanks! Yes, I think it's nice for us to support preload() as much as possible in ml5!

Hi @shiffman @viztopia:
I took a quick look at this and it seems there's something about the way DCGAN is structured that doesn't allow for it is support preload out of the box. Basically the model doesn't finish loading before moving on to setup().
// Copyright (c) 2018 ml5
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

/* ===
ml5 Example
DCGAN example
=== */

let dcgan;
let outputCanvas;
let button;

function preload(){
  // Load the model
  // There can be multiple pre-trained models (e.g. cats, flowers, etc.), just like SketchRNN
  dcgan = ml5.DCGAN('face');

}

function setup() {
  createCanvas(400, 400);
  // generate on page load
  console.log(dcgan)
  generate();
  // Button to generate an image
  button = createButton('generate');
  button.mousePressed(generate);

}

function generate() {
  // Generate function receives a callback for when image is ready
  dcgan.generate(displayImage);
  console.log(dcgan)
}

function displayImage(err, result) {
  if (err) {
    console.log(err);
    return;
  }
  image(result.image, 0, 0, 400, 400);
}

TypeError: "_this.model is null"
    y index.js:74
    tidy tf-core.esm.js:17
    scopedRun tf-core.esm.js:17
    tidy tf-core.esm.js:17
    Fe tf-core.esm.js:17
    _callee3$ index.js:71
    tryCatch runtime.js:62
    invoke runtime.js:296
    method runtime.js:114
    step asyncToGenerator.js:17
    default asyncToGenerator.js:35
    Promise es6.promise.js:177
    default asyncToGenerator.js:14
    compute ml5.js:50984
    _callee4$ index.js:88
    tryCatch runtime.js:62
    invoke runtime.js:296
    method runtime.js:114
    step asyncToGenerator.js:17
    default asyncToGenerator.js:35
    Promise es6.promise.js:177
    default asyncToGenerator.js:14
    generateInternal ml5.js:51066
    _callee2$ index.js:62
    tryCatch runtime.js:62
    invoke runtime.js:296
    method runtime.js:114
    step asyncToGenerator.js:17
    default asyncToGenerator.js:35
    Promise es6.promise.js:177
    default asyncToGenerator.js:14
    generate ml5.js:50944
    generate sketch.js:35
    setup sketch.js:26
    _setup p5.min.js:3
    _runIfPreloadsAreDone p5.min.js:3
    _start p5.min.js:3
    m p5.min.js:3
    n p5.min.js:3

In chrome:
DCGANBase {modelCache: {…}, modelName: "face", model: null, ready: Promise}
sketch.js:36 DCGANBase {modelCache: {…}, modelName: "face", model: null, ready: Promise}
sketch.js:41 TypeError: Cannot read property 'predict' of null
    at index.js:74
    at tf-core.esm.js:17
    at t.scopedRun (tf-core.esm.js:17)
    at t.tidy (tf-core.esm.js:17)
    at Object.Fe (tf-core.esm.js:17)
    at DCGANBase._callee3$ (index.js:71)
    at tryCatch (runtime.js:62)
    at Generator.invoke [as _invoke] (runtime.js:296)
    at Generator.prototype.<computed> [as next] (runtime.js:114)
    at step (asyncToGenerator.js:17)
index.js:74 Uncaught (in promise) TypeError: Cannot read property 'predict' of null
    at index.js:74
    at tf-core.esm.js:17
    at t.scopedRun (tf-core.esm.js:17)
    at t.tidy (tf-core.esm.js:17)
    at Object.Fe (tf-core.esm.js:17)
    at DCGANBase._callee3$ (index.js:71)
    at tryCatch (runtime.js:62)
    at Generator.invoke [as _invoke] (runtime.js:296)
    at Generator.prototype.<computed> [as next] (runtime.js:114)
    at step (asyncToGenerator.js:17)

Hi @joeyklee ,
I just moved DCGAN into WithPreload, recompile ml5.js, and moved:
dcgan = ml5.DCGAN('face', modelReady);
under preload(), and it worked. Is it because of the callback?
Here's the complete example code:
/* ===
ml5 Example
DCGAN example
=== */

let dcgan;
let outputCanvas;
let button;

function preload(){
  dcgan = ml5.DCGAN('face', modelReady);
  console.log("preload!");
}

function setup() {
  createCanvas(400, 400);
  // Load the model
  // There can be multiple pre-trained models (e.g. cats, flowers, etc.), just like SketchRNN
  // dcgan = ml5.DCGAN('face', modelReady);

  // Button to generate an image
  button = createButton('generate');
  button.mousePressed(generate);
  // Hiding button until model is ready
  button.hide();
}

function generate() {
  // Generate function receives a callback for when image is ready
  dcgan.generate(displayImage);
}

function displayImage(err, result) {
  if (err) {
    console.log(err);
    return;
  }
  image(result.image, 0, 0, 400, 400);
}

function modelReady() {
  console.log('model is ready');
  button.show();
  generate();
}

And here's my modified ml5-library/src/index.js:
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

import * as tf from '@tensorflow/tfjs';
import pitchDetection from './PitchDetection/';
import imageClassifier from './ImageClassifier/';
import soundClassifier from './SoundClassifier/';
import KNNClassifier from './KNNClassifier/';
import featureExtractor from './FeatureExtractor/';
import word2vec from './Word2vec/';
import YOLO from './YOLO';
import poseNet from './PoseNet';
import * as imageUtils from './utils/imageUtilities';
import styleTransfer from './StyleTransfer/';
import charRNN from './CharRNN/';
import pix2pix from './Pix2pix/';
import sketchRNN from './SketchRNN';
import uNet from './UNET';
import CVAE from './CVAE';
import DCGAN from './DCGAN';
import preloadRegister from './utils/p5PreloadHelper';
import { version } from '../package.json';
import sentiment from './Sentiment';

const withPreload = {
  charRNN,
  CVAE,
  DCGAN,
  featureExtractor,
  imageClassifier,
  soundClassifier,
  pitchDetection,
  pix2pix,
  poseNet,
  sketchRNN,
  styleTransfer,
  word2vec,
  YOLO,
  uNet,
};

module.exports = Object.assign({}, preloadRegister(withPreload), {
  KNNClassifier,
  ...imageUtils,
  // DCGAN,
  tf,
  version,
  sentiment,
});

@viztopia I'm afraid it's not as straightforward as this, but it is a start. Technically what preload() should do is remove the need for the callback function inside the model instantiation.
Your modification won't successfully run generate() in setup()  -- an error saying "this.model.predict()" is not a function will be thrown. I suspect that tf.loadLayersModel() doesn't get finished loading and as a result, you don't have a model loaded yet and therefore no way to run your prediction.
I'm also working on trying to get this to work, but it turns out preload isn't waiting for things to load before continuing. Maybe @WenheLI or @NHibiki might have an idea?
On an unrelated but related note:
I've refactored DCGAN a bit here:
https://github.com/ml5js/ml5-library/pull/397
And added and example here:
https://github.com/ml5js/ml5-examples/pull/151
The ^^ above will allow for easier changing of pre-trained models but I suspect there's some things we might want to clean up/set some presets.

@viztopia - this should be working. Please give this a test if you can: https://github.com/ml5js/ml5-library/pull/398


feat: add env input - #25

adds env input (closes cypress-io/actions #25)

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

I’m good with it as is - if users find a problem we will fix it :)
Sent from my iPhone

On Nov 19, 2019, at 17:40, Scott Prue<EMAIL_ADDRESS>wrote:

@prescottprue commented on this pull request.
In dist/index.js:

@@ -1907,6 +1907,14 @@ const runTests = () => {
cmd.push(browser)
}

const envInput = core.getInput('env')
if (envInput) {

 // TODO should env be quoted?

 // If it is a JSON, it might have spaces

 cmd.push('--env')

 cmd.push(envInput)

When entering JSON it should already be wrapped in it's own string right?
For now do you think we should add a note to the README about potential issues or did you want to improve the handling/testing before releasing it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.


CASMTRIAGE-7147: Add BOS v2 max_component_batch_size option

CSM 1.6 PR for https://github.com/Cray-HPE/craycli/pull/155

This adds the option, but doesn't back it up with any code. I don't feel comfortable putting stuff into the API that we don't support.

What code are you wanting added to the CLI repo? It automatically adds the new option from parsing the spec.

This adds the option, but doesn't back it up with any code. I don't feel comfortable putting stuff into the API that we don't support.

What code are you wanting added to the CLI repo? It automatically adds the new option from parsing the spec.

I thought we were in the BOS repository, not the CLI repository. Comment rescinded.


Synonym requests for 'altered metastatic potential' and children

Synonyms
MP:0000858 altered metastatic potential
change in metastasis potential
change in potential to create metastases
MP:0001273 decreased metastatic potential
reduction in metastasis potential
reduction in potential to create metastases
MP:0001272 increased metastatic potential
increase in metastasis potential
increase in potential to create metastases

Because when I searched on "metastas" I found nothing!
Thanks,
Laurens

Added synonyms; used "develop" instead of "create"


npm install (windows)

I fave a fork of the scratch blocks so I could develop it in conjunction with scratch gui, but npm install and npm link are both failing on the scratch blocks fork for me?
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture<EMAIL_ADDRESS>npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>prepublish: python build.py && webpack
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>prepublish script 'python build.py && webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
Do I need to install python or perhaps the install does not work in windows?
Thank you

@griffpatch Would you please post your npm-debug.log?  You do need Python installed, so also curious what happens with python -V.

Here's my log: npm-debug.log.txt
Hope that helps :) - Just to let you know I do now have Python installed and I can run python from the command prompt by typing "python" after I got the paths set up...

Just ran python on it's own with one of your .py scripts and note that I have pythan 3.x not 2.x...  I'll install version 2 instead, but it might be the console I'm running the scripts in that's the issue...?

Yeah, python 2 did the same... It doesn't appear to like the "&&" in "python build.py && webpack" ?
although I also don't like the:
93 warn optional Skipping failed optional dependency /chokidar/fsevents:
94 warn notsup Not compatible with your operating system or architecture<EMAIL_ADDRESS>
This is now python 2.7.13 and it gets to the same place:
35285 verbose stack Error<EMAIL_ADDRESS>prepublish: `python build.py && webpack`
35285 verbose stack Exit status 1
35285 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
35285 verbose stack     at emitTwo (events.js:106:13)
35285 verbose stack     at EventEmitter.emit (events.js:191:7)
35285 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
35285 verbose stack     at emitTwo (events.js:106:13)
35285 verbose stack     at ChildProcess.emit (events.js:191:7)
35285 verbose stack     at maybeClose (internal/child_process.js:877:16)
35285 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
35286 verbose pkgid<EMAIL_ADDRESS>

@griffpatch It appears that the install part did complete successfully, so npm was attempting to do the post-install steps. This includes running prepublish if it exists.  The && there should not be evaluated directly by Windows, since npm passes that through an intermediate process which parses it.  So I'm curious what happens if you run these commands individually? If you run python build.py what happens? And if that succeeds, node_modules/.bin/webpack?

This is what I get when running the python build.py:
~\Documents\GitHub\scratch-blocks [develop ≡]> python -V
Python 2.7.13
~\Documents\GitHub\scratch-blocks [develop ≡]> python build.py
Error: Closure not found.  Read this:
developers.google.com/blockly/guides/modify/web/closure

Aha — on https://github.com/LLK/scratch-blocks/wiki we describe setting up a symlink from ../closure-library to ./node_modules/google-closure-library. This will make closure-library available from the directory above your scratch-blocks directory, which is where the build script looks for it. I believe the syntax for Windows would be mklink /D ..\closure-library node_modules\google-closure-library, but you probably know better on how to accomplish this.

Hey @griffpatch, when you find the exact command to set this up on windows you should post it back here for other people to find.

Yes and we will also update the wiki with that. And maybe put setup instructions directly into our README :)

Ok, I got further after installing closure ;) - But now I have a different
problem!
One of the errors is: Error: EMFILE: too many open files. But there are a
few others too.
See the log below:
$ npm install

<EMAIL_ADDRESS>prepublish
C:\Users\Admin\Documents\GitHub\scratch-blocks
python build.py && webpack

FAILED to create msg\js\constants.js
SUCCESS: msg\js\en.js
WARNING
Misplaced type annotation. Type annotations are not allowed here. Are you
missing parentheses?
core\blockly.js at line 32:
goog.provide('Blockly.Blocks');
^
()
SUCCESS: blockly_compressed_vertical.js
Size changed from 2914 KB to 726 KB (25%).
SUCCESS: blockly_uncompressed_horizontal.js
SUCCESS: blockly_uncompressed_vertical.js
WARNING
Misplaced type annotation. Type annotations are not allowed here. Are you
missing parentheses?
core\blockly.js at line 32:
goog.provide('Blockly.Blocks');
^
()
SUCCESS: blockly_compressed_horizontal.js
Size changed from 2896 KB to 719 KB (25%).
SUCCESS: blocks_compressed_horizontal.js
Size changed from 34 KB to 18 KB (53%).
SUCCESS: blocks_compressed_vertical.js
Size changed from 148 KB to 83 KB (56%).
SUCCESS: blocks_compressed.js
Size changed from 14 KB to 6 KB (43%).
SUCCESS: javascript_compressed.js
Size changed from 18 KB to 12 KB (67%).
SUCCESS: python_compressed.js
Size changed from 11 KB to 5 KB (49%).
SUCCESS: php_compressed.js
Size changed from 11 KB to 5 KB (50%).
SUCCESS: dart_compressed.js
Size changed from 9 KB to 4 KB (45%).
SUCCESS: lua_compressed.js
Size changed from 7 KB to 2 KB (42%).
Error: EMFILE: too many open files, open
'C:\Users\Admin\Documents\GitHub\scratch-blocks\gh-pages\closure-library\closure\goog\dom\classlist.js'
at Error (native)
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture:
<EMAIL_ADDRESS>npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>prepublish: python build.py && webpack
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>prepublish script 'python
build.py && webpack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the scratch-blocks
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     python build.py && webpack
npm ERR! You can get information on how to open an issue for this project
with:
npm ERR!     npm bugs scratch-blocks
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls scratch-blocks
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Admin\Documents\GitHub\scratch-blocks\npm-debug.log
On 17 March 2017 at 20:58, Ray Schamp<EMAIL_ADDRESS>wrote:

Aha — on https://github.com/LLK/scratch-blocks/wiki we describe setting
up a symlink from ../closure-library to ./node_modules/google-closure-
library. This will make closure-library available from the directory
above your scratch-blocks directory, which is where the build script looks
for it. I believe the syntax for Windows would be mklink /D
..\closure-library node_modules\google-closure-library, but you probably
know better on how to accomplish this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/LLK/scratch-blocks/issues/833#issuecomment-287469460,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGbNvoEN1lJM-9XiDcDaW_Se87p6YDCzks5rmvP2gaJpZM4MYnL9
.

Ignore this one:
WARNING
Misplaced type annotation. Type annotations are not allowed here. Are you
missing parentheses?
core\blockly.js at line 32:
goog.provide('Blockly.Blocks');
^
()

and this one:
WARNING
Misplaced type annotation. Type annotations are not allowed here. Are you
missing parentheses?
core\blockly.js at line 32:
goog.provide('Blockly.Blocks');
^
()

I think they're fixed in newer versions of scratch-blocks and blockly.

For the record, I was able to instal the closure library in windows using the instructions on the wiki ln -s $(npm root)/google-closure-library ../closure-library - whether this was because I ran it from the bash shell that comes with the  github client I'm not sure... But it worked.
However, I'm still unable to complete the npm build as I get the error:
Error: EMFILE: too many open files, open
'C:\Users\Admin\Documents\GitHub\scratch-blocks\gh-pages\closure-library\closure\goog\dom\classlist.js'
    at Error (native)

I've read lots of reports of this occurring with other npm projects and that the solution is to use a plugin (graceful-fs) that forces a limit on the number of files that can be opened at once?
Does nobody else get this issue? I guess most people are using macs? I am on windows 10.

Or on Windows 10 I use an Ubuntu VM under Hyper-V.

Here is a suggestion that might simplify the process for instalkling closoure, why don't you use a NPM plugin to create the symlink from ./node_moduoles/google-closure-library to ../google-closure automaticly when it runs prepublish?

Hi @griffpatch do you continue to have issues with npm run build due to this EMFILE error?  @cwillisf Have you seen this before?

Any further info on this?

Sorry, I've not had time to look at Scratch 3 for a while. I did get things
building, but I ran into issues with trying to build the blocks module.
On 24 July 2017 at 07:59, Ken<EMAIL_ADDRESS>wrote:

Any further info on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/LLK/scratch-blocks/issues/833#issuecomment-317335730,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGbNvrjhfz0g9e8CtGPNYLLBR1iVH0QVks5sREC1gaJpZM4MYnL9
.

I also met the problem ,this is what I have done, and it worked:
1）update nodejs 9.8;
2）install webpack in nodejs ；
3）copy google-closure-library  to scratch-blocks‘s parent directory and rename it to closure-library


add description to by-predicate finders

Add an option to provide a custom description to predicate
finders. Without a custom description we default to printing the
predicate function's signature, which is not all that useful.
Use this new option in the driver extension to print the text of the
sought after tooltip.
/cc @abarth @Hixie


Content Suggestion: A Guide To Understanding Bitcoin (bitcoin-explained)

Link to Content: https://www.bitcoin-explained.com
Briefly Describe Content: An introduction to the many different reasons of why Bitcoin is so important. Including a curated list of resources for a deeper learning process.
Suggested Section: Learning (Websites)

Addded Great work


vimPlugins.stay-centered-nvim: init at 2024-04-13

Description of changes
Add stay-centered  Neovim plugin.
Added via the vim-plugins-updater script.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[X] aarch64-darwin

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[X] Fits CONTRIBUTING.md.

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

Result of nixpkgs-review pr 333325 run on x86_64-linux 1

2 packages built:

vimPlugins.stay-centered-nvim
vimPluginsUpdater


support for asio standalone

Hi @anarthal Ruben,
great work, thanks!
There's quite a big community using asio in stand-alone mode without boost. Is boost really needed or would it be possible to make a definition to support compiling without the boost framework and namespaces?
i.e.
#ifdef ASIO_STANDALONE
#define MYSQL_COMPLETION_TOKEN ASIO_COMPLETION_TOKEN_FOR
#else
#define MYSQL_COMPLETION_TOKEN BOOST_ASIO_COMPLETION_TOKEN_FOR
#endif

Thanks and best,
Roman
Update: according to grep, there's just a few includes from boost that are non-asio related, and their functionalities are covered since c++11 by std::*, except - ok - lexical cast, config and endian conversion:
#> egrep -Riohw "#include <boost/.*>"|sort|uniq | grep -v 'boost/asio'
#include <boost/config.hpp>
#include <boost/endian/conversion.hpp>
#include <boost/lexical_cast/try_lexical_convert.hpp>
#include <boost/optional/optional.hpp>
#include <boost/system/error_code.hpp>
#include <boost/system/system_error.hpp>
#include <boost/utility/string_view.hpp>
#include <boost/variant2/variant.hpp>

Hi @ropuls, thanks for your time analyzing this. I think the simplest approach to achieve this would be taking the same path as Boost.Json and enabling two modes for the library:

A standalone mode that requires C++17 (as variant, optional and string_view require it).
A with-Boost mode that requires C++11 and the entire Boost framework.

As you pointed out, there are three libraries that would require consideration:

Config is used to determine the availability of some C++14/17 features, adding extra functionality if they are available (e.g. if std::optional is available, boost::mysql::value gets extra member functions). Requiring C++17 for the standalone mode would suffice.
Lexical cast is used in the implementation of the text protocol (what you use when calling connection::query). I would have to consider what to use instead - efficiency is important here.
Endian is used for integers and floating points. I may be able to implement something myself, but I guess it wouldn't be as efficient as Boost's.

Would the C++17 requirement be okay for your use case?
I can't promise getting this done in the short term as it is a decent amount of work, but I can start considering it before its inclusion in Boost.

Hi @ropuls, thanks for your time analyzing this. I think the simplest approach to achieve this would be taking the same path as Boost.Json and enabling two modes for the library:

A standalone mode that requires C++17 (as variant, optional and string_view require it).
A with-Boost mode that requires C++11 and the entire Boost framework.

As you pointed out, there are three libraries that would require consideration:

Config is used to determine the availability of some C++14/17 features, adding extra functionality if they are available (e.g. if std::optional is available, boost::mysql::value gets extra member functions). Requiring C++17 for the standalone mode would suffice.
Lexical cast is used in the implementation of the text protocol (what you use when calling connection::query). I would have to consider what to use instead - efficiency is important here.
Endian is used for integers and floating points. I may be able to implement something myself, but I guess it wouldn't be as efficient as Boost's.

Would the C++17 requirement be okay for your use case?
I can't promise getting this done in the short term as it is a decent amount of work, but I can start considering it before its inclusion in Boost.

hi @anarthal ,
thanks for considering this change. I guess I (and possibly friends) can help out providing code alternatives to the required boost functionalities, mostly re-directing to std::xxx with c++17.
And yes, if c++17 is the minimum language and library level for a standalone version (makes sense to me), one can:

clearly make decisions ( __has_include ( < filename > ) what optional, string_view etc. to use.
replace lexical cast with std::from_chars in most places, which is IMO way more efficient
handle endianess conversion with a small drop-in replacement, not that hard - as you said.

Efficiency-wise: I'd opt for making it correct, then optimize if needed. I can hardly imagine that i.e. endianess conversion will have any performance impact in real world scenarios (this is basically a std::reverse_copy operation instead of a std::copy ;)
The most annoying part is probably to reorganize namespace declarations and usage. Once a concept is there, some shell scripting can lift major work, but will leave behind some hundred manual fixes before it compiles again. So that part will take some time and patience, but is a one-shot operation. Boost.json and asio's asio/detail/config.hpp are starting points.
Most likely there will be a config.hpp (like in asio) that either globally defines types and namespaces, or do that per type, i.e. have local includes for string_view that branch to the correct type(s).
#ifndef MYSQL_STANDALONE
namespace boost {
#endif

namespace mysql {
#ifdef HAS_STD_STRINGVIEW
using string_view = std::string_view
#else
using string_view = boost::string_view
#endif

#ifndef MYSQL_STANDALONE
} // namespace boost
#endif

If you have the chance to identify and define tasks / TODOs, I'd happily help out and contribute, just let me know where help is needed.
Thanks and best,
Roman

Hi @ropuls, thanks for offering your help. I will break down this in more granular issues during this upcoming week and let you know.

Hi @ropuls, sorry for coming back so late. I have created for you the basics for standalone mode (branch standalone-mode):

I have added an option BOOST_MYSQL_STANDALONE to the CMake. By specifying this, the interface library will be built with -DBOOST_MYSQL_STANDALONE. Instead of finding Boost, standalone Asio will be searched for. As standalone Asio is not available through standard find_package, I have created a CMake finder for it, which gets installed with the library. CMakeLists should not require further changes to support Asio standalone.
I have created boost/mysql/detail/config.hpp, defining the relevant namespaces and other switches. Standalone library defines stuff in boost::mysql, inside standalone inline namespace to prevent ODR clashes (as Boost.Json does). Regular mode defines symbols in boost::mysql namespace (no inline namespace).
I have also created the required files and switches for string_view, optional, variant and error_code.
I have made all required changes in public headers (although I haven't tested it yet).

What still needs to be done:

Apply required changes (switching asio includes/namespace, string_view) in implementation files.
Remove the dependency to Boost.Lexical_cast for standalone mode by implementing the relevant text parsing routines (use std::from_chars).
Idem for Boost.Endian.
Apply the required changes throughout the tests.
Add documentation on standalone mode (I can do this myself).
Add CI builds for standalone mode (I can do this myself).

Some notes for testing:

Boost.Mysql runs 3 kinds of tests: unit tests, integration tests and examples. For the two latter, you require an actual database running in localhost. The easiest way to set this up is to use docker, image anarthal/mysql_8 - have a look to the CI build files for reference.
Tests still require Boost, for the unit test framework. This doesn't affect the ability to use the library without Boost.

It would be great if you can submit a PR with the above items. I can take care of documentation and CI builds, so it's okay if you just make tests pass in your local environment.
If you have any questions or comments please feel free to ask.

Hi @anarthal,
no problem - thanks! I made a first test run through the standalone branch to see what items are most problematic. IDK yet if I can really make that compile clean, but I have the following observations:

lexical_cast: turns out to be a five liner so far with charconv
string_view: requires removing of fully qualified namespaces, i.e. string_view instead boost::string_view
variant: AFAICS the most edgy part to replace with std::variant, IMO requires some major work-arounds
inline namespace standalone does not work for me with gcc10 since detail namespaces are ambiguous. I removed it in the first test-run. Needs to be reviewed.
value_holder: unable to make that compile with std::string_view

We'd first need to get rid of all <boost/...> includes and re-direct to local headers that pull in the right stuff.
Also, another issue that I had overseen arises from boost datetime. Either we need to pull in the stand-alone version from here https://github.com/HowardHinnant/date, use the c++20 version (might be good enough, but loosing the c++14/17 world seems wrong), or have another bright idea. If you agree, I'd suggest to pull in date.h from Howard if he's ok with that or make it an external dependency. What's your opinion here?
Regarding further steps: do you plan to change anything in the standalone branch within the near future or is it 'frozen' unless I show up with a PR?
Thanks and best,
Roman

Hi @ropuls

Can you describe what problems arise from using std::variant? I was expecting it to be an immediate change, as boost::variant2 and std::variant are designed to have an almost identical interface (Boost.Mysql actually used std::variant before boost::variant2).
I would push towards using the inline namespace in the final version (although the initial workaround you describe seems okay to begin), as it's the approach Boost.Json uses. It can be because some instances of namespace boost { namespace mysql { haven't been changed to the BOOST_MYSQL_NAMESPACE_BEGIN yet (as I did it only for the public headers).
If you can link me the build error for value_holder I may be able to aid you.
I'm very surprised for issue with Boost.Datetime, as Boost.Mysql does not use it at any point. It used to employ Howard Hinnant's date, but it was removed because of licensing issues. All datetime manipulations are performed using C++11 std::chrono types. The only thing that may be using that is Boost.Coroutine, required to run the tests with the boost::coroutine completion token. You can try removing these tests by removing the boost::mysql::test::async_coroutine_errinfo_functions and boost::mysql::test::async_coroutine_noerrinfo_functions network functions (have a look inside ./test/integration/network_functions/). It should not be necessary to use the library though; you can try building any of the examples that do not use Boost coroutines.
I'm not planning any immediate changes (this week, at least), so I can consider freezing it while you develop it. Which timing are you considering?

Cheers,
Ruben.

Good day @anarthal
thanks for your feedback. I will come back to the above points once the major refactoring is done.
Mean-while: I am a bit puzzled about the include statements of your header files which are inside the include folder. When they reference internal (boost/mysql/...) headers, this is done this way:
example file: connection_params.hpp:
#include "boost/mysql/detail/config.hpp"
however, to my understanding, that shall either be
#include "detail/config.hpp <- in a local relative way (we currently stand in boost/mysql), or
#include <boost/mysql/detail/config.hpp> in an absolute way
I have double checked with other boost libraries which confirms that the second case would be right, imo.
Can you confirm or elaborate that before I start globally replacing include statements?
Thanks,
Roman

Hi @ropuls,
I usually use quoted includes to mark project-local inlcudes and bracket includes for system/well established includes. So essentially this is a leftover from when the library was not intended to be a Boost library. I do prefer absolute includes with angle brackets, if you do not mind changing them:
#include <boost/mysql/detail/config.hpp>
Thanks,
Ruben.

Hi @ropuls,
How are you doing on this issue? Is there anything I can do to help you?
Cheers,
Ruben.

Hi @anarthal,
thanks for asking! ;) Well, I was able to replace things like lexical cast, endianess etc. and pull in std::string_view and optional, but failed hard with variant and got stuck with thousand of compiler errors in the middle of the transformation. With a recent tremendous lack of time the best I can offer is to provide code parts that replace boost functionalities. However, I sadly won't be able to do the full transmation to non-boost within the near future. If providing parts will help and you'd agree to take the unboostify to your shoulders, we could make some progress though. Let me know and sorry for the poor progress.
Thanks and cheers,
Roman

Hi @ropuls,
If you don't mind please share with me your changes up to now and I will see what I can do.
Cheers,
Ruben.


Revert #10344

#10344 revert, for #10557.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: incfly
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers: fisherxu, greghanson
If they are not already assigned, you can assign the PR to them by writing /assign @fisherxu @greghanson in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS
istioctl/OWNERS
pilot/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Closing because I don't think the appProbe is relevant here.


Monokai dark soda and extract

based on https://github.com/rainje/Monokai-Dark-Soda/commit/d6562374eac3e3b8204b0db3c10cc6f8893bf28b#commitcomment-9712930
when i open psd file from extract, color sheme was changed to darker
http://imgur.com/a/Cp3yB
look for "div" keyword and other syntax hightlight, (i use color picker, so it cannot be idealy)
without extract: FF0B4E
with extract FF007F

God it took me a while to understand the issue. So, the colors scheme gets darker when you open a file in extract, I now see. But I don't think it's a theme related issue but rather an extension related issue. You can see the same thing happens when you use the default brackets dark theme, it gets darker when you use extract. I guess it'll be the same for every other theme. I checked if I could find a css property that change the color when loading a file but i wasn't able to find one. Sorry I think I can't do anything here.


Fixes #2851 typo bug in LLM-generated definitions

Fixes #2851

Edited the file: src/patterns/dosdp-patterns/ExtendedDescription.yaml to fix the typo.
Reran the command: ./run.sh make ../patterns/definitions.owl to update definition.owl.

#gogoeditdiff


Add "flag" option to TimeCrystal

See https://discord.com/channels/403698615446536203/1259904331654889573 for more info. Probably squash merge because of "merge branch.." commit.

Resolved by #51


fix(database): OpenAPI spec for test_connection

SUMMARY
Fixes/updates OpenAPI spec for test_connection
Also updated the entire OpenAPI spec for docs with some feature flags on
ADDITIONAL INFORMATION

[ ] Has associated issue: #11323
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

Codecov Report

Merging #12274 (5bea584) into master (d4a854e) will decrease coverage by 3.62%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #12274      +/-   ##
==========================================
- Coverage   67.17%   63.55%   -3.63%
==========================================
  Files        1002      485     -517
  Lines       49231    29815   -19416
  Branches     5000        0    -5000
==========================================
- Hits        33073    18949   -14124
+ Misses      16035    10866    -5169
+ Partials      123        0     -123

Flag
Coverage Δ

cypress
?

javascript
?

python
63.55% <ø> (-0.65%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

superset/databases/api.py
89.15% <ø> (ø)

superset/db_engines/hive.py
0.00% <0.00%> (-85.72%)
:arrow_down:

superset/db_engine_specs/hive.py
54.61% <0.00%> (-29.62%)
:arrow_down:

superset/db_engine_specs/presto.py
70.56% <0.00%> (-12.78%)
:arrow_down:

superset/db_engine_specs/mysql.py
79.59% <0.00%> (-12.25%)
:arrow_down:

superset/db_engine_specs/sqlite.py
65.62% <0.00%> (-9.38%)
:arrow_down:

superset/utils/celery.py
96.42% <0.00%> (-3.58%)
:arrow_down:

superset/examples/world_bank.py
97.10% <0.00%> (-2.90%)
:arrow_down:

superset/examples/birth_names.py
96.51% <0.00%> (-2.33%)
:arrow_down:

superset/views/database/mixins.py
80.70% <0.00%> (-1.76%)
:arrow_down:

... and 529 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #12274 (5bea584) into master (d4a854e) will decrease coverage by 3.62%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #12274      +/-   ##
==========================================
- Coverage   67.17%   63.55%   -3.63%
==========================================
  Files        1002      485     -517
  Lines       49231    29815   -19416
  Branches     5000        0    -5000
==========================================
- Hits        33073    18949   -14124
+ Misses      16035    10866    -5169
+ Partials      123        0     -123

Flag
Coverage Δ

cypress
?

javascript
?

python
63.55% <ø> (-0.65%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

superset/databases/api.py
89.15% <ø> (ø)

superset/db_engines/hive.py
0.00% <0.00%> (-85.72%)
:arrow_down:

superset/db_engine_specs/hive.py
54.61% <0.00%> (-29.62%)
:arrow_down:

superset/db_engine_specs/presto.py
70.56% <0.00%> (-12.78%)
:arrow_down:

superset/db_engine_specs/mysql.py
79.59% <0.00%> (-12.25%)
:arrow_down:

superset/db_engine_specs/sqlite.py
65.62% <0.00%> (-9.38%)
:arrow_down:

superset/utils/celery.py
96.42% <0.00%> (-3.58%)
:arrow_down:

superset/examples/world_bank.py
97.10% <0.00%> (-2.90%)
:arrow_down:

superset/examples/birth_names.py
96.51% <0.00%> (-2.33%)
:arrow_down:

superset/views/database/mixins.py
80.70% <0.00%> (-1.76%)
:arrow_down:

... and 529 more

Continue to review full report at Codecov.

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


Remove library

I deleted and recreated the Github repository so I can't access the library right now so I want to remove and re-add it

Hi @oguzkaganyaglioglu. It's not clear to me what you are trying to accomplish. Please provide a detailed description.
You are, of course, always permitted to request the removal of your library from Library Manager, but that should only be done if your intention is to permanently remove the library. If you are planning on just adding it back right away, this indicates that your goal is not really to remove it after all.

I can't access the library right now

Why not? I can access it, no problem, so surely you can as well:
https://github.com/oguzkaganyaglioglu/PLCustomDevicesLibrary

I realized that I added secret information to the github repo so I deleted the repository then recreated this repo with the same name and uploaded the new library but now
http://downloads.arduino.cc/libraries/logs/github.com/oguzkaganyaglioglu/PLCustomDevicesLibrary/
when i go to the link

2021/06/12 13:58:52 Scraping https://github.com/oguzkaganyaglioglu/PLCustomDevicesLibrary.git
2021/06/12 13:58:52 Error fetching repository: authentication required
2021/06/12 13:58:52 Removing clone and trying again
2021/06/12 13:58:52 Error fetching repository: authentication required
2021/06/12 13:58:52 Leaving...

I found these errors. So I am thinking if I delete and re-add library it will fix that error

OK, I understand now. Once the Library Manager indexer adds a release to the index, it is stored there unless its removal is requested. You might request the removal of a release that has a problem, such as the one you described.
So what we need to do is remove the release from the Library Manager index, while leaving the library. As long as you have also removed the tag with the problematic content from the repository, as is sounds like you have done, it will be permanently removed from the Library Manager index. Any existing tags will be picked up by the indexer automatically, as usual.
There is no automated system for removing libraries or releases and I don't have access to the data that needs to be removed in order to remove releases (or libraries for that matter). So we'll need to wait until someone with the necessary access is available to help out. Since you don't actually want to remove your library, I will not merge this pull request, but we can keep it open as a way to track your request to remove the current 0.1.0 release from the index.
Please let me know if you have any questions or concerns.

I found these errors.

I think that was a temporary thing caused by the indexer job running during or near to the time you had deleted the repository. I see that in the latest run of the indexer it was able to access your library without any problems:
http://downloads.arduino.cc/libraries/logs/github.com/oguzkaganyaglioglu/PLCustomDevicesLibrary/
2021/06/12 14:58:44 Scraping https://github.com/oguzkaganyaglioglu/PLCustomDevicesLibrary.git
2021/06/12 14:58:44 Checking out tag: v0.1.0
2021/06/12 14:58:44 Release PLCustomDevices:0.1.0 already loaded, skipping

It's been 9 days and still, version 0.1.0 is not removed from the index. When will it be removed?

Hi @oguzkaganyaglioglu Although the submission and indexing processes are automated, the removals and modifications are still manual processes. So it will be done on the next sweep by the index maintainer to clear all the outstanding requests.

The release 0.1.0 has been regenerated.


Optimize get_peaks_and_heights for archival MMR.

This PR is a response to Issue #125
I chose to keep the get_peaks_and_heights_async and place the new functionality inside it rather than in get_peaks because the async function is used 5 or 6 times within the test suite.  I ran the benchmarks before and after the change and obtained the following results:
Master:

My PR:

In multiple runs I noticed the same small but consistent improvement on my machine, its possible that in setups with different tradeoffs between disk I/O and CPU speed, the difference would be more pronounced.

Thanks @zkclay for the PR.  I like the comparative simplicity of this approach.
lgtm, but i will defer to @Sword-Smith on this one.

Let's get rid of get_peaks_and_heights_async all calls to it in test can be replaced by a call to get_peaks, or be deleted entirely.

@Sword-Smith I have gotten rid of the function completely and added the updated benchmark above. I think removing it completely was a good ideas, aside from the speedup, it's satisfying to delete even more code 😄

Thanks, @Sword-Smith1 I will get to work on it! I assume that's the work covered by Issue #127 ?

Thanks, @Sword-Smith1 I will get to work on it! I assume that's the work covered by Issue #127 ?

It is :)


Doc: Add GitHub badges with project statistics and workflow automation

Changes:

Checks in and updates the gather_metadata.py utility as a standard source of "truth" to collect metadata from HoloHub subprojects. Updates the summarize_metadata.py utility to use those results, fixing an issue where that utility previously failed to reflect some metadata from nested folders.
Adds badges to the HoloHub README to reflect the number of applications and operators available in HoloHub. We can add more badges later to reflect other statistics, such as tutorial counts or latest HSDK supported versions.
Adds workflow to automatically update project statistics badges in the HoloHub README. If a branch adds a new project, the README will be updated in a new commit appended to the branch co-authored by a GitHub bot.

README after this change:

Note that we have three options available for how to commit README changes:

(favored) In the contributor's PR branch: Best visibility to contributors and maintainers. Could cause confusion where the upstream branch has one more commit than local, requiring either a pull prior to more development or force-push to override bot commit.
Run workflow in main branch after PR merge and add commit directly to main: May be less confusing for contributors, but more difficult to debug. Risks automatically updating documentation with improper statistics without a human in the loop.
Run workflow in main and create a new PR: May be more confusing for maintainers, requires extra action to keep documentation up to date

@jjomier Please let me know if you have a preference to pursue a different path among these three.

It looks like the auto-commit action is not currently permitted to run in nvidia-holoscan. @jjomier are we able to add an exception?

Per request I've updated the proposed README action to use EndBug/add-and-commit. As part of that investigation I've learned more about the limitations of automatic commits with PRs from forks, as discussed in add-and-commit docs:

Running add-and-commit on pull_request can result in errors if nvidia-holoscan does not have write permissions to update the branch in the user's fork (default), as seen in https://github.com/nvidia-holoscan/holohub/actions/runs/8367432453
It's not clear that running add-and-commit on pull only would allow us to fully police the action to ensure that the README has been updated, as that would depend entirely on the user repo and README workflow results may not show up in nvidia-holoscan PRs. Also, could be confusing for the user if the workflow only runs on their fork.

Based on this, I recommend that we pursue the second option in my comment above, where a new commit may be pushed to main with README updates immediately after a MR is merged. That will keep edits completely within the scope and control of nvidia-holoscan/holohub and out of the user forks, so we never cause unexpected behavior or deal with permissions in the user fork. One caveat of that approach is that we may need additional effort to run CI workflows on the automated commit.
I've tested that in the main branch of my user fork as seen here: https://github.com/tbirdso/holohub/commits/main/
TL;DR: Managing automatic commits and PRs from user forks is tricky. Running directly on main seems to be the best path forward to minimize both risks and complexity.

I like the idea of the workflow that update main. Seems cleaner and we keep control (make sure also that the statistics are coherent).


Train with NeuralNetworkGPU more slower than CPU

What is wrong?
Training with GPU takes too much time ( 2 min for 3000 data )
Where does it happen?
When I try to train with "NeuralNetworkGPU" instead of "NeuralNetwork"
How do we replicate the issue?
you can try to run this code ->
Code:
const abalone = require('./abalone.json');
const {NeuralNetworkGPU} = require('brain.js')

const sexToNumber = (sex) => {
  switch(sex) {
    case 'F': return 0;
    case 'M': return 1;
    default: return 0.5
  }
}

const preparedData = (data, ratio = 29) => {
  return data.map(row => {
    const values = Object.values(row).slice(0, -1);
    values[0] = sexToNumber(values[0]);
    return { input: values, output: [row.rings / ratio] };
  })
}

const shuffle = (arr) => arr.sort(() => Math.random() - .5);
const split = (arr, trainRatio = .75) => {
  const l = Math.floor(arr.length * trainRatio);
  return { train: arr.slice(0, l), test: arr.slice(l) };
}

const prepared = split(shuffle(preparedData(abalone)));

const config = {
  iterations: 5000,
  log: true,
  logPeriod: 20,
};

const net = new NeuralNetworkGPU();
net.train(prepared.train, config);
let totalError = 0;
prepared.test.forEach(item => {
  const output = net.run(item.input);
  console.log(`Expected: ${item.output * 29} Predicted: ${output * 29}`);
  totalError += (output - item.output) ** 2;
});

console.log(totalError / prepared.test.length);

Expected behavior (i.e. solution)
I've RTX 3060Ti & i5-10500 when I try to train with cpu it takes 2-3 sec but when I switch to gpu maybe options same data takes almost 2 min. I believe my GPU is much stronger and faster than my CPU. GPU should more accurate and faster I think
Version information
brain.js: 2.0.0-beta.23
gpu.js: 2.16.0
Nodejs:
node: v16.16.0
Browser:
Brain.js:
brain.js: 2.0.0-beta.23
How important is this (1-5)?
5
Other Comments
Maybe the config is not works on gpu version or I should enable some feature on my gpu. If so, brain.js should at least warn me about this
iterating 20 times each time

abalone.csv U can convert .csv to .json for code if you want

I think I don't have a CPU so it takes an infinite amount of time to train

I have the same thing, only gpu does not work at all, with cpu everything works quietly, I thought it was a problem with nodejs, rewrote to the browser version. Everything is preserved, the browser freezes and everything crashes with gpu, but with cpu everything works. At the same time gpujs itself works fine.

I think I don't have a CPU so it takes an infinite amount of time to train

how the hell your compute can run without a cpu ???


Add Gitpod config

Original PR is closed https://github.com/testcontainers/testcontainers-java/pull/5092
Indexing is working now in prebuild.

@kiview @eddumelendez Could you try again with stable version? A lot of things changed since last year :)