Update indentation.js description

I think you made the same PR twice. Or is there a difference?

Sorry, yes, ignore the second one
Raghav Dua wrote:

I think you made the same PR twice. Or is there a difference?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duaraghav8/Solium/pull/89#issuecomment-316108313,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA-yUALLE-W8pJfV203M3bo0G9S3Hr1fks5sPNRQgaJpZM4ObibF.


Add node_fetch code sample

Hi Erik,
First of all, thank you very much for creating this package. It works great!
The node_request target creates a code sample using the https://www.npmjs.com/package/request package but recently there was an announcement that this will be no longer supported. Hence, it would be great to add/update node code sample using https://www.npmjs.com/package/node-fetch

@hirenoble Glad to hear you like the package!
Under the hood, it actually uses the httpsnippet library, which determines valid targets. I.e., you would have to file this issue with them to add support for other libraries.

Hi @ErikWittern ! We see that https://github.com/Kong/httpsnippet/tree/master/src/targets/node/fetch has been added to httpsnippet, would it be possible to add support for this in openapi-snippet? cc @hirenoble


Show small line next to attachment button

Apparently, people have difficulties with the attachment box. This adds a small line to separate the two buttons. While I was at it, I changed the corners to be a bit more round.
https://forum.k9mail.app/t/default-folder-for-attachments/3931
https://forum.k9mail.app/t/concerning-attachments-embedded-media/359
Before:

After:

This change breaks the UI when image previews are displayed.

From a design standpoint, I don't think slicing the surface apart works very well given that the attachment box can include an image preview. And if we really wanted to do that, we probably can't use CardView. There's still a shadow spanning the whole width.
We could add a (gray) divider that doesn't stretch all the way to the top and bottom of the card.
But I'm not convinced adding a divider would fix the problem. From the experience with Android's notification settings, you know that some people still won't realize that there's two different tap areas.
"Downsides" of adding a separator:

More padding required. Where we previously only needed padding between the text and the save icon we now need padding between the text and the divider and between the divider and the save icon.
When there's a divider, the pressed state of the card probably shouldn't change the background of the save button. This might be tricky to implement (when there's an image preview).

What might help and is very low effort, is to make the save button look more like regular text buttons do, i.e. change the color to black (when using the light theme).
Another thing we could do is replace the save button with a "three dots" button that will display a popup menu containing a "save" option. It could also include an "open" and "share" (see #5913) action.

This requires some design work before an implementation can be attempted.


Tinyproxy HTTPS connection

I have Tinyproxy up and running, it works really great.
Can you confirm that Tinyproxy is using http between client and Tinyproxy communication, therefore the connection between client and Tinyproxy is not encrypted?
It doesn't really matter in home network environment. But it is not advised to use this from outside of home network as a proxy, if I get this correctly.
Looking into Tinyproxy I believe it doesn't do https transparent proxy, so I think this can't be done. The only https transparent proxy would be Squid. If configured as https transparent proxy, than basically it acts a man-in-a-middle to encrypt/decrypt traffic going from client and Squid. Do I get this right?

I think you do! You would need an HTTPS proxy (Caddy with the forward proxy does it too). But it gets quite troublesome to do so as you cannot "forward" an HTTP proxy request from a proxy to another apparently.
The way I'm looking at is to have a VPN server (look at wireguard it's great! I'm working on some Docker images at https://github.com/qdm12/wireguard) in my network so that I can tunnel there and then connect to PIA's Tinyproxy... I know that's a lot of tunneling :smile:

In the end I have setup wireguard without Docker (as it runs in the Kernel space so Docker is sort of pointless). I use it to VPN to my server securely and I can then access PIA's tinyproxy without trouble. Let me know if you would want help setting this up!

I was looking at Wireguard some time ago, but didn't manage to configure it and had no time to investigate further. If you have some time, a guide would be really appreciated. Not a problem that it is not in docker, as it is in kernel - the best. I'm running Ubuntu Server. Thanks for your help!

Ok that was rushed on my phone, but here is a guide for you: Gist guide


How can i use "bump version"

TL;DR
I want to use the manual trigger for workflow with one input "Release Type", which includes 3 options "patch", "minor", and "major". How i can use this input for bump version?
Detailed design
name: New release

on:
  workflow_dispatch:
    inputs:
      releaseType:
        description: 'Release Type'
        required: true
        default: 'patch'
        type: choice
        options:
        - patch
        - minor
        - major

name: release-please
jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v3
        with:
          command: manifest

Additional information
No response

This is not really supported as a one-off forced run. Release-please determines the next release version via conventional commit messages. If you want to force a bump, you can use a commit message with fix, feat, or a breaking change indicator (or using a Release-As: x.y.z as a git commit footer).


Laucher_bat detected by AV's.

Laucher_bat detected by most of the AV's.
Couple of months ago if tested and generate a launcher bat it was FUD. 1/36 or 2/36 max.
But now i see its detecteble by most of the AV's
My quistion is, why?

That's it because of such as you and not FUD you need to use private AV scanners that do not send data

That's it because of such as you and not FUD you need to use private AV scanners that do not send data

I was thinkin the same.I know it is because of people don’t use private AV scanners like us :-(
We must think of something to prevent  it in the future. Anyway thanks for your comment :-)

no distribute doesn't seem to work anymore. I didn't see a currently usable online alternative (that doesn't share results). Any recommendations?

Use private av scanners like antiscan.me or run4me. DO NOT USE VIRUS TOTAL!!!!


Needing to Implement Scan from Scratch

hey @kho, had a question about the the following code block. for context, the shapes come from the build_cache of lattices_test.
--
by the time we reach this point:
init_alpha is of shape (4,5)
blank_weight and lexical_weight is of shape (4, 6, 5). however, it gets permuted via _to_time_major to (6,4,5).
when we scan, we will iterate 6 times, with a final shape of alpha being (4,5). if i understand the code correctly, are we updating alpha every pass in the scan?
you can see my implementation here:
def shortest_distance_step_scan(shortest_distance_step, init, xs):

  t, alpha = init
  blank_weight, lexical_weight = xs

  for i in range(blank_weight.shape[0]):
    (t, alpha), _ = shortest_distance_step(alpha, (blank_weight[i,:], lexical_weight[i,:]))

  return (None, alpha), None

Yes. alpha is [batch_size, num_context_states]. In each scan step, we compute alpha for that input frame t so that after the step alpha[:, q] is the sum of all paths entering state q after observing input frame t.

Thanks.
If I understand the shortest_distance_step correctly, alpha is updated as a matrix, not row by row.
So we do not need to feed in alpha[:q] in the scan, but rather iteratively update the entire matrix. Am I correct in this understanding?

No, we just need the alpha from the last frame.

perfect. got a working solution with minor tweaks. thanks for your help!


Set checkout country to one from shipping address

This also checks if variants in checkouts are available in the shipping zone from shipping country
I want to merge this change because...
Fixes #5780

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

@maarcingebala Yes, I wanted to do #5781 in separate PR but it can be done in this one

I didn't see that issue. It seems very related so I think it should be shipped in one PR.


add query and update manual

This is missing a couple of things

Reply doesn't work because the ic object function is not generated yet
We need to update the bodies of our canister methods to return empty if its a manual query or update.
We need to add the tests after those things are resolved

Point number 1 is resolved with this pull request: https://github.com/demergent-labs/kybra/pull/110

Everything is complete, I just added the tests to the test.ymal so we're just waiting to see those tests pass here, but they pass locally


Issue 215 update alpine

This isn't working yet, hoping to have time soonish, but just wanted to push this out on the radar so that work isn't duplicated.

I think this branch needs to be updated. The first commit has already been integrated into main.
Today I was able to get a Drupal container running PHP 8.1 by starting off with the second commit and then making a few additional changes, mostly to fpm paths ('.txt' extension added so GitHub will upload the file): php81-20220912.patch.txt

I did a bit more PHP 8.1 clean-up. See my working branch: https://github.com/asulibraries/isle-buildkit/tree/asu.

When this is finally testable, note the following issue where in fits doesn't get generated on media creation, one can still generate it by manually applying the action and the bug resides out of this repository's hands, so you can ignore that bit.

In the included test site, there is no search displays setup, that will come at a later date when the following issue is resolved, in the meanwhile you can visit the [solr.islandora.dev] to confirm documents are actually indexing.

Automating the installation of Matomo via the console using ExtraTools is just too unstable and flaky that I don't we can rely on it.

Automating the installation of Matomo via the console using ExtraTools is just too unstable and flaky that I don't we can rely on it.

Oh, bother, I ended up not using ExtraTools anyway but forgot to take it out! 🤦♂

Needed to re-write the plugin to better support the automated test / improving caching and speed up build times.
https://github.com/Islandora-Devops/isle-gradle-docker-plugin/compare/0.11...1.0.1
I can now do a complete clean build (no-cache) ~8 mins on my MacBook, whereas before it took around 35 minutes. With caching, about ~4 mins on my MacBook.

This is why the tests are failing: https://github.com/just-containers/s6-overlay/issues/503, in the meanwhile. I'll raise a ticket to patch when the new release of s6-overlay comes out, and simply ignore when services do not have enough time to react to the SIGTERM. This by and large only effects the JAVA services (ActiveMQ, Fcrepo, etc) which is fortunate in that they are typically the only service running in the container (so not affected by the bug), except when we are also running tests, as the tests are additional services.

I am not sure why I'm getting cache misses with GitHub actions that I don't see locally...

We had to explore this recently. I don't know if this helps, but this is what we're doing to get to PHP 8.1 https://github.com/jhu-idc/idc-isle-buildkit/pull/112

We had to explore this recently. I don't know if this helps, but this is what we're doing to get to PHP 8.1 jhu-idc#112

Oh I've had PHP 8.1 working for months, the things I have had issues with are more related to working around bugs in Fedora (locked up and didn't respond to SIGTERM singles causing the JVM to hang - though I've resolved this) and buildkit (Issues relate to caching and concurrency bugs -  I'm still working on this)

I had a meeting with @rosiel to go over these changes, and she'll continue the code review later. While 100% of everything is not polished, things are working and building, and it's better to get it in and make incremental changes going forward than keeping this pull request up indefinitely.

@nigelgbanks Do we know when this will be ready?

@DonRichards It's ready for review now, I'll be continuing my work on other branches adding more docs, etc.

A note about my experience testing.
In context of a shared storage environment, the mariadb container fails to complete mysql-setup (newly created volume). An example of the failure is below. However, If I set the docker-compose.yml env var S6_CMD_WAIT_FOR_SERVICES_MAXTIME for mariadb then the mysql-setup initialization succeeds. Also Initialization succeeds when used on a different system with local SSD storage.
Docker version 23.0.1, build a5ee5b1
Docker Compose version v2.16.0
Image Tag: islandora/mariadb:issue-215-update-alpine
leaf-mariadb-1  | s6-rc: info: service ready: starting
leaf-mariadb-1  | s6-rc: info: service ready successfully started
leaf-mariadb-1  | s6-rc: info: service mysql-setup: starting
leaf-mariadb-1  | s6-rc: info: service confd: starting
leaf-mariadb-1  | s6-rc: info: service confd successfully started
leaf-mariadb-1  | Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
leaf-mariadb-1  | s6-sudoc: fatal: unable to get exit status from server: Operation timed out
leaf-mariadb-1  | s6-rc: warning: unable to start service mysql-setup: command exited 111
leaf-mariadb-1  | /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
leaf-mariadb-1  | prog: fatal: stopping the container.

Not to self: Test fails relatively often due to https://www.drupal.org/project/drupal/issues/2833539 occurring when Alpaca tries to write a derivative to Drupal

@jefferya

If I set the docker-compose.yml env var S6_CMD_WAIT_FOR_SERVICES_MAXTIME for mariadb

What value are you setting it to?

What value are you setting it to?

S6_CMD_WAIT_FOR_SERVICES_MAXTIME: 10min (600000). Same value as in drupal/Dockerfile

What value are you setting it to?

S6_CMD_WAIT_FOR_SERVICES_MAXTIME: 10min (600000). Same value as in drupal/Dockerfile

I've pushed a change to set that to the default for mariadb as well.

@alxp brought this (https://github.com/Islandora-Devops/isle-dc/issues/298) to my attention during the tech call, so I pushed a fix for that we now have a new image for the leptonica package, so we can compile it with its optional open jpeg dependency.

I ran make setup without having pre-commit installed (because the README said I didn't need it) but it errors out before completing. After I installed pre-commit it ran completely and notified me that I hadn't installed jq yet. Now that make, pre-commit, and jq are all updated/installed it completes successfully.

I swapped the images into a local review environment (LEAF with mods) and ran a few tests. The site loads and PDF's, video/audio and image ingest looks ok.  I haven't tried Matomo and Fedora in not in LEAF stack. On bit to maybe highlight is the change log Cantaloupe port change -- this caught me for a bit.

Like @seth-shaw-asu, I had to install pre-commit and jq. Now it seems to work. I ran make bake (on mac with homebrew it's gmake bake to avoid warnings caused by the older built-in version of make) and then make certs and make up to launch the test site. I was able to access it and use the site and the IDE (woohoo!)
Aside from potentially listing Cantaloupe in the "Services available" in make up, are we good to proceed?

I haven't tried Matomo and Fedora in not in LEAF stack. On bit to maybe highlight is the change log Cantaloupe port change -- this caught me for a bit.

I've updated the README so it's not an explicit requirement

Aside from potentially listing Cantaloupe in the "Services available" in make up, are we good to proceed?

I've pushed a commit to add it to the list of services, good catch.

I ran make certs and make up but Microsoft Edge didn't like the certs and won't let me view the site.

I ran make certs and make up but Microsoft Edge didn't like the certs and won't let me view the site.

I'll see what I can do about that mkcert doesn't seem to document any additional steps, and I didn't see anything in their issue queue about Edge. So, we may not be able to support Edge with this...

I ran make certs and make up but Microsoft Edge didn't like the certs and won't let me view the site.

I've pushed a fix for this. In this particular case, mkcert must be run in the host Windows context (i.e. mkcert.exe not under WSL2). As it needs to be able to modify the trust store on Windows to affect the browsers running on Windows. Now the makefile will check if it is running under WSL2 and call the appropriate executable.

@seth-shaw-asu if you test again under Windows be sure to delete the existing certificates you generated under build\certs to ensure that new ones get created.

A number of people have reviewed and tested, so I feel it's safe to merge. If any issues arise, we can raise new tickets, and I'll sort it out.


Fix: Tailwind CSS in Vite 3

What is it?

[ ] Feature / enhancement
[x] Bug
[ ] Docs / tests

Description
Vite errors on postcss.config.js and tailwind.config.js because they aren't marked as Common JS
Fixes: #836
Use cases and why
Checklist:

[x] My code follows the developer guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] Added new tests to cover the fix / functionality

Thanks a lot for the PR!! makes a lot of sense


missing API call get /admin/users/{username}

Gitea version (or commit ref): 1.9.1
Git version:
Operating system:
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[x] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Log gist:

missing an API call to get all informations for an existing user
the call GET /users/{username} sends only a few user properties,
but not enough to change some values (eg. allow_create_organization, or active)
and send this changes back to server by API call PATCH /admin/users/{username}
Short: i missing the API call GET /admin/users/{username}

Made the above PR for this. Added a admin/users/<username> endpoint but also made all GET endpoints for getting User and Org info more verbose and open.


C++17 rewrite

C++17 deprecated and removed some language features. This made this project not compile inside RetDec.
I replaced these features and bumped Travis and Appveyor environments. I also bumped stuff in README.md and CHANGELOG.md.
Now it compiles without warnings or errors.
Since PeLib does not have its own unit or regression tests, can one (both?) of you (@s3rvac, @metthal) please look at it? I was careful, but it is easy to mess up those lambdas :-)
I will need this for https://github.com/avast/retdec/issues/650. But for now, I will use reference to this branch (instead of master) in RetDec, so it is not a total blocker. It will also run RetDec tests with these changes, so it may catch some problems before we merge here.

LOL 651987a
I thought there is something fishy about this when I wrote it. But it "compiled" so I thought ok, probably some partial application is going on in there - that method has one argument but was called with zero.
It turns out, it did not compile when used it RetDec - templates :-)
I guess no partial application in C++.
Is it ok now? That comparator object description for std::max_element() is non-trivial.

Is it ok now? That comparator object description for std::max_element() is non-trivial.

The comparison function should take two arguments and return true when the first one is smaller than the second one. The current code is
[](const auto& i1, const auto& i2) { return i1.biggerFileOffset(i2); }

Member function biggerFileOffset() is
bool PELIB_IMAGE_SECTION_HEADER::biggerFileOffset(const PELIB_IMAGE_SECTION_HEADER& ish) const
{
    return PointerToRawData < ish.PointerToRawData;
}

So, the comparator is correct.
As for the compilation, when a compiler encounters a template, it first only checks its syntax. It checks its semantic only after the template is instantiated with particular types/values.

Diky. Mergnem to, ked prejdu testy RetDecu, ktory toto pouziva.

Everything looks good now, but I will still wait for RetDec regression tests to pass witch this branch - I'm currently running this code inside RetDec's issue-650 (C++17 support) branch and there are some more complications in there - likely unrelated to changes here.


History back does not work in ionic 2 apps

Ionic version:  (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ...  (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:

Instead of popping a page the back buttons take me to the last url, usually closing the app.
Also the android back button kills the app when opening it in a mobile browser.
And closes the app when opened as a pwa
Expected behavior:

Browser and mouse back buttons pop the current page.
Steps to reproduce:

Related code:
public nav(){
  this.navController.push(HomePage);
}

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
using plunker version

Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!


Setting to False in config

If I set Announcements to False it still displays. Haven't tried the other ones. Was just trying to disable it because it stays on the screen the whole time while playing.

Hey sorry I didn't see this earlier! Im wondering, it's probably the welcome message sending that you don't want to send rather than the periodic announcements.
I notice the welcome messages and announcements etc are permanent. Classic ark problems.
I'll try to make a way to separate these so both can be disabled.
I'm currently pretty deep into redoing the project with a GUI

resolved on a recent commit


Fix broken TPs (includes FSharp.Data)

Type providers can emit code which currently cause a failure in FCS TAST traversal, see https://github.com/fsharp/FSharp.Compiler.Service/issues/568
Solutions:

(workaround in WS) finish ReflectedDefinition-based fallback translation - needs the "corrector" logic ported from WS3 (removing outer lambda expressions based on argument currying info)
add a fallback case in FCS to expose unresolved IL calls through the TAST API, handle these calls in WS4 F# code reader

This has now been solved by FCS improvements


Problem with increasing connections while getting metrics from Elasticsearch in client mode

Hello.
I'm using Telegraf (ver. 0.2.4) to monitor few Elasticsearch (ver. 1.7.3) instances. One of them is configured in client mode (has no data, essentially it's a load balancer). When I'm starting Telegraf, metrics are gathered and send to Influx database. But Telegraf process keeps opening network connections to Elasticsearch, never closing them. It keeps increasing until limit of open files is reached.
22994 is PID of Telegraf process:
# ls /proc/22994/fd | wc -l
128

In 2 hours number of open files is reaching limit, causing:
Dec 17 12:07:30 es-lb-0 telegraf: 2015/12/17 12:07:30 Error in plugin [net]: error getting net io info: open /proc/net/dev: too many open files
Dec 17 12:07:30 es-lb-0 telegraf: panic: runtime error: index out of range

Then Telegraf restarts (or clear active connections) or sometimes even stops getting metrics.
When Elasticsearch plugin is not loaded, everything is ok.
I've tried all possible Elasticsearch plugin configuration options (local = true/false), without any positive results.
Number of open files is increasing in Elasticsearch process, too, so I'm sure it's connected.
Process file descriptors (output shortened for brevity):
# ls -al /proc/22994/fd
[...]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 90 -> socket:[8634053]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:14 91 -> socket:[8634093]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 92 -> socket:[8634632]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 93 -> socket:[8634743]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 94 -> socket:[8634671]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 95 -> socket:[8634776]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 96 -> socket:[8635496]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 97 -> socket:[8635534]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:17 98 -> socket:[8635002]
lrwx------. 1 telegraf telegraf 64 Dec 17 13:16 99 -> socket:[8635163]

I can help with further testing, for now my solution is to remove Elasticsearch plugin from Telegraf.

My guess is this is caused by not calling r.Body.Close() and not reading response body. I don't see anything like that in code of the plugin.

The client must close the response body when finished with it:

resp, err := http.Get("http://example.com/")
if err != nil {
	// handle error
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)

I had the similar issue in Python with requests.

thanks for the report, if @zstyblik is correct then that is the issue, we should be always be closing the response body.

@sparrc - I don't know architecture of Telegraf, so it's a "guess" based on reading through the Elasticsearch plugin. But I doubt such functionality, read body of response and close connection, is implemented somewhere inside. Anyway, that part is copy-paste from documentation of net/http + my own experience from Python land :)

I think you're right, we should be closing this: https://github.com/influxdb/telegraf/blob/master/plugins/elasticsearch/elasticsearch.go#L201

@sparrc indeed :) It could be something like ...
	r, err := e.client.Get(url)
	if err != nil {
		return err
	}
	defer r.Body.Close()
	if r.StatusCode != http.StatusOK {
		ioutil.ReadAll(r.Body)
		return fmt.Errorf("elasticsearch: API responded with status-code %d, expected %d", r.StatusCode, http.StatusOK)
	}
	if err = json.NewDecoder(r.Body).Decode(v); err != nil {
		return err
	}
	return nil

? And import ioutil or use another Reader, I guess.

why does it require the ioutil.ReadAll? I think only the defer is necessary

Because you're supposed to read the body of the response even if you don't care about it. Whether it's just a good practice or optional, that I don't know. I'm always doing it regardless :)

@sparrc I was going to work on this and https://github.com/influxdb/telegraf/issues/430 but wasn't sure if I should create a branch from master or 0.2.4 given all the changes going on with master

@jipperinbham do it on master, the changes I'm making are on the 0.3.0 branch and will remain there until sometime in January

@zstyblik re: whether or not the body should be read, from what I've read you are right in that the underlying transport will not reuse the connection if Body.Close() is called without first being read.
In this situation, I tend to think it's ok to not reuse the underlying connection because we received something other than HTTP/1.1 200 OK and would want to setup the connection again.
thoughts?

@jipperinbham sorry, but I don't know that well. I'd expect this to be related to connection pool rather than connection being reused, resp. another request being sent over the exactly the same and already open connection and freeing up that connection early. shrug


Add profile to build on JDK 14

Motivation:
JDK 14 was released and need some special settings to be able to build with. Also there seems to be one regression that we need to workaround for now.
Modifications:

Add maven profile for JDK 14
Update blockhound version to be able to work on JDK 14
Add workaround for possible JDK 14 regression

Result:
Be able to build on JDK 14

@netty-bot test this please

@netty-bot test this please


Added configuration for pwa status bar color

Hi,
I added some configuration in the vue.config.js in order to change the status bar color.
Closes #14

Thanks for your contributions @pierresaid, appreciate it! 😄


Use Local Memory Type Variable Instead of Global Storage Type Variable in Event to Save Gas

Hi, we recently have conducted a systematic study about Solidity event usage, evolution, and impact, and we are attempting to build a tool to improve the practice of Solidity event use based on our findings. We have tried our prototype tool on some of the most popular GitHub Solidity repositories, and for your repository, we find a potential optimization of gas consumption arisen from event use.
The point is that when we use emit operation to store the value of a certain variable, local memory type variable would be preferable to global storage type (state) variable if they hold the same value. The reason is that an extra SLOAD operation would be needed to access the variable if it is storage type, and the SLOAD operation costs 800 gas.
For your repository, we find that the following event use can be improved:

DataTokenTemplate.sol
function name: proposeMinter
event name:  MinterProposed
variable:    _proposedMinter->newMinter

    function proposeMinter(address newMinter)
        external
        onlyMinter
    {
        _proposedMinter = newMinter;
        emit MinterProposed(
            msg.sender,
            _proposedMinter
        );
    }

BPool.sol
function name: updatePublishMarketFee
event name:  PublishMarketFeeChanged
variable:    _publishMarketCollector->_newCollector

    function updatePublishMarketFee(address _newCollector, uint256 _newSwapFee) external {
        require(_publishMarketCollector == msg.sender, "ONLY MARKET COLLECTOR");
        require(_newCollector != address(0), "Invalid _newCollector address");
        require(_newSwapFee ==0 || _newSwapFee >= MIN_FEE, "ERR_MIN_FEE");
        require(_newSwapFee <= MAX_FEE, "ERR_MAX_FEE");
        _publishMarketCollector = _newCollector;
        _swapPublishMarketFee = _newSwapFee;
        emit PublishMarketFeeChanged(msg.sender, _publishMarketCollector, _swapPublishMarketFee);
    }

MockOldDT.sol
function name: proposeMinter
event name:  MinterProposed
variable:    _proposedMinter->newMinter

    function proposeMinter(address newMinter)
        external
        onlyMinter
    {
        _proposedMinter = newMinter;
        emit MinterProposed(
            msg.sender,
            _proposedMinter
        );
    }

V3DataTokenTemplate.sol
function name: proposeMinter
event name:  MinterProposed
variable:    _proposedMinter->newMinter

    function proposeMinter(address newMinter)
        external
        onlyMinter
    {
        _proposedMinter = newMinter;
        emit MinterProposed(
            msg.sender,
            _proposedMinter
        );
    }

Do you find our results useful? Your reply and invaluable suggestions would be greatly appreciated, and are vital for improving our tool. Thanks a lot for your time!

Spam. Closing.


如何调整standalone的可接受大小

传个视频文件就炸了 413 Request Entity Too Large

sorry，i don't find that our owner is a foreigner. Let me repeat my question,how to change the standalone service's file receive max  length

@maodou38 What's you large file? Is it a request or response?

It's a request. i want to mock a movie upload interface. Once i upload a file almost several Ms level，it will return the error.
Is there any ways to customize the multipart size like java's spring?


⚠ Bofrost.de has degraded performance

In f91e96c, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 2023 ms

Resolved: Bofrost.de performance has improved in 93c795e after 8 minutes.


log file name before loading

in the event there is a fatal error inside zonec_read provide ability to log the zone and file names prior to entry

@wcawijngaards do you mind including this?

Certainly, it is a nice feature. I included it, and also changed it to verbosity 5; I think that may be a better verbosity level for it. Most production usage is with smaller values.


runtime: Improve performance of round2

What version of Go are you using (go version)?

$ go version
go version go1.15.4 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What did you do?

Current implementation:
// round x up to a power of 2.
func round2(x int32) int32 {
	s := uint(0)
	for 1<<s < x {
		s++
	}
	return 1 << s
}

We can use pure bit operations to improve it.
// round x up to a power of 2.
func round2(x int32) int32 {
	if x <= 1 {
		return 1
	}

	n := x - 1
	n |= n >> 1
	n |= n >> 2
	n |= n >> 4
	n |= n >> 8
	n |= n >> 16

	return n + 1
}

Here is the final benchmark result

Unless you have a 10ghz processor that is executing all the instructions in this parallel, you need to watch out for compiler optimisations. Inspect the compiled output of your benchmarks, I suspect the code has been optimised away because in your benchmark you are not using the result of round2

Also, there is no need to use pb.Parallel. This code does not use concurrency, its performance should not change depending on the value of GOMAXPROCS.

Also, there is no need to use pb.Parallel. This code does not use concurrency, its performance should not change depending on the value of GOMAXPROCS.

Hey @davecheney If I don't use pb.Parllel, I got
BenchmarkRound2Old-16           133692382                8.90 ns/op
BenchmarkRound2Old-16           135668180                8.94 ns/op
BenchmarkRound2Old-16           134220864                8.99 ns/op
BenchmarkRound2Old-16           135382104                8.93 ns/op
BenchmarkRound2Old-16           134764070                8.86 ns/op
BenchmarkRound2Old-16           135216817                8.97 ns/op
BenchmarkRound2Old-16           131684757                8.92 ns/op
BenchmarkRound2Old-16           135538406                8.92 ns/op
BenchmarkRound2Old-16           135814132                9.00 ns/op
BenchmarkRound2Old-16           134046284                8.83 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.240 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.236 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.240 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.235 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.238 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.238 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.237 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.236 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.241 ns/op
BenchmarkRound2New-16<PHONE_NUMBER>               0.243 ns/op

Your benchmark is being optimised away because you are not using the result. Because your chance removed the for loop round2 can be inlined allowing the compiler to see that you’re not using the result so it removes the call completely.
Don’t get distracted by how fast the benchmark runs, focus on the delta between the original version and your replacement.

@davecheney How about this
func BenchmarkRound2(b *testing.B) {
	var r int32
	for i := 0; i < b.N; i++ {
		r = round22(2059)
	}
	_ = r
}

OLD
BenchmarkRound2-16      133114935                8.97 ns/op
BenchmarkRound2-16      134299686                8.97 ns/op
BenchmarkRound2-16      133705064                8.94 ns/op
BenchmarkRound2-16      134264065                8.95 ns/op
BenchmarkRound2-16      135490294                9.14 ns/op
BenchmarkRound2-16      133457739                9.04 ns/op
BenchmarkRound2-16      134982480                8.97 ns/op
BenchmarkRound2-16      134222414                8.91 ns/op
BenchmarkRound2-16      132213411                8.96 ns/op
BenchmarkRound2-16      130988796                8.97 ns/op

NEW
BenchmarkRound2-16<PHONE_NUMBER>               0.254 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.238 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.238 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.234 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.240 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.235 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.236 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.236 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.242 ns/op
BenchmarkRound2-16<PHONE_NUMBER>               0.236 ns/op

Respectfully you need to double check your math; if you have a 3ghz processor, then round2 compelted in less than one clock cycle. This seems unlikely.
There are several possible reasons for this:

inlining, your revision makes round2 inlinable, the compiler can now see what happens to the value 2059 when it is passed into round2 and it can see that round2 is a pure function which has no side effects.
because round2 is inlined, the compiler can use constant propogation to compute the result at compile time, not run time.
the result is probably still being thrown away because the compile can see you never read from r, so its value is not used.

I suggest the following replacement benchmark
var Result, Input int32 = 0, 2059

func BenchmarkRound2(b *testing.B) {
	var r int32
	for i := 0; i < b.N; i++ {
		r = round22(Input)
	}
	R = r
}

@davecheney Thanks very much!

Respectfully you need to double check your math

I do think so!
var result, input int32 = 0, 2059

func BenchmarkRound2(b *testing.B) {
	var r int32
	for i := 0; i < b.N; i++ {
		r = round222(input)
	}
	result = r
}

OLD
BenchmarkRound2-16      128067048                8.89 ns/op
BenchmarkRound2-16      134646064                8.85 ns/op
BenchmarkRound2-16      133322764                8.86 ns/op
BenchmarkRound2-16      135313116                8.95 ns/op
BenchmarkRound2-16      133720844                8.98 ns/op
BenchmarkRound2-16      134429626                8.90 ns/op
BenchmarkRound2-16      134209008                9.04 ns/op
BenchmarkRound2-16      135072374                8.86 ns/op
BenchmarkRound2-16      135947492                8.86 ns/op
BenchmarkRound2-16      134961540                8.93 ns/op

NEW
BenchmarkRound2-16      817970109                1.38 ns/op
BenchmarkRound2-16      885790197                1.38 ns/op
BenchmarkRound2-16      853032567                1.37 ns/op
BenchmarkRound2-16      882751386                1.39 ns/op
BenchmarkRound2-16      869532646                1.37 ns/op
BenchmarkRound2-16      857339872                1.39 ns/op
BenchmarkRound2-16      822184684                1.37 ns/op
BenchmarkRound2-16      856609690                1.36 ns/op
BenchmarkRound2-16      892192333                1.38 ns/op
BenchmarkRound2-16      889352274                1.40 ns/op

benchstat
name       old time/op  new time/op  delta
Round2-16  8.91ns ± 1%  1.38ns ± 2%  -84.53%  (p=0.000 n=10+10)

Some observations:

In the benchmark the old round2 does not get inline in the benchmark but the new one does. With //go:noinline the new round2 gets a little bit slower around 2ns.

for input 1<<31-1 the old round2 produces an infinite loop and the new round2 produces: -2147483648

adding a dependency in the benchmark loop drops the performance of the new round2 from 2ns to 4ns on my computer.
r  = round2(r)

for small inputs like 2 the old version can be faster (assuming no inlining).

Hey @martisch based on your observations:

In the benchmark the old round2 does not get inlined in the benchmark but the new one does. With //go:noinline the new round2 gets a little bit slower to around 2ns.

Same here

for input 1<<31-1 the old round2 produces an infinite loop and the new round2 produces: -2147483648

Yeah, it's overflow because of type int32. But I think this situation won't happen in the real world. Because that means allocating 2GB memory 😆

adding a dependency in the benchmark loop drops the performance of the new round2 from 2ns to 4ns on my computer.
r = round2(r)

Sorry I don't follow this

for small inputs like 2 the old version can be faster (assuming no inlining).

The new one is always faster on my machine

It seems that round2 is called twice in the codebase and only one of those is in a non constant context, inside malg. I think some higher level benchmarks are needed to demonstrate the benefits of this change.

@davecheney  Any examples about higher level benchmarks?

Benchmark the things that call round2, and possibly their callers.
The goal is not to rewrite a low level function if it has no observable benefit. Change has a cost, each code review takes time, and could possibly introduce bugs. If there is no meaningful improvement to the runtime of real go programs, there is little justification to continue.

adding a dependency in the benchmark loop drops the performance of the new round2 from 2ns to 4ns on my computer.
r = round2(r)

Sorry I don't follow this

Sometimes benchmarks should take into account that there is a dependency chain since the result will be used. I dont think its that important here just something to keep in mind when benchmarking:
func BenchmarkRound2(b *testing.B) { 	r := input 	for i := 0; i < b.N; i++ { 		r = round2(r) 	} 	result = r }

The new one is always faster on my machine

I do not think it is much important here but to make clear what I benchmarked: Adding //go:noinline and the loop dependency from above for an input of 2 produces 4ns for the new round2 on my  Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz instead of 2ns for the old.
Which to me makes sense since the new version has a longer dependency chain for small numbers.
All in all this function is not at all critical for performance so it will be hard to impossible to prove any effect if there is a 4 to 8 ns difference between the non inlined versions.

The goal is not to rewrite a low level function if it has no observable benefit. Change has a cost, each code review takes time, and could possibly introduce bugs. If there is no meaningful improvement to the runtime of real go programs, there is little justification to continue.

@davecheney I think malg is in a hot path, so the improvement is meaningful even it may be just small.

The goal is not to rewrite a low level function if it has no observable benefit. Change has a cost, each code review takes time, and could possibly introduce bugs. If there is no meaningful improvement to the runtime of real go programs, there is little justification to continue.

@davecheney I think malg is in a hot path, so the improvement is meaningful even it may be just small.

Good. Then benchmark that in support of your change.

Sometimes benchmarks should take into account that there is a dependency chain since the result will be used. I dont think its that important here just something to keep in mind when benchmarking:

Ok thanks for the explanation!

@davecheney I don't think I can provide a benchmark about malg but just round2. The systemstack is related to the compiler, right?

@davecheney I don't think I can provide a benchmark about malg but just round2. The systemstack is related to the compiler, right?

From my vague understanding system stack is used when the goroutine needs to make a call using the underlying threads stack, not the goroutines. I don’t know the specifics, sorry.
Look. I appreciate your enthusiasm, and don’t want you to be discouraged, but it’s important to understand the cost of any change is large, especially when it’s inside the runtime. It has to be supported with clear evidence that the change is beneficial in real life, not just on paper.
Lastly, the reason round2 got faster with your change is it became inlinable. I encourage you to research the series of changes landing in 1.16 (or maybe 1.17, I’m not following closely) that allow functions with a for loop to be inlinable. This may reduce the benefit of your change

From profiling data that I know I can confirm that round2 is not worth optimising for performance.

Look. I appreciate your enthusiasm, and don’t want you to be discouraged, but it’s important to understand the cost of any change is large, especially when it’s inside the runtime. It has to be supported with clear evidence that the change is beneficial in real life, not just on paper.

I totally understand.

Lastly, the reason round2 got faster with your change is it became inlinable. I encourage you to research the series of changes landing in 1.16 (or maybe 1.17, I’m not following closely) that allow functions with a for loop to be inlinable. This may reduce the benefit of your change

@davecheney and @martisch  Thanks for the information

@kiyonlin thanks for the suggestion. If this would have been indeed in a hot path it could have been worth while optimising but it is not in a hot path called often enough. There are better gains elsewhere in the runtime lets focus on finding and optimising those.

Thank you @davecheney and @martisch for your time and the excellent discussions.

From profiling data that I know I can confirm that round2 is not worth optimising for performance.

@martisch Last question, could I know how to profile this?

This may give you a starting point: https://blog.golang.org/pprof

@martisch Okey and may I know which data should I care/notice?

Profile the program you care about (not a benchmark a real program) and see how much pprof reports is spend in round2.

Profile the program you care about (not a benchmark, a real program and use case) and see how much pprof reports is spend in round2.

@martisch  I'll try to investigate that. Thanks again for your patience!


[Bug] Lost Buffer

Before Reporting

[X] I found no existing issues matching my bug
[X] My issue is not caused by a plugin or theme

Describe the Bug
brower no have Buffer.
Expected Behavior
no error
Steps To Reproduce
require('request').get('https://www.gstatic.com/generate_204', console.warn)

VM1451 C:\Users\MoeShin\AppData\Roaming\BetterDiscord\data\betterdiscord.asar\preload.js:formatted:224 Uncaught Error: Cannot read properties of undefined (reading 'Buffer')
    at IncomingMessage.<anonymous> (VM1451 C:\Users\MoeShin\AppData\Roaming\BetterDiscord\data\betterdiscord.asar\preload.js:formatted:224:25)
    at IncomingMessage.emit (VM1341 node:events:525:35)
    at endReadableNT (VM1383 readable:1358:12)
    at process.processTicksAndRejections (VM1350 task_queues:83:21)

Operating System
Windows
Discord Version
Stable
BetterDiscord Version
v1.9.3
Anything else?

Already been discussed.
"Discord removed their Buffer polyfill that we made use of" - Zerebos

fixed bee11905dd1461ac50987177f9885a80e8ceaa55


No Clablast library installed in lib-caffe-bvlc-opencl-clblast-universal package

Whenever we run the command ck install package:lib-caffe-bvlc-opencl-clblast-universal, we get Caffe without CLBLAST library installed.
Are we supposed to comment the line DUSE_LIBDNN:BOOL=${USE_LIBDNN} in the install script?

Is it possible to get a log, please?
If it's too large, can you can please invoke "ck install package:lib-caffe-bvlc-opencl-clblast-universal" again and just send me info with how CK resolved dependencies.
Also can you please send the output of
$ ck show env --tags=clblast

Finally, I recently added a stable package for Caffe OpenCL with CLBlast (all dependencies are compiled so it may take some time). Can you please try it too:
$ ck install package:lib-caffe-bvlc-opencl-clblast-universal-20171015

Lastly, can you please tell me about the platform and OS you are using? Thanks!

Thanks a lot @gfursin , I will send the log and try the new package as quickly as possible.

So, I ran the command again and this is how ck resolves the dependancy
Resolving software dependencies ...
*** Dependency 1 = cmake (cmake):
Resolved. CK environment UID = 4ce088373b84c775 (detected version 3.5.1)

*** Dependency 2 = compiler (C++ compiler):
Resolved. CK environment UID = aa2445c08a129029 (detected version 5.4.0)

*** Dependency 3 = lib-opencl (OpenCL stubs library):
Resolved. CK environment UID = b6366f46b1b4eb71

*** Dependency 4 = lib-gflags (GFlags library):
Resolved. CK environment UID = 093614ef18eea9f2

*** Dependency 5 = lib-glog (GLog library):
Resolved. CK environment UID = 2941abafce842b6d

*** Dependency 6 = lib-lmdb (LMDB library):
Resolved. CK environment UID = a6222da4b3981f2c

*** Dependency 7 = lib-hdf5 (HDF5 library):
Resolved. CK environment UID = e436e5799e45a18e

*** Dependency 8 = lib-opencv (OpenCV library):
Resolved. CK environment UID = 46930b7044fe1814

*** Dependency 9 = lib-boost (Boost library):
Resolved. CK environment UID = 428598e466408a68

*** Dependency 10 = lib-blas (BLAS library):
Resolved. CK environment UID = 3c9cc758fd8f4196

*** Dependency 11 = lib-viennacl (ViennaCL library):
Resolved. CK environment UID = 4117936cca1ce737

*** Dependency 12 = lib-clblast (CLBlast library):
Resolved. CK environment UID = 5483bd6874734331

*** Dependency 13 = lib-protobuf-host (ProtoBuf host compiler):
Resolved. CK environment UID = f4cf7a72139d5991

Searching if CK environment for this package already exists using:

Tags: lib,caffe,bvlc,vopencl,vclblast,host-os-linux-64,target-os-linux-64,64bits
Dependency: lib-protobuf-host=f4cf7a72139d5991
Dependency: lib-viennacl=4117936cca1ce737
Dependency: cmake=4ce088373b84c775
Dependency: lib-glog=2941abafce842b6d
Dependency: lib-opencv=46930b7044fe1814
Dependency: lib-opencl=b6366f46b1b4eb71
Dependency: lib-hdf5=e436e5799e45a18e
Dependency: lib-blas=3c9cc758fd8f4196
Dependency: lib-gflags=093614ef18eea9f2
Dependency: lib-clblast=5483bd6874734331
Dependency: lib-lmdb=a6222da4b3981f2c
Dependency: lib-boost=428598e466408a68
Dependency: compiler=aa2445c08a129029

CK environment found for this package: a188c74013a9bfaf
OVERWRITING AND PROCESSING AGAIN!
*** Installation path used: /home/LAB/anikam/CK-TOOLS/lib-caffe-bvlc-opencl-clblast-master-gcc-5.4.0-linux-64

Resolving software dependencies ...
*** Dependency 1 = cmake (cmake):
Resolved. CK environment UID = 4ce088373b84c775 (detected version 3.5.1)

*** Dependency 2 = compiler (C++ compiler):
Resolved. CK environment UID = aa2445c08a129029 (detected version 5.4.0)

*** Dependency 3 = lib-opencl (OpenCL stubs library):
Resolved. CK environment UID = b6366f46b1b4eb71

*** Dependency 4 = lib-gflags (GFlags library):
Resolved. CK environment UID = 093614ef18eea9f2

*** Dependency 5 = lib-glog (GLog library):
Resolved. CK environment UID = 2941abafce842b6d

*** Dependency 6 = lib-lmdb (LMDB library):
Resolved. CK environment UID = a6222da4b3981f2c

*** Dependency 7 = lib-hdf5 (HDF5 library):
Resolved. CK environment UID = e436e5799e45a18e

*** Dependency 8 = lib-opencv (OpenCV library):
Resolved. CK environment UID = 46930b7044fe1814

*** Dependency 9 = lib-boost (Boost library):
Resolved. CK environment UID = 428598e466408a68

*** Dependency 10 = lib-blas (BLAS library):
Resolved. CK environment UID = 3c9cc758fd8f4196

*** Dependency 11 = lib-viennacl (ViennaCL library):
Resolved. CK environment UID = 4117936cca1ce737

*** Dependency 12 = lib-clblast (CLBlast library):
Resolved. CK environment UID = 5483bd6874734331

*** Dependency 13 = lib-protobuf-host (ProtoBuf host compiler):
Resolved. CK environment UID = f4cf7a72139d5991

Also, the ck install package:lib-caffe-bvlc-opencl-clblast-universal-20171015 did not work, I reckon I need to pull the repo again for that, I got a
can't find path to CK entry "package:lib-caffe-bvlc-opencl-clblast-universal-20171015" (?:1dc07ee0f4742028:?)! error.

This is the output for ck show env --tags=clblast

Hmm, CLBLast seems to be installed fine. How did you check that Caffe was installed without CLBlast?
You can try a simple OpenCL benchmark to check that it works:
$ ck compile program:caffe-time-opencl
$ ck run program:caffe-time-opencl

Usually, when OpenCL-based installation is broken, it fails too ... The first run can be a bit slow due to internal kernel caching but subsequent runs are usually much faster ...
LIBDNN is another library which can work with or without CLBLAST and we had another package which turns both of them on (but it was not tested thoroughly though):
$ ck install package:lib-caffe-bvlc-opencl-libdnn-clblast-universal

As for the stable package I mentioned, you can update all CK repos as following (and then try again):
$ ck pull all
$ ck install package:lib-caffe-bvlc-opencl-clblast-universal-20171015

I actually checked this package recently on x86 and ARM64 machines and it seem to be working ...

Thanks a lot @gfursin for your prompt reply, there are multiple new functions supported by Clblast library such as Xgemmbatched. I cannot find a way for using these apis like Xgemmbatched with Caffe.
I said it is not installed with Caffe because I cannot find any CLBLAST files inside the :lib-caffe-bvlc-opencl-clblast-universal-20171015 package.
I request you to please guide me in using the Clbast apis for Caffe.

@abhi1212 A CK package is just a recipe to download, build and install a piece of software, while resolving its dependencies. The actual files get installed into a folder at $HOME/CK-TOOLS (or into $CK_TOOLS if this env variable is defined).

Yes, CLBlast is installed in a separate place and then linked dynamically. The point of CK is to let you reuse various installations of libs in your projects. @psyhtest - maybe you can provide a few notes about which functions are currently used from CLBlast in the Caffe OpenCL branch, and where they are linked? I think it's done via ViennaCL API? Thanks!

Thanks a lot @psyhtest and @gfursin for your detailed explanation, I seemed to have anide about the flow.
It would really be helpful if @psyhtest can provide me with some notes on which functions are currently used from CLBlast in the Caffe OpenCL branch, and where they are linked.
I searched a lot but could not find any documentation on that.
Thanks

BTW, I just saw your ticket #119 (I somehow missed it - we now have a very intense project with very close deadlines) - I saw @psyhtest answered there.  Maybe @CNugteren and @naibaf7 can provide more details about which CLBlast functions are currently used in the Caffe OpenCL branch ...

Thanks a lot @gfursin , your help is much appreciated.


search using "_include" returned "FHIRPersistenceDataAccessException: Failure retrieving string values"

Describe the bug
Dear ibm fhirserver team, we got a "FHIRPersistenceDataAccessException: Failure retrieving string values" error when we tried to query the patient, medication and medicationStatement using "_include" search option + some search criteria, e.g. the patient birthdate and medication codes.
To Reproduce

The fhirserver was deployed using a docker-compose file. A docker container of fhirserver (version:4.4.0) and a docker container of postgresql database (version:12.3) are running.
Assume the fhirserver can be accessed through: https://localhost:9443/fhir-server/api/v4 where we put a few million of Patients fhir resources, a few thousand of Medication and a few thousand of MedicationStatement.

In a MedicationStatement  there are a reference to a Medication and a reference to a Patient.
{
    "resourceType": "MedicationStatement",
    "id": "xxxxxx",
    "meta": {
        "versionId": "2",
        "lastUpdated": "xxxxxx",
        "profile": [
            "xxxxxx"
        ]
    },
    "status": "unknown",
    "medicationReference": {
        "reference": "Medication/xxxxxx"
    },
    "subject": {
        "reference": "Patient/xxxxxx"
    },
    "effectiveDateTime": "xxxxxx"
}

We want to query the patient with birthDate before 2000.01.01 and who were given at least one of the medication in (medication code: 00000000,11111111,22222222)
So the following curl query was used:

curl -k -u'fhiruser:change-password' 'https://localhost:9443/fhir-server/api/v4/MedicationStatement?_pretty=true&medication.code=00000000,11111111,22222222&_include=MedicationStatement:medication&_include=MedicationStatement:subject&subject:Patient.birthdate=le2000'

It took quite long time and returned error message:

{
    "resourceType": "OperationOutcome",
    "id": "ac-16-0-3-274c6f9b-ab3a-4fa8-bce5-8fe897fb989c",
    "issue": [
        {
            "severity": "fatal",
            "code": "exception",
            "details": {
                "text": "FHIRPersistenceDataAccessException: Failure retrieving string values"
            }
        }
    ]
}

in the docker-compose log, I saw:

ibm-fhir-server_1  | [ERROR   ] Failure retrieving string values.  OR (CP1.TOKEN_VALUE = ?) OR (CP1.TOKEN_VALUE = ?)))))) AND LR.LOGICAL_RESOURCE_ID = param0.LOGICAL_RESOURCE_ID JOIN MedicationStatement_STR_VALUES  AS param1 ON (param1.PARAMETER_NAME_ID=1396 AND (param1.STR_VALUE IN (SELECT 'Patient' || '/' || CLR1.LOGICAL_ID FROM Patient_RESOURCES CR1, Patient_LOGICAL_RESOURCES CLR1, Patient_DATE_VALUES CP1 WHERE CR1.RESOURCE_ID = CLR1.CURRENT_RESOURCE_ID AND CR1.IS_DELETED <> 'Y' AND CP1.LOGICAL_RESOURCE_ID = CR1.LOGICAL_RESOURCE_ID AND (CP1.PARAMETER_NAME_ID=1054 AND ((CP1.DATE_START <= ?)))))) AND LR.LOGICAL_RESOURCE_ID = param1.LOGICAL_RESOURCE_ID ORDER BY R.LOGICAL_RESOURCE_ID ASC  OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY)  searchArgs=[00000000, 11111111, 22222222, 1955-12-31 23:59:59.999999] [probeId=ac-12-0-3-5f90b44e-15aa-49c9-ab1f-e80b493a8af6]
ibm-fhir-server_1  | An I/O error occurred while sending to the backend.
ibm-fhir-server_1  | [ERROR   ] Failure retrieving string values
ibm-fhir-server_1  | Failure retrieving string values
postgres_1         | 2020-10-21 21:09:45.512 UTC [2304] LOG:  unexpected EOF on client connection with an open transaction

This SQL can be executed manually in psql ("?" replaced with search args). It can return a list of patients without showing errors:
str_value
-----------------------
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx
 Patient/xxxxxx

Expected behavior
This curl query should return the bundle with 11 MedicationStatement, 11 Medication and 11 Patient resources because the MedicationStatement tells what Medication was prescribed to which patient. The same query using different or less number of Medication codes (thus less fhir resources will return) did work.
Additional context
Looking into the log, it seemed to be some connection issues. The effected classes might be:
com.ibm.fhir.persistence.jdbc.dao.impl.FHIRDbDAOImpl.java
com.ibm.fhir.persistence.jdbc.exception.FHIRPersistenceFKVException.java

Some efforts were done:

tried to increase liberty authentication cache timeout (https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_sec_cache.html) by adding the following into "server.xml" file:

<authCache initialSize="100" maxSize="50000" timeout="15m"/>

added the following to "postgresql.properties":

connectTimeout=1000
socketTimeout=1000

Either did not help.

Thank you for the detailed bug report.  The authCache doesn't appear to be the problem here, however it could be related to the number of the IN values.  We'll look at it as soon as we can - post 1366

Sometimes the database query optimizer fails to find the most efficient execution plan. In this case, you probably want the query to be driven by patient. It may be helpful to place the patient filter at the beginning of the query:
subject:Patient.birthdate=le2000

The underlying issue is that the optimizer does not try every possible order of tables to join - with a lot of tables there are simply too many combinations to assess in a reasonable amount of time. By placing the Patient predicate early, there is a better chance that the optimizer will use the Patient tables and filter early in the query. Query performance is then determined largely by the number of patients matching the given filter. If there are too many matching patients, then the query might require more time than the transaction timeout.

I am updating the FHIRPerformanceGuide.md document with this guidance.

@gk-zhang can you please try with the above advice on order of search parameters?


How to Contribute to Celo Docs

heres a doc i put together about contributing to translations https://docs.google.com/document/d/1k67j9W5Il4R-NwudtCSYMCh0YK3P9xNUfz8wjc4Np3A/edit#


Cracks and pops

When using espeak the sound quality is very poor with lots of pops and cracks - it almost seems that it happens when there is output to the command line. The VU meter doesn't display.
Using omxplayer - it cracks and pops at the start - but during the play it is ok - the VU meter works as expected.
Using PIXEL gui with Chrome - it worked well the first time - after a reboot volume is very low - VU works the same.
I have two speaker phats so can rule out errors with them - I've used 3 Pi's, a zero, zero w and a Pi3
I've used latest version of Raspbian and Raspbian Lite and a year old version just to test - its the same results on all three.

When using omxplayer were you within pixel or lite? I'm getting audio but no vu within lite.

In Lite - via ssh
pi@314-zerow1:~/music $ omxplayer Dexter_Britain_Charge_into_2015.mp3 -o alsa
Audio codec mp3 channels 2 samplerate 44100 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
Using device: speaker-peat

I've got working vu - but sound quality poor - clicks/pops/distortion

omxplayer responds to alsamixer - just has some clicks and pops - vu works
espeak doesn't respond to alsamixer - lots of clicks and pops - vu doesn't work

I'm using mine for a similar purpose, got everything working (at last!) but I'm yet to try it with Espeak which is what I'm using mine for too!

On 5 Mar 2017, at 09:08, simonbugler<EMAIL_ADDRESS>wrote:
omxplayer responds to alsamixer - just has some clicks and pops - vu works
espeak doesn't respond to alsamixer - lots of clicks and pops - vu doesn't work
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@simonbugler I have exactly the same issue now, desperate to get the VU working with Alsa, cmsu on the command line works with MP3s, its just the output of espeak thats not working :( No idea where to start now either!

so made a bit of progress with this.... if you output espeak to a wav it'll then playback via cmus complete with vu.... problem is it plays way way way way too quickly!!!

Loudness of the included speaker is very dependent on the environment you are listening in, and how much material is surrounding it.
For example with the speaker facing away from you and in a normal kitchen environment I could not hear it at all.
Also the volume depends on the type of sound. I haven't experimented but suspect that there are certain frequencies/sounds that work better than a standard mp3 music track.
I suspect that the sounds would need to be specifically processed to get the best out of it.

we'll be looking into espeak support and issues specifically at some point in the near future - this is a fairly complex environment and I suspect it outputs each syllable as a separate stream, so once we have improved the overall situation with clicks and pops it may automatically cure that too.
VU not working (with espeak) is almost certainly due to the specific user context the application uses. We'll look into it, but ultimately I think our plans to avoid these types of issues is to dissociate the hardware access from the caller initialising the audio stream.
... if you can trace back the user to add to the i2c group you may be able to resolve the issue yourself. Try:
cut -d: -f1 /etc/passwd
sudo adduser <espeakuser> i2c

(just see if there is a user obviously associated with espeak in the output form the first command)

hum, I have just installed espeak and it works for me, including VU on a pHAT BEAT, and  no clicks/pops
... I didn't notice any specific user added to my system by the espeak package so would presume that should work with Speaker pHAT too, but perhaps there is something i pivumeter itself that somehow trips only when communicating over I2C.

yes, just tried the speaker-phat and the VU meter works. Clicks at the start, but I don't think that can be avoided with the basic speaker included.

I just tried to re-implement the asound that was shipping before the wekend and indeed espeak is a total mess and the VU does not work either... try the most recent config by re-running the installer:
curl https://get.pimoroni.com/speakerphat | bash
please let us know if that resolves your issue (primarily with espeak, but any feedback on any other playback application welcome).

Ran latest installer script and espeak is as you said - pops at the start but not during.
I've settled on mplayer as terminal player now - it seems to work the best.


Remove 20-99 check in isPerson

As there exists Gervimenn that have valid IDs but the 7th and 8th number are lower than 20 it breaks island.is code base, and probably others that have started using Gervimenn's ID in their environments.

Meant to merge with my fork before creating a PR here.


Support building docs written in Perl's POD

It would be nice if it would be possible to publish documentation written in Perl's POD ("Plain Old Documentation") format. pod2html is probably the right command to base on for that. (The referenced documentation likely has been built with pod2html itself, too.)
That would help a lot of perl-based projects to use ReadTheDocs.
There is also a POD to Markdown converter in Perl so Mkdocs could be used as second step. But that would still require some additional support from ReadTheDocs.

We have a mostly working version of a Perl Sphinx domain, and are on the way to adding support for Perl autoapi docs. Though @agjohnson would know more.

So I started tackling this problem a few months ago and gave a talk at PDX.pm on it. There were two paths I explored.
The first path was using standard POD tool chain to output something that could be used by RTD, like @xtaran mentions above. The problem with this approach is that POD, and Markdown, are only really proxies to HTML output. In the end, this route is just recreating CPAN/MetaCPAN with our theme, which doesn't seem worth it, IMO.
The power of RTD comes from Sphinx and rST. My prototype includes a Sphinx domain for the parsing, display, and linking of Perl language constructs inside rST. rST replaces POD in my solution, providing a hybrid POD/rST which should be parseable going back to older versions of Perl. Though rST-ified POD introduces additional problems, like how to display on CPAN/MetaCPAN, rST provides a substantial amount of additional power to documentation authors.
 This feature, if implemented, would live inside our autoapi extension.
I'll create a ticket there with more insight into all of this and hopefully get some conversation going there.

ReadTheDocs being able to ship POD rendered as HTML would be far more than "CPAN/MetaCPAN can do". CPAN doesn't have any VCS triggers/hook as it haven't any VCS integration besides linking to externally hosted VCS repositories.
CPAN is only for stuff which has been released on CPAN. ReadTheDocs doesn't have such a restriction.
In general, from my point of view the primary advantage of ReadTheDocs compared to just using Github + CPAN is to get documentation rendered including a nice index with every push. CPAN, well, at least MetaCPAN already has such an index, but is by far less agile. You don't want to make a release just to fix a single typo. On the other hand, Github has some POD renderer and is agile, but lacks the generated index.
My project currently uses separate Markdown files for documentation. It's a commandline tool and no library (i.e. no Perl module), so there is no inline documentation and no API to document. I'd like to switch to POD to have less non-perl dependencies (i.e. getting rid of the mkdocs build dependency) to make the project more suitable for CPAN, but I'd like to keep the neat agile index and Github integration which ReadTheDocs offers. rST is definitely out of scope for me. It would only add disadvantages without adding any advantages for my (nearly) pure-perl project.
IMHO there won't be many Perl written projects which would drop inline POD for inline Markdown or even inline rST because POD is very central to Perl's documentation infrastructure. So from my point of view that is not worth implementing it.

I'd be curious to get more input on this from some more Perl folks.
As it stands, pod2html is a non-starter. Read the Docs doesn't aim to just host arbitrary HTML from documentation tools -- that can happen anywhere on the internet. In addition, most maintainers would just use development releases to attempt the workflow you are suggesting. I don't see adoption from the Perl community being very wide in this case -- either case really.
Our primary focus is on using Sphinx as an authoring tool, and unifying the experience around Sphinx. Because of that, if we build anything to support Perl, it will be something that adopts Sphinx. The only reason not to parse POD in this case, is that I don't believe there are any modules that support this in Python currently -- this is something the community would have to maintain, as we likely would not. If it existed, we'd happily use that as well.
Either way, this won't address this specific use case of trying to avoid using non-Perl tools for documentation. This requirement isn't one we're particularly interested in supporting.
Happy to talk more about implementation details on the linked ticket: rtfd/sphinx-autoapi#5
Closing this ticket here, as the implementation will be strictly separated from RTD.


"Wrong fb secret!" - How to configure the Facebook Connector correctly? - Python 3 only

Rasa Core version: rasa-core (0.8.0a4, /root/rasa_core) including pull request #160
Python version: Python 3.6.3 |Anaconda, Inc.
Operating system : Ubuntu 16.04.3
Issue:
I have a problem with connection the FB Messenger. I have included pull request #160 and also tried it with the old dependency pymessenger and with my workaround here  is supposed in Bug #153
I get the errormessage:
2018-01-08 12:13:06 WARNING  rasa_core.channels.facebook - Invalid fb verify token!
The webhook looks like it is correctly installed:

I connect to my bot via an nginx proxy server with an Let's encrypt cert installed.
In the credentials.yml I use the secret  from here. Is this correct?

What else can I try?

I am still facing the same issue in python 3.5.4 Anaconda.
Moreover I am not able to test it with python 2.7 as I am not able to install tensorflow in python 2.7
I am using ngrok to redirect page messages to localhost.
Using Endpoint similar to : https://436d4633.ngrok.io/app/webhook


ID translation for port-forward-access-application-cluster page

add ID translation for /docs/tasks/access-application-cluster/port-forward-access-application-cluster/
part of this issue: https://github.com/kubernetes/website/issues/20111
Note:
I add the _index.md file so that my page is in the right branch. But I didn't translate that as it's belong to another task.
/language id
/assign @kubernetes/sig-docs-id-reviews

/cc
/cc @phanama

@wahyuoi I have resolved all of the comments. Who will resolve the thread?

@adityaalifn thanks for your contribution! based on the logs, there's an error in building process
9:02:50 PM: ERROR 2020/04/15 14:02:50 [id] no Resource or Page matching "task-tutorial-prereqs.md*".

can you try to fix this first? most probably there's a missing page required by this page, you need to add that here as well. try to debug locally using hugo, it will be faster.

@adityaalifn or if the error is because of task-tutorial-prereqs.md, you can raise a separate PR as well and we can merge this first

holding this for now until the build is fixed
/hold

task-tutorial-prereqs.md is related with  #20261 and already merged.
so, please rebase from master to get this file.
it should resolve this issue @adityaalifn

@girikuncoro @wahyuoi  I have rebased this branch

Nice, :tada: :tada:
thank you @adityaalifn, feel free to pick other pages!
/unhold
/lgtm

/approve


The initialValues prop doesn't respect destroyOnUnmount

For an example component: (using React-Router)
export default reduxForm({
  form: 'answers',
  fields: [
    'background'
  ],
  initialValue: {
    background: []
  },
  destroyOnUnmount: false
})(BackgroundComponent);

When navigating from this page and back to it, the background field value is undefined.

Dupes #370. Working on it... I apologize.


Program 22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD failed: custom program error: 0x66

i'm trying to follow the example and trying to swap usdc to swap , however i always get the error.
logs: [
'Program 22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD invoke [1]',
'Program log: Custom program error: 0x66',
'Program 22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD consumed 6046 of 200000 compute units',
'Program 22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD failed: custom program error: 0x66'
]

I'd in general appreciate it if Serum Team shares insights how to map certain Custom Errors.


Artifacts not equipped to characters

Current Behavior
Characters with artifacts have 1~4 missing artifacts .
Expected Behavior
The scanner to correctly exports the data
Reproducing a Behavior
Unknown
Device OS
Windows 11
Genshin Impact Version
4.3
Inventory Kamera Version
1.3.12
Screen resolution, screen mode, and UI scale
1920x1080 and 1280x720
Additional notes and remarks
No response
Evidence
InventoryKamera.debug.log
InventoryKamera.log
Preflight Checklist

[X] I have checked for similar issues in the issue page, and I have not found any similar to mine.
[X] I am using the latest version of the scanner.
[X] I tried setting the scanning delay to maximum, and it still doesn't work.
[ ] I have attached the video recording to the bug report.
[ ] I have attached the error log to the bug report.
[X] I am available to later explains the issue.
[X] I have disabled all screen filtering software or plugins (i.e. HDR, Image Sharpening) while scanning.
[X] I use default in-game keybindings or have configured keybindings for the scanner.

might be related to  #463

user error


[core] Added null check for output buffer

Check output != nullptr before calling output->clear()

if we just barely return false may induce other following logic issue, right?

@Leslie-Fang , thanks a lot for the review. The function CompressInternal() returns false in most of the error cases, so I believe the caller should handle it the similar way that it handles other errors. Thoughts ?

Hi, is there anything from my side here ? Please advise. Thanks.

@gaurav1086 Can you please fix the build failures? Thanks!

@mihaimaruseac @gbaned , rebased with the latest master

@gaurav1086 Can you please fix the build failures? Thanks!

@gbaned fixed the build errors. Thank you.


Update google-api-services-bigquery to v2-rev20210518-1.31.0

Updates com.google.apis:google-api-services-bigquery from v2-rev20200719-1.30.10 to v2-rev20210518-1.31.0.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.google.apis", artifactId = "google-api-services-bigquery" } ]

labels: library-update

Superseded by #451.


Statblocks CSS and Layouts Release 1.2

The readme transfer is complete, and the Statblock documentation has been expanded. However, there are some lingering areas that I would like to finish up.
For the CSS.

[ ] Transcribing the Bootstrap and it's individual Explanations
[ ] Collect more FAST (Frequently Asked Snippets and Tips)

For the Layouts:

[ ] The different block explanations are helpful, but for the extra reach, I think a video or screenshots would be helpful.
[ ] I also need a page with the layout editor shown in question.
[ ] Under advanced topics, altering the layout in pure .JSON

Community Requests:
Any community requests? Please respond below.

Looking to be at the end of the month is when this will be completed by. :)


TypeScript

Types for react-alert-template-basic does not exist

For me worked creating a file react-alert-template-basic.d.ts and put declare module 'react-alert-template-basic'; in it.

I don't want to create file, I just wanna install this library and continue working

@Krausso
Download the above folder and create a libs directory and use it like below
import React from "react";
import AlertTemplate from "../libs/AlertTemplate";
import App from "../App";

const options = {
    timeout: 50000,
    position: positions.BOTTOM_CENTER
  };

const IndexPage: React.FC<{}> = (props) => {
    return (
        <Provider template={AlertTemplate} {...options}>
             <App/>
        </Provider>
     )
}

AlertTemplate.zip

No overload matches this call.   Overload 1 of 2, '(props: AlertProviderProps | Readonly<AlertProviderProps>): Provider', gave the following error.     Type '{ children: Element; position: string; timeout: number; offset: string; transition: string; containerStyle: { marginTop: number; zIndex: number; }; template: FC<{}>; }' is not assignable to type 'Readonly<AlertProviderProps>'.       Types of property 'position' are incompatible.         Type 'string' is not assignable to type 'AlertPosition | undefined'.   Overload 2 of 2, '(props: AlertProviderProps, context: any): Provider', gave the following error.     Type '{ children: Element; position: string; timeout: number; offset: string; transition: string; containerStyle: { marginTop: number; zIndex: number; }; template: FC<{}>; }' is not assignable to type 'Readonly<AlertProviderProps>'.       Types of property 'position' are incompatible.         Type 'string' is not assignable to type 'AlertPosition | undefined'.
Same error message for different attempts to handle the issue:

Importing the lib folder and use it like above
Creating ..d.ts and declaring module
Declaring any other things while trying to declare the custom AlertTemplate component properly.

Anyway, everything is working just fine, but how could I get rid of these errors?


Warn if istioctl version is different from that installed in the cluster

This is a duplicate of https://github.com/istio/istio/issues/23074 .  Please close this one and set the mileston and priority of that one.

Related: https://github.com/istio/istio/issues/18487